A packet has destination IP — which next hop should router pick?
Per Wikipedia: “Routing chooses next hop using tables built from protocols that exchange reachability and compute shortest path.”
Routing is GPS for packets — each intersection consults map and forwards toward destination.
- Router learns routes via protocol
- Builds forwarding table
- Looks up destination on arrival
- Forwards via best next hop
- Updates on topology change
- Decentralized — each router decides
- Convergence time after failure
- Longest prefix match for IP
- May cause loops transiently
ip route add 10.0.0.0/8 via 192.168.1.1- Built from: Store-and-Forward — routing decides where to forward
- Related: Packet Switching — routing enables switching
- Related: Datagram Network — datagrams need routing
- Related: Network Topology — topology informs routes
- Static routes stale after link fail
- Loop without TTL — packet circles forever