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
| Node | Image | CPUs / memory | Addresses | Role |
|---|---|---|---|---|
h1 | debian-13 | 1 / 1GiB | mgmt 10.116.0.11; lan 192.168.1.10/24 | Site 1 host |
r1 | debian-13 | 1 / 1GiB | mgmt 10.116.0.12; lan 192.168.1.1/24; to-r2 172.16.16.1/30; to-r3 172.16.16.5/30 | Site 1 router |
r2 | debian-13 | 1 / 1GiB | mgmt 10.116.0.13; lan 192.168.2.1/24; to-r1 172.16.16.2/30; to-r3 172.16.16.10/30 | Site 2 router |
r3 | debian-13 | 1 / 1GiB | mgmt 10.116.0.14; to-r1 172.16.16.6/30; to-r2 172.16.16.9/30 | Backup path |
h2 | debian-13 | 1 / 1GiB | mgmt 10.116.0.15; lan 192.168.2.10/24 | Site 2 host |
Before you start
bash
vz image pull disk debian-13Run it
bash
cd examples/16-ospf-failover
vz validate
vz up
vz node ls
ssh lab@10.116.0.11 # password: labFirst 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 pathNotes
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