BFD Session States

The following are states through which a BFD session can move:
  • Admin down
  • Down
  • Init
  • Up

The following are states through which a BFD session normally moves:

  • Down
  • Init
  • Up

Each system communicates its session state in the State field in the BFD control packet. This remotely received session state, in combination with the local session state, updates the state machine for that session.

Once BFD session information is passed to the micro-controller, the micro-controller can establish the BFD session and maintain the state machines on its own, tracking the session for any state changes and notifying BFD when necessary.

BFD State Change Notifications

When RX packets are missed for failure detect multiplier times, the BFD state machine detects session failure and BFD registers a callback. BFD then does a session lookup using the session ID, and marks the session state as down. All user applications associated with this BFD session are notified about the state change through an IPC message. If the holdover timer is configured for an application or protocol, it waits for the configured interval to check if the BFD session comes back up. If the BFD session comes back up before the configured time interval per application times out, the session state is updated and the holdover timer is stopped. If the BFD session is not back up before the configured interval times out, each respective application is notified about the session failure. Refer to Holdpver Timer for more information.

BFD Session Removal

When an application or protocol notifies BFD to remove a session that it is no longer using, the session is searched based on the parameters provided by the application. The application or protocol is then removed from the BFD session. If no other application or protocol is using the BFD session, the remote peer is notified about the admin down state and the admin down state is transmitted to the peer using the control packet. The BFD session is then removed from the micro-controller. The remote peer receives the control packet and brings the session down, notifying the application or protocol.