BFD Session Up/Down Traps

BFD has two traps, one for notifying that the session moved to the UP state, and the other trap for notifying that the session moved to DOWN state. To reduce the number of traps sent to NMS, a single trap is generated to combine the status changes of multiple sessions if the sessions have contiguous session IDs and multiple sessions move to either the UP or DOWN state in the same window of time. However, status changes of different types (UP & DOWN), will not be mixed in single trap. The window of time to combine the traps can be configured using the CLI command configure snmp traps batch-delay bfd.

For example, if sessions with session IDs 1, 2, 3, 4, and 5 are moving to the UP state in the same window of time, then a single trap is sent with low range index 1 and high range index 5. As a second example, after all sessions moved to the UP state, session ID 2 goes DOWN and comes back UP before generating the first trap. In this case also, the first trap which is the UP trap, is set to include all sessions. Then, the second trap would be the DOWN trap for session ID 2, and finally the third trap would be the UP trap again for session ID 2. Thus, events are not missed or reordered.

NMS relates traps to sessions using only the session index which is provided in traps. It is necessary that the session index does not change until NMS retrieves session details via GET requests. To achieve this, the session will be retained for fifteen minutes after deletion is initiated by the BFD client (control protocol). During this period transmission and reception of BFD control packets will be stopped. If BFD protection is requested for the same destination again within this period, the same session index is reused. With this change, NMS can also have good history of the session to a particular destination.

Configuring SNMP Traps for BFD

To enable snmp traps for bfd:

enable snmp traps bfd {session-down | session-up}

To disable snmp traps for bfd:

disable snmp traps bfd {session-down | session-up}

To configure batch delay for sending the traps:

configure snmp traps batch-delay bfd {none | delay}

To display the configuration:

show snmp traps bfd

Note

Note

SNMP traps for BFD are disabled by default for both session-down and session-up.

Configuration Example

Click to expand in new window
BFD Configuration Example
../Graphics/BFD_configuration_example.png

Consider the network segment like above, wherein two routers R1 and R2 are connected via an L2 switch. Following is the list of commands to configure BFD protection for static routes.

Router R1:
  1. Create vlan and configure IP address.

    create vlan v1 tag 100

    configure vlan v1 add port 2 tagged

    configure vlan v1 ipaddress 10.0.0.1/24 2

  2. Create BFD session to the next-hop which is being monitored.

    enable iproute bfd 10.0.0.2 vr VR-Default

  3. Configure iproute add <destination network> <gateway> bfd