Learning path

Full curriculum

Full curriculum

Unit content

IP routing

A packet can cross many networks before reaching its destination. Routing is the process of selecting the next hop that moves an IP packet toward its destination address.

Routing tables

A router maintains a table that associates destination network prefixes with forwarding actions.

Conceptually:

10.0.0.0/8      → interface A
192.0.2.0/24    → router B
default         → router C

When several entries match a destination, the most specific matching prefix is normally preferred.

Hop-by-hop forwarding

Each router only needs to choose the next hop. The packet does not ordinarily contain a complete predetermined list of every router it must traverse.

The next router repeats the same process until the packet reaches the destination network or can no longer be forwarded.

Default routes

A default route handles destinations for which no more specific entry is known. End hosts commonly send nonlocal traffic to a default gateway.

Routes can change

Routers can learn routes through configuration or routing protocols. Network failures and policy changes can therefore alter the path taken by later packets.

Routing provides connectivity across networks, but it does not itself guarantee delivery, ordering or application-level success.