Networking Kid / Addresses, Names And Routes

What A Router Is Actually Deciding

Strip away the mystique and the decision is small, repeated and local.

A piece of routing equipment holds a table. The table lists directions it knows about and, for each one, which of its own connections is the way there. When a piece of data arrives, the equipment reads the destination, finds the most specific matching entry in the table, and sends the data out of the corresponding connection. Then it does exactly the same for the next piece, and the next, millions of times over. That is the whole of the decision. There is no negotiation, no plan for the rest of the journey, no preference about the contents and no memory of what came before.

The interesting work is not the decision but the table. Routing equipment continually talks to its neighbours, telling them what it can reach and learning what they can reach, so the tables update as links appear, disappear, recover or become congested. When a connection fails, that news spreads outward from neighbour to neighbour and the tables adjust, and messages begin taking a different way around without any human intervention or any central authority approving the change. Self healing at the level of the whole internet is really just a great many tables being quietly rewritten in the background.

Two practical points follow. First, a change in path can noticeably alter your experience without anything at either end having changed, so intermittent slowness with no local cause is entirely plausible rather than imaginary. Second, the traffic going out and the traffic coming back need not follow the same route at all, because each direction is decided independently by different equipment consulting different tables. A one way problem is a real and common category of fault, and it can be genuinely bewildering until you know that this asymmetry is completely normal.