Static vs Dynamic Routing

Once a network has more than two routers, you have a choice: configure routes manually (static) or run a protocol that builds routing tables automatically (dynamic). Most real-world networks use both.

Static routing

An administrator manually configures routes on each router. The routes don’t change unless someone edits them.

# Linux
sudo ip route add 10.10.0.0/16 via 192.168.1.254

# Cisco IOS
ip route 10.10.0.0 255.255.0.0 192.168.1.254

When static is the right choice

  • Small networks (a few routers, few subnets)
  • Stub networks (single uplink, no choice of paths)
  • Default routes pointing to your ISP
  • Override behavior — force specific traffic over a specific path
  • Lab environments, home networks

Pros

  • Simple, predictable, no protocol overhead
  • No CPU/memory cost on routers
  • Easy to reason about — what you wrote is what you get
  • No security exposure from route advertisements

Cons

  • Doesn’t adapt — if a link fails, traffic blackholes until manually fixed
  • Doesn’t scale — 100 routers × 100 routes each = 10,000 lines of config
  • Easy to make typos that cause outages
  • Requires touching every router when topology changes

Dynamic routing

Routers run a protocol that exchanges routing information with neighbors. The protocol computes the best paths and updates routing tables automatically. When a link goes down, the protocol detects it and reroutes within seconds.

The two main families

Interior Gateway Protocols (IGPs)

Run inside one organization. Examples:

  • OSPF — link-state, fast convergence, dominant in enterprise
  • IS-IS — like OSPF, common at large ISPs and internet backbones
  • EIGRP — Cisco proprietary (mostly), hybrid distance-vector + link-state
  • RIP — old distance-vector, only for very small or legacy networks

Exterior Gateway Protocols (EGPs)

Run BETWEEN organizations. Only one matters today:

  • BGP — what the entire internet runs on. Each ISP and large enterprise has an Autonomous System (AS) and uses BGP to peer with others.

When dynamic is the right choice

  • Networks with multiple paths to the same destination
  • Networks that need to survive link failures automatically
  • Anything spanning multiple sites or data centers
  • ISPs, cloud providers, large enterprises

Pros

  • Adapts to failures within seconds
  • Scales to thousands of routers
  • One config change propagates through the network
  • Multi-path load balancing automatically

Cons

  • Protocol complexity — OSPF areas, BGP route maps, etc. take time to learn
  • Convergence delays — even dynamic protocols take seconds to react
  • Misconfiguration can cause spreading outages (BGP especially)
  • Routing loops are possible if not configured carefully

Distance-vector vs link-state

Two algorithm families behind dynamic routing:

Distance-vector (RIP, BGP)

“Tell my neighbors what I know.” Each router only knows about its neighbors and what they tell it. Slow to converge, simple to implement.

Link-state (OSPF, IS-IS)

“Flood my neighbor info to everyone, then everyone computes the topology themselves.” Each router builds a complete map of the network. Faster convergence, more CPU.

Real-world: most networks combine both

Typical setup:

  • Default route on every device → static, points to local gateway
  • Internal routes within a site → OSPF
  • Routes between sites/data centers → BGP
  • Override routes for specific traffic → static, more specific than dynamic learned routes

Cloud routing

In AWS/GCP/Azure VPCs, you don’t run routing protocols. The cloud provider does it for you. You configure “route tables” — which look static but are managed by the cloud’s underlying infrastructure.

What to learn next

BGP — the protocol that holds the internet together. The only EGP that matters. Up next.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *