Routing Exchange (22): BFD

Refer to Huawei product documentation

1. Introduction to BFD

BFD is a technology that unifies the entire network, quickly detects and monitors the two-way forwarding connectivity of links or IP routes in the network, and provides services for upper-layer applications.

  1. After a BFD session is established, BFD packets are sent periodically and quickly. If the peer BFD packet is not received within the detection time, the bidirectional forwarding path is considered to be faulty and the upper-layer application is notified to perform corresponding processing.
  2. BFD itself does not have a neighbor discovery mechanism, and relies on upper-layer applications to notify neighbor information to establish a session.
  3. Physical interface status, Layer 2 link status, network layer address reachability, transport layer connection status, application layer protocol running status can all be sensed by BFD

2. Basic Principles of BFD

1. BFD session establishment method

There are two types of BFD session methods: static establishment of BFD sessions and dynamic establishment of BFD sessions.
1) Static establishment of BFD sessions.
Manually configure BFD session parameters through command lines, including configuring local and remote identifiers, and then manually issue BFD session establishment requests
2) Dynamically establish a BFD session. The
application creates a BFD session. The system allocates the local identifier of the BFD session, and sends a BFD control message with a remote identifier of 0 to the peer to negotiate the session. When one end of the BFD session receives a BFD control packet with a remote identifier of 0, it determines whether the packet matches the local BFD session. If it matches, it learns the local identifier in the received BFD packet as the corresponding Remote identifier

2. BFD detection mechanism

Both ends of the BFD session periodically send BFD control packets. If one party does not receive the BFD control packets within a predetermined period of time, it is considered that the path has failed. The BFD control packets are UDP packets and the port number is 3784

3. Linkage function

The linkage function is composed of three parts: monitoring module, track and application module.
1) The monitoring module is responsible for monitoring the link status, network performance, etc., and notifying the track module of the detection results.
2) After the track module receives the monitoring results of the monitoring module, it changes the status of the track item in time and notifies the application module
3) The application module performs corresponding processing according to the status of the track item

Three, BFD basic configuration

1. Linkage between BFD and static routing

// Enable bfd
bfd globally
// Configure bfd session
bfd 1 bind peer-ip 10.1.12.2 source-ip 10.1.12.1
discriminator local 1
discriminator remote 2
commit
// Static route association BFD
ip route-static 0.0.0.0 0.0.0.0 10.1 .12.2 track bfd-session 1
ip route-static 0.0.0.0 0.0.0.0 10.1.13.3 preference 100


// Enable bfd
bfd globally
// Configure bfd session
bfd 1 bind peer-ip 10.1.12.1 source-ip 10.1.12.2
discriminator local 2
discriminator remote 1
commit

2. BFD and OSPF linkage

// enable bfd
bfd globally // enable bfd
under ospf process
bfd all-interface enable

3. Linkage between BFD and VRRP

// Enable bfd
bfd globally
// Configure bfd session
bfd 1 bind peer-ip 10.1.12.2 source-ip 10.1.12.1
discriminator local 1
discriminator remote 2
commit
// VRRP associated BFD
vrrp vrid 1 track bfd-session 1 reduced 30

Guess you like

Origin blog.51cto.com/12631595/2543900
bfd