# Unique Loop Detection

## 1. Function Overview

This product offers a proprietary system to detect whether there is a loop in the network environment that was configured.
This sends a proprietary loop detection frame from LAN/SFP ports and logical interfaces (hereinafter “loop detection-compatible interfaces”) to monitor whether that same frame returns or not.
If the transmitted frame returns, the system determines that there is a loop in the port in question.

## 2. Definition of Terms Used

LDF (Loop Detection Frame)

This is a Yamaha proprietary Ethernet frame that is used to detect loops.

## 3. Function Details

### 3.1. Loop detection operating specifications

The loop detection specifications for this product are shown below.

1. The loop detection functionality in this product can be enabled/disabled for the entire system or for specific loop detection-compatible interfaces.
   To activate loop detection at all loop detection-compatible interfaces, the loop detection function must be enabled for the entire system.

   - Use the loop-detect command in global configuration mode for the system-wide setting.

   - To activate loop detection at only specific loop detection-compatible interfaces, the loop-detect command must be used in the interface mode.

2. The default settings for the loop detection function are as shown below. (In the initial state, this function is not operating.)

   - System-wide setting: Disabled

   - Setting for loop detection-compatible interfaces: Enabled

3. If both loop detection and spanning tree protocol settings are set to enabled for the entire system, the spanning tree protocol is prioritized over the loop detection-compatible interface setting.

4. If the loop detection function is enabled for this product, the following operations are performed.

   - Loop detection frames (hereafter “LDF”) are sent every two seconds from linked-up loop detection-compatible interfaces.
     However, the loop detection function is disabled at ports with mirroring specified (mirror ports).

   - If an LDF sent from a port is received by that same port, a loop is determined to have occurred and the port that received the LDF performs the following actions.

     - Port Shutdown

       - If an LDF is sent and received at the same loop detection-compatible interface, the corresponding port is shut down.

       - The linkup will be made five minutes after shutdown, and LDF transmission will resume. (If a loop has occurred, this operation will repeat.)

       - When a linkup to the relevant port is desired within five minutes of monitored time, the no shutdown command is used.

     - Port Blocking

       - In any of the following cases, the port that received the LDF will block all non-LDF frames.

         - An LDF sent from a logical interface was received at a LAN/SFP port

         - An LDF sent from a static logical interface was received at an LACP logical interface

         - Sending or receiving interfaces are the same type and the interface with the higher number received an LDF

       - The LDF will be transmitted periodically, but LDF will not be forwarded from other devices.

       - If a blocked loop detection-compatible interface does not detect an LDF sent from itself for 5 seconds, then the loop is considered resolved and normal communications are resumed.

     - Port Detected

       - In any of the following cases, the port that received the LDF will continue normal communications because other ports are blocked.

         - An LDF sent from a LAN/SFP port was received at a logical interface

         - An LDF sent from an LACP logical interface was received at a static logical interface

         - Sending and receiving interfaces are the same type and the interface with the smaller number received an LDF

   - When a loop is detected, the port lamp display on this product changes to a dedicated status, and the following SYSLOG message is output.

     - [LOOP]: inf: Detected Loop! : port1.1, 1.3 ..., sa1,3 ..., po1,3 (displayed every five seconds from the start of loop detection)

   - The port lamp display on this product is restored as communications are resumed after the loop is resolved, and the following SYSLOG message is output.

     - [LOOP]: inf: Recovered Loop! : port1.1, 1.3 … , sa1,3 …, po1,3 …

5. Shutdown and blocking actions at loop detection-compatible interfaces that have detected a loop can be overridden to perform “loop detected” actions.

   - Use the loop-detect blocking disable command for this setting.

   - If this setting is “enabled”, port blocking will be implemented on the next largest port number. (Shutdown operations will not occur.)

6. A force-clear can be performed on the loop detection status (detected, blocking) by using the loop-detect reset command. (On models equipped with a [MODE] button, this can be also done by holding down the [MODE] button for three seconds.)
   If a linkdown has occurred on the port where a loop has been detected, the detection status will be cleared. (The port lamp display is restored, and the following syslog message is outputted.)

7. The status of the loop detection function can be checked using the show loop-detect command. The following is displayed.

   - System Enable/disable status

   - Loop detection status display (status for a single loop detection-compatible interface)

8. When an LDF is received by a loop detection-compatible interface when the loop detection function is disabled, frames received from all other ports will be forwarded as-is.
   However, forwarding is disabled at ports with mirroring specified (mirror ports).

9. In the following kinds of situations, loops in hubs that are connected to this product might not be detected.

   - Loops are being detected in a connected hub

   - Loop detection frames are not being forwarded by a connected hub

### 3.2. Loop detection examples

The following shows examples of loop detection in this product.

- Loop detection examples

