Method for implementing Ethernet ring network with fast fault recovery capability

By defining the roles of root and slave devices in an Ethernet ring network, and utilizing arbitration, link change messages, and message buffering techniques, rapid fault recovery and zero message loss are achieved, solving the problems of slow fault recovery and message loss in Ethernet ring networks.

CN117081886BActive Publication Date: 2026-04-14ZHEJIANG YUANCHUANG BUILDING INTELLIGENT TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG YUANCHUANG BUILDING INTELLIGENT TECH CO LTD
Filing Date
2023-09-21
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing Ethernet loops are slow during fault recovery and are prone to packet loss, which cannot meet the requirements of high-security systems.

Method used

All devices are designated as root devices by default when powered on, and the port mode is virtual disconnect mode. Fast fault recovery is achieved through arbitration messages and link change messages. Combined with message buffering and static MAC address table management, it ensures that no messages are lost when the loop is broken.

Benefits of technology

It achieves rapid fault recovery within 5 milliseconds, avoids message loss, and is suitable for high-security systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117081886B_ABST
    Figure CN117081886B_ABST
Patent Text Reader

Abstract

The application discloses an Ethernet ring network implementation method with fast fault recovery capability, which has great limitation to device form and network topology structure, only supports SOC plus three-port switch device form, only supports linear and single loop two network topology structures, and enables the device in the ring network protocol to have the capability of actively informing link change. The application has strict limitation to device structure, ring network structure and device in the ring network, the device in the ring network protocol has the capability of actively informing link change, and has the capability of recovering ring fault within 5 milliseconds. Since the mac address learning function of all switches in the ring network is closed, the root device can cache all messages in the ring network, and retransmit the messages not received by some devices when the ring is disconnected, so that the ring network protocol can not lose messages during the ring disconnection recovery process. The application has the advantages of extremely short ring fault recovery time and no message loss during the ring disconnection recovery process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Ethernet ring network technology, and in particular to an Ethernet ring network implementation method with rapid fault recovery capability. Background Technology

[0002] Ethernet buses are widely used in PLC systems. However, due to the characteristics of Ethernet, network wiring errors can cause loops and broadcast storms. Broadcast storms can cause the PLC processor to become busy processing useless network packets and malfunction. Even when the network wiring is normal, if an accident occurs and the network cable is unexpectedly disconnected, the PLC controller will lose control of some node devices, which is unacceptable in systems with high security requirements.

[0003] Existing technical solutions:

[0004] CN101686158B describes a control method and Ethernet loop node for Ethernet loop protection fault recovery. The method includes: after a neighboring node detects link recovery, it blocks the newly recovered port, sets the port to a pre-forwarding state, and starts a timer. If the neighboring node does not receive a control protocol message from the master node within the timer's duration, it releases the temporarily blocked port and transitions it from the pre-forwarding state to the forwarding state. By applying this invention, even if the corresponding control protocol message cannot be received in a timely manner, the port of the link recovery neighboring node can enter the forwarding state from the pre-forwarding state as early as possible, effectively avoiding traffic loss caused by the failure of the faulty port to forward data packets in a timely manner.

[0005] CN101707538B discloses a method for detecting and automatically recovering Ethernet loops. This method relates to the detection and recovery of Ethernet loops, and includes the following steps: Step 1, the loop detection initialization module completes initialization; Step 2, loop detection messages are constructed, sent, received, and analyzed to determine if a loop exists; Step 3, a flag is assigned, and when a loop exists, the message is redirected to the CPU and a warning message is issued; Step 4, loop fault recovery status is monitored and processed; Step 5, steps 2 to 4 are repeated. The method for detecting and automatically recovering Ethernet loops described in this invention can detect loop faults in both single-port and dual-port networks, detect loops, and determine whether the corresponding loop has been eliminated, thereby restoring the loop. It also provides a solution to prevent users from forging loop detection messages to create the illusion of loop congestion. It has the advantages of low hardware configuration requirements for Ethernet switching chips and simple implementation.

