Skip to content

Lesson 1 of 9 · 20m

How Internet Routing Really Works

Packets are forwarded hop by hop from local routing decisions; understanding longest-prefix match, control plane versus data plane, and default-free routing explains most production routing behavior.

The internet is not a map you route across once. It is a mesh of independently operated networks, each making only a local decision: given this destination IP, which next hop is best? Packets cross the world because thousands of those local decisions line up end to end. When they stop lining up, traffic loops, blackholes, or detours through places nobody intended.

The forwarding decision

A router looks up the destination address in its forwarding table and chooses the most specific matching route:

192.0.2.44 matches:
  0.0.0.0/0        default
  192.0.0.0/8      large allocation
  192.0.2.0/24     customer prefix      <-- selected

This is longest-prefix match. A /24 beats a /8; a /32 host route beats everything. Administrative distance and metrics decide which protocol may install a route, but longest-prefix match decides which installed route forwards a packet. New operators routinely confuse those two ideas.

Control plane versus data plane

The control plane learns and selects routes: BGP sessions, OSPF adjacency, static configuration, policy decisions. The data plane forwards packets using the result. A session can be healthy while forwarding is broken because a line card never got the route; conversely traffic may keep flowing briefly after control-plane convergence problems if stale forwarding entries still work.

BGP/OSPF/static -> RIB (routing information base)
                 -> best paths
                 -> FIB (forwarding information base)
                 -> hardware or kernel forwarding

A useful incident question is therefore: is the route missing from the RIB, selected but not installed in the FIB, or installed but unreachable because the next hop is dead?

Default-free and default-using networks

Enterprise edges commonly carry a default route toward an ISP. Transit and large content networks often carry the default-free zone (DFZ): every destination needs an explicit route. In a DFZ router there is no safe fallback when a prefix disappears — traffic is dropped as unreachable.

Static routes are sharp tools

A static route is simple, deterministic, and dangerous:

ip route 203.0.113.0/24 198.51.100.1

It does not know whether the far end is actually healthy unless you add tracking. Static blackhole routes are useful for sinkholing abuse or anchoring aggregates, but an accidental static route survives link failures, failover, and sometimes reboots because somebody wrote it into startup config years earlier.

Field notes

  • Longest-prefix match explains why an accidental /32 can override a perfectly good /24.
  • show ip route and show fib can disagree; on Linux compare ip route with ip -o fib or platform hardware diagnostics.
  • A traceroute shows the path packets took at that moment, not the routes every router currently knows.
  • Recursive next-hop resolution matters: a BGP next hop itself has to resolve through an IGP, static route, or connected subnet.
  • If symptoms change when traffic volumes change, suspect forwarding-plane capacity or ECMP hashing, not just route selection.

Was this lesson helpful?

Sign in to rate