Skip to content

hop 18 of 32 · 5 min

The protocols that actually run

Three protocols carry most of the internet's routing, and the split between them is about scope.

Inside an organisation

RIP, distance vector, metric is hop count, maximum 15 hops. Simple, historically important, and unsuitable for anything sizeable because hop count ignores link speed: a route over three gigabit links loses to one over a single slow link.

OSPF, link state, metric is based on bandwidth. This is what most enterprises run. It scales by dividing the network into areas that connect through a backbone, so a change inside one area does not force every router everywhere to recompute.

Between organisations

BGP, path vector, and the protocol the internet is built on.

Each autonomous system advertises which networks it can reach and the full path of systems to get there.

code
"to reach 203.0.113.0/24, the path is AS64500, AS64501, AS64502"

Carrying the whole path solves loop detection completely: a router seeing its own number in a path discards the route, with no counting involved.

BGP chooses on policy rather than length. A provider prefers a route through a customer who pays them over a shorter one through a peer who does not. Money is a routing metric, and this is why internet paths are frequently not geographically sensible.

RIPOSPFBGP
Typedistance vectorlink statepath vector
Scopesmall internalinternalbetween systems
Metrichopsbandwidthpolicy
Convergenceslowfastslow, deliberately

BGP is built on trust, and that is a problem

A system announcing a network it does not own is generally believed.

In 2008 Pakistan Telecom announced a YouTube prefix while trying to block it domestically, and took YouTube offline globally for about two hours. Similar incidents have redirected traffic through unexpected countries, sometimes accidentally and sometimes not.

The defences, RPKI to cryptographically validate who owns a prefix and route filtering at each provider, are being deployed and are not universal.

Why convergence is deliberately slow

BGP damps flapping routes, holding back a route that keeps changing. A flapping link that announced and withdrew every few seconds would force recomputation across the entire internet.

So stability is chosen over speed, which is the opposite of the trade inside an organisation, and is correct at that scale.