Skip to content

Static Routing

Last updated:

A static route is you telling the router the answer. No protocol overhead, no convergence surprises — and no reaction when the path dies, unless you plan for it.

bash
# Cisco IOS
ip route 10.20.0.0 255.255.0.0 192.168.1.2

# Linux
ip route add 10.20.0.0/16 via 192.168.1.2

# Default route (the gateway of last resort)
ip route 0.0.0.0 0.0.0.0 203.0.113.1

When statics are the right tool

  • Stub networks — one way out means nothing to compute.
  • Default routes toward an ISP — you rarely need their full table.
  • Deterministic control — security zones or lab setups where you want zero route churn.

Floating static routes

A static route with a worse AD than the primary source acts as a standby:

bash
ip route 10.20.0.0 255.255.0.0 192.168.2.2 115

With OSPF (AD 110) supplying the same prefix, this route stays out of the table — until OSPF loses it, and the floating static (115) steps in.