[0006] CN114760207A describes a method and system for breaking Ethernet ring networks. This invention discloses a method for breaking Ethernet ring networks, comprising: when network nodes change, enabling each node in the network to know the entire network topology through topology learning; and determining whether a loop has occurred when network data flow anomalies occur, and if a loop has occurred, breaking the ring network. In this invention, each node normally knows the entire network topology and its own position within the network. When a ring network occurs, a node can immediately identify the location of the loop and any newly added ports. The loop can be broken simply by disconnecting the newly added ports, resulting in fast breaking speed and high stability. Under normal network conditions, no additional packets need to be sent, resulting in virtually no load. This invention also provides an Ethernet ring network breaking system, comprising multiple nodes, which uses the Ethernet ring network breaking method to break the ring network when network data flow anomalies occur.

[0007] CN115695082A describes a method, apparatus, electronic device, and storage medium for switching protection of an on-board Ethernet ring network. Embodiments of this invention provide a method, apparatus, electronic device, and storage medium for switching protection of an on-board Ethernet ring network. The method involves dividing each node in the Ethernet ring network into a master node and several slave nodes. Each node's port is configured with VLAN-based inbound blocking, and each node's port is open for the VLAN containing the link detection message. When the link is normal, each node sends link detection messages to each other to check the link status. When a link fault is detected, the ports at both ends of the faulty link are blocked, and a link anomaly notification message is sent externally. After receiving the link anomaly message, the master node and the first slave node open the ports at both ends, and the nodes at both ends of the faulty link send link detection messages to each other. This method suppresses ring network storms and enables rapid link recovery under unidirectional blocking, improving protocol compatibility with the system.

[0008] ERPS Ethernet Multi-Ring Protection Technology

[0009] STP (Spanning Tree Protocol)

[0010] However, the existing technology still has the following problems:

[0011] 1. Loop fault recovery speed is generally above 10 milliseconds;

[0012] 2. Message loss will occur during the recovery process of loop faults.

[0013] Therefore, there is an urgent need to propose a method that can solve the above problems. Summary of the Invention

[0014] The purpose of this invention is to provide a method and system for implementing an Ethernet ring network with rapid fault recovery capabilities. This invention has the advantages of extremely short loop fault recovery time and no packet loss during the loop disconnection recovery process.

[0015] The technical solution of this invention: A method for implementing an Ethernet ring network with rapid fault recovery capability, wherein all devices are root devices by default when powered on, and the port mode is virtual disconnection mode. The specific process is as follows:

[0016] S1. Disable the MAC address learning function of the switch;

[0017] S2. Add the ring network-specific MAC address to the static MAC address table;

[0018] S3. Detect how many of its own ports are online, and send arbitration messages to the online ports;

[0019] S4. Determine whether a link change message has been received. If so, send a link change response message and an arbitration message to the corresponding port.

[0020] S5. If an arbitration message is received, compare the MAC addresses: if the source device's MAC address is smaller than its own MAC address, the arbitration fails, and proceed to S6; if the source device's MAC address is larger than its own MAC address, the arbitration succeeds, and proceed to S7; if they are the same, proceed to S8.

[0021] S6. Forward the received arbitration message from the other port and reply with the same message from the port that received the message, delete the ring network special MAC address from the static MAC address table; switch the device role to slave device, switch the port mode to path mode, and perform slave device operations;

[0022] S7. Reply with an arbitration message from the received port. The source device MAC address is its own MAC address, and the destination device MAC address is the broadcast MAC address. The device role remains root device, and the port mode remains unchanged.

[0023] S8. If the arbitration message sending port is considered to be another port of its own, a loop is established; the device role remains root device, and the port mode is switched to virtual disconnect mode.

[0024] S9. If the arbitration message is not received from another port within 5 milliseconds after it is sent, the loop is determined to be broken; the device role remains root device, and the port mode is switched to path mode.

[0025] S10. When the device port mode is in virtual disconnect mode, perform message buffering operation.

[0026] In the aforementioned method for implementing an Ethernet ring network with rapid fault recovery capability, the slave device operation described in S6 has the following specific process:

[0027] S11. If a port on one side is detected to be offline, a link change message is sent. If no response is received within 5 milliseconds, the root device of the ring network is determined to be offline, and the device itself is switched to the root device, while the port mode remains in the path mode.

[0028] S12. If both ports are detected to be offline, the device role is switched to root device and the port mode is switched to virtual disconnection mode.

