A2.3.4 · Data transmissions
Routing
By the end you can
Explain how routers use routing tables, and compare static routing with dynamic routing.
A packet crosses several routers on its way, and every one has to answer the same question: where do I send this next? The answer comes from the router's , a list of destinations with the next hop to use for each and usually a cost (a measure such as delay or number of hops). The router reads the destination IP address, finds the best matching entry, and passes the packet on. If nothing matches, it uses the default route (“send everything else to the provider”) or drops the packet. The question is how the tables get filled in.
Static routing#
With a network administrator types the routes in by hand: the destination network, the mask and the next hop. The table never changes unless a person changes it. That makes the network predictable, needs no extra processing or bandwidth for route-sharing, and avoids messages an attacker could fake. It suits small networks whose layout rarely changes. The weakness is that it cannot adapt: if a link fails, the router keeps sending packets down the dead path until someone notices and edits it, and in a big network editing every router by hand does not scale.
Dynamic routing#
With the routers talk to each other using a routing protocol (RIP is one example), telling their neighbours what they are connected to and what it costs. Each router uses the news to build the cheapest routes (the idea is the same as finding the shortest path on a map), and when something changes, such as a link going down, the news spreads and every router recalculates automatically. It copes with growth and failures with no manual work. The costs are more processing, memory and bandwidth for the chatter, a more complex set-up that needs skilled staff, a delay while all the routers agree on the new picture (), and the risk that the routing messages are attacked if they are not secured.
Static routing
Tables were typed in once and never change.
R1 → R2 → R3
Delivered to R3.
Dynamic routing
Routers share news of the break and rebuild their tables.
R1 → R2 → R3
Delivered to R3.
Numbers are link costs (think delay). The cheapest total wins.
| Destination | Next hop | Total cost |
|---|---|---|
| R2 | R2 | 2 |
| R3 | R2 | 4 |
| R4 | R4 | 3 |
| R5 | R4 | 6 |
This is what a dynamic router would hold now. A static router still holds the table from before the break.
A small office with one router and one fixed link to its provider that never changes.
A university network with hundreds of routers where links are added and fail often.
An administrator wants the route to be exactly what she typed, with no surprises.
The network must keep working when a cable is cut at night with nobody on duty.
0 of 4 matched
Check yourself
Routing
Quick questions, made fresh every time and marked here. Do a few until they feel easy.
Exam practice
Paper 1-style questions
4 questions · 14 marks
Write your answer as you would in the exam, then show the mark points and tick each one your answer made. These are our own questions in the style of the exam, not past-paper questions.
1.Describe what a routing table contains and how a router uses it.
[3]Describe: A detailed account: say what happens, step by step if it is a process.
2.Explain one advantage of static routing compared with dynamic routing.
[3]Explain: Give reasons: say what happens AND why, or how one thing causes another.
3.Describe how dynamic routing responds when a link in the network fails.
[4]Describe: A detailed account: say what happens, step by step if it is a process.
4.Compare static and dynamic routing in terms of configuration, adaptability, resource use and suitable network size.
[4]Compare: Similarities and differences, about both things, point by point.
In a nutshell
- A router forwards each packet by looking up its destination in a routing table: destination, next hop, cost.
- Static routing: an administrator enters the routes by hand. Predictable, light on resources and secure, but it cannot adapt and is tedious as the network grows.
- Dynamic routing: routers share information using routing protocols and rebuild their tables as the network changes, choosing the cheapest path.
- Dynamic routing copes with failures and scales well, but uses more resources, is more complex to run, and takes time to converge.
- Use static for small stable networks, dynamic for large or changing ones; many networks use both.
