Follow these steps to configure loop detection (LD) protocol globally and at the interface and VLAN level.
Procedure
-
Enter global configuration mode.
device# configure terminal
-
Enter the
protocol loop-detection command to enable loop detection, enter Protocol Loop Detect configuration mode, and configure a variety of global options.
device(config)# protocol loop-detection
-
(Optional) Enter the
hello-interval command to change the hello interval from the default.
device(config-loop-detect)# hello-interval 2000
-
(Optional) Enter the
shutdown-time command to change from the default the interval after which an interface that is shut down by loop detection (LD) protocol is automatically reenabled.
device(config-loop-detect)# shutdown-tiome 20
-
(Optional) Enter the
raslog-duration command to change from default the interval between RASLog messages that are sent when a port is disabled by the loop detection (LD) protocol.
device(config-loop-detect)# raslog-duration 20
-
Enable LD at the interface level.
-
In global configuration mode, specify an interface (either an Ethernet interface or a port-channel interface).
device(config)# interface ethernet 0/6
-
In interface subtype configuration mode, enter the
loop-detection command.
device(conf-if-eth-0/6)# loop-detection
-
Enable LD at the VLAN level.
-
In global configuration mode, create a VLAN.
-
In VLAN configuration mode, enter the
loop-detection command.
device(config-vlan-5)# loop-detection
-
Associate the VLAN with an interface.
-
In global configuration mode, specify an interface (either an Ethernet interface or a port-channel interface).
device(config)# interface ethernet 0/6
-
In interface subtype configuration mode, enter the
loop-detection vlan command and specify a VLAN. (The VLAN must already be created.)
device(conf-if-eth-0/6)# loop-detection vlan 5
-
(Optional) Disable the shutting down of an interface (Ethernet or port-channel) as a result of the loop detection (LD) protocol.
-
In global configuration mode, specify an interface (either an Ethernet interface or a port-channel interface).
device(config)# interface ethernet 0/6
-
In interface subtype configuration mode, enter the
loop-detection shutdown-disable command.
device(conf-if-eth-0/6)# loop-detection shutdown-disable
-
(Optional) Disable the shutting down of an interface (Ethernet or port-channel) as a result of the loop detection (LD) protocol.
-
In global configuration mode, specify an interface (either an Ethernet interface or a port-channel interface).
device(config)# interface ethernet 0/6
-
In interface subtype configuration mode, enter the
loop-detection shutdown-disable command.
device(conf-if-eth-0/6)# loop-detection shutdown-disable
-
Confirm the LD configuration, using the
show loop-detection command with a variety of options.
-
To display LD information at the system level, enter the
show loop-detection command as in the following example.
device# show loop-detection
Strict Mode:
------------------------
Number of loop-detection instances enabled: 1
Interface: eth 0/6
Enabled on VLANs: 100
Shutdown Disable: No
Interface status: UP
Auto enable in: Never
Packet Statistics:
vlan sent rcvd disable-count
100 100 0 0
Loose Mode:
------------------------
Number of LD instances: 2
Disabled Ports: 2/7
Packet Statistics:
vlan sent rcvd disable-count
100 100 0 0
-
To display ports disabled by LD, enter the
show loop-detection disabled-ports command as in the following example.
device# show loop-detection disabled-ports
Ports disabled by loop detection
-------------------------------------------
port age(min) disable cause
0/6 5 Disabled by Self
-
To display global LD configuration values, enter the
show loop-detection globals command.
device# show loop-detection globals
Loop Detection: Disabled
Shutdown-time (minutes): 0
Hello-time (msec): 1000
Raslog-duration (minutes): 10
-
Use the clear loop-detection command in privileged EXEC mode with a variety of options to reenable ports that were disabled by LD and clear the LD statistics.
-
To enable LD-disabled ports and clear LD statistics on all interfaces, enter the
clear loop-detection command.
device# clear loop-detection
-
To enable LD-disabled ports and clear LD statistics on an Ethernet interface, enter the
clear loop-detection interface ethernet command.
device# clear loop-detection interface ethernet 0/6
-
To enable LD-disabled ports and clear LD statistics on a port-channel interface, enter the
clear loop-detection interface port-channel
command.
device# clear loop-detection interface port-channel 20
-
To enable LD-disabled ports and clear LD statistics on a VLAN, enter the
clear loop-detection interface vlan command.
device# clear loop-detection interface vlan 10