Configuration Guide Vol. 2


17.2.2 Configuring L2 Loop Detection

The following describes how to configure L2 loop detection. Switch C is used in the figure below as an example.

Specify ports 1/0/1 and 1/0/2 as uplink ports because they are connected to the core network. Set ports 1/0/3 and 1/0/4 as detecting and blocking ports because they are connected to lower-level switches.

Figure 17-6: Sample L2 Loop-Detection Configuration

[Figure Data]

<Structure of this section>

(1) Configuring L2 Loop-Detect Feature

Points to note

In the configuration file for L2 loop detection, enable L2 loop detection for the entire switch and specify the ports on which to actually detect L2 loop failures.

Command examples

  1. (config)# loop-detection enable

    Enables L2 loop detection on the Switch.

  2. (config)# interface range gigabitethernet 1/0/1-2

    (config-if-range)# loop-detection uplink-port

    (config-if-range)# exit

    Sets ports 1/0/1 and 1/0/2 as uplink ports. With this specification, if an L2 loop detection frame is received on ports 1/0/1 and 1/0/2, operations based on the port type of the source port are performed for the source port.

  3. (config)# interface range gigabitethernet 1/0/3-4

    (config-if-range)# loop-detection send-inact-port

    (config-if-range)# exit

    Sets ports 1/0/3 and 1/0/4 as detecting and blocking ports. With this specification, the ports 1/0/3 and 1/0/4 send L2 loop detection frames.In addition, if a loop failure is detected on either of these ports, the port is deactivated.

(2) Setting the Sending Interval for L2 Loop-Detected Frames

Points to note

Frames exceeding the maximum rate for sending L2 loop detection frames will not be sent. In addition, loop failures will no longer be able to be detected on ports or the VLANs from which the frames could not be sent. If the maximum rate for sending L2 loop detection frames is exceeded, specify a longer interval so that no frames will exceed the maximum sending rate.

Command examples

  1. (config)# loop-detection interval-time 60

    Sets the L2 loop detection frame sending interval to 60 seconds.

(3) Setting inactive status

Points to note

Normally, a port is deactivated if a loop failure is detected, in which case you do not need to change the initial value (one occurrence). However, to avoid deactivating a port due to a momentary loop, specify the number of L2 loop detection frames to be received before the port is deactivated.

Command examples

  1. (config)# loop-detection threshold 100

    Deactivates a port when 100 L2 loop detection frames have been received.

  2. (config)# loop-detection hold-time 60

    Holds the number of received L2 loop detection frames for 60 seconds. The period starts from the time the last frame was received.

(4) Setting Automatic Recovery Time

Points to note

The example below shows how to activate a deactivated port automatically.

Command examples

  1. (config)# loop-detection auto-restore-time 300

    Sets deactivated ports to automatically activate in 300 seconds.