ViewWiki

The world, a little closer

Networks and the internet.

A message to a server on the far side of the world arrives in a blink, even when cables break. How does it find its way?

Explore the scene Interactive article

01 / The experiment

Cut a cable. Still delivered.

Cut links one by one and watch the message find another way, then split it into packets.

Still of the Networks and the internet 3D scene, which explores: How does a message cross the internet, and what happens when a cable breaks?
Interactive scene

Loading the interactive version…

The explanation below is available while the scene loads.

Every router knows the length of each cable and sends traffic along the shortest route left. Speeds are slowed down hugely so the trip can be followed.The real internet has millions of routers run by thousands of separate networks, and packets usually cross it in a few hundredths of a second. Packets of one message normally share a route; here they are spread over several to show that each one finds its own way.

02 / Three shapes

One cut, three outcomes.

The same six devices wired three ways. In each, one cable (marked ×) has been cut.

One way through
×

Chain

Every message walks the whole line. Break any cable and the two halves can no longer talk.

Routes between two devices
1
One cable cut
Splits it in two
Found in
Old string-of-towns telegraph lines
One hub
×

Star

Short routes through a central hub. A cut strands one device; losing the hub strands them all.

Routes between two devices
1
One cable cut
Cuts off one device
Found in
A home Wi-Fi router and its devices
Many ways round
×

Mesh

Loops everywhere, so there is almost always another route. Routers send traffic around the break.

Routes between two devices
Several
One cable cut
Traffic detours
Found in
The internet’s core
The big idea

The internet survives broken cables because it is a mesh: routers always send traffic along the shortest route that is left, and messages travel as numbered packets that can be put back in order.

msg = 1 + 2 + … + n

A mesh, not a line

Your laptop is not wired to the server it talks to. Between them lies a network: devices called routers, joined by cables, radio links and optical fibre. A router’s whole job is to take what arrives on one cable and pass it out of another, a little closer to where it is going.

In the experiment a laptop on the left sends a message to a server on the right through ten routers. The cables lit in blue are the ones the message is using.

Finding the shortest route

Each router keeps a routing table: for every destination, which of its cables to send things down. Routers build these tables by telling one another which cables they have and how long each is, and passing on what they hear, until each has a map of the whole network. Out of all that gossip, each one works out the shortest route to everywhere, the way a map app finds the quickest drive. The method used here, Dijkstra’s algorithm, spreads out from the start, always extending the nearest unfinished route first, until it reaches the goal.

Watch the message hop. At each router it pauses: the router reads its destination address, looks it up, and sends it on. That is called store and forward.

Try it: raise Links cut to 1. A cable on the route snaps, and the next message goes around the break along a slightly longer route. Keep raising Links cut to see the detours grow.

Back to the experiment

Built to survive breaks

The early internet was designed so that no single failure could stop it. Because the routers form a mesh, with many loops, there is almost always another way round. When a link fails, the routers on either side notice, tell their neighbours, and within moments every table points around the gap.

But there are limits. In this mesh only four cables cross from the left half to the right. Cut all four and no route is left: the first router has nowhere to send the message, drops it, and sends back an error.

Packets

Under Split into packets, choose Packets. A long message is never sent in one piece. It is cut into packets, each a small chunk of data with a label saying where it is going, where it came from, and its place in the sequence.

Packets travel independently, so they can take different routes and arrive out of order. The receiving computer files each one by its number and puts the message back together, asking again for any packet that never turned up. The rules for this are TCP/IP: IP addresses and routes the packets; TCP numbers them, checks they all arrived and puts them in order.

Packets let millions of conversations share the same cables, taking turns at every router, and a lost packet costs only a small resend rather than the whole message.

What this model leaves out

The mesh here has twelve devices; the internet has billions, organised into separate networks that agree routes with each other using rules such as BGP. Real routers choose routes by cost and policy as well as distance, keep queues that fill up and overflow, and spread traffic over equal-cost paths. Packets of a single connection usually follow the same path unless something changes. A packet carries up to about 1,500 bytes, so a real message this short would fit in one; it is split into six here so the splitting can be seen. Signals in fibre travel at about two thirds of the speed of light, and everything is slowed down enormously to make the hops visible.

Reuse with credit to ViewWiki and a link to this page.

04 / Learn this in a course

Practise it, step by step.

This lesson teaches the topic with checked questions.

  1. Routing packets Computer science · Graphs and networks