Configuring LD protocol

  1. Enter global configuration mode.
    device# configure terminal
  2. 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
  3. (Optional) Enter the hello-interval command to change the hello interval from the default.
    device(config-loop-detect)# hello-interval 2000
  4. (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
  5. (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
  6. Enable LD at the interface level.
    1. In global configuration mode, specify an interface (either an Ethernet interface or a port-channel interface).
      device(config)# interface ethernet 0/6
    2. In interface subtype configuration mode, enter the loop-detection command.
      device(conf-if-eth-0/6)# loop-detection
  7. Enable LD at the VLAN level.
    1. In global configuration mode, create a VLAN.
      device(config)# vlan 5
    2. In VLAN configuration mode, enter the loop-detection command.
      device(config-vlan-5)# loop-detection
  8. Associate the VLAN with an interface.
    1. In global configuration mode, specify an interface (either an Ethernet interface or a port-channel interface).
      device(config)# interface ethernet 0/6
    2. 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
  9. (Optional) Disable the shutting down of an interface (Ethernet or port-channel) as a result of the loop detection (LD) protocol.
    1. In global configuration mode, specify an interface (either an Ethernet interface or a port-channel interface).
      device(config)# interface ethernet 0/6
    2. In interface subtype configuration mode, enter the loop-detection shutdown-disable command.
      device(conf-if-eth-0/6)# loop-detection shutdown-disable
  10. (Optional) Disable the shutting down of an interface (Ethernet or port-channel) as a result of the loop detection (LD) protocol.
    1. In global configuration mode, specify an interface (either an Ethernet interface or a port-channel interface).
      device(config)# interface ethernet 0/6
    2. In interface subtype configuration mode, enter the loop-detection shutdown-disable command.
      device(conf-if-eth-0/6)# loop-detection shutdown-disable
  11. Confirm the LD configuration, using the show loop-detection command with a variety of options.
    1. 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
      
      
    2. 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    
      
      
    3. 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
    
    
  12. 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.
    1. To enable LD-disabled ports and clear LD statistics on all interfaces, enter the clear loop-detection command.
      device# clear loop-detection
    2. 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
      
    3. 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
      
    4. 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