NetOps Toolkit

Cisco IOS

Static Route Generator

Build Cisco IPv4/IPv6 static, default, floating, and Null0 routes with show commands and troubleshooting

What is a Static Route?

A static route is a manually configured route that tells the router exactly how to reach a destination network via a specified next-hop IP or exit interface. Unlike dynamic routing protocols (OSPF, EIGRP, BGP), static routes do not adapt automatically when the network changes.

  • Predictable — traffic always follows the path you define.
  • Lightweight — zero routing protocol overhead.
  • Secure — no routing updates to spoof or hijack.
  • Manual — must be updated by hand when topology changes.

Static Route Types

TypeCommand FormatUse Case
Standardip route <net> <mask> <next-hop or intf>Route to a specific network via next-hop IP or exit interface
Default Routeip route 0.0.0.0 0.0.0.0 <next-hop>Gateway of last resort — matches all traffic not matched by a more specific route
Floating Staticip route <net> <mask> <next-hop> <AD>Backup route with higher Administrative Distance; only used if primary route fails
Summary Staticip route <supernet> <mask> <next-hop>One route covering a block of contiguous networks to reduce routing table size
Null0 (Black Hole)ip route <net> <mask> Null0Discard traffic matching the route; prevents routing loops and blocks unwanted traffic
IPv6 Staticipv6 route <prefix/len> <next-hop>Same as IPv4 but for IPv6 address space

Administrative Distance (AD)

AD is a trustworthiness score for route sources. Lower AD wins. A floating static route uses a higher AD than the primary dynamic protocol so it only becomes active when the preferred route disappears.

Route SourceDefault AD
Connected0
Static Route1
eBGP20
EIGRP (internal)90
OSPF110
IS-IS115
RIP120
EIGRP (external)170
iBGP200
Unreachable / Floating255

Next-Hop vs. Exit Interface

MethodExampleNotes
Next-hop IPip route 10.0.0.0 255.0.0.0 192.168.1.1Most common. Router performs recursive lookup to find exit interface.
Exit Interface onlyip route 10.0.0.0 255.0.0.0 GigabitEthernet0/1Avoid on multi-access (Ethernet) — causes ARP for every destination. OK on P2P serial.
Both (Recommended)ip route 10.0.0.0 255.0.0.0 Gi0/1 192.168.1.1No recursion + ARP for only the next-hop IP. Best practice for Ethernet.
Best Practice: On multi-access (Ethernet) interfaces, always specify both the exit interface and next-hop IP to avoid proxy-ARP issues and recursive lookup overhead.
Caution: Static routes require manual updates when network topology changes. Use dynamic routing protocols for larger environments and static routes only at the edge or for specific policy needs.