Routes you write by hand — static, default and backup
Static routes give predictable behaviour with zero overhead. This chapter covers next-hop and exit-interface forms, default routes, host routes (/32), floating statics, and the IPv6 versions of all of them.
What you'll learn
- Configure a next-hop static route and an exit-interface static route.
- Configure a default route and an IPv6 default route.
- Configure a host route (/32 or /128).
- Use a floating static route as a backup to a dynamic protocol.
Next-hop vs exit-interface forms
Next-hop form is preferred on multi-access links because the router will ARP for the next-hop's MAC. Exit-interface form is fine on point-to-point links where there's only one possible neighbor.
R1(config)# ip route 10.2.0.0 255.255.255.0 10.99.0.2
R1(config)# ip route 10.3.0.0 255.255.255.0 Serial0/0/1
R1(config)# ip route 0.0.0.0 0.0.0.0 10.99.0.2 ! default route
R1(config)# ipv6 route ::/0 2001:db8::1 ! IPv6 defaultDefault routes — the lifeline to 'everything else'
0.0.0.0/0 is the catch-all default route. Any destination not matched by a more specific route falls through to it. Every router connecting to an upstream provider needs one.
Endpoints don't need a routing table — they only need one default gateway, which is the router IP that owns their subnet.
14 more sections in this chapter, plus a 4-question quiz and a hands-on lab.
Modules 2–8 are part of the Course & Lab Pass and All-Access Max — start with a free account
You can see the title, summary, learning objectives and the opening sections. The rest of this chapter, like all of modules 2–8, comes with the Course & Lab Pass and All-Access Max. A free account opens Module 1: How Networks Work end-to-end and saves your labs — start there, no card required.
- Read every chapter in Module 1 — How Networks Work
- Save labs of up to 5 devices
- Save up to 3 topologies
- See the full course syllabus + chapter titles
Free account · no card required · compare plans any time
Build it step by step
- VLSM for two sitesCarve one /24 into a /26, a /27 and a /30 sized to what each site needs, then route between them with masks that match the plan. · 5 steps · ~18 min · 4 devices
- A stub branch and one default routeSend everything a branch can't place to HQ with a single default route, and see why HQ still needs a specific route back for every branch network. · 7 steps · ~22 min · 4 devices
- Traceroute across three routersChain three routers with static routes and follow a packet hop by hop — then watch a trace stop at a missing route and circle in a routing loop. · 7 steps · ~25 min · 5 devices
- Your first IPv6 pingAddress two routers and their LANs with IPv6, ping across the link between them, then route between the sites with a static route and a ::/0 default. · 7 steps · ~22 min · 4 devices
- Static routes across a WANJoin three sites with point-to-point WAN links and route between them by hand, one line at a time. · 9 steps · ~22 min · 6 devices
- Two routers that learn the networkJoin two sites over a WAN link, then let OSPF fill in the routing tables that you would otherwise type by hand. · 7 steps · ~20 min · 5 devices
- A backup link that waits its turnRun two sites over a fast primary link, park a floating static route on a slow standby line, then pull the primary and watch the backup carry the traffic. · 8 steps · ~20 min · 4 devices
- Share one default route with OSPFGive the edge router a default route to the provider, then let OSPF hand it to the rest of the campus instead of typing it on every router. · 7 steps · ~22 min · 5 devices
- NAT to the internetHide two private office LANs behind the single public address your provider gave you. · 8 steps · ~20 min · 5 devices
- Fix it: Fix the NAT that translates nothingThe shop's desks and tills cannot reach the internet, yet the router itself can. Find why nothing leaves translated. · 7 steps · ~18 min · 5 devices
- Fix it: Fix the branch that fails four waysA branch depot has lost head office, and two of its hosts have faults of their own. Find all four, one layer at a time. · 10 steps · ~30 min · 7 devices