Computer Networks
Routing and the network layer
How a router chooses a path, and how routing protocols learn it.
In two minutes
One idea to a line
A router forwards a packet by the longest prefix match in its table: the most specific matching route wins.
Distance vector (RIP) shares its whole table with neighbours and can suffer from count-to-infinity. Link state (OSPF) floods the topology and each router runs Dijkstra.
The TTL field falls by 1 at every router and the packet is dropped at 0, which stops loops. Traceroute uses it.
ICMP carries error and diagnostic messages, such as the replies that ping uses.
BGP chooses routes between autonomous systems by policy, not only by the shortest path.
Slips people make here
Interviewers know them too
Choosing the first matching route instead of the longest prefix.
Saying OSPF is distance vector.
Thinking a router changes the destination IP address of a packet it forwards (NAT aside).
Your practice here
Not started
10 written questions, and 2 kinds of calculation that change every time
No answers yet