Unlike dynamic routing protocols, static routes do not have a detection mechanism. When a fault occurs on the network, the administrator needs to handle it. To assist the administrator, Bidirectional Forwarding Detection (BFD) for static routes can be introduced into the network to bind a static route to a BFD session. Then the BFD session can detect the status of the link where the static route resides.
If a BFD session associated with a static route detects a link failure when the BFD session is Down, the BFD session reports the link failure to the system. The system then deletes the static route from the IP routing table.
If a BFD session associated with a static route detects that a faulty link recovers when the BFD session is Up, the BFD session reports the fault recovery to the system. The system then adds the static route to the IP routing table again.
By default, a static route can still be selected even though the BFD session associated with it is AdminDown (triggered by the shutdown command run either locally or remotely). If a device is restarted, the BFD session needs to be re-negotiated. In this case, whether the static route associated with the BFD session can be selected as the optimal route is subject to the re-negotiated BFD session status.
For a non-iterated static route, the configured outbound interface and next-hop address provide the information about the directly connected next hop. In this case, the outbound interface bound to the BFD session is the outbound interface of the static route, and the peer address is the next-hop address of the static route.
For an iterated static route, only the next-hop address is configured. Therefore, the directly connected next-hop and outbound interface need to be iterated. In this case, the peer address of the BFD session is the original next-hop address of the static route, and the outbound interface is not specified. Generally, the original next hop to be iterated is an indirect next hop. Therefore, multi-hop detection is performed on the static routes that support route iteration.
If the next hop of a route is not directly reachable, the route cannot be used for packet forwarding. Based on information about the current next hop of this route, the system will calculate an actual outbound interface and an actual next hop. This process is called route iteration. In the display ip routing-table command output, if the Flags value of a route is displayed R, the route is an iterated route. Otherwise, the route is not an iterated route.