Configure Ethernet Interface Detection Function
Configure Status Flap Detection
When the Ethernet interface changes from Down to Up and if the port status flap detection is configured and it meets the detection condition, it is regarded that the status flap happens to the specified Ethernet interface or called Link-Flap and the Ethernet interface is automatically disabled and set as Error-Disabled.
Table 2-20 Configure status flap detection
Step
|
Command
|
Description
|
Enter the global configuration mode
|
configure terminal
|
-
|
Configure flap detection
|
errdisable flap-setting cause link-flap max-flaps max-flaps-number time time-value
|
Mandatory
By default, the trigger condition of executing
Link-Flap is: within 10s, the detected Ethernet interface becomes Up for at least 5 times.
|
-
When the Ethernet interface is disabled by the Link-Flap function and set as Error-Disabled and if it is necessary to recover automatically, you can configure the command errdisable recovery cause to set the above function.
Enable Loopback Test
When performing some troubleshooting, such as locating the Ethernet interface fault initially, you can enable the Ethernet interface loopback test function. The Ethernet interface enabled with the loopback test function cannot forward packets normally.
The loopback test function of the Ethernet interface includes internal loopback test and external loopback test.
During internal loopback test, change the internal receiving end and sending end of the specified Ethernet interface to make the packets sent by the Ethernet interface loopback in the device and received by the Ethernet interface. If the internal loopback test succeeds, it indicates that the Ethernet interface inside works normally. The Ethernet optical interface will be in the OMM-disabled state when it is not inserted with the optical module, and the configured internal loop cannot be UP. At this time, the port OMM-disabled state needs to be cancelled first.
During the external loopback test, first insert one self-loop cable on the Ethernet interface and the packets sent by the specified Ethernet interface return to the Ethernet interface via the self-loop cable and received by the Ethernet interface. If the external loopback test succeeds, it indicates that the Ethernet interface works normally.
Table 2-21 Enable loopback test
Step
|
Command
|
Description
|
Enter the global configuration mode
|
configure terminal
|
-
|
Enter the L2/L3 Ethernet interface configuration mode
|
interface interface-name
|
Either
After entering L2/L3 Ethernet interface configuration mode, the subsequent configuration just takes effect on the current interface.
|
Enable loopback test |
loopback { internal | external } |
Mandatory
By default, the loopback test function of the Ethernet interface is not enabled.
|
-
The device does not support the external loopback test function.