Loop detection case | Configuration example | Loop detection status
--- | --- | ---
1 |  | A loop is detected when a port receives the LDF that it has transmitted. port1.1: Shutdown
2 |  | When loops are detected in multiple ports on the same terminal, the port with the largest number is blocked. port1.1: Detected port1.3: Blocking
3 |  | The loop is avoided by blocking multiple ports. The blocking port is selected using the same rules as case 2. port1.1: Detected port1.2: Blocking port1.3: Blocking
4 |  | When loops are detected in multiple groups, the port with the largest number in each group port1.1: Detected, port1.2: Blocking port1.3: Detected, port1.4: Blocking
5 |  | When a loop occurs between two switches, one of the switches detects the loop. ○When detected in port1.3 of switch #A port1.1: Detected, port1.3: Blocking ○When detected in port1.7 of switch #B port1.5: Detected, port1.7: Blocking
6 |  | Out of the six ports that are connected by cable, the port for which the loop is most quickly detected is the one that is blocked. ○When detected in port1.2 of switch #A port1.1: Detected, port1.2: Blocking ○When detected in port1.4 of switch #B port1.3: Detected, port1.4: Blocking ○When detected in port1.6 of switch #C port1.5: Detected, port1.6: Blocking
7 |  | Because the LDF transmitted from each port returns to these ports, port1.5 and port1.6 will both shut down. port1.5: Shutdown port1.6: Shutdown
8 |  | Port1.6 of switch #B is blocked. Depending on the timing, port1.1 of switch #A will shut down; but the loop in port1.1 of switch #A is resolved by blocking port1.6 of switch #B. Switch #A port1.1: Shutdown Switch #B port1.5: Detected Switch #B port1.6: Blocking

## 4. Related Commands

Related commands are indicated below.
For details on the commands, refer to the Command Reference.

Operations | Operating commands
--- | ---
Enable/disable loop detection function (system) | loop-detect enable/disable
Enable/disable loop detection function (interface) | loop-detect enable/disable
Set port blocking for loop detection | loop-detect blocking enable/disable
Set port blocking duration time when a loop is detected | loop-detect blocking interval
Reset the loop detection status | loop-detect reset
Refer to the setting status of loop detection | show loop-detect

## 5. Examples of Command Execution

This example detects any loops occurring on this product using the following configuration, when the loop detection function is enabled.

- [Example 1] Loop occurring within this product

- [Example 2] Loop occurring in a third-party hub connected to this product

This sets LAN ports #1 and #3 to detect loops.

■ Setting Procedure

1. Enable the loop detection function for the entire system.

       Yamaha(config)#loop-detect enable (1)

   1 | Enable the loop detection function for the entire system

2. Enable the loop detection function for LAN ports #1 and #3.

       Yamaha(config)#interface port1.1
       Yamaha(config-if)#spanning-tree disable (1)
       Yamaha(config-if)#loop-detect enable (2)
       Yamaha(config-if)#loop-detect blocking enable (3)
       (上記設定をLANポート #3 に対しても行います。)

   1 | Disable the spanning tree function for each LAN port
   2 | Enable the loop detection function for each LAN port
   3 | Enables blocking The loop detection function for each LAN port and blocking are both enabled by default, so there is no need to set them.

3. Confirm that the loop detection function has been set.
   Confirm whether the loop detection function is enabled(*) for LAN ports #1 and #3.

       Yamaha>show loop-detect
       loop-detect: Enable

       port      loop-detect    port-blocking           status
       -------------------------------------------------------
       port1.1        enable(*)        enable           Normal
       port1.2        enable           enable           Normal
       port1.3        enable(*)        enable           Normal
       port1.4        enable           enable           Normal
       port1.5        enable           enable           Normal
       port1.6        enable           enable           Normal
       port1.7        enable           enable           Normal
       port1.8        enable           enable           Normal
       port1.9        enable           enable           Normal
          :             :                :                :
       -------------------------------------------------------
       (*): Indicates that the feature is enabled.

4. If a loop has been detected, the loop detection status can be checked.

   - In the case of example 1:

         Yamaha>show loop-detect
         loop-detect: Enable

         port      loop-detect    port-blocking           status
         -------------------------------------------------------
         port1.1        enable(*)        enable         Detected (1)
         port1.2        enable           enable           Normal
         port1.3        enable(*)        enable         Blocking (2)
         port1.4        enable           enable           Normal
         port1.5        enable           enable           Normal
         port1.6        enable           enable           Normal
         port1.7        enable           enable           Normal
         port1.8        enable           enable           Normal
         port1.9        enable           enable           Normal
            :             :                :                :
         -------------------------------------------------------
         (*): Indicates that the feature is enabled.

     1 | LAN port #1 enters the detected status
     2 | LAN port #3 enters the blocking status

   - In the case of example 2:

         Yamaha>show loop-detect
         loop-detect: Enable

         port      loop-detect    port-blocking           status
         -------------------------------------------------------
         port1.1        enable(*)        enable         Shutdown (1)
         port1.2        enable           enable           Normal
         port1.3        enable(*)        enable           Normal
         port1.4        enable           enable           Normal
         port1.5        enable           enable           Normal
         port1.6        enable           enable           Normal
         port1.7        enable           enable           Normal
         port1.8        enable           enable           Normal
         port1.9        enable           enable           Normal
            :             :                :                :
         -------------------------------------------------------
         (*): Indicates that the feature is enabled.

     1 | LAN port #1 goes into the shutdown state

## 6. Points of Caution

- All LAN/SFP ports included in the same logical interface must have the same loop detection setting (enabled, disabled, or blocked).

  - LAN/SFP ports with different loop detection settings cannot be included in the same logical interface.

  - Loop detection settings cannot be specified for LAN/SFP ports included in a logical interface.

## 7. Related Documentation

- Spanning tree

- LED Control

Search result
No more search results.
There are no topics that match your search query.