Nexnet AcademyV1 · alpha
← CourseRouting~5 min read

Routing: how packets cross networks

Routers connect subnets

A router has an interface in each network it joins. When a packet arrives, the router looks up the destination in its route table and forwards it out the right interface or to the next-hop router. A router only forwards to networks it knows about.

Connected, static, and default routes

A router automatically knows its directly-connected subnets. For anything else it needs a route: a static route ('to reach 10.0.3.0/24, send to 10.0.2.2') or a default route (0.0.0.0/0 - 'everything else goes this way', typically toward the internet).

Longest-prefix match

When several routes match a destination, the most specific one (longest prefix) wins. A /24 route beats the /0 default. If nothing matches, the packet is dropped - 'no route to host.'

Concept cards

Route table

The list of networks a router knows and how to reach each.

A road map: 'for that town, take this exit.'

Static route

A manually configured path to a remote network via a next-hop router.

Written directions to a place your GPS doesn't know.

Default route

0.0.0.0/0 - the catch-all for any destination without a more specific route.

'When in doubt, head for the highway on-ramp.'

Now try it
M5-01Router Between LANs
Start the mission →