1. Introduction
In a bridged local area network (LAN), redundant paths are necessary to enhance reliability, and network segments are connected using redundant bridges. However, in a transparently bridged network, the existence of redundant paths can create a bridge loop, which is fatal to a LAN. It can cause the following problems:
A. Broadcast Storm
B. Multiple copies of the same frame
C. Unstable MAC address table
Therefore, there must be a mechanism in the switching network to prevent loops.
2. Spanning Tree Protocol
The Spanning Tree Protocol (STP) is a commonly used mechanism in the IT industry. It's a bridge nesting protocol defined in the IEEE 802.1d standard, used to eliminate bridge loops. Its working principle is as follows: STP defines a data packet called a Bridge Protocol Data Unit (BPDU). Bridges use BPDUs to communicate with each other and use their functions to dynamically select the root bridge and backup bridges. However, because there is only one path from the central bridge to any network segment, bridge loops are eliminated.
In a spanning tree network, bridges do not immediately begin forwarding. They must first select a bridge as the root bridge and then establish a designated path. The bridge with the lowest bridge ID in the network becomes the root bridge, and there is only one root bridge in the entire spanning tree network. The root bridge's primary responsibility is to periodically send configuration information, which is then sent to all designated bridges. This is a mechanism in spanning tree networks where the network state is reconfigured should the network structure change.
After the root bridge is selected, before forwarding data packets, it must decide on the designated bridge for each network segment. Using the spanning tree algorithm, the root bridge sends BPDU packets from all its ports every 2 seconds. BPDU packets are copied by all bridges from their root ports (the bridge ports connected to the root bridge). The BPDU contains information called the port cost. The network administrator assigns port costs to all bridge ports. When the root bridge sends a BPDU, it sets its port cost to zero. Then, along this path, the next bridge increments its configured port cost to a value that determines the value it receives and forwards to the next network segment. Each bridge increments its port cost by the cost of the BPDU packets it receives. All bridges check their port costs, and the bridge with the lowest port cost becomes the designated bridge. Bridges with higher port costs put their ports into a blocking state, becoming backup bridges. In the blocking state, a bridge stops forwarding but continues to receive and process BPDU packets.
The IEEE 802.1D specification includes the Spanning Tree Algorithm (STA), a mechanism that ensures forwarding loops never occur. STA uses Bridge Protocol Data Units (BPDUs) to automatically configure individual ports on a bridge that are in forwarding or blocking states. A BPDU is a message sent by the bridge to a stored multicast MAC address (01-80-C2-00-00-00 for Ethernet), which all transparent bridges listen for. In blocking state, ports do not learn of or forward received frames. The end result of STA is a loop-free bridging environment that always exists regardless of changes in the LAN segment topology. The Spanning Tree Algorithm determines the network link failure recovery time, which is at least 15 seconds.
The state of the spanning tree:
A port on a switch running the Spanning Tree Protocol is always in one of the following five states:
Blocking: All ports start in blocking state to prevent loops. The spanning tree determines which port switches to forwarding state. Ports in blocking state do not forward data frames but can accept BPDUs.
Listen: Do not forward data frames, but detect BPDU (transitional state).
Learning: Instead of forwarding data frames, learn the MAC address table (temporary state).
Forwarding: Can transmit and receive data frames.
Disabled: This is usually caused by port failure or switch misconfiguration.
3. Supreme-Ring Protocol
The Supreme-Ring protocol is a redundancy mechanism used in industrial Ethernet. Similar to the Spanning Tree Protocol (STP), Supreme-Ring also defines a type of data packet called the HELLO packet, also known as the WD packet (WatchDogPacket). Switches communicate using HELLO packets, and the primary and backup links are dynamically selected on the master switch. However, because only one path exists from the central bridge to any network segment, bridge loops are eliminated.
In an industrial redundant ring network environment, switches do not immediately begin forwarding. The primary switch (Local) is manually designated, and a primary link and backup link are selected to establish a specified path, which is automatically assigned by the Supreme-Ring protocol. Only one primary switch (Local) can exist in an industrial redundant ring network. The primary switch (Local) periodically sends configuration information, which is then transmitted to all secondary switches (Remote). If the network structure changes, the network state will be reconfigured.
Once a master switch (Local) is designated, all ports start in blocking mode before forwarding data packets. Using the Supreme-Ring algorithm, the master switch (Local) selects the port with the lowest cost value as the primary link, and the other port with the higher cost value as the backup link. The backup link does not forward data; it only receives and processes HELLO packets and is in hot standby mode. Slave switches (Remote) do not distinguish between primary and backup links. The Supreme-Ring protocol is a simple and efficient redundancy protocol that ensures that the ring network can restore network communication within 300ms in the event of a link failure.
The status of Supreme-Ring:
A port on a switch running the Supreme-Ring protocol is always in one of the following four states:
Blocking: All ports are started in blocking mode to prevent loops. Ports in blocking mode do not forward data frames but can accept HELLO packets.
Hot standby: It does not forward data frames, but learns the MAC address table. In the event of a primary link failure, it immediately enters the forwarding state within 300ms.
Forwarding: Can transmit and receive data frames.
Disabled: This is usually caused by port failure or switch configuration error.
4. Conclusion
Industrial network environments require rapid-response redundancy mechanisms, and the 15-second recovery time of the Spanning Tree Protocol (STP) cannot meet the requirements of industrial environments. Only the Supreme-Ring protocol is the optimal redundancy mechanism for industrial network environments.