Engineer Atlas
OverviewLearnJourneysPacket LabDebuggerRoadmapPracticeInterviewCheat Sheet
OverviewLearnJourneysPacket LabDebuggerRoadmapPracticeInterviewCheat SheetCompareConnections
Computer Networking
  • How the Internet Works
  • Ethernet, MAC & the Link Layer
  • IP, IPv4, IPv6, Subnets, NAT & Ports
  • Routing
  • DNS
  • UDP
  • TCP
  • TLS & Certificates
  • HTTP/1.1, HTTP/2 & HTTP/3
  • WebSockets, SSE & Polling
  • Proxies, Load Balancers & CDNs
  • Firewalls & VPNs
  • Container & Kubernetes Networking
  • Network Performance
  • Network Debugging & Capstone
  • Packet Lab
OS + Networking
  • OS + Networking Together
Networking/Learn/Routing
Computer Networking

Routing

Routing tables, longest-prefix match, next hops, and how the internet is stitched together from autonomous systems with BGP.

The question this module answers · A router sees a destination IP and has three matching routes. Which wins, and why?
Routing: From a Destination IP to a Next Hop

Every host and every router answers the same question for every packet — "given this destination address, which interface and which neighbour?" — by looking the address up in a routing table and taking the most specific match.

The Routing Table and Longest-Prefix Match
▶ interactive

Given `10.0.0.0/8 → A`, `10.10.0.0/16 → B` and `0.0.0.0/0 → gateway`, the destination `10.10.42.7` goes to B because sixteen of its leading bits match that entry and only eight match the other — and this rule is what lets a router summarise the world into one entry and still carve out exceptions.

Internet Routing: Autonomous Systems and BGP
▶ interactive

The internet is tens of thousands of independently run networks that tell each other which prefixes they can reach and by what path, and choose among those paths by commercial policy rather than by distance — which is why your packets take the route they take and why the return path is usually different.

Engineer Atlas
GitHub·LinkedIn