11-High Availability Configuration Guide

HomeSupportSwitchesS7500E SeriesConfigure & DeployConfiguration GuidesH3C S7500E Switch Series Configuration Guides-R757X-GL-6W10011-High Availability Configuration Guide
10-BFD configuration
Title Size Download
10-BFD configuration 67.23 KB

Configuring BFD

Overview

Bidirectional forwarding detection (BFD) provides a general-purpose, standard, medium- and protocol-independent fast failure detection mechanism. It can detect and monitor the connectivity of links in IP to detect communication failures quickly so that measures can be taken to ensure service continuity and enhance network availability.

BFD can uniformly and quickly detect the failures of the bidirectional forwarding paths between two devices for upper-layer protocols such as routing protocols. The hello mechanism used by upper-layer protocols needs seconds to detect a link failure, while BFD can provide detection measured in milliseconds.

BFD can be used for single-hop and multihop detections.

·     Single-hop detection—Detects the IP connectivity between two directly connected systems.

·     Multihop detection—Detects any of the paths between two systems. These paths have multiple hops, and might overlap.

BFD session establishment and termination

Establishing a BFD session

BFD does not provide any neighbor discovery mechanisms. The upper protocol notifies BFD of the routers to which it needs to establish sessions.

A BFD session is established as follows:

1.     A protocol sends Hello messages to discover neighbors and establish neighborships.

2.     After establishing a neighborship, the protocol notifies BFD of the neighbor information, including destination and source addresses.

3.     BFD uses the information to establish a BFD session.

Terminating a BFD session

When BFD detects a link failure, it performs the following tasks:

1.     BFD clears the neighbor session.

2.     BFD notifies the protocol of the failure.

3.     The protocol terminates the neighborship on the link.

4.     If a backup link is available, the protocol will use it for communication.

BFD session modes and operating modes

BFD sessions use the following types of packets:

·     Echo packets—Encapsulated into UDP packets with port number 3785.

·     Control packets—Encapsulated into UDP packets with port number 3784 for single-hop detection or port number 4784 for multihop detection.

Echo packet mode

The local end of the link sends echo packets to establish BFD sessions and monitor link status. The peer end does not establish BFD sessions and only forwards the packets back to the originating end.

In echo packet mode, BFD supports only single-hop detection and the BFD session is independent of the operating mode.

Control packet mode

Both ends of the link exchange BFD control packets to monitor link status.

Before a BFD session is established, BFD has two operating modes—active and passive.

·     Active mode—BFD actively sends BFD control packets regardless of whether any BFD control packet is received from the peer.

·     Passive mode—BFD does not send control packets until a BFD control packet is received from the peer.

At least one end must operate in active mode for a BFD session to be established.

After a BFD session is established, the two ends can operate in the following BFD operating modes:

·     Asynchronous mode—The device periodically sends BFD control packets. The device considers that the session is down if it does not receive any BFD control packets within a specific interval.

·     Demand mode—The device periodically sends BFD control packets. If the peer end is operating in Asynchronous mode (default), the peer end stops sending BFD control packets. If the peer end is operating in Demand mode, both ends stop sending BFD control packets. When the connectivity to another system needs to be verified explicitly, a system sends several BFD control packets with the Poll (P) bit set at the negotiated transmit interval. If no response is received within the detection interval, the session is considered down. If the connectivity is found to be up, no more BFD control packets are sent until the next command is issued.

In addition, both ends of the link can exchange BFD control packets to establish and maintain BFD sessions, and one end of the link sends echo packets to monitor link status.

Supported features

·     Static routing. For more information, see Layer 3—IP Routing Configuration Guide.

·     IPv6 static routing. For more information, see Layer 3—IP Routing Configuration Guide.

·     RIP. For more information, see Layer 3—IP Routing Configuration Guide.

·     OSPF. For more information, see Layer 3—IP Routing Configuration Guide.

·     OSPFv3. For more information, see Layer 3—IP Routing Configuration Guide.

·     IS-IS. For more information, see Layer 3—IP Routing Configuration Guide.

·     IPv6 IS-IS. For more information, see Layer 3—IP Routing Configuration Guide.

·     BGP. For more information, see Layer 3—IP Routing Configuration Guide.

·     IPv6 BGP. For more information, see Layer 3—IP Routing Configuration Guide.

·     PIM. For more information, see IP Multicast Configuration Guide.

·     IPv6 PIM. For more information, see IP Multicast Configuration Guide.

