LAN B192.168.2.0/24spare 10.0.99.0/24LAN A 192.168.1.0/24link 10.0.12.0/24link 10.0.23.0/24LAN C 192.168.3.0/24
Yellow card: a route the administrator typedEnvelope: the ping (blue) and its reply (pink)Lanes: networks; the spare cable sits behindRed cross: no route, the packet is droppedEach router starts with connected routes for its own ports. An administrator types static routes (a destination network plus a next hop) until a ping from Laptop A reaches Laptop C and the reply finds its way back. Router 1 also gets a default route to the ISP. When the cable between router 2 and router 3 breaks, nothing adapts until floating static routes (administrative distance 200) send traffic over the spare cable. LANs and router links use RFC 1918 private addresses; the ISP link (203.0.113.0/24) and the website (198.51.100.7) use RFC 5737 documentation addresses.

Routes by hand

  1. Three routers stand in a line, each with its own LAN. When a router port gets an address, the router adds a connected route by itself: “this network is plugged in right here.” That is all any router knows so far.

The way back

Defaults and failures

Commands and tables

;; step 1/12 · connected · local
;; at Router 1, Router 2, Router 3
Router 1:
  C  192.168.1.0/24  connected        AD 0   
  C  10.0.12.0/24    connected        AD 0   
  C  203.0.113.0/24  connected        AD 0   
Router 2:
  C  192.168.2.0/24  connected        AD 0   
  C  10.0.12.0/24    connected        AD 0   
  C  10.0.23.0/24    connected        AD 0   
  C  10.0.99.0/24    connected        AD 0   
Router 3:
  C  192.168.3.0/24  connected        AD 0   
  C  10.0.23.0/24    connected        AD 0   
  C  10.0.99.0/24    connected        AD 0   
C = connected (AD 0), added automatically for every working port
AD = administrative distance, a trust score (lower wins), explained in step 10

For clarity the figure only adds the routes needed between LAN A and LAN C. LAN B would need routes on router 1 and router 3 too, written the same way. A floating static route only takes over when the router itself sees the main route fail, for example when its own port goes down. A failure further away stays invisible to it.