[0029] In the aforementioned method for implementing an Ethernet ring network with rapid fault recovery capability, the specific content of the packet buffering operation described in S10 is as follows:

[0030] Packets received from both port 2 and port 3 will be cached. When a packet that is already in the cache and received from port 2 is received from port 3, the packet will be deleted from the cache.

[0031] Conversely, packets that are already in the cache and are received from port 3 will also be deleted from the cache when they are received from port 2.

[0032] Before the device port mode switches from virtual disconnect mode to pass mode, it will send out the buffered packets. Packets received on port 2 will be sent out from port 3, and packets received on port 3 will be sent out from port 2.

[0033] The aforementioned Ethernet ring network implementation method with rapid fault recovery capability is limited to a device form of SOC plus a three-port switch, and only supports two network topologies: linear and single-loop.

[0034] In the aforementioned Ethernet ring network implementation method with fast fault recovery capability, the virtual disconnect mode specifically involves dividing the two outward-facing ports and the port connected to the controller into two independent VLANs, so that all received packets are sent only to the controller.

[0035] The specific path mode is to assign all three ports to the same VLAN, enabling the two outward-facing ports to communicate with each other.

[0036] In the aforementioned method for implementing an Ethernet ring network with rapid fault recovery capability, the root device specifically has a port mode that can switch between virtual disconnect mode and path mode; a ring network-specific MAC address exists in the static MAC address table, and ring network packets are only forwarded to the controller and not forwarded out from the other side port; the MAC address learning function of the switch is turned off, and packets with destination MAC addresses other than those with ring network-specific MAC addresses will be flooded.

[0037] Specifically, the slave device maintains its port mode in always-on mode, does not have a ring network-specific MAC address in its static MAC address table, and ring network packets will be flooded; the switch's MAC address learning function is disabled, and all other packets will be flooded.

[0038] In the aforementioned Ethernet ring network implementation method with rapid fault recovery capability, the arbitration message specifically has a message type field of 00 00, and is only sent by the root device;

[0039] Specifically, the link change message has a message type field of 00 01 and is only sent by the slave device.

[0040] Compared with the prior art, the present invention has the following beneficial effects:

[0041] 1. This invention imposes strict restrictions on the equipment structure, ring network structure, and equipment within the ring network, enabling equipment within the ring network protocol to proactively notify of link changes, and enabling this ring network protocol to recover from loop faults within 5 milliseconds;

[0042] 2. Because this invention disables the MAC address learning function of all switches in the ring network, the root device can cache all packets in the ring network and resend packets that some devices did not receive when the ring was disconnected, so that this ring network protocol will not lose packets during the ring disconnection and recovery process.

[0043] Therefore, the present invention has the advantages of extremely short loop fault recovery time and no message loss during the loop disconnection recovery process. Attached Figure Description

[0044] Figure 1 This is a schematic diagram of the device frame of the present invention;

[0045] Figure 2 This is a schematic diagram of the virtual disconnect mode of the present invention;

[0046] Figure 3 This is a schematic diagram of the pathway mode of the present invention;

[0047] Figure 4 This is the ring network topology diagram of the present invention;

[0048] Figure 5 This is a schematic diagram of the device role state transition of the present invention. Detailed Implementation

[0049] The present invention will be further described below with reference to the accompanying drawings and embodiments, but this should not be construed as limiting the present invention.

[0050] Example. A method for implementing an Ethernet ring network with fast fault recovery capability, such as... Figure 1 As shown, this is limited to a device configuration consisting of a SOC and a three-port switch, supporting only linear and single-loop network topologies. All devices are powered on as root devices by default, with the port mode set to virtual disconnection mode. The specific process is as follows:

[0051] S1. Disable the MAC address learning function of the switch;

[0052] S2. Add the ring network-specific MAC address to the static MAC address table;

[0053] S3. Detect how many of its own ports are online, and send arbitration messages to the online ports;

[0054] S4. Determine whether a link change message has been received. If so, send a link change response message and an arbitration message to the corresponding port.

[0055] S5. If an arbitration message is received, compare the MAC addresses: if the source device's MAC address is smaller than its own MAC address, the arbitration fails, and proceed to S6; if the source device's MAC address is larger than its own MAC address, the arbitration succeeds, and proceed to S7; if they are the same, proceed to S8.