·     Track. For more information, see "Configuring Track."

·     IP fast reroute (FRR). IP FRR is supported by BGP, OSPF, RIP, IS-IS and static routing. For more information, see Layer 3—IP Routing Configuration Guide.

·     Ethernet link aggregation. For more information, see Layer 2—LAN Switching Configuration Guide.

Protocols and standards

·     RFC 5880, Bidirectional Forwarding Detection (BFD)

·     RFC 5881, Bidirectional Forwarding Detection (BFD) for IPv4 and IPv6 (Single Hop)

·     RFC 5882, Generic Application of Bidirectional Forwarding Detection (BFD)

·     RFC 5883, Bidirectional Forwarding Detection (BFD) for Multihop Paths

·     RFC 5885, Bidirectional Forwarding Detection (BFD) for the Pseudowire Virtual Circuit Connectivity Verification (VCCV)

·     RFC 7130, Bidirectional Forwarding Detection (BFD) on Link Aggregation Group (LAG) Interfaces

Configuration restrictions and guidelines

Layer 3 aggregate interfaces/subinterfaces do not support BFD.  

Configuring BFD basic functions

Before configuring BFD basic functions, configure the network layer addresses of the interfaces so that adjacent nodes are reachable to each other at the network layer.

After a BFD session is established, the two ends negotiate BFD parameters, including minimum sending interval, minimum receiving interval, initialization mode, and packet authentication, by exchanging negotiation packets. They use the negotiated parameters without affecting the session status.

By default, the device runs BFD version 1 and is compatible with BFD version 0. You cannot change the BFD version to 0 through commands. When the peer device runs BFD version 0, the local device automatically switches to BFD version 0.

Configuring echo packet mode

CAUTION

CAUTION:

To avoid echo packet loss, do not configure the echo packet mode on a device with uRPF enabled. For more information about uRPF, see Security Configuration Guide.

 

To configure echo packet mode:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Configure the source IP address of echo packets.

·     Configure the source IP address of echo packets:
bfd echo-source-ip ip-address

·     Configure the source IPv6 address of echo packets:
bfd echo-source-ipv6 ipv6-address

By default, no source IP address is configured for echo packets.

The source IP address cannot be on the same network segment as any local interface's IP address. Otherwise, a large number of ICMP redirect packets might be sent from the peer, resulting in link congestion.

The source IPv6 address of echo packets can only be a global unicast address.

3.     Enter interface view.

interface interface-type interface-number

N/A

4.     (Optional.) Set the minimum interval for receiving BFD echo packets.

bfd min-echo-receive-interval interval

On an S7503E-M switch, the default setting is 400 milliseconds for the LSQM1CTGS24QSFD0 MPU and is 1000 milliseconds for other MPUs.

On a switch other than S7503E-M, the default setting is 400 milliseconds.

5.     (Optional.) Set the single-hop detection time multiplier.

bfd detect-multiplier value

The default setting is 5.

 

Configuring control packet mode

To configure control packet mode for single-hop detection:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Specify the mode for establishing a BFD session.

bfd session init-mode { active | passive }

By default, active is specified.

BFD version 0 does not support this command. The configuration does not take effect.

3.     Enter interface view.

interface interface-type interface-number

N/A

4.     Configure the authentication mode for single-hop control packets.

bfd authentication-mode { m-md5 | m-sha1 | md5 | sha1 | simple } key-id { cipher cipher-string | plain plain-string }

By default, single-hop BFD packets are not authenticated.

BFD version 0 does not support this command. The configuration does not take effect.

5.     Enable the Demand BFD session mode.

bfd demand enable

By default, the BFD session is in Asynchronous mode.

BFD version 0 does not support this command. The configuration does not take effect.

6.     Enable the echo packet mode.

bfd echo [ receive | send ] enable

By default, the echo packet mode is disabled.

BFD version 0 does not support this command. The configuration does not take effect.

Configure this command for BFD sessions in which control packets are sent. When you enable the echo packet mode for such a session in up state, BFD periodically sends echo packets to detect link connectivity and decrease control packet receive rate.

7.     Set the minimum interval for transmitting single-hop BFD control packets.

bfd min-transmit-interval interval

On an S7503E-M switch, the default setting is 400 milliseconds for the LSQM1CTGS24QSFD0 MPU and is 1000 milliseconds for other MPUs.

On a switch other than S7503E-M, the default setting is 400 milliseconds.

