- Table of Contents
-
- 04-Layer 2 - LAN Switching Command Reference
- 00-Preface
- 01-VLAN Commands
- 02-MAC Address Table Commands
- 03-Spanning Tree Commands
- 04-Ethernet Link Aggregation Commands
- 05-Port Isolation Commands
- 06-QinQ Commands
- 07-VLAN Mapping Commands
- 08-BPDU Tunneling Commands
- 09-GVRP Commands
- 10-Loopback Detection Commands
- 11-MAC-in-MAC Commands
- 12-LLDP Commands
- 13-MVRP Commands
- Related Documents
-
Title | Size | Download |
---|---|---|
10-Loopback Detection Commands | 83.87 KB |
display loopback-detection
Syntax
display loopback-detection [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display loopback-detection command to display the operating status of the loopback detection function.
Example
# Display the loopback detection operating status.
<Sysname> display loopback-detection
Loopback-detection is running.
Detection interval is 30 second(s).
Action mode: None
Loopback-detection is enabled on the following VLAN(s):
1, 20, 315, 1001, 2008, 2010-2015, 2026
Loopback is detected on the following interface(s):
GigabitEthernet4/0/2
Table 1 Output description
Field |
Description |
Detection interval is 30 second(s) |
The loopback detection interval is 30 seconds. |
Action mode |
The loopback detection action: · None—When detecting a looped port, the system prints log information and sends trap messages. · Shutdown—When detecting a looped port, the system prints log information, sends trap messages, and shuts down the port. |
loopback-detection action
Syntax
loopback-detection action { none | shutdown }
undo loopback-detection action
View
System view
Default level
2: System level
Parameters
none: Sets the loopback detection action to none. With this keyword selected, when detecting a looped port, the system prints log information and sends trap messages.
shutdown: Sets the loopback detection action to shutdown. With this keyword selected, when detecting a looped port, the system prints log information, sends trap messages, and shuts down the port to disable the port from sending and receiving packets (including loopback detection frames).
Description
Use the loopback-detection action command to configure the loopback detection action.
Use the undo loopback-detection action command to restore the default.
By default, the loopback detection action is none.
Related commands: display loopback-detection.
Example
# Set the loopback detection action to shutdown.
<Sysname> system-view
[Sysname] loopback-detection action shutdown
loopback-detection enable
Syntax
In system view:
loopback-detection enable vlan { vlan-list | all }
undo loopback-detection enable vlan { vlan-list | all }
In VLAN view:
loopback-detection enable
undo loopback-detection enable
View
System view, VLAN view
Default level
2: System level
Parameters
vlan-list: VLAN list, in the format of vlan-list = { vlan-id [ to vlan-id ] }&<1-10>, where vlan-id represents the VLAN ID and ranges from 1 to 4094 and &<1-10> indicates you can specify up to 10 VLAN IDs or VLAN ID ranges. The VLANs specified by this VLAN list must already exist.
all: Specifies all existing VLANs.
Description
Use the loopback-detection enable command to enable loopback detection.
Use the undo loopback-detection enable command to disable loopback detection.
By default, the loopback detection function is disabled.
In system view, you can enable loopback detection for ports in multiple or all existing VLANs.
In VLAN view, you can enable loopback detection only for ports in the VLAN.
Related commands: display loopback-detection.
Example
# Enable loopback detection for VLAN 10 through VLAN 100 in system view.
<Sysname> system-view
[Sysname] loopback-detection enable vlan 10 to 100
# Enable loopback detection for VLAN 10 in VLAN view.
<Sysname> system-view
[Sysname] vlan 10
[Sysname-vlan10] loopback-detection enable
loopback-detection interval-time
Syntax
loopback-detection interval-time interval
undo loopback-detection interval-time
View
System view
Default level
2: System level
Parameters
interval: Specifies the loopback detection interval (in seconds), ranging from 1 to 300.
Description
Use the loopback-detection interval-time command to configure the loopback detection interval.
Use the undo loopback-detection interval-time command to restore the default.
By default, the loopback detection interval is 30 seconds.
Related commands: display loopback-detection.
Example
# Set the loopback detection interval to 10 seconds.
<Sysname> system-view
[Sysname] loopback-detection interval-time 10