[0056] S6. Forward the received arbitration message from the other port and reply with the same message from the port that received the message, delete the ring network special MAC address from the static MAC address table; switch the device role to slave device, switch the port mode to path mode, and perform slave device operations;

[0057] S7. Reply with an arbitration message from the received port. The source device MAC address is its own MAC address, and the destination device MAC address is the broadcast MAC address. The device role remains root device, and the port mode remains unchanged.

[0058] S8. If the arbitration message sending port is considered to be another port of its own, a loop is established; the device role remains root device, and the port mode is switched to virtual disconnect mode.

[0059] S9. If the arbitration message is not received from another port within 5 milliseconds after it is sent, the loop is determined to be broken; the device role remains root device, and the port mode is switched to path mode.

[0060] S10. When the device port mode is in virtual disconnect mode, perform message buffering operation.

[0061] The specific process for operating the device as described in S6 is as follows:

[0062] S11. If a port on one side is detected to be offline, a link change message is sent. If no response is received within 5 milliseconds, the root device of the ring network is determined to be offline, and the device itself is switched to the root device, while the port mode remains in the path mode.

[0063] S12. If both ports are detected to be offline, the device role is switched to root device and the port mode is switched to virtual disconnection mode.

[0064] The specific content of the message buffering operation described in S10 is as follows:

[0065] Packets received from both port 2 and port 3 will be cached. When a packet that is already in the cache and received from port 2 is received from port 3, the packet will be deleted from the cache.

[0066] Conversely, packets that are already in the cache and are received from port 3 will also be deleted from the cache when they are received from port 2.

[0067] Before the device port mode switches from virtual disconnect mode to pass mode, it will send out the buffered packets. Packets received on port 2 will be sent out from port 3, and packets received on port 3 will be sent out from port 2.

[0068] like Figure 2 The virtual disconnect mode specifically involves dividing the two outward-facing ports and the port connected to the controller into two independent VLANs, so that all received packets are sent to the controller.

[0069] like Figure 3 The specific path mode is to assign all three ports to the same VLAN, enabling the two outward-facing ports to communicate with each other.

[0070] Specifically, the root device has a port mode that can switch between virtual disconnect mode and path mode; the static MAC address table contains ring network-specific MAC addresses, and ring network packets are only forwarded to the controller and will not be forwarded out from the other side port; the MAC address learning function of the switch is turned off, and packets with destination MAC addresses other than ring network-specific MAC addresses will be flooded.

[0071] Specifically, the slave device maintains its port mode in always-on mode, does not have a ring network-specific MAC address in its static MAC address table, and ring network packets will be flooded; the switch's MAC address learning function is disabled, and all other packets will be flooded.

[0072] The arbitration message specifically has a message type field of 00 00 and is sent only by the root device.

[0073] Specifically, the link change message has a message type field of 00 01 and is only sent by the slave device.

[0074] The message format is as follows:

[0075]

[0076] Among them, the ring network special MAC address is the Ethernet destination MAC address of all ring network packets;

[0077] Source device MAC: The MAC address of the device that sent the message;

[0078] Special type: The Ethernet packet type field 0x1403 indicates a ring network packet;

[0079] Destination device MAC: The MAC address of the destination device receiving the message; ff:ff:ff:ff:ff:ff:ff indicates the broadcast address.

[0080] Message type:

[0081] 0x0000 indicates an arbitration message; all arbitration messages are broadcast messages.

[0082] 0x0001 indicates a link change message; request messages are broadcast messages, and response messages are non-broadcast messages.

[0083] Sending port number: 2 / 3 indicates whether the message is sent from port 2 or port 3. This field is only required for arbitration messages. For link change messages, fill in 0.

[0084] Human-induced loop fault testing:

[0085] When a continuous, uninterrupted ping test is performed on a device in a ring network with 16 devices, and a loop fault is artificially created, the response time of the ping message increases by less than 5 milliseconds, indicating that the loop fault recovery time of this application is extremely short.

[0086] When a continuous, uninterrupted ping test is performed on a device in a ring network with 16 devices, and the ring network is artificially disconnected, no ping packets are not responded to, indicating that the ring disconnection recovery process in this application will not result in packet loss.

