Professional Documents
Culture Documents
BFC Ingles
BFC Ingles
6 BFD Configuration
6.1 BFD Overview
6.2 BFD Features Supported by the S9300
6.3 Configuring Single-hop BFD
6.3.1 Establishing the Configuration Task
6.3.2 Enabling BFD Globally
6.3.3 (Optional) Setting the Multicast IP Address of BFD
6.3.4 Creating a BFD Session
6.3.5 Checking the Configuration
6.4 Configuring the Multi-Hop BFD
6.4.1 Establishing the Configuration Task
6.4.2 Enabling BFD Globally
6.4.3 Creating a BFD Session
6.4.4 Checking the Configuration
6.5 Configuring a BFD Session with Automatically Negotiated Discriminators
6.5.1 Establishing the Configuration Task
6.5.2 Enabling BFD Globally
6.5.3 Configuring a Static BFD Session with Automatically Negotiated Discriminators
6.5.4 Checking the Configuration
6.6 Adjusting BFD Parameters
6.6.1 Establishing the Configuration Task
6.6.2 Adjusting the BFD Detection Time
6.6.3 Adding the Description of a BFD Session
6.6.4 Configuring the BFD WTR
6.6.5 Setting the Priority of BFD Packets
6.6.6 Checking the Configuration
6.7 Configuring the Delay of a BFD Session to Go Up
6.7.1 Establishing the Configuration Task
6.7.2 Configuring the Delay of a BFD Session to Go Up
6.7.3 Checking the Configuration
6.8 Configuring the TTL Globally
6.8.1 Establishing the Configuration Task
6.8.2 Configuring the TTL Globally
6.8.3 Checking the Configuration
6.9 Configuring the Interval at Which Trap Messages Are Sent
6.9.1 Establishing the Configuration Task
6.9.2 Configuring the Interval at Which Trap Messages Are Sent
6.9.3 Checking the Configuration
6.10 Configuring Association Between a BFD Session and an Interface (Triggering the Physical Status of the Interface
Associated with the BFD Session to Become Down)
6.10.1 Establishing the Configuration Task
6.10.2 Configuring Association Between a BFD Session and an Interface
6.10.3 Checking the Configuration
6.11 Configuring Association Between BFD Sessions
6.11.1 Establishing the Configuration Task
6.11.2 Configuring Association Between BFD sessions
6.11.3 Checking the Configuration
6.12 Maintaining BFD
6.12.1 Clearing BFD Statistics
6.12.2 Debugging BFD
6.13 Configuration Examples
6.13.1 Example for Configuring Single-Hop BFD on a Layer 2 Interface
6.13.2 Example for Configuring Single-Hop BFD on a VLANIF Interface
6.13.3 Example for Configuring Multi-Hop BFD
6.13.4 Example for Associating the BFD Status with the Interface Status
6.13.5 Example for Configuring Association Between a BFD Session and an Interface
6.13.6 Example for Configuring Association Between the Status of BFD Sessions
6 BFD Configuration
6.10 Configuring Association Between a BFD Session and an Interface (Triggering the Physical Status of
the Interface Associated with the BFD Session to Become Down)
Association between a BFD session and an interface is applicable to the scenario where a CE is directly
connected to a PE. BFD is enabled on PEs and a BFD session is associated with an interface. When the BFD
session detects a link fault, the BFD module notifies the OAM management module on the local PE of the fault.
This triggers the physical status of the interface to become Down.
NOTE:
Currently, on the S9300, OSPF, BGP, IS-IS, MPLS, MPLS LDP, RSVP-TE, PWE3, and PIM can dynamically trigger the establishment of
BFD sessions.
When the two ends of a BFD session create discriminators in different modes:
If the discriminators on the local end are specified manually, the discriminators on the remote end must also be
specified manually.
If you configure a static BFD session with automatically negotiated discriminators on the local end, you can
configure a static BFD session with automatically negotiated discriminators or configure a dynamic BFD
session on the peer end.
If a static BFD session with automatically negotiated discriminators and a dynamic BFD session are configured
at the local end, the following principles are applicable:
If the dynamic BFD session and static BFD session with automatically negotiated discriminators share the
same configurations (the source address, destination address, outbound interface, and VPN index), the two
BFD sessions coexist.
If the dynamic BFD session named DYN_local discriminator is configured earlier than the static BFD
session with automatically negotiated discriminators, the name of the dynamic BFD session is changed to
the name of the static BFD session.
The two BFD sessions use the smaller values of BFD parameters.
Single-Hop BFD
Single-hop BFD detects connectivity of the forwarding link between two directly connected devices.
Between the two systems detected by the single-hop BFD session, only one BFD session can be set up on a specified
interface enabled with a specified data protocol. Therefore, each BFD session is bound to an interface. On the S9300,
BFD sessions are bound to Layer 2 interfaces.
The S9300 provides single-hop BFD for the link fault between IS-IS peer nodes. By detecting the link fault between
IS-IS peer nodes, the S9300 fast reports the fault to IS-IS, triggering IS-IS fast convergence.
Multi-Hop BFD
Multi-hop BFD detects IP connectivity of paths between two non-directly-connected devices. These paths may span
multiple hops or overlap. Multi-hop BFD is often used to detect reachable routes between two devices.
The S9300 provides multi-hop BFD for static routes. Generally, static routes do not have the detection mechanism.
When a network fails, the administrator needs to check the static routes manually. You can use multi-hop BFD to
check the status of static routes. The RM module determines whether a static route is available according to the status
of the BFD session.
Association Between the BFD Session Status and the Interface Status
When a transmission device exists on a directly connected link, BFD can detect a fault faster than the detection
mechanism of the link protocol on the interface. The link protocol status of the trunk interface or the VLAN interface
depends on the link protocol status of member interfaces.
Therefore, to notify the BFD detection result to the application rapidly, each interface is added with an attribute in the
interface management module of the S9300, that is, the BFD status. The BFD status indicates the status of the BFD
session that is bound to the interface. The system determines the interface status according to the link status, protocol
status, and BFD status, and then notifies the interface status to the application.
The association between the BFD session status and the interface status means that the BFD session status in the
IFNET module is modified when the BFD session status changes. This function is valid for the single-hop BFD session
that is bound to an outbound interface and uses the default multicast address.
After the BFD session is bound to an interface,
When the BFD session goes Down, the status of the interface that is bound to the BFD session also goes
Down. The application on the interface is notified of the interface status change.
When the BFD session status goes Up, the status of the interface that is bound to the BFD session also goes
Up.
This function aims to fast report BFD detection results to the application.
NOTE:
For details on how to configure BFD for static routes, see Configuring BFD for IPv4 Static Routes on a Public Network in the Quidway
S9300 Terabit Routing Switch Configuration Guide - IP Routing.
NOTE:
For details on how to configure BFD for PIM, see the Quidway S9300 Terabit Routing Switch Configuration Guide - Multicast.
BFD for PW
BFD can quickly detect faults on the PW between the local and remote PEs to support FRR on the VLL and reduce the
impact of link faults on the services. The S9300 can set up a static BFD session with manually configured
discriminators or a dynamic BFD session to detect faults on a PW.
The S9300 combines BFD and VCCV ping to detect the connectivity of the PW dynamically. In this manner,
the S9300 triggers fast switchover of the upper-layer services to protect them.
NOTE:
For details on how to configure BFD for PWs, see the Quidway S9300 Terabit Routing Switch Configuration Guide - VPN.
NOTE:
For details on how to configure BFD for VSI PWs, see the Quidway S9300 Terabit Routing Switch Configuration Guide - VPN.
Applicable Environment
To fast check directly-connected links, configure single-hop BFD.
Pre-configuration Tasks
Before configuring single-hop BFD, complete the following tasks:
Connecting each interface correctly
Configuring IP addresses for Layer 3 interfaces
Data Preparation
To configure single-hop BFD, you need the following data.
No. Data
2 Peer IP address, local interface type and number for the directly-connected link detected by BFD, and default
multicast address used by BFD if it checks the physical layer status of the link
Procedure
1. Run:
system-view
Procedure
1. Run:
system-view
NOTE:
If this multicast IP address is used by other protocols on the network, you must change the multicast IP address. The S9300s at
both ends of the BFD session must use the same multicast IP address.
If multiple BFD sessions exist on a path, for example, Layer 3 interfaces are connected through Layer 2 switching devices that
support BFD, you must configure different default multicast IP addresses for the devices where different BFD sessions are
established. In this manner, BFD packets can be correctly forwarded.
Procedure
1. Run:
system-view
5. NOTE:
6. For the BFD sessions that use the default multicast IP address, the local and remote discriminators must be different.
7. Run:
commit
Example
Run the display bfd configuration command, and you can view the configuration of a BFD session.
<Quidway> display bfd configuration static name bfd1 verbose
--------------------------------------------------------------------------------
BFD Session Configuration Name : bfd1
--------------------------------------------------------------------------------
Local Discriminator : 10 Remote Discriminator : 20
BFD Bind Type : Interface(Vlanif511)
Bind Session Type : Static
Bind Peer IP Address : 11.1.1.2
Bind Interface : Vlanif110
TOS-EXP : 7 Local Detect Multi : 3
Min Tx Interval (ms) : 1000 Min Rx Interval (ms) : 1000
WTR Interval (ms) : - Process PST : Disable
Proc Interface Status : Disable
Bind Application : No Application Bind
Session Description : -
--------------------------------------------------------------------------------
Run the display bfd interface command, and you can view information about the BFD session on a specified
interface.
<Quidway> display bfd interface gigabitethernet 3/0/1GigabitEthernet 0/0/1
--------------------------------------------------------------------------------
Interface Name MIndex Sess-Count BFD-State
--------------------------------------------------------------------------------
GigabitEthernet3/0/1 1025 1 up
Run the display bfd session command, and you can view information about a BFD session.
<Quidway> display bfd session all
--------------------------------------------------------------------------------
Local Remote PeerIpAddr State Type InterfaceName
--------------------------------------------------------------------------------
20 10 224.0.0.184 UP S_IP_IF GigabitEthernet3/0/1
--------------------------------------------------------------------------------
Total UP/DOWN Session Number : 0/1
Run the display bfd statistics session command, and you can view the statistics on a BFD session.
<Quidway> display bfd statistics session static for-ip
--------------------------------------------------------------------------------
Session MIndex : 4097 (One Hop) State : Init Name : 9to6
--------------------------------------------------------------------------------
Session Type : Static
Bind Type : IP
Local/Remote Discriminator : 20/10
Received Packets : 97
Send Packets : 314
Received Bad Packets : 169
Send Bad Packets : 0
Down Count : 32
ShortBreak Count : 0
Send Lsp Ping Count : 0
Dynamic Session Delete Count : 0
Create Time : 2007/10/14 16:48:13
Last Down Time : 2007/10/14 17:09:11
Total Time From Last DOWN : ---D:--H:--M:--S
Total Time From Create : 000D:00H:20M:59S
--------------------------------------------------------------------------------
Applicable Environment
To rapidly detect the faults occur during IP switch forwarding, configure the multi-hop BFD.
Pre-configuration Tasks
Before configuring the multi-hop BFD, complete the following tasks:
Correctly connecting each interface and configuring IP addresses for them
Configuring the routing protocol to ensure that the network layer is reachable
Data Preparation
To configure the multi-hop BFD, you need the following data.
No. Data
1 Remote IP address
Context
Do as follows on the switch:
Procedure
1. Run:
system-view
Procedure
1. Run:
system-view
4. NOTE:
5. When you set the discriminators, ensure that the local discriminator at the local end is the same as the remote discriminator at the
peer end; otherwise, the BFD session fails to be set up.
Example
Run the display bfd configuration command, and you can view the configuration of a BFD session.
<Quidway> display bfd configuration static name bfd1 verbose
--------------------------------------------------------------------------------
BFD Session Configuration Name : bfd1
--------------------------------------------------------------------------------
Local Discriminator : 22 Remote Discriminator : 11
BFD Bind Type : Interface(GigabitEthernet3/0/1)
Bind Session Type : Static
Bind Peer IP Address : 224.0.0.184
Bind Interface : GigabitEthernet3/0/1
TOS-EXP : 7 Local Detect Multi : 3
Min Tx Interval (ms) : 1000 Min Rx Interval (ms) : 1000
WTR Interval (ms) : - Process PST : Disable
Proc Interface Status : Disable
Local Demand Mode : Disable
Bind Application : No Application Bind
Session Description : -
--------------------------------------------------------------------------------
Run the display bfd session command, and you can view information about a BFD session.
<Quidway> display bfd session discriminator 22 verbose
--------------------------------------------------------------------------------
Session MIndex : 4096 (One Hop) State : Up Name : bfd1
--------------------------------------------------------------------------------
Local Discriminator : 22 Remote Discriminator : 11
Session Detect Mode : Asynchronous Mode Without Echo Function
BFD Bind Type : Interface(GigabitEthernet3/0/1)
Bind Session Type : Static
Bind Peer IP Address : 224.0.0.184
NextHop Ip Address : 224.0.0.184
Bind Interface : GigabitEthernet3/0/1
FSM Board Id : 0 TOS-EXP : 7
Min Tx Interval (ms) : 1000 Min Rx Interval (ms) : 1000
Actual Tx Interval (ms): 1000 Actual Rx Interval (ms): 1000
Local Detect Multi : 3 Detect Interval (ms) : 3000
Echo Passive : Disable Acl Number : -
Destination Port : 3784 TTL : 255
Proc Interface Status : Disable Process PST : Disable
WTR Interval (ms) : - Local Demand Mode : Disable
Active Multi : 3
Last Local Diagnostic : No Diagnostic
Bind Application : No Application Bind
Session TX TmrID : 16394 Session Detect TmrID : 16395
Session Init TmrID : - Session WTR TmrID : -
Session Echo Tx TmrID : -
PDT Index : FSM-0 | RCV-0 | IF-0 | TOKEN-0
Session Description : -
--------------------------------------------------------------------------------
Run the display bfd statistics session command, and you can view statistics a BFD session.
<Quidway> display bfd statistics session all
--------------------------------------------------------------------------------
Session MIndex : 4096 (One Hop) State : Up Name : bfd1
--------------------------------------------------------------------------------
Session Type : Static
Bind Type : IP
Local/Remote Discriminator : 22/11
Received Packets : 178
Send Packets : 177
Received Bad Packets : 0
Send Bad Packets : 0
Down Count : 0
ShortBreak Count : 0
Send Lsp Ping Count : 0
Dynamic Session Delete Count : 0
Create Time : 2007/10/14 22:26:53
Last Down Time : 0000/00/00 00:00:00
Total Time From Last DOWN : ---D:--H:--M:--S
Total Time From Create : 000D:00H:03M:03S
--------------------------------------------------------------------------------
Applicable Environment
If a dynamic BFD session is used by a remote device, a static BFD session with automatically negotiated
discriminators must be created on a local device to interwork with the remote device and support a static route to track
BFD.
Pre-configuration Tasks
Before configuring a BFD session with automatically negotiated discriminators, complete the following tasks:
Correctly connecting interfaces
Correctly configuring the IP address of a Layer 3 interface
Data Preparation
To complete the configuration, you need the following data.
No. Data
2 IP addresses of local and remote ends of a link checked by BFD, and name and number of the local interface
Context
Do as follows on the switch on which a static BFD session with automatically negotiated discriminators is used to
detect faults in a link:
Procedure
1. Run:
system-view
Procedure
1. Run:
system-view
A BFD session with different parameters is created according to the detected link type.
When creating a BFD session, you must:
When creating a single-hop BFD session for the first time, you must bind the single-hop BFD session to
the peer IP address and the local address. In addition, the configuration of the single-hop BFD session
cannot be changed after being created.
Specify the source IP address.
Specify the peer IP address instead of the multicast IP address.
Procedure
1. Run the display bfd session { all | static | dynamic | discriminator discr-value | peer-ip peer-ip [ vpn-
instance vpn-name ] } [ verbose ] command to check information about a BFD session.
Example
# Display detailed information about all the BFD sessions.
<Quidway> display bfd session all verbose
--------------------------------------------------------------------------------
Session MIndex : 4098 (One Hop) State : Up Name : staticbfd
--------------------------------------------------------------------------------
Local Discriminator : 8192 Remote Discriminator : 8192
Session Detect Mode : Asynchronous Mode Without Echo Function
BFD Bind Type : Interface(Vlanif3)
Bind Session Type : Static_Auto
Bind Peer IP Address : 10.10.10.119
NextHop Ip Address : 10.10.10.119
Bind Interface : Vlanif3
Bind Source IP Address : 10.10.10.116
FSM Board Id : 0 TOS-EXP : 7
Min Tx Interval (ms) : 1000 Min Rx Interval (ms) : 1000
Actual Tx Interval (ms): 1000 Actual Rx Interval (ms): 1000
Local Detect Multi : 3 Detect Interval (ms) : 3000
Echo Passive : Disable Acl Number : -
Destination Port : 3784 TTL : 255
Proc Interface Status : Disable Process PST : Disable
WTR Interval (ms) : -
Active Multi : 3
Last Local Diagnostic : No Diagnostic
Bind Application : AUTO
Session TX TmrID : 16396 Session Detect TmrID : 16397
Session Init TmrID : - Session WTR TmrID : -
Session Echo Tx TmrID : -
PDT Index : FSM-0 | RCV-0 | IF-0 | TOKEN-0 | OAMF-0
Session Description : -
--------------------------------------------------------------------------------
You can view that a BFD session with the type as Static_Auto is established. The local discriminator and the remote
discriminator of this BFD session are 8192 and 8192 respectively, which are obtained through automatic negotiation.
Applicable Environment
After a BFD session is set up, the sending interval, the receiving interval, and the local detection multiplier are adjusted
on the basis of the network status and performance requirement.
The Wait to Recovery (WTR) time for a BFD session is set to prevent frequent master/slave switchovers caused by
BFD session flapping.
The description of a BFD session is added to describe a link monitored by a BFD session.
If none of the preceding parameters is set, the default configurations are used.
Pre-configuration Tasks
Before adjusting BFD parameters, you need to set up a BFD session.
Data Preparation
To adjust BFD parameters, you need the following data.
No Data
Procedure
1. Run:
system-view
NOTE:
If the FSU is installed, the interval for sending packets can be set to 0 ms, 20 ms, 50 ms, 100 ms, or 1000 ms. If your switch has an
FSU installed, use one of the preceding rates as required. If you set the packet transmission rate to another value, the switch still
sends BFD packets at one of the preceding rates. In this case, the switch will sends more packets or fewer packets than configured.
If the switch sends fewer packets than configured, the BFD session state may flap, affecting the BFD function. If the FSU is not
installed, the interval can only be set to 100 ms or 1000 ms.
4. Run:
min-rx-interval interval
NOTE:
If the FSU is installed, the interval for sending packets can be set to 0 ms, 20 ms, 50 ms, 100 ms, or 1000 ms. If the FSU is not
installed, the interval can only be set to 100 ms or 1000 ms.
5. Run:
detect-multiplier multiplier
Context
NOTE:
The description command takes effect only on statically configured BFD sessions not on BFD sessions that are dynamically configured or
BFD sessions that are created by using automatically-negotiated discriminators.
Procedure
1. Run:
system-view
Context
The WTR time for a BFD session is used to prevent frequent master/slave switchovers caused by BFD session
flapping. If a BFD session changes from Down to Up, BFD reports the change to an upper-layer application after the
WTR time expires.
Do as follows on the switch:
Procedure
1. Run:
system-view
Procedure
1. Run:
system-view
Example
# Run the display bfd configuration command, and you can view the configuration of BFD.
<Quidway> display bfd configuration static for-ip verbose
--------------------------------------------------------------------------------
BFD Session Configuration Name : multi
--------------------------------------------------------------------------------
Local Discriminator : 321 Remote Discriminator : 123
BFD Bind Type : Peer IP Address
Bind Session Type : Static
Bind Peer IP Address : 10.111.111.2
TOS-EXP : 6 Local Detect Multi : 3
Min Tx Interval (ms) : 1000 Min Rx Interval (ms) : 1000
WTR Interval (ms) : 1800000 Process PST : Disable
Proc Interface Status : Disable
Local Demand Mode : Disable
Bind Application : No Application Bind
Session Description : -
--------------------------------------------------------------------------------
Run the display bfd session command, and you can view information about a BFD session.
<Quidway> display bfd session all for-ip verbose
--------------------------------------------------------------------------------
Session MIndex : 4096 (Multi Hop) State : Up Name : multi
--------------------------------------------------------------------------------
Local Discriminator : 321 Remote Discriminator : 123
Session Detect Mode : Asynchronous Mode Without Echo Function
BFD Bind Type : Peer IP Address
Bind Session Type : Static
Bind Peer IP Address : 10.111.111.2
Bind Interface : -
FSM Board Id : 0 TOS-EXP : 6
Min Tx Interval (ms) : 1000 Min Rx Interval (ms) : 1000
Actual Tx Interval (ms): 1000 Actual Rx Interval (ms): 1000
Local Detect Multi : 3 Detect Interval (ms) : 3000
Echo Passive : Disable Acl Number : -
Destination Port : 3784 TTL : 255
Proc Interface Status : Disable Process PST : Disable
WTR Interval (ms) : -
Active Multi : 3
Last Local Diagnostic : No Diagnostic
Bind Application : No Application Bind
Session TX TmrID : 16434 Session Detect TmrID : 16435
Session Init TmrID : - Session WTR TmrID : -
Session Echo Tx TmrID : -
PDT Index : FSM-0 | RCV-0 | IF-0 | TOKEN-0
Session Description : -
--------------------------------------------------------------------------------
Applicable Environment
If BFD is Up on a network, the interface bound to BFD goes Up, allowing traffic to switch back to the interface. As a
routing protocol goes Up later than the interface status, no route is available for traffic to switch back. As a result,
traffic is dropped. The time when the routing protocol goes Up and the time when the interface goes Up must be
synchronous.
Pre-configuration Tasks
Before configuring the delay of a BFD session to go Up, ensure that the switch runs normally.
Data Preparation
To complete the configuration, you need the following data.
No. Data
1 Delay time
Context
Do as follows on the switchs on which the setup of the BFD session needs to be delayed:
Procedure
1. Run:
system-view
Prerequisites
The configurations of the delay of a BFD session to go Up are complete.
Procedure
1. Run the display bfd statistics [ slot slot-id ] command to check statistics about global BFD.
Example
# After the configuration, restart the switch. After the restart, run the display bfd statistics command.
The System Session Delay Up Timer field in the command output. This field displays the status of the current system
delay Up time. OFF indicates that the system is in the normal state; Xs indicates that after X seconds, the system
recovers, and the BFD session goes Up.
<Quidway> display bfd statistics
Current Display Board Number : Main ; Current Product Register Type:
IP Multihop Destination Port : 3784
Total Up/Down Session Number : 0/1
Current Session Number :
Static session : 0 Dynamic session : 0
E_Dynamic session : 0 STATIC_AUTO session : 1
LDP_LSP session : 0 STATIC_LSP session : 0
TE_TUNNEL session : 0 TE_LSP session : 0
PW session : 0 IP session : 1
VSI PW session : 0
--------------------------------------------------------------------------------
PAF/LCS Name Maxnum Minnum Create
--------------------------------------------------------------------------------
BFD_CFG_NUM 8192 1 1
BFD_IF_NUM 512 1 1
BFD_SESSION_NUM 8192 1 1
BFD_IO_SESSION_NUM 512 1 0
BFD_PER_TUNNEL_CFG_NUM 16 1 0
--------------------------------------------------------------------------------
IO Board Current Created Session Statistics Information :(slot/number)
--------------------------------------------------------------------------------
0/1 1/0 2/0 3/0
4/0 5/0 6/0 7/0
8/0 9/0 10/0 11/0
12/0 13/0 14/0 15/0
16/0
--------------------------------------------------------------------------------
Current Total Used Discriminator Num : 1
--------------------------------------------------------------------------------
IO Board Reserved Sessions Number Information :(slot/number)
--------------------------------------------------------------------------------
0/0 1/0 2/0 3/0
4/0 5/0 6/0 7/0
8/0 9/0 10/0 11/0
12/0 13/0 14/0 15/0
16/0
--------------------------------------------------------------------------------
BFD HA Information :
--------------------------------------------------------------------------------
Core Current HA Status : Normal
Shell Current HA Status : Normal
--------------------------------------------------------------------------------
BFD for LSP Information :
--------------------------------------------------------------------------------
Ability of auto creating BFD session on egress : Disable
Period of LSP Ping : 60
System Session Delay Up Timer : OFF
--------------------------------------------------------------------------------
Applicable Environment
If devices running different versions interwork with each other, the TTL values and detection modes on both ends of a
BFD session are different, resulting in BFD packet loss. The TTL is set globally to enable Huawei devices to interwork
with Huawei devices running different S9300 versions and non-Huawei devices.
Pre-configuration Tasks
Before configuring the TTL globally, complete the following tasks:
Connecting interfaces correctly
Configuring the IP address of each Layer 3 interface correctly
Data Preparation
To configure the TTL globally, you need the following data.
No. Data
Context
Do as follows on each device:
Procedure
1. Run:
system-view
BFD is enabled globally on the local device and the BFD view is displayed.
3. Run:
peer-ip peer-ip mask-length ttl { single-hop | multi-hop } ttl-value
NOTE:
By default, in a static BFD session, the TTL for single-hop BFD packets is 255, and the TTL for multi-hop BFD packets is 254; in
a dynamic BFD session, the TTL for single-hop BFD packets is 255 and the TTL for multi-hop BFD packets is 253.
Prerequisites
The configurations of the global TTL are completed.
Procedure
Run the display bfd session { all | discriminator discr-value | dynamic | peer-ip peer-ip [ vpn-instance vpn-
instance-name ] | static } [ verbose ] command to view information about the BFD session.
Run the display bfd ttl command to view information about the globally configured TTL.
Example
After the configurations are successful, run the display bfd ttl command, and you can view information about the
global TTL.
<Quidway> display bfd ttl
--------------------------------------------------------------------------
Peer IP Mask Type Value
---------------------------------------------------------------------------
1.1.1.0 24 Single-hop 255
---------------------------------------------------------------------------
Applicable Environment
If BFD is enabled with the SNMP trap function, the NMS receives messages indicating that the BFD session is Up or
Down. If the BFD session flaps, the NMS will receive a large number of trap messages. In this case, BFD trap
messages need to be suppressed. Setting the interval at which trap messages are sent prevents overflow of trap
messages.
Pre-configuration Tasks
Before configuring the interval at which trap messages are sent, enable BFD globally.
Data Preparation
To configure the interval at which trap messages are sent, you need the following data.
No. Data
Context
Do as follows on the switch that needs to be configured with the interval at which trap messages are sent:
Procedure
1. Run:
system-view
Prerequisites
The configurations of the interval at which trap messages are sent are complete.
Procedure
Run the display current-configuration configuration bfd command to view the configuration of the BFD trap
function.
Example
Run the display current-configuration configuration bfd command, and you can view that the interval at which trap
messages are sent is 300 seconds.
<Quidway> display current-configuration configuration bfd
#
bfd
snmp-agent bfd trap-interval 300
#
return
Applicable Environment
You can configure the association between a BFD session and an interface to enable the BFD session or the interface
to send messages to each other in case of failure. As shown in Figure 6-1, CE1 is directly connected to PE1 and PE3,
and CE2 is directly connected to PE2 and PE4. BFD sessions are created between PE1 and PE2 and between PE3 and
PE4. When a fault occurs on a link between PEs, a CE needs to detect the fault to ensure reliable service transmission.
In this case, the associations between BFD sessions and interfaces can be configured. When the BFD session between
PE1 and PE2 detects a link fault, the BFD module on a PE notifies the OAM management module of the fault. This
triggers the physical status of GE 1/0/1 on a PE directly connected to a CE to become Down. The CE can then detect
the fault and switch traffic to a backup path, which ensures reliable service transmission.
Figure 6-1 Networking diagram of the association between a BFD session and an interface
Assume that the bidirectional association between a BFD session and an interface is configured on each PE. When GE
1/0/1 on PE1 connected to CE1 becomes Down, PE1 notifies the OAM management module of the fault, and then the
OAM management module forwards fault information to the BFD session associated with GE 1/0/1. The fault
information is sent to the OAM management module on PE2 through BFD, which triggers the physical status of GE
1/0/1 to become Down. In this manner, CE2 can detect the fault and switch traffic to a backup path, which ensures
reliable service transmission.
NOTE:
Currently, the association between a BFD session and an interface is inapplicable to links detected by the BFD session for PWs.
The BFD session can be associated with the interface connecting a PE to a CE but not the interface connecting two PEs (that is, the outbound
interface of the BFD session).
Pre-configuration Tasks
Before configuring the association between a BFD session and an interface, complete the following task:
Creating a BFD session
Data Preparation
To configure the association between a BFD session and an interface, you need the following data.
No. Data
Context
Do as follows on the device that needs the association:
Procedure
1. Run:
system-view
The unidirectional transmission of fault information from a BFD session to an interface is configured.
When the BFD session detects a fault, the physical status of the interface associated with the BFD session
becomes Down.
Run:
oam-bind ingress interface interface-type interface-number egress bfd-session bfd-
session-id trigger if-down
The unidirectional transmission of fault information from an interface to a BFD session is configured.
When an interface goes Down, the OAM management module can send fault information to the BFD
session associated with the interface, and then the BFD session sends the fault information to the remote
device.
Run:
oam-bind bfd-session bfd-session-id trigger if-down interface interface-type
interface-number
The bidirectional transmission of fault information between a BFD session and an interface is configured.
NOTE:
If oam-bind bfd-session bfd-session-id trigger if-down interface interface-type interface-number command is performed,
both the oam-bind ingress bfd-session bfd-session-id trigger if-downegress interface interface-type interface-
number command and the oam-bind ingress interface interface-type interface-number egress bfd-session bfd-session-
id trigger if-down command are displayed in the configuration file, indicating fault notification in opposite directions.
Prerequisites
All configurations of the association between a BFD session and an interface is complete.
Procedure
1. Run the display this command in the OAM management view to check whether a BFD session and an
interface are successfully associated.
Example
Run the display this command. You can view all associations between BFD sessions and interfaces.
[Quidway-oam-mgr] display this
#
oam-mgr
oam-bind ingress interface GigabitEthernet1/0/1 egress bfd-session 1 trigger if-down
oam-bind ingress bfd-session 1 trigger if-down egress interface GigabitEthernet1/0/1
#
return
Application Environment
As shown in Figure 6-2, BFD sessions are created between CE1 and PE1, between CE2 and PE2, and between PE1
and PE2. When a fault occurs on a link between CE1 and PE1, CE2 needs to detect the fault to ensure reliable service
transmission. In this case, the association between BFD sessions needs to be configured. When the BFD session
between CE1 and PE1 detects a fault, the BFD session on PE1 notifies the OAM management module of the fault. The
OAM management module notifies the associated BFD session on PE2. The BFD session sends the fault information
to the OAM management module on PE2. Then, the OAM management module on PE2 notifies CE2 through BFD of
the fault. CE2 can then detect the fault.
Figure 6-2 Networking diagram of the association between BFD sessions
Pre-configuration Tasks
Before configuring the association between BFD sessions, complete the following task:
Creating BFD sessions
Data Preparation
To configure the association between BFD sessions, you need the following data.
No. Data
Context
Do as follows on the device that needs the association:
Procedure
1. Run:
system-view
The unidirectional transmission of fault information from one BFD session to the other BFD session is
configured.
After the configuration, when detecting a fault, BFD session bfd-session-id1 can send fault messages to
BFD session bfd-session-id2.
Run:
oam-bind bfd-session bfd-session-id bfd-session bfd-session-id
The bidirectional transmission of fault information between two BFD sessions is configured.
NOTE:
If Step 4 is performed, two oam-bind ingress bfd-session bfd-session-id egress bfd-session bfd-sessionid commands are
displayed in the configuration file, indicating fault notification in opposite directions.
Prerequisites
All configurations of the association between BFD sessions are complete.
Procedure
1. Run the display this command in the OAM management view to check whether two BFD sessions are
successfully associated.
Example
Run the display this command. You can view all associations between BFD sessions.
[Quidway-oam-mgr] display this
#
oam-mgr
oam-bind ingress bfd-session 1 egress bfd-session 2
oam-bind ingress bfd-session 2 egress bfd-session 1
#
return
Context
CAUTION:
BFD statistics cannot be restored after being deleted. Exercise caution when using the command.
Procedure
1. Run the reset bfd statistics { all | discriminator discr-value } command in the user view to delete BFD
statistics.
Context
CAUTION:
Debugging affects system performance. After debugging is complete, run undo debugging all command to disable
debugging immediately.
If a BFD fault occurs, run the following debugging command in the user view to locate the fault.
Procedure
1. Run the debugging bfd { all | defect-detect | error | event | fsm | ha | packet | process | product-
interface | session-management | timer } command in the user view to enable the debugging of the BFD
module.
Context
For configuration examples of BFD for static LDP, see Example for Configuring Static BFD for Static LSPs in
the Quidway S9300 Terabit Routing Switch Configuration Guide - MPLS.
For configuration examples of BFD for LDP LSPs, see Example for Configuring Static BFD for LDP LSPs and
Example for Configuring Dynamic BFD for LDP LSPs in the Quidway S9300 Terabit Routing Switch Configuration
Guide - MPLS.
For configuration examples of BFD for MPLS TE tunnels, see Example for Configuring Static BFD for CR-LSPs,
Example for Configuring Static BFD for TE Tunnels, Example for Configuring Dynamic BFD for CR-LSPs, and
Example for Configuring Dynamic BFD for RSVP in the Quidway S9300 Terabit Routing Switch Configuration
Guide - MPLS.
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure a BFD session on Switch A to detect the direct link from Switch A to Switch B.
2. Configure a BFD session on Switch B to detect the direct link from Switch B to Switch A.
Data Preparation
To complete the configuration, you need the following data:
Type and number of the interface bound to the BFD session
Local and remote identifiers of the BFD session
Use the default values of the minimum sending interval, the minimum receiving interval, and the local detection
multiplier of BFD control packets.
Procedure
1. Configure single-hop BFD on Switch A.
# Enable BFD on Switch A.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] bfd
[SwitchA-bfd] quit
Configuration Files
Configuration file of Switch A
#
sysname SwitchA
#
bfd
#
bfd atob bind peer-ip default-ip interface GigabitEthernet1/0/1
discriminator local 1
discriminator remote 2
#
return
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLAN 13 on Switch A and Switch B.
2. Configure GE 1/0/1 interfaces on Switch A and Switch B as hybrid interfaces.
3. Create VLANIF 13 on Switch A and Switch B and set their IP address.
4. Create a BFD session on Switch A to detect the link between Switch A and Switch B.
5. Create a BFD session on Switch B to detect the link between Switch B and Switch A.
Data Preparation
To complete the configuration, you need the following data:
Numbers of VLANIF interfaces bound to BFD sessions
IP addresses of VLANIF interfaces
Local and remote discriminators of BFD sessions
Default values of minimum intervals for sending BFD control packets, minimum intervals for receiving BFD control
packets, and local detection multipliers
Procedure
1. On Switch A and Switch B, create VLAN 13, configure GE 1/0/1 interfaces as hybrid interfaces, and add GE
1/0/1 interfaces to VLAN 13.
# Configure Switch A.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan 13
[SwitchA-vlan13] quit
[SwitchA] interface gigabitethernet1/0/1
[SwitchA-GigabitEthernet1/0/1] port hybrid pvid vlan 13
[SwitchA-GigabitEthernet1/0/1] port hybrid untagged vlan 13
[SwitchA-GigabitEthernet1/0/1] quit
# Configure Switch B.
<Quidway> system-view
[Quidway] sysname SwitchB
[SwitchB] vlan 13
[SwitchB-vlan13] quit
[SwitchB] interface gigabitethernet1/0/1
[SwitchB-GigabitEthernet1/0/1] port hybrid pvid vlan 13
[SwitchB-GigabitEthernet1/0/1] port hybrid untagged vlan 13
[SwitchB-GigabitEthernet1/0/1] quit
2. Set IP addresses of VLANIF 13 interfaces so that Switch A can communicate with Switch B at Layer 3.
# Configure Switch A.
[SwitchA] interface vlanif13
[SwitchA-Vlanif13] ip address 10.1.1.5 24
[SwitchA-Vlanif13] quit
# Configure Switch B.
[SwitchB] interface vlanif13
[SwitchB-Vlanif13] ip address 10.1.1.6 24
[SwitchB-Vlanif13] quit
After the configuration, run the display interface vlanif command on Switch A or Switch B. You can view
that the status of VLANIF 13 is Up.
[SwitchA] display interface vlanif 13
Vlanif13 current state : UP
Line protocol current state : UP
Last line protocol up time : 2007-10-19 11:46:42 UTC-08:00
Description:HUAWEI, Quidway Series, Vlanif13 Interface
Route Port,The Maximum Frame Length is 1500
Internet Address is 10.1.1.5/24
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 0022-0033-0044
Input bandwidth utilization : --
Output bandwidth utilization : --
Configuration Files
Configuration file of Switch A
#
sysname SwitchA
#
vlan batch 13
#
bfd
#
interface Vlanif13
ip address 10.1.1.5 255.255.255.0
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 13
port hybrid untagged vlan 13
#
bfd atob bind peer-ip 10.1.1.6 interface Vlanif13
discriminator local 1
discriminator remote 2
#
return
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure a BFD session on Switch A to detect the multi-hop path from Switch A to Switch C.
2. Configure a BFD session on Switch C to detect the multi-hop path from Switch C to Switch A.
Data Preparation
To complete the configuration, you need the following data:
Peer IP address bound to the BFD session
Local and remote identifiers of the BFD session
IP address of VLANIF 10 on Switch A: 10.1.1.1/16
IP address of VLANIF 10 on Switch B: 10.1.1.2/16
IP address of VLANIF 20 on Switch B: 10.2.1.1/16
IP address of VLANIF 20 on Switch C: 10.2.1.2/16
Use the default values of the minimum sending interval, the minimum receiving interval, and the local detection
multiplier of a BFD control packet.
Procedure
1. Add interfaces to VLANs, create VLANIF interfaces, and assign an IP address to each VLANIF interface.
# Create a VLAN on Switch A and add the interface to the VLAN.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan batch 10
[SwitchA] interface gigabitethernet 1/0/1
[SwitchA-GigabitEthernet1/0/1] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet1/0/1] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/1] quit
The configurations of Switch B and Switch C are the same as the configuration of Switch A, and are not
mentioned here.
2. Configure a reachable static route between Switch A and Switch C.
[SwitchA] ip route-static 10.2.0.0 16 10.1.1.2
The configuration of Switch C is the same as the configuration of Switch A, and is not mentioned here.
3. Configure multi-hop BFD on Switch A and Switch C.
# Create a BFD session with Switch C on Switch A.
[SwitchA] bfd
[SwitchA-bfd] quit
[SwitchA] bfd atoc bind peer-ip 10.2.1.2
[SwitchA-bfd-session-atoc] discriminator local 10
[SwitchA-bfd-session-atoc] discriminator remote 20
[SwitchA-bfd-session-atoc] quit
Configuration Files
Configuration file of Switch A
#
sysname SwitchA
#
vlan batch 10
#
bfd
#
interface Vlanif10
ip address 10.1.1.1 255.255.0.0
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
bfd atoc bind peer-ip 10.2.1.2
discriminator local 10
discriminator remote 20
#
ip route-static 10.2.0.0 255.255.0.0 10.1.1.2
#
return
6.13.4 Example for Associating the BFD Status with the Interface Status
Networking Requirements
As shown in Figure 6-6, transmission devices exist on the link. After the BFD status is associated with the interface
status, the status change of the BFD session between GE 1/0/0 of Switch A and GE 1/0/0 of Switch B affects the
protocol status of the interfaces when the link between transmission devices fails. Fast convergence of routes is
triggered.
Figure 6-6 Networking diagram for associating the BFD session status with the interface status
Configuration Roadmap
The configuration roadmap is as follows:
1. Create a BFD session on Switch A.
2. Create a BFD session on Switch B.
3. Associate the BFD status with the interface status on Switch A when the BFD session is Up.
4. Associate the BFD status with the interface status on Switch B when the BFD session is Up.
Data Preparation
To complete the configuration, you need the following data:
Peer IP address bound to the BFD session
Local interface that sends and receives BFD control packets
Local discriminator and remote discriminator of the BFD session
Use the default values of the minimum sending interval, the minimum receiving interval, and the local detection
multiplier of a BFD control packet.
Procedure
1. Set the IP addresses of the interfaces through which Switch A and Switch B are directly connected.
# Assign an IP address to the interface of Switch A.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan 10
[SwitchA-vlan10] quit
[SwitchA] interface gigabitethernet 1/0/0
[SwitchA-GigabitEthernet1/0/0] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet1/0/0] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/0] quit
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ip address 10.1.1.1 24
[SwitchA-Vlanif10] quit
# Run the display bfd session all verbose command on Switch A and Switch B, and you can find that a
single-hop BFD session is set up and is in Up state. Take Switch A for example. The display is as follows:
[SwitchA] display bfd session all verbose
--------------------------------------------------------------------------------
Session MIndex : 16384 (One Hop) State : Up Name : atob
--------------------------------------------------------------------------------
Local Discriminator : 10 Remote Discriminator : 20
Session Detect Mode : Asynchronous Mode Without Echo Function
BFD Bind Type : Interface(GigabitEthernet1/0/0)
Bind Session Type : Static
Bind Peer Ip Address : 224.0.0.184
NextHop Ip Address : 224.0.0.184
Bind Interface : GigabitEthernet1/0/0
FSM Board Id : 3 TOS-EXP : 7
Min Tx Interval (ms) : 1000 Min Rx Interval (ms) : 1000
Actual Tx Interval (ms): 13000 Actual Rx Interval (ms): 13000
Local Detect Multi : 3 Detect Interval (ms) : 3000
Echo Passive : Disable Acl Number : --
Destination Port : 3784 TTL : 255
Proc interface status : Enable Process PST : Disable
WTR Interval (ms) : --
Active Multi : 3
Last Local Diagnostic : No Diagnostic
Bind Application : No Application Bind
Session TX TmrID : -- Session Detect TmrID : --
Session Init TmrID : -- Session WTR TmrID : --
Session Echo Tx TmrID : -
PDT Index : FSM-0 | RCV-0 | IF-0 | TOKEN-0
Session Description : --
--------------------------------------------------------------------------------
Run the shutdown command on GE 1/0/0 of Switch B so that the BFD session is Down.
[SwitchB] interface gigabitethernet 1/0/0
[SwitchB-GigabitEthernet1/0/0] shutdown
[SwitchB-GigabitEthernet1/0/0] quit
Run the display bfd session all verbose and display interface gigabitethernet 1/0/0 commands
on Switch A, and you can find that the status of the BFD session is Down, and the status of GE 1/0/0 is Up
(BFD status down).
[SwitchA] display bfd session all verbose
--------------------------------------------------------------------------------
Session MIndex : 16384 (One Hop) State : Down Name : atob
--------------------------------------------------------------------------------
Local Discriminator : 10 Remote Discriminator : 20
Session Detect Mode : Asynchronous Mode Without Echo Function
BFD Bind Type : Interface(GigabitEthernet1/0/0)
Bind Session Type : Static
Bind Peer Ip Address : 224.0.0.184
NextHop Ip Address : 224.0.0.184
Bind Interface : GigabitEthernet1/0/0
FSM Board Id : 3 TOS-EXP : 7
Min Tx Interval (ms) : 1000 Min Rx Interval (ms) : 1000
Actual Tx Interval (ms): 1000 Actual Rx Interval (ms): 1000
Local Detect Multi : 3 Detect Interval (ms) : 3000
Echo Passive : Disable Acl Number : --
Destination Port : 3784 TTL : 255
Proc interface status : Enable Process PST : Disable
WTR Interval (ms) : --
Active Multi : 3
Last Local Diagnostic : Neighbor Signaled Session Down
Bind Application : IFNET
Session TX TmrID : -- Session Detect TmrID : --
Session Init TmrID : -- Session WTR TmrID : --
Session Echo Tx TmrID : -
PDT Index : FSM-0 | RCV-0 | IF-0 | TOKEN-0
Session Description : --
--------------------------------------------------------------------------------
Configuration Files
Configuration file of Switch A
#
sysname SwitchA
#
vlan batch 10
#
bfd
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
bfd atob bind peer-ip default-ip interface GigabitEthernet1/0/0
discriminator local 10
discriminator remote 20
process-interface-status
#
return
Figure 6-7 Networking diagram for configuring association between a BFD session and an interface
Configuration Roadmap
The configuration roadmap is as follows:
1. Set IP addresses of interfaces according to Figure 6-7.
2. Advertise routes through OSPF and set the OSPF cost of VLANIF40 on CE1 and VLANIF60 on CE2 to 10
so that traffic is transmitted through the primary path CE1 -> PE1 -> PE3 -> CE2.
3. Create a BFD session on PE1 to detect the directly connected link between PE1 and PE2.
4. Create a BFD session on PE3 to detect the directly connected link between PE2 and PE1.
5. Associate the BFD session with GE 1/0/1 on PE1 and associate the BFD session with GE 1/0/2 on PE3.
Data Preparation
To complete the configuration, you need the following data:
VLANs allowed by interfaces
Peer IP addresses to be detected by BFD sessions
Local interface that sends and receives BFD control packets
Local discriminators and remote discriminators of BFD sessions
Default values of the minimum interval for sending packets, the minimum interval for receiving packets, and the local
detection multiplier
Procedure
1. Set IP addresses.
Configure VLANs allowed by interfaces and assign IP addresses to VLANIF interfaces. For details,
see Figure 6-7.
The configuration details are not mentioned here.
2. Configure a routing protocol.
In this example, OSPF is used.
Run OSPF on CEs and PEs. To ensure that traffic is transmitted through the path CE1 -> PE1 -> PE3 ->
CE2, increase the OSPF cost of VLANIF 40 on CE1 and VLANIF 60 on CE2. For example, change the cost
to 10.
# Configure PE1.
[PE1] ospf 1
[PE1-ospf-1] area 0.0.0.0
[PE1-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
[PE1-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255
[PE1-ospf-1-area-0.0.0.0] quit
[PE1-ospf-1] quit
The configurations of PE2, PE3, and PE4 are similar to the configuration of PE1, and are not mentioned
here.
# Configure CE1.
[CE1] ospf 1
[CE1-ospf-1] area 0.0.0.0
[CE1-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
[CE1-ospf-1-area-0.0.0.0] network 40.1.1.0 0.0.0.255
[CE1-ospf-1-area-0.0.0.0] network 100.1.1.0 0.0.0.255
[CE1-ospf-1-area-0.0.0.0] quit
[CE1-ospf-1] quit
[CE1] interface vlanif 40
[CE1-Vlanif40] ospf cost 10
[CE1-Vlanif40] quit
# Configure CE2.
[CE2] ospf 1
[CE2-ospf-1] area 0.0.0.0
[CE2-ospf-1-area-0.0.0.0] network 30.1.1.0 0.0.0.255
[CE2-ospf-1-area-0.0.0.0] network 60.1.1.0 0.0.0.255
[CE2-ospf-1-area-0.0.0.0] network 110.1.1.0 0.0.0.255
[CE2-ospf-1-area-0.0.0.0] quit
[CE2-ospf-1] quit
[CE2] interface vlanif 60
[CE2-Vlanif60] ospf cost 10
[CE2-Vlanif60] quit
Run the display ip routing-table command on CE1, and you can view that the outbound interface for the
route from CE1 to 110.1.1.0/24 is VLANIF 10. That is, traffic is transmitted along the primary path.
[CE1] display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 15 Routes : 15
# Configure PE3.
[PE3] bfd
[PE3-bfd] quit
[PE3] bfd pe3tope1 bind peer-ip 20.1.1.1 interface Vlanif20
[PE3-bfd-session-pe3tope1] discriminator local 2
[PE3-bfd-session-pe3tope1] discriminator remote 1
[PE3-bfd-session-pe3tope1] commit
[PE3-bfd-session-pe3tope1] quit
# Configure PE3.
[PE3] oam-mgr
[PE3-oam-mgr] oam-bind bfd-session 2 trigger if-down interface gigabitethernet 1/0/2
[PE3-oam-mgr] quit
Run the display ip routing table command on CE1 to check the route from CE1 to CE2. The next hop
of 110.1.1.0/24 is 40.1.1.2. That is, the traffic is forwarded through the backup path.
[CE1] display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 15 Routes : 15
Configuration Files
Configuration file of CE1
#
sysname CE1
#
vlan batch 10 40 100
#
bfd
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.252
#
interface Vlanif40
ip address 40.1.1.1 255.255.255.252
ospf cost 10
#
interface Vlanif100
ip address 100.1.1.1 255.255.255.252
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface GigabitEthernet1/0/2
port hybrid pvid vlan 40
port hybrid untagged vlan 40
#
interface GigabitEthernet1/0/3
port hybrid pvid vlan 100
port hybrid untagged vlan 100
#
ospf 1
area 0.0.0.0
network 10.1.1.0 0.0.0.255
network 40.1.1.0 0.0.0.255
network 100.1.1.0 0.0.0.255
#
return
Configuration Roadmap
The configuration roadmap is as follows:
1. Create BFD sessions between CE1 and PE1, between PE1 and PE3, and between PE3 and CE2.
2. On PE1, configure bidirectional transmission of fault notification messages between CE1 and PE1 and
between PE1 and PE3.
3. On PE3, configure bidirectional transmission of fault notification messages between PE1 and PE3 and
between PE3 and CE2.
NOTE:
In this example, PEs and CEs are Switches.
Data Preparation
To complete the configuration, you need the following data:
VLAN IDs of frames that are allowed on the interfaces
Peer IP address bound to the BFD session
Local interface that sends and receives BFD control packets
Local discriminator and remote discriminator of the BFD session
Default values of the minimum interval for sending packets, the minimum interval for receiving packets, and the local
detection multiplier
Procedure
1. Set IP addresses.
Configure the VLAN IDs of frames allowed by interfaces and assign IP addresses to VLANIF interfaces. For
details, see Figure 6-8.
The configuration details are not mentioned here.
2. Configure the routing protocol.
In this example, OSPF is used.
Run OSPF on CE and PE devices. To ensure that traffic is transmitted through the path CE1 -> PE1 -> PE3 -
> CE2, increase the OSPF cost on VLANIF 40 of CE1 and VLANIF 60 of CE2. For example, change the
cost to 10.
# Configure PE1.
[PE1] ospf 1
[PE1-ospf-1] area 0.0.0.0
[PE1-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
[PE1-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255
[PE1-ospf-1-area-0.0.0.0] quit
[PE1-ospf-1] quit
The configurations of PE2, PE3, and PE4 are similar to the configuration of PE1, and are not mentioned
here.
# Configure CE1.
[CE1] ospf 1
[CE1-ospf-1] area 0.0.0.0
[CE1-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
[CE1-ospf-1-area-0.0.0.0] network 40.1.1.0 0.0.0.255
[CE1-ospf-1-area-0.0.0.0] network 100.1.1.0 0.0.0.255
[CE1-ospf-1-area-0.0.0.0] quit
[CE1-ospf-1] quit
[CE1] interface vlanif 40
[CE1-Vlanif40] ospf cost 10
[CE1-Vlanif40] quit
# Configure CE2.
[CE2] ospf 1
[CE2-ospf-1] area 0.0.0.0
[CE2-ospf-1-area-0.0.0.0] network 30.1.1.0 0.0.0.255
[CE2-ospf-1-area-0.0.0.0] network 60.1.1.0 0.0.0.255
[CE2-ospf-1-area-0.0.0.0] network 110.1.1.0 0.0.0.255
[CE2-ospf-1-area-0.0.0.0] quit
[CE2-ospf-1] quit
[CE2] interface vlanif 60
[CE2-Vlanif60] ospf cost 10
[CE2-Vlanif60] quit
Run the display ip routing-table command on CE1, and you can view that the outgoing interface for the
route from CE1 to 110.1.1.0/24 is VLANIF 10. That is, the traffic is transmitted through the primary path.
[CE1] display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 15 Routes : 15
# Configure PE1.
[PE1] bfd
[PE1-bfd] quit
[PE1] bfd pe1toce1 peer-ip 10.1.1.1 interface vlanif 10
[PE1-bfd-session-pe1toce1] discriminator local 11
[PE1-bfd-session-pe1toce1] discriminator remote 10
[PE1-bfd-session-pe1toce1] quit
[PE1] bfd pe1tope3 peer-ip 20.1.1.2 interface vlanif 20
[PE1-bfd-session-pe1tope3] discriminator local 13
[PE1-bfd-session-pe1tope3] discriminator remote 31
[PE1-bfd-session-pe1tope3] quit
# Configure PE3.
[PE3] bfd
[PE3-bfd] quit
[PE3] bfd pe3toce2 peer-ip 30.1.1.2 interface vlanif 30
[PE3-bfd-session-pe3toce2] discriminator local 32
[PE3-bfd-session-pe3toce2] discriminator remote 23
[PE3-bfd-session-pe3toce2] quit
[PE3] bfd pe3tope1 peer-ip 20.1.1.1 interface vlanif 20
[PE3-bfd-session-pe3tope1] discriminator local 31
[PE3-bfd-session-pe3tope1] discriminator remote 13
[PE3-bfd-session-pe3tope1] quit
# Configure CE2.
[CE2] bfd
[CE2-bfd] quit
[CE2] bfd ce2tope3 peer-ip 30.1.1.1 interface vlanif 10
[CE2-bfd-session-ce2tope3] discriminator local 23
[CE2-bfd-session-ce2tope3] discriminator remote 32
[CE2-bfd-session-ce2tope3] quit
After the configuration, run the display bfd session all command on PEs and CEs, and you can view that the
status of the BFD sessions is Up. Take the display on PE1 as an example.
[PE1] display bfd session all
--------------------------------------------------------------------------------
Local Remote PeerIpAddr State Type InterfaceName
--------------------------------------------------------------------------------
11 10 10.1.1.1 Up S_IP_IF Vlanif10
13 31 20.1.1.2 Up S_IP_IF Vlanif20
--------------------------------------------------------------------------------
Total UP/DOWN Session Number : 1/0
# Configure PE3.
[PE1] oam-mgr
[PE1-oam-mgr] oam-bind bfd-session 31 bfd-session 32
[PE1-oam-mgr] quit
Run the display bfd session all verbose command on CE1 or CE3, and you can view that the status of the
BFD session is Down. Take the display on CE1 as an example:
[CE1]display bfd session all verbose
--------------------------------------------------------------------------------
Session MIndex : 4096 (One Hop) State : Down Name : ce1tope1
--------------------------------------------------------------------------------
Local Discriminator : 10 Remote Discriminator : 11
Session Detect Mode : Asynchronous Mode Without Echo Function
BFD Bind Type : Interface(Vlanif10)
Bind Session Type : Static
Bind Peer IP Address : 10.1.1.2
NextHop Ip Address : 10.1.1.2
Bind Interface : Vlanif10
FSM Board Id : 0 TOS-EXP : 7
Min Tx Interval (ms) : 1000 Min Rx Interval (ms) : 1000
Actual Tx Interval (ms): 1000 Actual Rx Interval (ms): 1000
Local Detect Multi : 3 Detect Interval (ms) : -
Echo Passive : Disable Acl Number : -
Destination Port : 3784 TTL : 255
Proc Interface Status : Disable Process PST : Disable
WTR Interval (ms) : -
Last Local Diagnostic : No Diagnostic
Bind Application : ETHOAM
Session TX TmrID : 16392 Session Detect TmrID : -
Session Init TmrID : - Session WTR TmrID : -
Session Echo Tx TmrID : -
PDT Index : FSM-0 | RCV-0 | IF-0 | TOKEN-0 | OAMF-1
Session Description : -
--------------------------------------------------------------------------------
Run the display ip routing table command on CE1 to check the route from CE1 to CE2. The next hop
of 110.1.1.0/24 is 40.1.1.2. That is, the traffic is forwarded through the standby path.
[CE1] display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 15 Routes : 15
Configuration Files
Configuration file of CE1
#
sysname CE1
#
vlan batch 10 40 100
#
bfd
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.252
#
interface Vlanif40
ip address 40.1.1.1 255.255.255.252
ospf cost 10
#
interface Vlanif100
ip address 100.1.1.1 255.255.255.252
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface GigabitEthernet1/0/2
port hybrid pvid vlan 40
port hybrid untagged vlan 40
#
interface GigabitEthernet1/0/3
port hybrid pvid vlan 100
port hybrid untagged vlan 100
#
bfd ce1tope1 bind peer-ip 10.1.1.2 interface Vlanif10
discriminator local 10
discriminator remote 11
commit
#
ospf 1
area 0.0.0.0
network 10.1.1.0 0.0.0.255
network 40.1.1.0 0.0.0.255
network 100.1.1.0 0.0.0.255
#
return