R0106-HP MSR Router Series Layer 2 - LAN Switching Command Reference(V7)

56
Syntax
loopback-detection enable vlan { vlan-list | all }
undo loopback-detection enable vlan { vlan-list | all }
Default
The loop detection function is disabled on ports.
Views
Layer 2 Ethernet interface view
Predefined user roles
network-admin
Parameters
vlan-list: Specifies a space-separated list of up to 10 VLAN items. Each item specifies a VLAN ID or a
range of VLAN IDs in the form of vlan-id1 to vlan-id2. The value range for VLAN IDs is 1 to 4094. The
ID for vlan-id2 must be equal to or greater than the ID for vlan-id1.
all: Specifies all existing VLANs.
Usage guidelines
The per-port loop detection configuration takes effect only after you enable loop detection globally. To
enable loop detection globally, use the loopback-detection global enable command.
The global configuration applies to all ports in the specified VLAN. The per-port configuration applies to
the individual port only when the port belongs to the specified VLAN. The per-port configuration takes
precedence over the global configuration.
Example
# Enable loop detection on port GigabitEthernet 2/1/1 for VLAN 10 through VLAN 20.
<Sysname> system-view
[Sysname] interface gigabitethernet 2/1/1
[System-GigabitEthernet2/1/1] loopback-detection enable vlan 10 to 20
Related commands
display loopback-detection
loopback-detection global enable
loopback-detection global action
Use loopback-detection global action to configure the global loop protection action.
Use undo loopback-detection global action to restore the default.
Syntax
loopback-detection global action shutdown
undo loopback-detection global action
Default
When the device detects a loop on a port, it generates a log but performs no action on the port.
Views
System view