< Home

BFD Session Management

This section describes the BFD session management, including session establishment mode and session establishment process.

Session Establishment Mode

BFD distinguishes sessions according to the My Discriminator and Your Discriminator of the control packets. According to the differences of My Discriminator and Your Discriminator in their establishment modes, FW supports the following types of BFD sessions.
  • Static BFD session with a manually designated discriminator

    You need to set BFD session parameters manually, including the configuration of My Discriminator and Your Discriminator, and deliver a BFD session establishment request manually.

    Manual configuration errors may occur in this mode, for example, the incorrect configuration of My Discriminator and Your Discriminator results in the failure of the BFD session. Meanwhile, the establishment and deletion of the BFD session is manually triggered, and lacks flexibility.

    The interworking between BFD and PBR, or DHCP requires the static BFD session with manually designated discriminators. In the application of interworking between BFD and static routes, you can choose the static BFD session with manually designated discriminators or the static BFD session with negotiated discriminators according to the network status.

  • Static BFD session with an automatically negotiated discriminator

    You need to manually establish the BFD session, but do not need to configure My Discriminator and Your Discriminator. Both discriminators are negotiated through the BFD session.

    In the application of interworking between BFD and static routes, the BFD session with an automatically negotiated discriminator is required in the scenario where the device at the peer end does not support static BFD session, and the dynamic BFD session is adopted; meanwhile, the local device is routable to the peer end, and ensures the application of interworking between BFD and static routes.

  • Dynamic BFD session triggered by protocols

    Dynamic BFD session triggered by protocols refers to the BFD session dynamically triggered by routing protocols.

    In dynamic establishment mode, the system processes My Discriminator and Your Discriminator in the following ways:
    • Dynamically assigning My Discriminator

      When an application program triggers the dynamic establishment of BFD sessions, the system assigns a value from the dynamic session discriminators as the My Discriminator of the BFD session. The system sends a BFD control packet with the value of Your Discriminator as 0 (the value of My Discriminator is the assigned value, and the state is Down) to the peer system to negotiate a session.

      The system distinguishes static BFD session and dynamic BFD session according to the classification of discriminators. The value of My Discriminator for static BFD session ranges from 1 to 8191, and the value of My Discriminator for dynamic BFD session ranges from 8192 to 16,383.

    • Self-learning Your Discriminator

      Upon receiving the BFD control packet with the value of Your Discriminator as 0, the system on one end of the BFD session determines whether the packet matches the local BFD session according to the quadruplet (source IP address, destination IP address, outbound interface, and VPN index). If yes, the system learns the value of My Discriminator in the received packet to obtain the value of Your Discriminator.

Session Establishment Process

BFD establishes a session by using three-way handshake. When sending the BFD control packet, the sender fills the Sta field with the current session status on the local end. The receiver transfers the BFD state machine and establishes the session according to the Sta field of the received BFD control packet and the current session status on the local end. Taking the establishment of BFD session as an example, Figure 1 shows the transference of the state machine.

Figure 1 BFD session establishment

  1. After receiving the message from the upper-layer protocol, BFDs of Router_A and Router_B send BFD control packets with the status as Down. In static BFD session with manually designated discriminator, the value of Your Discriminator in the packet is manually designated. In static BFD session with negotiated discriminator, the value of Your Discriminator in the packet is negotiated by both parties. In the dynamic establishment of BFD sessions, the value of Your Discriminator is 0.
  2. After receiving the BFD control packet with the status as Down, Router_B switches the session status to Init, and sends a BFD control packet with the status as Init. The change of BFD sessions of Router_A is the same as Router_B.
  3. After receiving the BFD control packet with the status as Init, Router_B switches the session status to Up, and sends a BFD control packet with the status as Up. The change of BFD sessions of Router_A is the same as Router_B.
  4. When the statuses of Router_A and Router_B are both Up, the session is successfully established and starts to detect the link.

After the status switches from Down to Init, a timeout timer is enabled on Router_A and Router_B respectively. If the routers do not receive the BFD control packet whose status is Init or Up within the timeout, the BFD session status in the local system automatically switches to Down.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic