Bring up OSPF and watch it converge
Task
Run OSPF between two routers, watch the adjacency form and the routes appear, then break a link and time how long it takes to reroute. Dynamic routing is much easier to reason about once you have seen a neighbour relationship come up and go down.
Steps
- Enable the OSPF daemon in
/etc/frr/daemonsby settingospfd=yes, thensudo systemctl restart frr. - On router 1, enter the FRR shell with
sudo vtyshand configure OSPF:router ospf,network 192.168.10.0/24 area 0,network 192.168.99.0/30 area 0. - Do the same on router 2 with its own subnets. Both must be in area 0 and both must include the transit link, or no adjacency forms.
- Watch the neighbour relationship:
show ip ospf neighbor. It progresses through Init, 2-Way, ExStart, Exchange, Loading and Full. Only Full means routes are being exchanged. - Confirm each router has learned the other's subnet with
show ip route ospf, then test end to end from Host A to Host B. Finally, shut the transit link on one side and time how long untilshow ip ospf neighbordrops it.
Verify
sudo vtysh -c "show ip ospf neighbor"
sudo vtysh -c "show ip route ospf"
ping -c 2 192.168.20.10
sudo vtysh -c "show ip ospf interface eth1" | grep -E "Timer|Area|Cost"
The neighbour must reach state Full. The route table must show the remote subnet with an O code and administrative distance 110. And the interface output shows the hello and dead timers — 10 and 40 seconds by default, which is exactly the delay you measured when you shut the link.
Notes
Those two timers are the answer to "why did it take 40 seconds to reroute". OSPF declares a neighbour down after the dead interval, not immediately, unless the interface itself goes down and the router notices at layer 1.
The state machine is examinable. Full is the only state that means working; a neighbour stuck in ExStart almost always means an MTU mismatch between the two interfaces, and one stuck in 2-Way on a broadcast segment is normal for non-designated routers.
Compare the administrative distance you saw — 110 — with the static route from the previous lesson at 1. A static route always wins, which is how a leftover static route quietly overrides a healthy OSPF network.