ViewWiki

Lesson 3 of 4

Routing packets.

About 25 minutes · 6 practice questions

The internet as a graph of routers: the shortest route, detours when a cable is cut, a cut that splits the network, and packets that spread over several routes and arrive out of order.

Step 1 of 6 · The shortest route

Step 1 of 6

The shortest route

The internet is a huge graph: the nodes are computers and routers, and the edges are cables, optical fibres and radio links. When you send a message to a server, it does not travel there directly; it passes from router to router, and each router sends it to a neighbour nearer the destination.

Here every edge has a length, and the shortest route is the one whose lengths add up to the least, not necessarily the one with the fewest edges. It is found with Dijkstra’s algorithm: start from the source, and at each step settle the nearest node not settled yet. The route glowing on the board is the result.

To the question

Step 2 of 6

A cut cable

Cables get cut, routers fail, and a good network keeps working. The message goes out again and again, and now we will cut a cable on its route. Predict.

To the question

Step 3 of 6

Cutting the server off

Each cut in the Scene hits a cable on the current shortest route. How many cuts will it take before there is no way at all?

To the question

Step 4 of 6

A cut

The server is cut off, but most cables are whole. Look at the cut cables, and at what they separated.

To the question

Step 5 of 6

Packets

Long messages are not sent in one piece. They are split into small packets, and each packet has a header with the destination address and a sequence number. A packet damaged on the way is sent again on its own, without resending the whole message. Predict, and then Look inside will split the message.

To the question

Step 6 of 6

Putting it together

Packets that travelled different ways arrive at different times. The server collects them and puts the message back together.

To the question

Interactive scene

Loading the interactive version…

Each step sets up the Scene for you, and a control marked “fixed” stays put for that step.

To the experiment

Practice · Calculate

The message travels from the laptop to the server by the shortest route, the one that glows. Through how many routers does it pass?

To the experiment

Practice · Predict, then look

We will cut the middle cable of the route the message now takes. What will happen to the next message?

To the experiment

Practice · Reach the target

Raise Links cut until the server is completely cut off from the laptop, and press Check.

To the experiment

Practice · Choose

After four cuts, 18 of the 22 links are left, and yet the server is cut off. Why?

To the experiment

Practice · Predict, then look

The message is split into packets, six numbered packets, sent one after another. Will they all take the same route?

To the experiment

Practice · Choose

The packets reached the server in a different order from the one they were sent in. How does the server put the message together?