The efm loopback command configures an interface to initiate or end an EFM remote loopback.
Parameter | Description | Value |
---|---|---|
start |
Initiate an EFM remote loopback. |
- |
timeout timeout |
Specifies the timeout interval of an EFM remote loopback. |
The value is an integer that ranges from 0 to 1000, in minutes. The default value is 20. The value 0 indicates that no timeout interval is set. That is, the interface remains in remote loopback state. |
stop |
Ends an EFM remote loopback. |
- |
Ethernet interface view, GE interface view, XGE interface view, 25GE interface view, 40GE interface view, 100GE interface view, MultiGE interface view, port group view
The S5720-EI, S6720-EI and S6720S-EI can only initiate EFM OAM remote loopback requests.
Usage Scenario
EFM remote loopback is used to locate link failures and test the link quality. After remote loopback is enabled, configure the local device to send test packets to the peer device. Based on the statistics about sent and received test packets, you can check connectivity and performance of a specified link.
If start is specified, an interface on the local device sends a remote loopback message to the peer device. After receiving the message, the peer device enters the loopback state. In loopback state, the peer sends back all received packets, except EFM OAMPDUs, to the local device through the interface that has received these packets.
If remote loopback is left enabled, the remote device keeps looping back service data, causing a service interruption. To prevent this problem, a capability can be configured to disable remote loopback automatically after a specified timeout interval. By default, the timeout interval for remote loopback is 20 minutes. The remote loopback test stops after 20 minutes. You can set the timeout interval to 0 to keep a link in remote loopback state.
The link in remote loopback state will not forward service data. Therefore, execute caution when you set the timeout interval to 0.
Prerequisites
EFM has been enabled and is in detect state.
The device has been configured to work in active mode using the efm mode active command.
Precautions
After remote loopback is enabled, all packets except EFM OAMPDUs are looped back on the remote device. EFM OAM remote loopback must be implemented on the link that does not need to forward service data. Otherwise, service data forwarding is affected.
Remote loopback is implemented successfully only when EFM protocols at the local end and the peer are in handshake state and EFM at the local end works in active mode. You can use the display efm session command to check whether EFM OAM protocols on the local interface and the peer are in handshake state.
# Configure Layer 2 interface GigabitEthernet0/0/1 to initiate an EFM OAM remote loopback.
<HUAWEI> system-view [HUAWEI] efm enable [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] efm enable [HUAWEI-GigabitEthernet0/0/1] efm loopback start
# Set the timeout interval for an EFM OAM remote loopback on Layer 2 interface GigabitEthernet0/0/1.
<HUAWEI> system-view [HUAWEI] efm enable [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] efm enable [HUAWEI-GigabitEthernet0/0/1] efm loopback start timeout 10
# Configure Layer 2 interface GigabitEthernet0/0/1 to stop an EFM OAM remote loopback.
<HUAWEI> system-view [HUAWEI] efm enable [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] efm enable [HUAWEI-GigabitEthernet0/0/1] efm loopback stop
# Configure Layer 3 interface GigabitEthernet0/0/1 to initiate an EFM OAM remote loopback.
<HUAWEI> system-view [HUAWEI] efm enable [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] undo portswitch [HUAWEI-GigabitEthernet0/0/1] efm enable [HUAWEI-GigabitEthernet0/0/1] efm loopback start
# Set the timeout interval for an EFM OAM remote loopback on Layer 3 interface GigabitEthernet0/0/1.
<HUAWEI> system-view [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] undo portswitch [HUAWEI-GigabitEthernet0/0/1] efm loopback start timeout 10
# Configure Layer 3 interface GigabitEthernet0/0/1 to stop an EFM OAM remote loopback.
<HUAWEI> system-view [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] undo portswitch [HUAWEI-GigabitEthernet0/0/1] efm loopback stop