A router supporting OSPF BFD strict-mode advertises this capability through its Hello packets as described in
Section 2. When a router supporting OSPF BFD strict-mode discovers a new neighbor router that also supports OSPF BFD strict-mode, it will establish a BFD session with that neighbor first before bringing up the OSPF adjacency as described further in this section.
This document updates the OSPF neighbor state machine as described in [
RFC 2328]. Specifically, the operations related to the Init state are modified as described below when OSPF BFD strict-mode is used:
-
Init (without OSPF BFD strict-mode):
-
In this state, a Hello packet has recently been received from the neighbor. However, bidirectional communication has not yet been established with the neighbor (i.e., the router itself did not appear in the neighbor's Hello packet). All neighbors in this state (or higher) are listed in the Hello packets sent from the associated interface.
-
Init (with OSPF BFD strict-mode):
-
In this state, a Hello packet has recently been received from the neighbor. However, bidirectional communication has not yet been established with the neighbor (i.e., the router itself did not appear in the neighbor's Hello packet). BFD session establishment with the neighbor is requested if it's not already completed (e.g., in the event of transition from 2-Way state). Neighbors in Init state or higher will be listed in Hello packets associated with the interface if they either have a corresponding BFD session established or have not advertised OSPF BFD strict-mode in the LLS Type 1 Extended Options and Flags advertised in the Hello packet.
When the neighbor state transitions to Down state, the removal of the BFD session associated with that neighbor is requested by OSPF; subsequent BFD session establishment is similarly requested by OSPF upon transitioning into Init state. This may result in BFD session deletion and creation, respectively, when OSPF is the only client interested in the BFD session with the neighbor address.
An implementation
MUST NOT wait for BFD session establishment in Init state unless OSPF BFD strict-mode is enabled by the operator on the interface and the specific neighbor indicates OSPF BFD strict-mode capability via the LLS Type 1 Extended Options and Flags advertised in the Hello packet. When BFD is enabled, but OSPF BFD strict-mode has not been signaled by both neighbors, an implementation
SHOULD start BFD session establishment only in 2-Way or greater state. This makes it possible for an OSPF router to support BFD operation in both strict-mode and normal mode across different interfaces or even across different neighbors on the same multi-access interface.
Once the OSPF state machine has moved beyond the Init state, any change in the B-bit advertised in subsequent Hello packets
MUST NOT result in any trigger in either the OSPF adjacency or the BFD session management (i.e., the B-bit is considered only when in Init state). Disabling BFD (or OSPF BFD strict-mode) on an OSPF interface would result in it not setting the B-bit in the LLS Type 1 Extended Options and Flags advertised in subsequent Hello packets. Disabling OSPF BFD strict-mode has no effect on BFD operations and would not result in the bringing down of any established BFD sessions. Disabling BFD would result in the BFD session being brought down due to AdminDown State (described in
Section 3.2 of
RFC 5882); hence, it would not bring down the OSPF adjacency.
When BFD is enabled on an interface over which we already have an existing OSPF adjacency, it would result in the router setting the B-bit in its subsequent Hello packets and the initiation of BFD session establishment to the neighbor. If the adjacency is already up (i.e., in its terminal state of Full or 2-Way with routers that are not designated routers on a multi-access interface) with a neighbor that also supports OSPF BFD strict-mode, then an implementation
SHOULD NOT bring this adjacency down into the Init state to avoid disruption to routing operations and instead use the OSPF BFD strict-mode wait only after a transition to Init state. However, if the adjacency is not up, then an implementation
MAY bring such an adjacency down so it can use the OSPF BFD strict-mode for its adjacency establishment.
Support for multiple AFs in OSPFv3 [
RFC 5838] requires the use of an IPv6 link-local address as the source address for Hello packets, even when forming adjacencies for IPv4 AF instances. In most deployments of OSPFv3 IPv4 AFs, it is required that BFD is used to monitor and verify IPv4 data plane connectivity between the routers on the link; hence, the BFD session is set up using IPv4 neighbor addresses. The IPv4 neighbor address on the interface is learned only later in the adjacency formation process when the neighbor's Link-LSA (Link State Advertisement) is received. This results in the setup of the BFD IPv4 session either after the adjacency is established or later in the adjacency formation sequence.
To operate in OSPF BFD strict-mode, it is necessary for an OSPF router to learn its neighbor's IPv4 link address during the Init state of adjacency formation (ideally, when it receives the first Hello). The use of the Local Interface IPv4 Address TLV (as defined in
Section 3) in the LLS block advertised in OSPFv3 Hello packets for IPv4 AF instances makes this possible. Implementations that support OSPF BFD strict-mode for OSPFv3 IPv4 AF instances
MUST include the Local Interface IPv4 Address TLV in the LLS block advertised in their Hello packets whenever the B-bit is also set in the LLS Type 1 Extended Options and Flags. A receiver
MUST ignore the B-bit (i.e., not operate in strict-mode for BFD) when the Local Interface IPv4 Address TLV is not present in OSPFv3 Hello messages for OSPFv3 IPv4 AF instances.
An implementation needs to handle scenarios where both graceful restart (GR) and the OSPF BFD strict-mode are deployed together. The graceful restart aspects related to process restart scenarios discussed in
Section 3.3 of
RFC 5882 also apply with OSPF BFD strict-mode. Additionally, since the OSPF adjacency formation is delayed until the BFD session establishment in OSPF BFD strict-mode, the resultant delay in adjacency formation may affect or break the GR-based recovery. In such cases, it is
RECOMMENDED that the GR timers are set such that they provide sufficient time to allow for normal BFD session establishment delays.