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.
Link connectivity and quality on the network are tested before the network is started.
Link quality is dynamically monitored after links are properly started.
Traffic is switched to a backup link if the primary link fails.
Configure basic EFM functions on CE1 and CE4 to monitor link connectivity.
Configure remote loopback on CE1 to test the connectivity and performance of the link between CE1 and CE4 before the link is used to transmit services.
Configure link monitoring on CE1 to monitor the performance and quality of the link between CE1 and CE4.
Configure association between EFM and interfaces on CE4. When the link between CE1 and CE4 becomes faulty, traffic sent from CE4 will not be sent along the link.
# Enable EFM on CE1 globally.
<HUAWEI> system-view [HUAWEI] sysname CE1 [CE1] efm enable
# Enable EFM on GE0/0/2 of CE1.
[CE1] interface gigabitethernet 0/0/2 [CE1-GigabitEthernet0/0/2] efm enable [CE1-GigabitEthernet0/0/2] quit
# Enable EFM on CE4 globally.
<HUAWEI> system-view [HUAWEI] sysname CE4 [CE4] efm enable
# Configure the EFM mode to passive on GE0/0/1 of CE4.
[CE4] interface gigabitethernet 0/0/1 [CE4-GigabitEthernet0/0/1] efm mode passive
# Enable EFM on GE0/0/1 of CE4.
[CE4-GigabitEthernet0/0/1] efm enable [CE4-GigabitEthernet0/0/1] quit
# Verify the configuration.
If EFM is correctly configured on CE1 and CE4, GE0/0/2 and GE0/0/1 will enter the handshake phase. Run the display efm session { all | interface interface-type interface-num } command on CE1 or CE4. The command output shows that the EFM status is detect on GE0/0/2 or GE0/0/1.
[CE1] display efm session all Interface EFM State Loopback Timeout ---------------------------------------------------------------------- GigabitEthernet0/0/2 detect --
# Configure remote loopback on CE1.
[CE1] interface gigabitethernet 0/0/2 [CE1-GigabitEthernet0/0/2] efm loopback start [CE1-GigabitEthernet0/0/2] quit
Verify the configuration.
After configuring remote loopback, run the display efm session { all | interface interface-type interface-num } command on CE1. The command output shows that the EFM status is loopback (control) on GE0/0/2.
[CE1] display efm session interface gigabitethernet 0/0/2 Interface EFM State Loopback Timeout ---------------------------------------------------------------------- GigabitEthernet0/0/2 loopback (control) 20
After configuring remote loopback, run the display efm session { all | interface interface-type interface-num } command on CE4. The command output shows that the EFM status is loopback (be controlled) on GE0/0/1.
[CE4] display efm session interface gigabitethernet 0/0/1 Interface EFM State Loopback Timeout ---------------------------------------------------------------------- GigabitEthernet0/0/1 loopback (be controlled) --
[CE1] test-packet start interface gigabitethernet 0/0/2 Please wait.............. Info: The test is completed.
[CE1] display test-packet result TestResult Value -------------------------------------------------------- PacketsSend : 5 PacketsReceive : 5 PacketsLost : 0 BytesSend : 320 BytesReceive : 320 BytesLost : 0 StartTime : 03-05-2012 14:28:16 UTC+03:00 EndTime : 03-05-2012 14:29:22 UTC+03:00
Link quality can be evaluated based on data in the preceding command output.
[CE1] interface gigabitethernet 0/0/2 [CE1-GigabitEthernet0/0/2] efm loopback stop [CE1-GigabitEthernet0/0/2] quit
By default, the timeout interval for remote loopback is 20 minutes. The remote loopback test stops after 20 minutes. To disable remote loopback, perform the preceding procedures.
After disabling remote loopback, run the display efm session { all | interface interface-type interface-num } command on CE1 or CE4. The command output shows that the EFM status is detect on the interfaces at both ends of the link. For example:
[CE1] display efm session all Interface EFM State Loopback Timeout ---------------------------------------------------------------------- GigabitEthernet0/0/2 detect --
If the link is working properly, perform the following operations to monitor the link in real time.
# Configure errored code detection on GE0/0/2 of CE1.
[CE1] interface gigabitethernet 0/0/2 [CE1-GigabitEthernet0/0/2] efm error-frame period 5 [CE1-GigabitEthernet0/0/2] efm error-frame threshold 5 [CE1-GigabitEthernet0/0/2] efm error-frame notification enable
# Configure errored frame detection on GE0/0/2 of CE1.
[CE1-GigabitEthernet0/0/2] efm error-code period 5 [CE1-GigabitEthernet0/0/2] efm error-code threshold 5 [CE1-GigabitEthernet0/0/2] efm error-code notification enable
# Configure errored frame second detection on GE0/0/2 of CE1.
[CE1-GigabitEthernet0/0/2] efm error-frame-second period 120 [CE1-GigabitEthernet0/0/2] efm error-frame-second threshold 5 [CE1-GigabitEthernet0/0/2] efm error-frame-second notification enable [CE1-GigabitEthernet0/0/2] quit
After the preceding configurations are complete, GE0/0/2 on CE1 and GE0/0/1 on CE4 will enter the handshake phase. Run the display efm session { all | interface interface-type interface-num } command on CE1 or CE4. The command output shows that the EFM status is detect on GE0/0/2 or GE0/0/1.
[CE1] display efm session interface gigabitethernet 0/0/2 Interface EFM State Loopback Timeout ---------------------------------------------------------------------- GigabitEthernet0/0/2 detect --
After the preceding configurations are complete, run the display efm { all | interface interface-type interface-number } command to check EFM configurations.
[CE1] display efm interface gigabitethernet 0/0/2 Item Value ---------------------------------------------------- Interface: GigabitEthernet0/0/2 EFM Enable Flag: enable Mode: active Loopback IgnoreRequest: no OAMPDU MaxSize: 128 OAMPDU Timeout: 5000 OAMPDU Interval: 1000 Parser: forward Multiplexer: forward ErrCodeNotification: enable ErrCodePeriod: 5 ErrCodeThreshold: 5 ErrFrameNotification: enable ErrFramePeriod: 5 ErrFrameThreshold: 5 ErrFrameSecondNotification: enable ErrFrameSecondPeriod: 120 ErrFrameSecondThreshold: 5 Hold Up Time: 0 ThresholdEvtTriggerErrDown: disable TriggerIfDown: disable TriggerMacRenew: disable Remote MAC: 0010-0010-0010 Remote EFM Enable Flag: enable Remote Mode: passive Remote MaxSize: 128 Remote Loopback IgnoreRequest: no Remote State: -- Remote Parser: forward Remote Multiplexer: forward ErrFramePeriodNotification: disable ErrFramePeriodPeriod: 200000 ErrFramePeriodThreshold: 1 Loopback Remain Time: --
[CE4] oam-mgr [CE4-oam-mgr] oam-bind efm interface gigabitethernet 0/0/1 trigger if-down interface gigabitethernet 0/0/2 [CE4-oam-mgr] quit
After the preceding configurations are complete, run the shutdown command on GE0/0/2 of CE1. The command output shows that the current state field value is TRIGGER DOWN (3AH) on GE0/0/2 of CE4.
[CE1] interface gigabitethernet 0/0/2 [CE1-GigabitEthernet0/0/2] shutdown [CE1-GigabitEthernet0/0/2] quit
[CE4] display interface gigabitethernet 0/0/2 GigabitEthernet0/0/2 current state : TRIGGER DOWN (3AH) Line protocol current state : DOWN ...
The output of the display interface gigabitethernet 0/0/2 command displays information that you need to concern and "..." indicates that information is omitted.
CE1 configuration file
# sysname CE1 # efm enable # interface GigabitEthernet0/0/2 efm enable efm error-frame period 5 efm error-frame threshold 5 efm error-frame notification enable efm error-frame-second period 120 efm error-frame-second threshold 5 efm error-frame-second notification enable efm error-code period 5 efm error-code threshold 5 efm error-code notification enable # return
CE4 configuration file
# sysname CE4 # efm enable # interface GigabitEthernet0/0/1 efm mode passive efm enable # oam-mgr oam-bind ingress efm interface GigabitEthernet0/0/1 trigger if-down egress interface GigabitEthernet0/0/2 oam-bind ingress interface GigabitEthernet0/0/2 egress efm interface GigabitEthernet0/0/1 trigger if-down # return