8.     Set the minimum interval for receiving single-hop BFD control packets.

bfd min-receive-interval interval

On an S7503E-M switch, the default setting is 400 milliseconds for the LSQM1CTGS24QSFD0 MPU and is 1000 milliseconds for other MPUs.

On a switch other than S7503E-M, the default setting is 400 milliseconds.

9.     Set the single-hop detection time multiplier.

bfd detect-multiplier value

The default setting is 5.

10.     (Optional.) Create a BFD session for detecting the local interface state.

bfd detect-interface source-ip ip-address [ discriminator local local-value remote remote-value ]

By default, no BFD session is created for detecting the local interface state.

This command implements fast collaboration between interface state and BFD session state. When BFD detects a link fault, it sets the link layer protocol state to DOWN(BFD). This behavior helps applications relying on the link layer protocol state achieve fast convergence.

 

To configure control packet mode for multihop detection:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Specify the mode for establishing a BFD session.

bfd session init-mode { active | passive }

By default, active is specified.

BFD version 0 does not support this command. The configuration does not take effect.

3.     Configure the authentication mode for multihop BFD control packets.

bfd multi-hop authentication-mode { m-md5 | m-sha1 | md5 | sha1 | simple } key-id { cipher cipher-string | plain plain-string }

By default, no authentication is performed.

BFD version 0 does not support this command. The configuration does not take effect.

4.     Configure the destination port number for multihop BFD control packets.

bfd multi-hop destination-port port-number

The default setting is 4784.

5.     Set the multihop detection time multiplier.

bfd multi-hop detect-multiplier value

The default setting is 5.

6.     Set the minimum interval for receiving multihop BFD control packets.

bfd multi-hop min-receive-interval interval

On an S7503E-M switch, the default setting is 400 milliseconds for the LSQM1CTGS24QSFD0 MPU and is 1000 milliseconds for other MPUs.

On a switch other than S7503E-M, the default setting is 400 milliseconds.

7.     Set the minimum interval for transmitting multihop BFD control packets.

bfd multi-hop min-transmit-interval interval

On an S7503E-M switch, the default setting is 400 milliseconds for the LSQM1CTGS24QSFD0 MPU and is 1000 milliseconds for other MPUs.

On a switch other than S7503E-M, the default setting is 400 milliseconds.

 

Configuring BFD session flapping suppression

About BFD session flapping suppression

When BFD detects a link failure, it tears down the BFD session and notifies the upper-layer protocol of the failure. When the upper-layer protocol re-establishes a neighbor relationship, the BFD session comes up again. BFD session flaps occur when a link fails and recovers repeatedly, which consumes significant system resources and causes network instability.

This feature allows you to suppress BFD session flapping by using the initial-interval, secondary-interval, and maximum-interval arguments.

·     A BFD session is suppressed within the specified interval. The suppression time does not exceed the maximum-interval.

·     After a BFD session goes down for the second time, it cannot be re-established within the initial-interval.

·     After a BFD session goes down for the third time, it cannot be re-established within the secondary-interval.

·     After a BFD session goes down for the fourth time and at any later time, the following rules apply:

¡     If secondary-interval × 2n-3 is smaller than or equal to the maximum-interval, the BFD session cannot be re-established within the secondary-interval × 2n-3.

¡     If secondary-interval × 2n-3 is greater than the maximum-interval, the BFD session cannot be re-established within the maximum-interval.

The letter n, starting from 4, is the number of times the BFD session flaps.

Procedure

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Configure BFD session flapping suppression.

bfd dampening [ maximum maximum-interval initial initial-interval secondary secondary-interval ]

By default, BFD sessions are not suppressed.

The values for the initial-interval and secondary-interval arguments cannot be greater than the value for the maximum-interval argument.

 

Enabling SNMP notifications for BFD

To report critical BFD events to an NMS, enable SNMP notifications for BFD. For BFD event notifications to be sent correctly, you must also configure SNMP as described in Network Management and Monitoring Configuration Guide.

To enable SNMP notifications for BFD:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Enable SNMP notifications for BFD.

snmp-agent trap enable bfd

By default, SNMP notifications are enabled for BFD.

 

Displaying and maintaining BFD

Execute the display command in any view and the reset command in user view.

 

Task

Command

Display BFD session information.

display bfd session [ discriminator value | verbose ]

Clear BFD session statistics.

reset bfd session statistics

 

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become a Partner
  • Partner Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网