Configuration procedure
Configure Device A:
# Configure GigabitEthernet 1/0/1 to operate in active Ethernet OAM mode, and enable Ethernet OAM for it.
<DeviceA> system-view [DeviceA] interface gigabitethernet 1/0/1 [DeviceA-GigabitEthernet1/0/1] oam mode active [DeviceA-GigabitEthernet1/0/1] oam enable
# Set the errored frame event detection window to 20000 milliseconds, and set the errored frame event triggering threshold to 10.
[DeviceA-GigabitEthernet1/0/1] oam errored-frame window 200 [DeviceA-GigabitEthernet1/0/1] oam errored-frame threshold 10 [DeviceA-GigabitEthernet1/0/1] quit
Configure Device B:
# Configure GigabitEthernet 1/0/1 to operate in passive Ethernet OAM mode (the default), and enable Ethernet OAM for it.
<DeviceB> system-view [DeviceB] interface gigabitethernet 1/0/1 [DeviceB-GigabitEthernet1/0/1] oam mode passive [DeviceB-GigabitEthernet1/0/1] oam enable [DeviceB-GigabitEthernet1/0/1] quit
Verify the configuration:
Use the display oam critical-event command to display the statistics of Ethernet OAM critical link events. For example:
# Display the statistics of Ethernet OAM critical link events on all the ports of Device A.
[DeviceA] display oam critical-event -----------[GigabitEthernet1/0/1] ----------- Local link status : UP Event statistics Link fault : Not occurred Dying gasp : Not occurred Critical event : Not occurred
The output shows that no critical link event occurred on the link between Device A and Device B.
Use the display oam link-event command to display the statistics of Ethernet OAM link events. For example:
# Display Ethernet OAM link event statistics of the local end of Device A.
[DeviceA] display oam link-event local ------------ [GigabitEthernet1/0/1] ----------- Link status: UP OAM local errored frame event Event time stamp : 5789 x 100 milliseconds Errored frame window : 200 x 100 milliseconds Errored frame threshold : 10 error frames Errored frame : 13 error frames Error running total : 350 error frames Event running total : 17 events
The output shows the following:
350 errors occurred after Ethernet OAM is enabled on Device A.
17 errors were caused by error frames.
The link is unstable.