- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
08-BFD commands | 149.80 KB |
bfd multi-hop authentication-mode
bfd multi-hop destination-port
bfd multi-hop detect-multiplier
bfd multi-hop min-receive-interval
bfd multi-hop min-transmit-interval
BFD commands
bfd authentication-mode
Use bfd authentication-mode to configure the BFD authentication mode for single-hop BFD control packets.
Use undo bfd authentication-mode to restore the default.
Syntax
bfd authentication-mode { m-md5 | m-sha1 | md5 | sha1 | simple } key-id { cipher | plain } string
undo bfd authentication-mode
Default
Single-hop BFD control packets are not authenticated.
Views
Interface view
BFD template view
Static BFD session view
Predefined user roles
network-admin
Parameters
m-md5: Specifies the Meticulous MD5 algorithm.
m-sha1: Specifies the Meticulous SHA1 algorithm.
md5: Specifies the MD5 algorithm.
sha1: Specifies the SHA1 algorithm.
simple: Specifies the simple authentication mode.
key-id: Sets the authentication key ID in the range of 1 to 255.
cipher: Specifies a key in encrypted form.
plain: Specifies a key in plaintext form. For security purposes, the key specified in plaintext form will be stored in encrypted form.
string: Specifies the key. Its plaintext form is a case-sensitive string of 1 to 16 characters. Its encrypted form is a case-sensitive string of 33 to 53 characters.
Usage guidelines
Use this command to enhance BFD session security.
BFD version 0 does not support this command. The configuration does not take effect.
Examples
# Configure GigabitEthernet 3/1/1 to perform simple authentication for single-hop BFD control packets, setting the authentication key ID to 1 and plaintext key to 123456.
<Sysname> system-view
[Sysname] interface gigabitethernet 3/1/1
[Sysname-GigabitEthernet3/1/1] bfd authentication-mode simple 1 plain 123456
bfd dampening
Use bfd dampening to configure BFD session flapping suppression.
Use undo bfd dampening to disable BFD session flapping suppression.
Syntax
bfd dampening [ maximum maximum-interval initial initial-interval secondary secondary-interval ]
undo bfd dampening
Default
BFD sessions are not suppressed.
Views
System view
Predefined user roles
network-admin
Parameters
maximum-interval: Specifies the maximum time a BFD session is suppressed, in the range of 1 to 3600 seconds. The default is 20 seconds.
initial-interval: Specifies the amount of time a BFD session is suppressed for the first time. The value range for the initial-interval argument is 1 to 3600 seconds. The default is 6 seconds.
secondary-interval: Specifies the amount of time a BFD session is suppressed for the second time. The value range for the secondary-interval argument is 1 to 3600 seconds. The default is 10 seconds.
Usage guidelines
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 command 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.
Examples
# Enable BFD session flapping suppression, and set the maximum-interval, initial-interval, and secondary-interval to 12 seconds, 4 seconds, and 8 seconds, respectively.
<Sysname> system-view
[Sysname] bfd dampening maximum 12 initial 4 secondary 8
bfd demand enable
Use bfd demand enable to enable the Demand BFD session mode.
Use undo bfd demand enable to restore the default.
Syntax
bfd demand enable
undo bfd demand enable
Default
The BFD session is in Asynchronous mode.
Views
Interface view
Predefined user roles
network-admin
Usage guidelines
In 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. As a best practice, configure the bfd echo enable command together with this command to detect connectivity by sending echo packets. If the device does not receive any echo packets from the peer end, it considers the session down.
In 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.
BFD version 0 does not support this command. The configuration does not take effect.
Examples
# Enable the Demand BFD session mode on GigabitEthernet 3/1/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 3/1/1
[Sysname-GigabitEthernet3/1/1] bfd demand enable
Related commands
bfd echo enable
bfd detect-interface
Use bfd detect-interface source-ip to associate the interface state with BFD.
Use undo bfd detect-interface to remove the association between the interface state and BFD.
Syntax
bfd detect-interface source-ip ip-address [ discriminator local local-value remote remote-value ]
undo bfd detect-interface
Default
The interface state is not associated with BFD.
Views
Interface view
Predefined user roles
network-admin
Parameters
ip-address: Specifies the source IP address for BFD control packets.
discriminator: Specifies BFD session discriminators. If you do not specify discriminators, the device obtains BFD session discriminators through autonegotiation.
local local-value: Specifies the local discriminator. The value range for the local-value argument is 1 to 32768.
remote remote-value: Specifies the remote discriminator in the range of 1 to 4294967295.
Usage guidelines
By creating a BFD session for single-hop detection through exchange of BFD control packets, this feature implements fast link detection. 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. The source IP address of control packets is specified manually, and the destination IP address is fixed at 224.0.0.184. As a best practice, specify the IP address of the interface as the source IP address. If the interface does not have an IP address, specify a unicast IP address other than 0.0.0.0 as the source IP address.
You can associate the state of the following interfaces with BFD:
· Layer 2 Ethernet interfaces.
· Member ports in a Layer 2 aggregation group.
· Layer 3 Ethernet interfaces.
· Member ports in a Layer 3 aggregation group.
· Serial interfaces, POS interfaces, serial interfaces created from E1, E3, T1, or T3, MP-group interfaces, member interfaces of an MP-group interface, HDLC link bundle interfaces, and member interfaces of an HDLC link bundle interface.
If the link layer protocol of an interface is modified by using the link-protocol command, the association between the interface state and BFD is automatically cancelled. When associating the state of a member interface of an MP-group interface or of an HDLC link bundle interface, you must specify the discriminator parameter.
This command must be configured on both ends of the link for a BFD session to be established.
If the peer device does not support obtaining BFD session discriminators through autonegotiation, you must specify the discriminators on both the local and peer devices. Without the discriminators, the BFD session cannot come up.
The BFD session discriminators must match on the local and peer devices. For example, if you configure bfd detect-interface source-ip 20.1.1.1 discriminator local 4501 remote 4502 on the local device, you must configure bfd detect-interface source-ip 20.1.1.1 discriminator local 4502 remote 4501 on the peer device.
The local discriminators of BFD sessions for interfaces on the same device must be different.
The echo function does not take effect on BFD sessions associated with interface states.
Examples
# Associate GigabitEthernet 3/1/1 with BFD to detect the interface state, and specify the source IP address for BFD control packets as 20.1.1.1.
<Sysname> system-view
[Sysname] interface gigabitethernet 3/1/1
[Sysname-GigabitEthernet3/1/1] bfd detect-interface source-ip 20.1.1.1
bfd detect-multiplier
Use bfd detect-multiplier to set the single-hop detection time multiplier for control packet mode and the detection time multiplier for echo packet mode.
Use undo bfd detect-multiplier to restore the default.
Syntax
bfd detect-multiplier value
undo bfd detect-multiplier
Default
The single-hop detection time multiplier for control packet mode and the detection time multiplier for echo packet mode are both 5.
Views
Interface view
BFD template view
Static BFD session view
Predefined user roles
network-admin
Parameters
value: Specifies a detection time multiplier in the range of 3 to 50.
Usage guidelines
The detection time multiplier determines the maximum number of concurrent BFD packets (including control packets and echo packets) that can be discarded.
Table 1 Detection interval calculation method
Mode |
Detection interval |
Echo packet mode |
Detection time multiplier of the sender × actual packet sending interval of the sender |
Control packet mode BFD session in asynchronous mode |
Detection time multiplier of the receiver × actual packet sending interval of the receiver |
Control packet mode BFD session in demand mode |
Detection time multiplier of the sender × actual packet sending interval of the sender |
If this command is configured in static BFD session view, it takes effect only on static BFD sessions used for single-hop detection.
Examples
# Set the single-hop detection time multiplier for control packet mode and the detection time multiplier for echo packet mode to 6 on GigabitEthernet 3/1/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 3/1/1
[Sysname-GigabitEthernet3/1/1] bfd detect-multiplier 6
Related commands
bfd static
bfd echo enable
Use bfd echo enable to enable the echo function.
Use undo bfd echo enable to disable the echo function.
Syntax
bfd echo [ receive | send ] enable
undo bfd echo [ receive | send ] enable
Default
The echo function is disabled.
Views
Interface view
Static BFD session view
Predefined user roles
network-admin
Parameters
receive: Specifies the echo packet receiving capability.
send: Specifies the echo packet sending capability.
Usage guidelines
If you enable the echo function for a BFD session in which control packets are sent and the session comes up, BFD performs the following operations:
· Periodically sends echo packets to detect link connectivity.
· Decreases the control packet receiving rate at the same time.
To enable only the echo packet receiving capability, use the bfd echo receive enable command.
To enable only the echo packet sending capability, use the bfd echo send enable command.
If you do not specify the receive or send keyword, the command enables both the echo packet receiving and sending capabilities.
The echo function does not take effect on BFD sessions associated with interface states.
If this command is configured in static BFD session view, it takes effect only on static BFD sessions used for single-hop detection.
BFD version 0 does not support this command. The configuration does not take effect.
Examples
# Enable the echo function on GigabitEthernet 3/1/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 3/1/1
[Sysname-GigabitEthernet3/1/1] bfd echo enable
bfd echo-source-ip
Use bfd echo-source-ip to configure the source IP address of BFD echo packets.
Use undo bfd echo-source-ip to remove the configured source IP address of BFD echo packets.
Syntax
bfd echo-source-ip ip-address
undo bfd echo-source-ip
Default
No source IP address is configured for BFD echo packets.
Views
System view
Predefined user roles
network-admin
Parameters
ip-address: Specifies the source IP address of BFD echo packets.
Usage guidelines
As a best practice, do not configure the source IP address to be on the same network segment as any local interface's IP address. If you configure such a source IP address, a large number of ICMP redirect packets might be sent from the peer, resulting in link congestion.
Examples
# Configure the source IP address of BFD echo packets as 8.8.8.8.
<Sysname> system-view
[Sysname] bfd echo-source-ip 8.8.8.8
bfd echo-source-ipv6
Use bfd echo-source-ipv6 to configure the source IPv6 address of BFD echo packets.
Use undo bfd echo-source-ipv6 to remove the configured source IPv6 address of BFD echo packets.
Syntax
bfd echo-source-ipv6 ipv6-address
undo bfd echo-source-ipv6
Default
No source IPv6 address is configured for BFD echo packets.
Views
System view
Predefined user roles
network-admin
Parameters
ipv6-address: Specifies the source IPv6 address for BFD echo packets.
Usage guidelines
The source IPv6 address of echo packets can only be a global unicast address.
As a best practice, do not configure the source IPv6 address to be on the same network segment as any local interface's IP address. If you configure such a source IPv6 address, a large number of ICMPv6 redirect packets might be sent from the peer, resulting in link congestion.
Examples
# Configure the source IPv6 address of BFD echo packets as 80::2.
<Sysname> system-view
[Sysname] bfd echo-source-ipv6 80::2
bfd min-echo-receive-interval
Use bfd min-echo-receive-interval to set the minimum interval for receiving BFD echo packets.
Use undo bfd min-echo-receive-interval to restore the default.
Syntax
bfd min-echo-receive-interval interval
undo bfd min-echo-receive-interval
Default
The minimum interval for receiving BFD echo packets is 400 milliseconds.
Views
Interface view
BFD template view
Static BFD session view
Predefined user roles
network-admin
Parameters
interval: Specifies the minimum interval for receiving BFD echo packets, in milliseconds. The value takes 0 or is in the range of 3 to 10000. A value of 0 means the device does not receive echo packets.
Usage guidelines
This command sets the BFD echo packet receiving interval, which is the actual BFD echo packet sending interval.
The local end stops sending echo packets after autonegotiation with the remote end if the following conditions are met:
· The echo function is enabled on the local end.
· The minimum interval for receiving BFD echo packets is set to 0 milliseconds on the remote end.
If this command is configured in static BFD session view, it takes effect only on static BFD sessions used for single-hop detection.
Examples
# Set the minimum interval for receiving BFD echo packets to 200 milliseconds on GigabitEthernet 3/1/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 3/1/1
[Sysname-GigabitEthernet3/1/1] bfd min-echo-receive-interval 200
Related commands
bfd static
bfd min-receive-interval
Use bfd min-receive-interval to set the minimum interval for receiving single-hop BFD control packets.
Use undo bfd min-receive-interval to restore the default.
Syntax
bfd min-receive-interval interval
undo bfd min-receive-interval
Default
The minimum interval for receiving single-hop BFD control packets is 400 milliseconds.
Views
Interface view
BFD template view
Static BFD session view
Predefined user roles
network-admin
Parameters
interval: Specifies the minimum interval for receiving single-hop BFD control packets, in the range of 3 to 10000 milliseconds.
Usage guidelines
Use this command to prevent the control packet sending rate of the peer end from exceeding the control packet receiving rate of the local end.
The actual control packet sending interval of the peer end takes the greater value between the following values:
· Minimum interval for transmitting BFD control packets on the peer end.
· Minimum interval for receiving BFD control packets on the local end.
If this command is configured in static BFD session view, it takes effect only on static BFD sessions used for single-hop detection.
Examples
# Set the minimum interval for receiving single-hop BFD control packets to 200 milliseconds on GigabitEthernet 3/1/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 3/1/1
[Sysname-GigabitEthernet3/1/1] bfd min-receive-interval 200
Related commands
bfd static
bfd min-transmit-interval
Use bfd min-transmit-interval to set the minimum interval for transmitting single-hop BFD control packets.
Use undo bfd min-transmit-interval to restore the default.
Syntax
bfd min-transmit-interval interval
undo bfd min-transmit-interval
Default
The minimum interval for transmitting single-hop BFD control packets is 400 milliseconds.
Views
Interface view
BFD template view
Static BFD session view
Predefined user roles
network-admin
Parameters
interval: Specifies the minimum interval for transmitting single-hop BFD control packets, in the range of 3 to 10000 milliseconds.
Usage guidelines
Use this command to prevent the BFD packet sending rate from exceeding the device capability.
The actual BFD control packet transmitting interval on the local end is the greater value between the following values:
· Minimum interval for transmitting BFD control packets on the local end.
· Minimum interval for receiving BFD control packets on the peer end.
If this command is configured in static BFD session view, it takes effect only on static BFD sessions used for single-hop detection.
Examples
# Set the minimum interval for transmitting single-hop BFD control packets to 200 milliseconds on GigabitEthernet 3/1/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 3/1/1
[Sysname-GigabitEthernet3/1/1] bfd min-transmit-interval 200
Related commands
bfd static
bfd multi-hop authentication-mode
Use bfd multi-hop authentication-mode to configure the authentication mode for multihop BFD control packets.
Use undo bfd multi-hop authentication-mode to restore the default.
Syntax
bfd multi-hop authentication-mode { m-md5 | m-sha1 | md5 | sha1 | simple } key-id { cipher | plain } string
undo bfd multi-hop authentication-mode
Default
No authentication is performed.
Views
System view
Static BFD session view
Predefined user roles
network-admin
Parameters
m-md5: Specifies the Meticulous MD5 algorithm.
m-sha1: Specifies the Meticulous SHA1 algorithm.
md5: Specifies the MD5 algorithm.
sha1: Specifies the SHA1 algorithm.
simple: Specifies the simple authentication mode.
key-id: Sets the authentication key ID in the range of 1 to 255.
cipher: Specifies a key in encrypted form.
plain: Specifies a key in plaintext form. For security purposes, the key specified in plaintext form will be stored in encrypted form.
string: Specifies the key. Its plaintext form is a case-sensitive string of 1 to 16 characters. Its encrypted form is a case-sensitive string of 33 to 53 characters.
Usage guidelines
Use this command to enhance BFD session security.
If this command is configured in static BFD session view, it takes effect only on static BFD sessions used for single-hop detection.
BFD version 0 does not support this command. The configuration does not take effect.
Examples
# Configure the simple authentication mode for multihop BFD control packets, setting the authentication key ID to 1 and key to 123456.
<Sysname> system-view
[Sysname] bfd multi-hop authentication-mode simple 1 plain 123456
Related commands
bfd static
bfd multi-hop destination-port
Use bfd multi-hop destination-port to configure the destination port number for multihop BFD control packets.
Use undo bfd multi-hop destination-port to restore the default.
Syntax
bfd multi-hop destination-port port-number
undo bfd multi-hop destination-port
Default
The destination port number for multihop BFD control packets is 4784.
Views
System view
Predefined user roles
network-admin
Parameters
port-number: Specifies the destination port number of multihop BFD control packets, 3784 or 4784.
Examples
# Specify the destination port number for multihop BFD control packets as 3784.
<Sysname> system-view
[Sysname] bfd multi-hop destination-port 3784
bfd multi-hop detect-multiplier
Use bfd multi-hop detect-multiplier to set the multihop detection time multiplier for control packet mode.
Use undo bfd multi-hop detect-multiplier to restore the default.
Syntax
bfd multi-hop detect-multiplier value
undo bfd multi-hop detect-multiplier
Default
The multihop detection time multiplier for control packet mode is 5.
Views
System view
Static BFD session view
Predefined user roles
network-admin
Parameters
value: Specifies the multihop detection time multiplier in the range of 3 to 50.
Usage guidelines
The detection time multiplier determines the maximum number of concurrent BFD control packets that can be discarded.
Table 2 Detection interval calculation method
Mode |
Detection interval |
Control packet mode BFD session in asynchronous mode |
Detection time multiplier of the receiver × actual packet sending interval of the receiver |
Control packet mode BFD session in demand mode |
Detection time multiplier of the sender × actual packet sending interval of the sender |
If this command is configured in static BFD session view, it takes effect only on static BFD sessions used for single-hop detection.
Examples
# Set the multihop detection time multiplier to 6 for control packet mode.
<Sysname> system-view
[Sysname] bfd multi-hop detect-multiplier 6
Related commands
bfd static
bfd multi-hop min-receive-interval
Use bfd multi-hop min-receive-interval to set the minimum interval for receiving multihop BFD control packets.
Use undo bfd multi-hop min-receive-interval to restore the default.
Syntax
bfd multi-hop min-receive-interval interval
undo bfd multi-hop min-receive-interval
Default
The minimum interval for receiving multihop BFD control packets is 400 milliseconds.
Views
System view
Static BFD session view
Predefined user roles
network-admin
Parameters
interval: Specifies the minimum interval for receiving multihop BFD control packets, in the range of 3 to 10000 milliseconds.
Usage guidelines
Use this command to prevent the packet sending rate of the peer end from exceeding the packet receiving capability (minimum control packet receiving interval) of the local end. If the receiving capability is exceeded, the peer end dynamically adjusts the BFD control packet sending interval to the minimum control packet receiving interval of the local end.
If this command is configured in static BFD session view, it takes effect only on static BFD sessions used for single-hop detection.
Examples
# Set the minimum interval for receiving multihop BFD control packets to 200 milliseconds.
<Sysname> system-view
[Sysname] bfd multi-hop min-receive-interval 200
Related commands
bfd static
bfd multi-hop min-transmit-interval
Use bfd multi-hop min-transmit-interval to set the minimum interval for transmitting multihop BFD control packets.
Use undo bfd multi-hop min-transmit-interval to restore the default.
Syntax
bfd multi-hop min-transmit-interval interval
undo bfd multi-hop min-transmit-interval
Default
The minimum interval for transmitting multihop BFD control packets is 400 milliseconds.
Views
System view
Static BFD session view
Predefined user roles
network-admin
Parameters
interval: Specifies the minimum interval for transmitting multihop BFD control packets, in the range of 3 to 10000 milliseconds.
Usage guidelines
Use this command to prevent the BFD packet sending rate from exceeding the device capability.
The actual BFD control packet transmitting interval on the local end is the greater value between the following values:
· Minimum interval for transmitting BFD control packets on the local end.
· Minimum interval for receiving BFD control packets on the peer end.
If this command is configured in static BFD session view, it takes effect only on static BFD sessions used for single-hop detection.
Examples
# Set the minimum interval for transmitting multihop BFD control packets to 200 milliseconds.
<Sysname> system-view
[Sysname] bfd multi-hop min-transmit-interval 200
Related commands
bfd static
bfd session init-mode
Use bfd session init-mode to configure the mode for establishing a BFD session.
Use undo bfd session init-mode to restore the default.
Syntax
bfd session init-mode { active | passive }
undo bfd session init-mode
Default
BFD uses the active mode.
Views
System view
Predefined user roles
network-admin
Parameters
active: Specifies the active mode. In active mode, BFD actively transmits BFD control packets to the remote device, regardless of whether it receives a BFD control packet from the remote device.
passive: Specifies the passive mode. In passive mode, BFD does not actively transmit a BFD control packet to the remote end; it transmits a BFD control packet only after receiving a BFD control packet from the remote end.
Usage guidelines
A minimum of one end must operate in active mode for a BFD session to be established.
BFD version 0 does not support this command. The configuration does not take effect.
Examples
# Configure the session establishment mode as passive.
<Sysname> system-view
[Sysname] bfd session init-mode passive
bfd static
Use bfd static to create a static BFD session and enter its view, or enter the view of an existing static BFD session.
Use undo bfd static to delete a static BFD session and all its settings.
Syntax
bfd static session-name [ peer-ip ipv4-address [ vpn-instance vpn-instance-name | interface interface-type interface-number ] source-ip ipv4-address discriminator local local-value remote remote-value ]
bfd static session-name [ peer-ipv6 ipv6-address [ vpn-instance vpn-instance-name | interface interface-type interface-number ] source-ipv6 ipv6-address discriminator local local-value remote remote-value ]
undo bfd static session-name
Default
No static BFD sessions exist.
Views
System view
Predefined user roles
network-admin
Parameters
session-name: Specifies a static BFD session name, a case-sensitive string of 1 to 15 characters.
peer-ip ipv4-address: Specifies the peer IPv4 address in dotted decimal notation. It must be a valid unicast IPv4 address.
peer-ipv6 ipv6-address: Specifies the peer IPv6 address.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the static BFD session belongs to the public network.
interface interface-type interface-number: Specifies an interface by its type and number. The command performs single-hop detection on the link with the specified interface as the outgoing interface and the specified peer IP address as the next hop.
source-ip ipv4-address: Specifies the source IPv4 address for control packets, in dotted decimal notation. It must be a valid unicast IPv4 address.
peer-ipv6 ipv6-address: Specifies the source IPv6 address for control packets.
discriminator: Specifies BFD session discriminators.
local local-value: Specifies the local discriminator in the range of 1 to 32768.
remote remote-value: Specifies the remote discriminator in the range of 1 to 4294967295.
Usage guidelines
A static BFD session can be used for single-hop detection and multihop detection. By working with Track, a static BFD session can provide fast failure detection. For more information about Track association with BFD, see Track in High Availability Configuration Guide.
The BFD session discriminators must match on the local and peer devices. For example, if you configure bfd static abc peer-ip 20.1.1.1 vpn-instance vpn1 source-ip 20.1.1.2 discriminator local 513 remote 514 on the local device, you must configure bfd static bcd peer-ip 20.1.1.2 vpn-instance vpn1 source-ip 20.1.1.1 discriminator local 514 remote 513 on the peer device.
When creating a static BFD session, you must specify a peer IP address. The system checks only the format of the IP address but not its correctness. If the peer IPv4 or IPv6 address is incorrect, the static BFD session cannot be established.
The bfd static session-name command without any parameters specified can only be used to enter the view of an existing static BFD session.
The system checks only the format of the IP address but not its correctness. If the peer IPv4 or IPv6 address is incorrect, the static BFD session cannot be established.
To modify a static BFD session, delete the static BFD session and then configure a new static BFD session.
If you do not specify a VPN instance or an interface, the device performs multihop detection in the public network.
If you specify an interface, make sure the following requirements are met for the static BFD session to be successfully established:
· Specify the IP address of the peer interface where the static BFD session resides as the peer IP address.
· Specify the IP address of the local interface where the static BFD session resides as the source IP address.
Different static BFD sessions cannot have the same local discriminator.
Examples
# Create a static BFD session and enter its view. The static BFD session detects the link with the outgoing interface GigabitEthernet 3/1/1 and the next hop 1.1.1.2. The source IP address for the session is 1.1.1.1, the local discriminator is 1537, and the remote discriminator is 2048.
<Sysname> system-view
[Sysname] bfd static aaaa peer-ip 1.1.1.2 interface gigabitethernet 3/1/1 source-ip 1.1.1.1 discriminator local 1537 remote 2048
[Sysname-bfd-static-session-aaaa]
Related commands
track bfd
bfd template
Use bfd template to create a BFD template and enter its view, or enter the view of an existing BFD template.
Use undo bfd template to delete the BFD template.
Syntax
bfd template template-name
undo bfd template template-name
Default
No BFD templates exist.
Views
System view
Predefined user roles
network-admin
Parameters
template-name: Specifies the template name, a case-sensitive string of 1 to 63 characters.
Examples
# Create BFD template bfd1 and enter BFD template view.
<Sysname> system-view
[Sysname] bfd template bfd1
[Sysname-bfd-template-bfd1]
display bfd session
Use display bfd session to display BFD session information.
Syntax
display bfd session [ discriminator local local-value | static session-name | verbose ]
display bfd session [ [ dynamic ] [ control | echo ] [ ip ] [ state { down | admin-down | init | up } ] [ discriminator remote remote-value ] [ peer-ip ipv4-address [ vpn-instance vpn-instance-name ] ] [ verbose ] ]
display bfd session [ [ dynamic ] [ control | echo ] [ ipv6 ] [ state { down | admin-down | init | up } ] [ discriminator remote remote-value ] [ peer-ipv6 ipv6-address [ vpn-instance vpn-instance-name ] ] [ verbose ] ]
display bfd session [ [ dynamic ] [ control | echo ] [ lsp | te | pw ] [ state { down | admin-down | init | up } ] [ discriminator remote remote-value ] [ [ peer-ip ipv4-address [ vpn-instance vpn-instance-name ] ] | [ peer-ipv6 ipv6-address [ vpn-instance vpn-instance-name ] ] ] [ verbose ] ]
display bfd session [ [ static ] [ ip ] [ state { down | admin-down | init | up } ] [ discriminator remote remote-value ] [ peer-ip ipv4-address [ vpn-instance vpn-instance-name ] ] [ verbose ]
display bfd session [ [ static ] [ ipv6 ] [ state { down | admin-down | init | up } ] [ discriminator remote remote-value ] [ peer-ipv6 ipv6-address [ vpn-instance vpn-instance-name ] ] [ verbose ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
discriminator local local-value: Specifies a BFD session by its local discriminator in the range of 1 to 4294967295.
static session-name: Specifies a static BFD session by its name, a case-sensitive string of 1 to 15 characters.
dynamic: Specifies dynamic BFD sessions.
static: Specifies static BFD sessions.
control: Specifies BFD sessions in control packet mode.
echo: Specifies BFD sessions in echo mode.
ip: Specifies BFD sessions used to detect IPv4 links.
ipv6: Specifies BFD sessions used to detect IPv6 links.
lsp: Specifies BFD sessions used to detect MPLS LSPs.
te: Specifies BFD sessions used to detect MPLS TE tunnels.
pw: Specifies BFD sessions used to detect PWs.
state: Displays BFD sessions by session state.
down: Specifies BFD sessions in Down state.
admin-down: Specifies BFD sessions in AdminDown state.
init: Specifies BFD sessions in Init state.
up: Specifies BFD sessions in Up state.
discriminator remote remote-value: Specifies a BFD session by its remote discriminator in the range of 1 to 4294967295.
peer-ip ipv4-address: Specifies a BFD session by the peer IPv4 address in dotted decimal notation.
peer-ipv6 ipv6-address: Specifies a BFD session by the peer IPv6 address.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays the BFD sessions of the public network.
verbose: Displays detailed BFD session information.
Usage guidelines
If you do not specify the dynamic or static keyword, this command displays all dynamic and static BFD sessions.
Examples
# Display brief information about all BFD sessions.
<Sysname> display bfd session
Total sessions: 9 Up sessions: 9 Init mode: Active
IPv4 session working in control packet mode:
LD/RD SourceAddr DestAddr State Holdtime Interface
513/513 1.1.1.1 1.1.1.2 Up 2297ms GE3/1/1
IPv6 session working in control packet mode:
Local discr: 513 Remote discr: 513
Source IP: FE80::20C:29FF:FED4:7171
Destination IP: FE80::20C:29FF:FE72:AC4D
Session state: Up Interface: GE3/1/2
Hold time: 2142ms
MPLS LSP session working in control packet mode:
LD/RD SourceAddr DestAddr State Holdtime Interface
513/514 2.2.2.9 127.0.0.1 Up 4410ms N/A
514/513 2.2.2.9 1.1.1.9 Up 4358ms N/A
IPv6 static session working in control packet mode:
Local discr: 1700 Remote discr: 1700
Source IP: FE80::20C:29FF:FED4:7171
Destination IP: FE80::20C:29FF:FE72:AC4D
Session state: Up Interface: GE3/1/2
Hold time: 2142ms
MPLS TE session working in control packet mode:
LD/RD SourceAddr DestAddr State Holdtime Interface
2050/2050 1.1.1.1 127.0.0.1 Up 2458ms N/A
MPLS TE session working in echo mode:
LD SourceAddr DestAddr State Holdtime Interface
2051 1.1.1.1 3.3.3.3 Up 4851ms Tun2
MPLS PW session working in control packet mode:
LD/RD SourceAddr DestAddr State Holdtime Interface
20481/20481 2.2.2.2 127.0.0.1 Up 2489ms N/A
Table 3 Command output
Field |
Description |
Total sessions |
Total number of BFD sessions. |
Up sessions |
Total number of active BFD sessions. |
Init mode |
BFD operating mode: Active or passive. |
IPv4 session working in control packet mode |
BFD session type and operating mode: · IPv4 session working in control packet mode. · IPv4 session working in echo mode. · IPv6 session working in control packet mode. · IPv6 session working in echo mode. · MPLS LSP session working in control packet mode—BFD session in control packet mode used to detect failures in an LSP. · MPLS LSP session working in echo mode—BFD session in echo mode used to detect failures in an LSP. · IPv6 SR session working in echo mode—BFD session in echo mode used to detect failures in an SRv6 tunnel. · IPv4 static session working in control packet mode. · IPv6 static session working in control packet mode. · MPLS TE session working in control packet mode. · MPLS TE session working in echo mode. · MPLS PW session working in control packet mode. |
LD/RD |
Local discriminator/Remote discriminator of the session. |
SourceAddr |
Source IPv4 address of the session. |
DestAddr |
Destination IPv4 address of the session. |
State |
Session state: Down, Init, or Up. |
Holdtime |
Length of time before session detection timer expires. For a BFD session in Down state, this field displays 0ms. If hardware BFD is enabled, this field displays 0ms. |
Interface |
Name of the interface of the session. |
Local discr |
Local discriminator of the session. |
Remote discr |
Remote discriminator of the session. |
Source IP |
Source IPv6 address of the session. |
Destination IP |
Destination IPv6 address of the session. |
Session state |
Session state: Down, Admdown, Init, or Up. |
Hold time |
Length of time before session detection timer expires. For a BFD session in Down state, this field displays 0ms. If hardware BFD is enabled, this field displays 0ms. |
# Display detailed BFD session information.
<Sysname> display bfd session verbose
Total sessions: 9 Up sessions: 9 Init mode: Active
IPv4 session working in control packet mode:
Local discr: 513 Remote discr: 513
Source IP: 1.1.1.1 Destination IP: 1.1.1.2
Destination port: 3784 Session state: Up
Interface: GigabitEthernet3/1/1
Min Tx interval: 500ms Actual Tx Interval: 500ms
Min Rx interval: 500ms Detection time: 2500ms
Rx count: 42 Tx count: 43
Connection type: Direct Up duration: 00:00:20
Hold time: 2078ms Auth mode: None
Detection mode: Async Slot: 0
Protocol: OSPF
Version:1
Diag info: No Diagnostic
Hardware mode: Disable
IPv6 session working in control packet mode:
Local discr: 513 Remote discr: 513
Source IP: FE80::20C:29FF:FED4:7171
Destination IP: FE80::20C:29FF:FE72:AC4D
Destination port: 3784 Session state: Up
Interface: GigabitEthernet3/1/2
Min Tx interval: 500ms Actual Tx interval: 500ms
Min Rx interval: 500ms Detection time: 2500ms
Rx count: 38 Tx count: 38
Connection type: Direct Up duration: 00:00:15
Hold time: 2211ms Auth mode: None
Detection mode: Async Slot: 0
Protocol: OSPFv3
Version: 1
Diag info: No Diagnostic
Hardware mode: Disable
MPLS LSP session working in control packet mode:
Local discr: 513 Remote discr: 514
Source IP: 1.1.1.9 Destination IP: 127.0.0.1
Destination port: 3784 Session state: Up
Interface: N/A
Min Tx interval: 1000ms Actual Tx interval: 1000ms
Min Rx interval: 1000ms Detection time: 5000ms
Rx count: 8894 Tx count: 9451
Connection type: Indirect Up duration: 02:17:50
Hold time: 4292ms Auth mode: None
Detection mode: Async Slot: 0
Protocol: MPLS_LSPV
Version: 1
Diag info: No Diagnostics
Hardware mode: Disable
IPv6 SR session working in echo mode:
Local discr: 2049
Source IP: FE80::20C:29FF:FED4:7171
Destination IP: FE80::20C:29FF:FE72:AC4D
Destination port: 3785 Session state: Up
Interface: Tunnel1
Hold time: 2049ms Actual Tx interval: 500ms
Min Rx interval: 500ms Detection time: 2500ms
Rx count: 7065 Tx count: 7065
Connection type: Indirect Up duration: 00:50:08
Detection mode: Async Slot: 2
Protocol: SRv6
Version: 1
Diag info: No Diagnostic
Hardware mode: Disable
IPv4 static session working in control packet mode:
Session name: abc
Local discr: 310 Remote discr: 308
Source IP: 12.1.1.1 Destination IP: 12.1.1.2
Destination port: 3784 Session state: Up
Interface: GigabitEthernet3/1/1
Min Tx interval: 1000ms Actual Tx interval: 3000ms
Min Rx interval: 1000ms Detection time: 5000ms
Rx count: 59 Tx count: 1003
Connection type: Direct Up duration: 00:00:00
Hold time: 1040ms Auth mode: None
Detection mode: Async Slot: 0
Protocol: STATIC_IPv4
Version: 1
Diag info: No Diagnostic
Hardware mode: Disable
IPv6 static session working in control packet mode:
Session name: bbbb
Local discr: 1700 Remote discr: 1700
Source IP: FE80::20C:29FF:FED4:7171
Destination IP: FE80::20C:29FF:FE72:AC4D
Destination port: 3784 Session state: Up
Interface: GigabitEthernet3/1/2
Min Tx interval: 500ms Actual Tx interval: 500ms
Min Rx interval: 500ms Detection time: 2500ms
Rx count: 38 Tx count: 38
Connection type: Direct Up duration: 00:00:15
Hold time: 2211ms Auth mode: None
Detection mode: Async Slot: 0
Protocol: STATIC_IPv6
Version: 1
Diag info: No Diagnostic
Hardware mode: Disable
MPLS TE Session working in control packet mode:
Local discr: 2050 Remote discr: 2050
Source IP: 1.1.1.1 Destination IP: 127.0.0.1
Destination port: 3784 Session state: Up
Interface: N/A
Min Tx interval: 500ms Actual Tx interval: 500ms
Min Rx interval: 500ms Detection time: 2500ms
Rx count: 72 Tx count: 73
Connection type: Indirect Up duration: 00:00:30
Hold time: 2458ms Auth mode: None
Detection mode: Async Slot: 0
Protocol: MPLS_LSPV
Version: 1
Diag info: No Diagnostic
Hardware mode: Disable
MPLS TE session working in echo mode:
Local discr: 2051
Source IP: 1.1.1.1 Destination IP: 3.3.3.3
Destination port: 3785 Session state: Up
Interface: Tunnel2
Hold time: 4851ms Actual Tx interval: 1000ms
Min Rx interval: 1000ms Detection time: 5000ms
Rx count: 9083 Tx count: 9637
Connection type: Indirect Up duration: 02:20:42
Detection mode: Async Slot: 0
Protocol: MPLS_LSPV
Version: 1
Diag info: No Diagnostics
Hardware mode: Disable
MPLS PW session working in control packet mode:
Local discr: 20481 Remote discr: 20481
Source IP: 2.2.2.2 Destination IP: 127.0.0.1
Destination port: 3784 Session state: Up
Interface: N/A
Min Tx interval: 500ms Actual Tx interval: 500ms
Min Rx interval: 500ms Detection time: 2500ms
Rx count: 72 Tx count: 73
Connection type: Indirect Up duration: 00:00:30
Hold time: 2489ms Auth mode: None
Detection mode: Async Slot: 0
Protocol: MPLS_LSPV
Version: 1
Diag info: No Diagnostic
Hardware mode: Disable
Table 4 Command output
Field |
Description |
Total session |
Total number of BFD sessions. |
Up session |
Total number of active BFD sessions. |
Init mode |
BFD operating mode: Active or passive. |
IPv4 session working in control packet mode |
BFD session type and operating mode: · IPv4 session working in control packet mode. · IPv4 session working in echo mode. · IPv6 session working in control packet mode. · IPv6 session working in echo mode. · MPLS LSP session working in control packet mode—BFD session in control packet mode used to detect failures in an LSP. · MPLS LSP session working in echo mode—BFD session in echo mode used to detect failures in an LSP. · IPv4 static session working in control packet mode. · IPv6 static session working in control packet mode. · MPLS TE session working in control packet mode. · MPLS TE session working in echo mode. · MPLS PW session working in control packet mode. |
Local discr |
Local ID of the session. |
Remote discr |
Remote ID of the session. |
Source IP |
Source IP address of the session. |
Destination IP |
Destination IP address of the session. |
Destination port |
Destination port number in BFD packets defined in Comware: · The destination port number in single-hop BFD control packets is 3784. · The destination port number in single-hop or multihop BFD echo packets is 3785. · The destination port number in multihop BFD control packets is 4784. · The destination port number in BFD control packets for association between link aggregation and BFD is 6784. The device uses the destination port number in incoming packets that are not defined in Comware as the destination port number in outgoing BFD packets. |
Session state |
Session state: Down, AdmDown, Init, or Up. |
Interface |
Name of the interface of the session. |
Min Tx interval |
Minimum transmit interval. |
Min Rx interval |
Minimum receive interval. |
Actual Tx interval |
Actual transmit interval. |
Detection time |
Actual session detection timer. |
Rx count |
Number of packets received. |
Tx count |
Number of packets sent. |
Hold time |
Length of time before session detection timer expires. For a BFD session in down state, this field displays 0ms. If hardware BFD is enabled, this field displays 0ms. |
Auth mode |
Session authentication mode. |
Connect type |
Connection type of the interface: Direct or indirect. |
Up duration |
Time period for which the session has been up. |
Detect mode |
Detection mode: · Async—Asynchronous mode. · Demand—Demand mode. · Async/Echo—Asynchronous mode with echo detection enabled. · Demand/Echo—Demand mode with echo detection enabled. |
Slot |
Slot number. |
Protocol |
Protocol associated with BFD: · OSPF. · ISIS_BR_L1—IS-IS with the network type as broadcast and the router type as Level 1. · ISIS_BR_L2—IS-IS with the network type as broadcast and the router type as Level 2. · ISIS_P2P—IS-IS with the network type as P2P. · ISIS6_BR_L1—IPv6 IS-IS with the network type as broadcast and the router type as Level 1. · ISIS6_BR_L2—IPv6 IS-IS with the network type as broadcast and the router type as Level 2. · ISIS6_P2P—IPv6 IS-IS with the network type as P2P. · BGP. · MPLS_RSVP. · STATIC4—IPv4 static routing. · TRACK—Track. · RIP. · IPFRR—FIB IP FRR. · MAD. · MPLS_LSPV. · OSPFv3. · BGP4+. · PIM. · PIM6—IPv6 PIM. · STATIC6—IPv6 static routing. · RIPNG—RIPng. · Interface—Interface state. · TUNNEL. · VTEP. · LAGG—Link aggregation. · SRv6. · STATIC_IPv4—IPv4 static BFD session. · STATIC_IPv6—IPv6 static BFD session. |
Diag info |
Diagnostic information about the session: · No Diagnostic. · Control Detection Time Expired—A control packet mode BFD session goes down because local detection times out. · Echo Function Failed—An echo mode BFD session goes down, because local detection times out or the source IP address of echo packets is deleted. · Neighbor Signaled Session Down—The remote end notifies the local end of BFD session down. · Administratively Down—The local system prevents a BFD session from being established. |
Hardware mode |
Mode in which BFD packets are processed in hardware: · Enabled. · Disable. BFD packets are processed in software. |
Related commands
bfd static
display bfd system mode info
Use display bfd system mode info to display the BFD hardware mode and hardware resource usage.
Syntax
display bfd system mode info
Views
Any view
Predefined user roles
network-admin
Examples
# Display the BFD hardware mode and hardware resource usage.
<Sysname> display bfd system mode info
Working in hardware BFD mode;
---------------------------------------------------------------------
Total Reserved Configured Remaining
---------------------------------------------------------------------
8 1 0 7
Machine0: Reserved interval: refcnt:0
Machine1: dynamic interval: refcnt:0
Machine2: dynamic interval: refcnt:0
Machine3: dynamic interval: refcnt:0
Machine4: dynamic interval: refcnt:0
Machine5: dynamic interval: refcnt:0
Machine6: dynamic interval: refcnt:0
Machine7: dynamic interval: refcnt:0
Table 5 Command output
Field |
Description |
Total |
Total number of hardware resources. |
Reserved |
Number of reserved hardware resources. |
Configured |
Number of hardware resources that has been applied. |
Remaining |
Number of hardware resources that you can apply. |
Machine |
Resource type: Reserved or dynamic. |
interval |
Minimum detection time (configured minimum packet sending interval multiplied by the detection time multiplier). |
refcnt |
Number of BFD sessions that used a resource. |
hardware bfd enable
Use hardware bfd enable to enable hardware BFD.
Use undo hardware bfd enable to disable hardware BFD.
Syntax
hardware bfd enable [ high-precision ]
undo hardware bfd enable
Default
Hardware BFD is disabled.
Views
System view
Predefined user roles
network-admin
Parameters
high-precision: Enables high-precision hardware BFD.
Usage guidelines
To avoid incorrect operation of BFD sessions, follow these guidelines when you enable or disable hardware BFD:
· Before you enable hardware BFD, make sure only CSPEX (except CSPEX-1204 and CSPEX-1104-E) and CEPC cards are installed in the device.
· After you enable hardware BFD, do not install any cards except those cards mentioned above.
· Make sure no BFD sessions exist when you enable or disable hardware BFD.
Hardware BFD and high-precision hardware BFD take effect only on new BFD sessions.
High-precision hardware BFD supports the shortest detection time of 3 milliseconds.
Examples
# Enable hardware BFD.
<Sysname> system-view
[Sysname] hardware bfd enable
The operation will enable hardware BFD. Are you sure you want to continue? [Y/N]:y
reset bfd session statistics
Use reset bfd session statistics to clear the BFD session statistics.
Syntax
reset bfd session statistics
Views
User view
Predefined user roles
network-admin
Examples
# Clear the BFD session statistics.
<Sysname> reset bfd session statistics
snmp-agent trap enable bfd
Use snmp-agent trap enable bfd to enable SNMP notifications for BFD.
Use undo snmp-agent trap enable bfd to disable SNMP notifications for BFD.
Syntax
snmp-agent trap enable bfd
undo snmp-agent trap enable bfd
Default
All SNMP notifications are enabled for BFD.
Views
System view
Predefined user roles
network-admin
Usage guidelines
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 the network management and monitoring configuration guide for the device.
Examples
# Disable SNMP notifications for BFD.
<Sysname> system-view
[Sysname] undo snmp-agent trap enable bfd