Let’s again step back another decade and take the Internet as an example. For most human beings, even the ones with a background in computer science, the way networks interconnect all over the ‘net is not so obvious to grasp. We are told uncountable times how links can fail, and that won’t shut the Internet down, because traffic is routed through different links. You can imagine this at a small scale, e.g. your home network. Imagine you have two ADSL connections at home: if one fails, you simply reprogram your home router to use the other connection instead. Thanks to automatic protocols like DHCP that will assign your home’s computers new IP addresses, if a link fails, the other router can assign you new addresses, and you can continue your work without a problem. Granted, if you happened to be connected to SL during an ADSL failure, you know that you’ll have to relog now — since you’ve changed operators. But it’s a minor nuisance.
At a larger scale, it’s obvious that you cannot shut down millions or billions of computers when a link fails. Instead, you have to devise an automatic mechanism to keep them interconnected in case a link fails. And that has to happen “instantly” — ideally, without loss of connection. Or, put in another way: if you origin and destination are known, and you have a connection between both, you shouldn’t be able to notice any difference if your packets take one route or another. In fact, Internet’s protocols (TCP/IP and UDP/IP) have been designed that way: only the origin and destination matter, not the path between them.
Still, there is a practical need to address the issue of links failing. If your ISP’s main upstream connection fails, how does your computer at home know where to send the packets? Worse than that: how does your computer at home knows the full path to a computer in, say, Japan?
In the very, very early days the answer was a simple one: give each computer a list of all possible networks and a “map” to where they ought to connect in order to deliver a message. That “list” would be updated frequently, specially when a link goes down or a new one goes up. That works well for a few hundred nodes, or possibly even a few thousands. But when we’re talking about a billion devices, that’s simply impossible: no single device can hold the entire Internet topology involving a billion other devices, that pop up into existence every day, many of which are mobile, or switch networks frequently (like your own laptop, when you carry it out of home into the office and vice-versa).
The solution was ingenious, and although there are several routing protocols available, the one that interconnects the major carriers is Border Gateway Protocol. The concept is simple: two routers that agree to exchange information (i.e. two networks joining together) exchange routing information about each other’s networks. That is to say, they tell each other about what networks they are able to connect to.