Skip to content

16 OSPF failover ​

Two sites with a direct link and a backup path through a third router. Cut the cable and count the lost pings.

What you practice ​

  • OSPF hello and dead timers (1s / 3s here) and how fast failover is
  • Passive interfaces for LANs
  • Measuring an outage with a running ping

Topology ​

NodeImageCPUs / memoryAddressesRole
h1debian-131 / 1GiBmgmt 10.116.0.11; lan 192.168.1.10/24Site 1 host
r1debian-131 / 1GiBmgmt 10.116.0.12; lan 192.168.1.1/24; to-r2 172.16.16.1/30; to-r3 172.16.16.5/30Site 1 router
r2debian-131 / 1GiBmgmt 10.116.0.13; lan 192.168.2.1/24; to-r1 172.16.16.2/30; to-r3 172.16.16.10/30Site 2 router
r3debian-131 / 1GiBmgmt 10.116.0.14; to-r1 172.16.16.6/30; to-r2 172.16.16.9/30Backup path
h2debian-131 / 1GiBmgmt 10.116.0.15; lan 192.168.2.10/24Site 2 host

Before you start ​

bash
vz image pull disk debian-13

Run it ​

bash
cd examples/16-ospf-failover
vz validate
vz up
vz node ls
ssh lab@10.116.0.11        # password: lab

First boot installs packages; give it a minute or two after vz up returns.

Try it ​

In one terminal:

bash
ssh lab@10.116.0.11 'ping -D 192.168.2.10'

In another:

bash
vz link down r1-r2     # a few pings are lost, then traffic goes through r3
ssh lab@10.116.0.11 'traceroute -n 192.168.2.10'
vz link up r1-r2       # back to the direct path

Notes ​

Every node also has a mgmt NIC on a NAT switch: out-of-band access from the Mac and package downloads. The exercise traffic stays on the links.

Clean up ​

bash
vz down
vz destroy --yes   # deletes the overlays and state of this lab