Card 10/ 10
Recap: Routing Packets Between Networks
The longest matching prefix chooses the next hop, and TTL is how a path is seen.
Routing moves a packet one hop at a time, each router deciding on its own from its table.
- A routing table lists ranges, a next hop and an interface for each. The default route, 0.0.0.0/0, catches everything else.
- Longest prefix match: of all rows that contain the destination, the longest prefix wins. Row order does not matter.
- The TTL drops by one at each router. traceroute exploits it to make each router reply in turn; ping asks whether a host answers at all.
- OSPF finds the shortest path inside one organisation; BGP chooses between organisations by policy.
- Anycast announces one address from many sites, and routing sends each user to the nearest.
- A cloud route table is a routing table, with the same rule.
- A ping reply proves layer 3 reachability, not that a port is open or a service is running.
When One or more specific routes contain the destination
, chooseThe route with the longest prefix.
When Only the default route contains it
, chooseThe default route's next hop.
Otherwise No route and no default; the packet is dropped and the sender is told the destination is unreachable.
← → move through sections and cards