← Module 03 · Layer 3: Network

Static Routing

The simplest possible way to tell a router how to reach a network: just tell it, no protocol, no negotiation, no automatic adaptation either.

What a static route actually is

A static route is an administrator manually entering a destination network and how to reach it, either a next-hop IP (Internet Protocol) address or an outgoing interface. That's the entire mechanism: no protocol runs in the background, no negotiation with neighboring routers, nothing gets learned automatically.

10.0.1.0/24 R1 R2 10.0.2.0/24 ip route 10.0.2.0/24 → R2 ip route 10.0.1.0/24 → R1
Two entries, typed by hand, one on each router, and this is only two routers. A full mesh of ten would need dozens.

Where it's the right tool

Where it falls apart

Static routes don't adapt. If the configured next-hop goes down, the route stays in the table (unless the router also loses reachability to the next-hop itself) and traffic keeps getting sent into a dead end until a human notices and fixes it. And every network has to be entered by hand, on every router that needs to reach it. A topology with dozens of routers becomes an enormous, error-prone amount of manual configuration. That's exactly the problem the dynamic routing protocols later in this module exist to solve.

The floating static route from the previous topic, worked through concretely. R1 has two paths out to the internet: a primary link through ISP-A, and a backup link through ISP-B that should only ever carry traffic if the primary is actually down.

Two static default routes point at the same destination, 0.0.0.0/0, but with different administrative distances:

As long as R1 can reach 203.0.113.1, the AD-1 route wins outright (see Administrative Distance & Metrics), and the AD-5 route never gets installed in the routing table at all, even though it's sitting there fully configured. The moment the primary link actually goes down, R1 can no longer reach 203.0.113.1, so that route disappears from the table on its own. With nothing left to outrank it, the AD-5 route becomes the best match and gets installed automatically: no script, no human, no dynamic protocol involved, just two static routes and the same administrative distance comparison from the previous topic.

TWO STATIC ROUTES TO 0.0.0.0/0 R1 ISP-A ISP-B AD 1 (primary) AD 5 (floating backup) PRIMARY UP · using the AD 1 route PRIMARY DOWN · AD 5 backup takes over
Both routes are configured all the time. Only one is ever actually installed: the AD-1 route while the primary link is up, the AD-5 route automatically the moment it isn't.
WHY THIS ONLY WORKS IF THE ROUTER CAN TELL THE LINK IS DOWN

A floating static route only fails over when R1 actually loses its route to the next-hop, typically because the outgoing interface itself goes down. If the physical link stays up but the ISP beyond it silently stops forwarding traffic, R1 has no way to know: the AD-1 route stays installed and "working" as far as the routing table is concerned, and the backup never kicks in. Real deployments usually pair this with a reachability check like IP SLA tracking to catch that case too.