Bidirectional Forwarding Detection (BFD) detects faults on links between neighboring routers. It is often associated with routing protocols so that these protocols can be notified of link faults in order to quickly trigger route convergence. Traffic loss caused by topology changes is therefore minimized. After RIP is associated with BFD, BFD rapidly detects link faults and reports the faults to RIP. This ensures that RIP quickly responds to network topology changes.
Table 1 lists link fault detection mechanisms and the convergence speed before and after BFD for RIP is enabled.
BFD is classified into static BFD and dynamic BFD:
Static BFD
BFD session setup is manually triggered, and BFD session parameters (including local and remote discriminators) are manually configured using commands. A device can implement static BFD even if the peer device does not support BFD.
Dynamic BFD
BFD session setup is dynamically triggered by routing protocols. The local discriminator is dynamically allocated and the remote discriminator is obtained from the BFD packet of the peer device. Therefore, dynamic BFD is more flexible than static BFD. After establishing a new neighbor relationship, a routing protocol notifies BFD of the neighbor parameters (including destination and source addresses), and then BFD sets up a session based on the received parameters. When a link fault occurs, the routing protocol quickly detects that the BFD session is Down and switches traffic to the backup link, minimizing data loss.
After BFD for RIP is enabled, BFD reports link faults to RIP within several milliseconds. A RIP router then deletes the route of the faulty link from its RIP routing table and starts the backup link.
Figure 1 illustrates the BFD for RIP process.
RouterA, RouterB, RouterC, and RouterD establish RIP neighbor relationships. RouterB is the next hop of the route from RouterA to RouterD. A dynamic BFD session is set up between RouterA and RouterB, and dynamic BFD for RIP is enabled on RouterA and RouterB.
When the link between RouterA and RouterB becomes faulty, BFD quickly detects the fault and notifies RouterA of the fault. RouterA deletes the route with RouterB as the next hop from its RIP routing table, and then recalculates a route. The new route passes through RouterC and RouterB to reach RouterD.
When the link between RouterA and RouterB recovers, a dynamic BFD session is set up again between RouterA and RouterB. RouterA receives routing information from RouterB and selects the optimal route for packet forwarding.