Claims

1. A method for implementing an Ethernet ring network with rapid fault recovery capability, characterized in that, All devices are root devices by default when powered on, and the port mode is virtual disconnect mode. The specific process is as follows: S1. Disable the MAC address learning function of the switch; S2. Add the preset ring network MAC address to the static MAC address table; S3. Detect how many of its own ports are online, and send arbitration messages to the online ports; S4. Determine whether a link change message has been received. If so, send a link change response message and an arbitration message to the corresponding port. S5. If an arbitration message is received, compare the MAC addresses: if the source device's MAC address is smaller than its own MAC address, the arbitration fails, and proceed to S6; if the source device's MAC address is larger than its own MAC address, the arbitration succeeds, and proceed to S7. If they are the same, execute S8; S6. Forward the received arbitration message from the other port and reply with the same message from the port that received the message, delete the preset ring network MAC address from the static MAC address table; switch the device role to slave device, switch the port mode to path mode, and perform slave device operations; S7. Reply with an arbitration message from the received port. The source device MAC address is its own MAC address, and the destination device MAC address is the broadcast MAC address. The device role remains root device, and the port mode remains unchanged. S8. If the arbitration message sending port is considered to be another port of its own, a loop is established; the device role remains root device, and the port mode is switched to virtual disconnect mode. S9. If the arbitration message is not received from another port within 5 milliseconds after it is sent, the loop is determined to be broken; the device role remains root device, and the port mode is switched to path mode. S10. When the device port mode is in virtual disconnect mode, perform message buffering operation; The specific process for operating the device as described in S6 is as follows: S11. If a port on one side is detected to be offline, a link change message is sent. If no response is received within 5 milliseconds, the root device of the ring network is determined to be offline, and the device itself is switched to the root device, while the port mode remains in the path mode. S12. If both ports are detected to be offline, the device role is switched to root device and the port mode is switched to virtual disconnection mode. The virtual disconnect mode specifically involves dividing the two outward-facing ports and the port connected to the controller into two independent VLANs, so that all received packets are sent only to the controller. The specific path mode is to assign all three ports to the same VLAN, enabling the two outward-facing ports to communicate with each other. Specifically, the root device has a port mode that can switch between virtual disconnect mode and path mode; a preset ring network MAC address exists in the static MAC address table, and ring network packets are only forwarded to the controller and will not be forwarded out from the other side port; the MAC address learning function of the switch is turned off, and packets with a destination MAC address other than the preset ring network MAC address will be flooded. Specifically, the slave device maintains its port mode in always-on mode, does not have a preset ring network MAC address in its static MAC address table, and ring network packets will be flooded; the switch's MAC address learning function is disabled, and all other packets will be flooded.

2. The method for implementing an Ethernet ring network with rapid fault recovery capability according to claim 1, characterized in that, The specific content of the message buffering operation described in S10 is as follows: Packets received from both port 2 and port 3 will be cached. When a packet that is already in the cache and received from port 2 is received from port 3, the packet will be deleted from the cache. Conversely, packets that are already in the cache and are received from port 3 will also be deleted from the cache when they are received from port 2. Before the device port mode switches from virtual disconnect mode to pass mode, it will send out the buffered packets. Packets received on port 2 will be sent out from port 3, and packets received on port 3 will be sent out from port 2.

3. The method for implementing an Ethernet ring network with fast fault recovery capability according to claim 1, characterized in that: Limited to a device configuration consisting of a System-on-a-Chip (SoC) and a three-port switch, it only supports linear and single-loop network topologies.

4. The method for implementing an Ethernet ring network with rapid fault recovery capability according to claim 3, characterized in that: The message type field of the arbitration message is 00 00, and only the root device will send it; The message type field of the link change message is 00 01, and it is only sent by the slave device.

Citation Information

Patent Citations

  • Control method for Ethernet loop guard fault recovery and Ethernet loop node

    CN101686158B

  • Method for detecting and automatically recovering Ethernet loopback

    CN101707538B

  • Ethernet ring network algorithm switching method

    CN101764731A

  • A method to accelerate convergence of Layer 2 ring network protocols when a large number of MAC addresses are available.

    CN102291261A