# Proprietary 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.
A proprietary loop detection frame is sent from the LAN port, and the unit monitors whether the 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. In addition to enabling/disabling the entire system, the loop detection on this product can enable/disable individual ports.
   When detecting loops in LAN ports, the system-wide setting must be set to enable.

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

   - Use the loop-detect command in the interface mode of the relevant port for the individual LAN port setting.

2. The default settings for the loop detection function are as shown below.

   - System-wide setting: Enabled

   - LAN port setting: Enabled

3. 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 the linked-up LAN port.
     The loop detection function cannot be used on static logical interfaces, and ports on which mirror settings have been made (mirror ports).

   - When a LAN port receives the loop detection frame that has been sent from the port, a loop occurrence is determined, and the following operations are performed.

     - Port Blocking
       When the port number of the transmitting LAN port is smaller than the receiving port number, all frames except for LDF are blocked.
       The LDF will be transmitted periodically, but LDF will not be forwarded from other devices.
       For the LAN ports that were blocked, if the LDF that was transmitted does not return within five seconds, it is determined that the loop has been resolved, and normal communications are resumed.
       If the blocking duration is specified with the loop-detect blocking interval command, a check is made to see if the loop has been resolved when the specified time has elapsed since the loop was detected.
       At this time, if the loop is resolved, the blocking status will be cleared, but if the loop is not resolved, the blocking status will continue until the specified time has elapsed again.

     - Port Detected
       When the port number of the LAN port that was transmitted is larger than the port number during reception, another port is doing the blocking, so communication continues as normal.

   - When a loop is detected, the LINK/ACT LED indicator on this product will change to flashing orange, the STATUS LED indicator will change to illuminating orange, and the following SYSLOG message will be output.

     - [LOOP]: inf: Detected Loop! : port1.1 ①

       1 | Displayed every 5 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

4. A force-clear can be performed on the loop detection status (detected, blocking) by using the loop-detect reset command.
   If a linkdown has occurred on the port where a loop has been detected, the detection status will be cleared.

5. 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 (status for each LAN port)

6. When an LDF is received by a LAN port when the loop detection function is disabled, the received frames from all other ports will be forwarded as-are.
   However, frames will not be forwarded for static logical interfaces and ports on which mirror settings have been made (mirror ports).

7. 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

8. If a loop occurs between different port-based VLANs or different multiple VLANs, the following actions are taken.

   Condition | Action
   --- | ---
   A loop occurs between ports that belong to different port-based VLANs | No blocking
   A loop occurs between ports that belong to different multiple VLANs | Blocking

#### 3.2. Loop detection examples

The following shows examples of loop detection in this product.

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: Blocking
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 be blocked. port1.5: Blocking port1.6: Blocking
8 |  | Port1.6 of switch #B is blocked. Depending on the timing, port1.1 of switch #A will also be blocked; but the loop in port1.1 of switch #A is resolved by blocking port1.6 of switch #B. Switch #A port1.1: Blocking Switch #B port1.5: Detected Switch #B port1.6: Blocking

### 4. Related Commands

Related commands are indicated below.
For command details, refer to the command reference.

Operations | Operating commands
--- | ---
Enable/disable loop detection function (system) | loop-detect enable/disable
Enable/disable loop detection function (LAN port) | loop-detect enable/disable
Set the port blocking duration 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)#loop-detect enable (1)
       (上記設定をLANポート #3 に対しても行います。)

   1 | Enable the loop detection function for each LAN port Both the loop detection function for the entire system and that for each LAN port are enabled in default settings.

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         status
       -----------------------------------------
       port1.1        enable(*)        Normal
       port1.2        enable(*)        Normal
       port1.3        enable(*)        Normal
       port1.4        enable(*)        Normal
          :             :                :

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         status
         -----------------------------------------
         port1.1        enable(*)        Detected (1)
         port1.2        enable(*)        Normal
         port1.3        enable(*)        Blocking (2)
         port1.4        enable(*)        Normal
            :             :                :

     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         status
         -----------------------------------------
         port1.1        enable(*)        Blocking (1)
         port1.2        enable(*)        Normal
         port1.3        enable(*)        Normal
         port1.4        enable(*)        Normal
            :             :                :

     1 | LAN port #1 enters the blocking status

### 6. Points of Caution

None

### 7. Related Documentation

None

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