Example for Configuring Association between EFM and BFD
Networking Requirements
As networks develop quickly, more and more IP networks are used to carry multiple services such as voice and video services. These services pose high requirements on network reliability and rapid fault detection.
Connectivity of links between CE1 and PE3, between PE3 and PE4, and between PE4 and CE2 can be detected.
When the link between CE1 and PE3 becomes faulty, CE2 can detect the fault, preventing return traffic from being forwarded to PE4.
When the link between CE1 and PE3 goes faulty, a active/standby link switchover can be implemented.
When the link between PE3 and PE4 becomes faulty, CE1 or CE2 can detect the fault.
Configuration Roadmap
Configure EFM for links between CE1 and PE3 and between CE2 and PE4 to monitor link connectivity.
Configure BFD for the link between PE3 and PE4 to monitor link connectivity.
Configure association between EFM and interfaces on CE2. When EFM detects a link fault between CE1 and PE3, traffic can be switched to the backup link and return traffic is not forwarded to PE4.
Configure association between BFD and EFM on PE3 and PE4 so that CFM and BFD can notify each other of faults.
Procedure
- Configure basic EFM functions.
# Enable EFM on CE1 globally.
<Quidway> system-view [Quidway] sysname CE1 [CE1] efm enable
# Enable EFM on CE2 globally.
<Quidway> system-view [Quidway] sysname CE2 [CE2] efm enable
# Enable EFM on PE3 globally.
<Quidway> system-view [Quidway] sysname PE3 [PE3] efm enable
# Enable EFM on PE4 globally.
<Quidway> system-view [Quidway] sysname PE4 [PE4] efm enable
# Enable EFM on GE1/0/1 of CE1.
[CE1] interface gigabitethernet 1/0/1 [CE1-GigabitEthernet1/0/1] efm enable [CE1-GigabitEthernet1/0/1] quit
# Enable EFM on GE1/0/1 of CE2.
[CE2] interface gigabitethernet 1/0/1 [CE2-GigabitEthernet1/0/1] efm enable [CE2-GigabitEthernet1/0/1] quit
# Enable EFM on GE1/0/1 of PE3.
[PE3] interface gigabitethernet 1/0/1 [PE3-GigabitEthernet1/0/1] efm enable [PE3-GigabitEthernet1/0/1] quit
# Enable EFM on GE1/0/1 of PE4.
[PE4] interface gigabitethernet 1/0/1 [PE4-GigabitEthernet1/0/1] efm enable [PE4-GigabitEthernet1/0/1] quit
# Verify the configuration.
If EFM is correctly configured on PE3, CE1, PE4, and CE2, GE1/0/1 of these devices will enter the handshake stage. Run the display efm session { all | interface interface-type interface-num } command on one of these devices. The command output shows that the EFM status on GE1/0/1 is detect.
[CE1] display efm session all Interface EFM State Loopback Timeout ---------------------------------------------------------------------- GigabitEthernet1/0/1 detect --
- Configure basic BFD functions.
BFD for IP is used as an example for configuring basic BFD functions.
# Configure basic BFD functions on PE3.
[PE3] bfd [PE3-bfd] quit [PE3] vlan 100 [PE3-vlan100] quit [PE3] interface gigabitethernet 1/0/2 [PE3-GigabitEthernet1/0/2] port link-type trunk [PE3-GigabitEthernet1/0/2] port trunk allow-pass vlan 100 [PE3-GigabitEthernet1/0/2] quit [PE3] interface vlanif 100 [PE3-Vlanif100] ip address 10.1.1.1 24 [PE3-Vlanif100] quit [PE3] bfd pedetect bind peer-ip 10.1.1.2 interface vlanif 100 [PE3-bfd-session-pedetect] discriminator local 1 [PE3-bfd-session-pedetect] discriminator remote 2 [PE3-bfd-session-pedetect] commit [PE3-bfd-session-pedetect] quit
# Configure basic BFD functions on PE4.
[PE4] bfd [PE4-bfd] quit [PE4] vlan 100 [PE4-vlan100] quit [PE4] interface gigabitethernet 1/0/2 [PE4-GigabitEthernet1/0/2] port link-type trunk [PE4-GigabitEthernet1/0/2] port trunk allow-pass vlan 100 [PE4-GigabitEthernet1/0/2] quit [PE4] interface vlanif 100 [PE4-Vlanif100] ip address 10.1.1.2 24 [PE4-Vlanif100] quit [PE4] bfd pedetect bind peer-ip 10.1.1.1 interface vlanif 100 [PE4-bfd-session-pedetect] discriminator local 2 [PE4-bfd-session-pedetect] discriminator remote 1 [PE4-bfd-session-pedetect] commit [PE4-bfd-session-pedetect] quit
# Verify the configuration.
If BFD is correctly configured on PE3 and PE4, run the display bfd session all command on PE3 or PE4. The command output shows that the BFD status is Up.
[PE3] display bfd session all -------------------------------------------------------------------------------- Local Remote PeerIpAddr State Type InterfaceName -------------------------------------------------------------------------------- 1 2 10.1.1.2 Up S_IP_IF Vlanif100 -------------------------------------------------------------------------------- Total UP/DOWN Session Number : 1/0
- Configure association between EFM and BFD.
# Configure association between EFM and BFD on PE3.
[PE3] oam-mgr [PE3-oam-mgr] oam-bind efm interface gigabitethernet 1/0/1 bfd-session 1 [PE3-oam-mgr] quit
# Configure association between EFM and BFD on PE4.
[PE4] oam-mgr [PE4-oam-mgr] oam-bind efm interface gigabitethernet 1/0/1 bfd-session 2 [PE4-oam-mgr] quit
- Configure association between EFM and interfaces on CE2.
[CE2] interface gigabitethernet 1/0/1 [CE2-GigabitEthernet1/0/1] efm trigger if-down [CE2-GigabitEthernet1/0/1] quit
- Verify the configuration.
After association functions are configured, run the shutdown command on GE1/0/1 of CE1 to simulate a fault on the link between CE1 and PE3. Run the display interface interface-type interface-num command on GE1/0/1 of CE2. The command output shows that the Line protocol current state field value is DOWN (EFM down).
[CE1] interface gigabitethernet 1/0/1 [CE1-GigabitEthernet1/0/1] shutdown [CE1-GigabitEthernet1/0/1] quit
[CE2] display interface gigabitethernet 1/0/1 GigabitEthernet1/0/1 current state : UP Line protocol current state : DOWN (EFM down) ...
The output of the display interface gigabitethernet 1/0/1 command displays information that you need to concern and "..." indicates that information is omitted.
Configuration Files
CE1 configuration file
# sysname CE1 # efm enable # interface GigabitEthernet1/0/1 efm enable # return
PE3 configuration file
# sysname PE3 # vlan batch 100 # efm enable # bfd # interface Vlanif100 ip address 10.1.1.1 255.255.255.0 # interface GigabitEthernet1/0/1 efm enable # interface GigabitEthernet1/0/2 port link-type trunk port trunk allow-pass vlan 100 # bfd pedetect bind peer-ip 10.1.1.2 interface Vlanif100 discriminator local 1 discriminator remote 2 commit # oam-mgr oam-bind ingress efm interface GigabitEthernet1/0/1 egress bfd-session 1 oam-bind ingress bfd-session 1 egress efm interface GigabitEthernet1/0/1 # return
PE4 configuration file
# sysname PE4 # vlan batch 100 # efm enable # bfd # interface Vlanif100 ip address 10.1.1.2 255.255.255.0 # interface GigabitEthernet1/0/1 efm enable # interface GigabitEthernet1/0/2 port link-type trunk port trunk allow-pass vlan 100 # bfd pedetect bind peer-ip 10.1.1.1 interface Vlanif100 discriminator local 2 discriminator remote 1 commit # oam-mgr oam-bind ingress efm interface GigabitEthernet1/0/1 egress bfd-session 2 oam-bind ingress bfd-session 2 egress efm interface GigabitEthernet1/0/1 # return
CE2 configuration file
# sysname CE2 # efm enable # interface GigabitEthernet1/0/1 efm enable efm trigger if-down # return