Method for restoring a single ring network topology and network switch system
By configuring enabled and disabled connection ports in network switches and utilizing control packets to quickly rebuild and restore a single ring network topology, the problem of long recovery time in traditional STP technology is solved, achieving rapid network recovery and low data loss.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- REALTEK SEMICON CORP
- Filing Date
- 2022-06-23
- Publication Date
- 2026-04-28
AI Technical Summary
Traditional STP technology requires 30 seconds to recover to a stable state when the network topology changes, while fast STP technology still requires 2-3 seconds to complete the process, resulting in data loss.
By configuring enabled and disabled connection ports in network switches, control packets can be used to quickly rebuild and restore a single ring network topology, including forwarding, restoring, and blocking the use of control packets, avoiding root bridge decision-making processes and directly switching port states.
It enables network topology reconstruction and recovery within 1 millisecond, reducing data loss and improving network recovery speed and stability.
Smart Images

Figure CN117319128B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to network topology technology, and in particular to a method for restoring a single ring network topology and a network switch system. Background Technology
[0002] In networking, Spanning Tree Protocol (STP) is a crucial technology for switches, designed to prevent various problems caused by network loops. However, traditional STP takes 30 seconds to complete network topology construction before data transmission can begin. Furthermore, when the network topology changes, it takes another 30 seconds to recover to a stable state, making its construction time quite lengthy. Therefore, predecessors improved upon STP by proposing Rapid Spanning Tree Protocol (RSTP). However, even Rapid STP still requires 2-3 seconds to complete / reconstruct the network topology, resulting in significant data loss for today's network traffic volumes. Summary of the Invention
[0003] This disclosure proposes a method for restoring a single ring network topology, the single ring network including at least one first network switch and one second network switch. Each first network switch includes a first connection port and a second connection port, and the second network switch includes a third connection port and a fourth connection port. The first connection port, the second connection port, the third connection port and the fourth connection port are preset to be in an enabled state or an disabled state to form a single ring network.
[0004] The method for restoring a single ring network topology includes: in response to a first network switch detecting an anomaly in a first connection port, the first network switch sets the first connection port to a closed state and sends a recovery control packet through a second connection port; in response to a second network switch receiving a recovery control packet, the second network switch sets a third connection port that was in a closed state to an enabled state; in response to a first network switch detecting that the first connection port has recovered, the first network switch sends a blocking control packet through the second connection port; in response to a second network switch receiving a blocking control packet, the second network switch sets the third connection port that was in an enabled state to a closed state and sends a forwarding control packet through a fourth connection port; and in response to a first network switch receiving a forwarding control packet, the first network switch sets the first connection port that was in a closed state to an enabled state. Attached Figure Description
[0005] Figure 1 This is a block diagram of an embodiment of a network switch according to the present disclosure.
[0006] Figure 2 This is a block diagram of an embodiment of a single ring network according to the present disclosure.
[0007] Figure 3 This is a flowchart of one embodiment of a network switch initialization procedure according to the present disclosure.
[0008] Figure 4 This is a flowchart of an embodiment of the execution program of the processing circuit of a first network switch according to the present disclosure.
[0009] Figure 5 This is a flowchart of an embodiment of the execution program of the processing circuit of a second network switch according to the present disclosure.
[0010] Figure 6 This is a schematic diagram of the reconstructed topology according to a first embodiment of an unusual single-ring network based on the present disclosure.
[0011] Figure 7 This is a first schematic diagram of topology recovery according to a first embodiment of an abnormal single-ring network of the present disclosure.
[0012] Figure 8 This is a second schematic diagram of the topology recovery according to a first embodiment of an abnormal single-ring network in accordance with the present disclosure.
[0013] Figure 9 This is a schematic diagram of the reconstructed topology according to a second embodiment of the unusual single-ring network of this disclosure.
[0014] Figure 10 This is a first schematic diagram of the topology recovery according to a second embodiment of an abnormal single ring network based on the present disclosure.
[0015] Figure 11 This is a second schematic diagram of the topology recovery according to a second embodiment of an abnormal single-ring network based on the present disclosure.
[0016] Figure 12 This is a schematic diagram of the reconstructed topology according to a third embodiment of the unusual single-ring network of this disclosure.
[0017] Figure 13 This is a first schematic diagram of the topology recovery according to a third embodiment of an abnormal single-ring network in accordance with the present disclosure.
[0018] Figure 14 This is a second schematic diagram of the recovery topology of a third embodiment of an abnormal single-ring network according to the present disclosure.
[0019] Figure 15 This is a schematic diagram of the reconstructed topology of a fourth embodiment of an unusual single-ring network according to the present disclosure.
[0020] Figure 16 This is a first schematic diagram of the topology recovery for a fourth embodiment of an abnormal single-ring network according to the present disclosure.
[0021] Figure 17 This is a second schematic diagram of the recovery topology of a fourth embodiment of an abnormal single-ring network according to the present disclosure.
[0022] Symbol Explanation
[0023] 10: Network Switch
[0024] 101: Processing Circuit
[0025] 102: Connection Port
[0026] 1-6: Network Switches
[0027] 11-16: Processing Circuit
[0028] 21A~26A, 21B~26B: Connection ports
[0029] S31~S35: Steps
[0030] S41~S46: Steps
[0031] S51~S57: Steps
[0032] BF: Barrier Control Packet
[0033] FF: Forwarding control packets
[0034] RF: Recovery Control Packet Detailed Implementation
[0035] Figure 1 This is a block diagram of an embodiment of a network switch according to the present disclosure. Please refer to... Figure 1 The network switch 10 includes processing circuitry 101 and multiple connection ports 102. Figure 1 Taking a network switch 10 containing two connection ports 102 as an example, this disclosure is not limited to this, and the number of connection ports may be greater than two.
[0036] Connection port 102 is preset to be in an enabled or disabled state. Processing circuitry 101 is coupled to connection port 102 and can set the state of connection port 102 to be enabled or disabled. When network switch 10 is in the path of a single ring network, if connection port 102 is enabled, connection port 102 can receive data packets transmitted by the preceding network switch in the single ring network and can forward data packets received by other connection ports 102 to the next network switch in the single ring network. In other words, connection port 102 in the enabled state can receive and forward data packets. If connection port 102 is disabled, connection port 102 can receive data packets transmitted by the preceding network switch, but connection port 102 does not forward data packets received by other connection ports 102 to the next network switch. In other words, connection port 102 in the disabled state can receive data packets but does not forward data packets. For example, connection port 102 can be connected to electronic devices, such as cameras or computers. Taking a camera as an example, the aforementioned data packet can be image data.
[0037] Based on this, by setting the connection port 102 to an enabled or disabled state through the processing circuit 101, the connection port 102 of the network switch 10 can be connected to the connection ports of other identical network switches through a transmission line. Other network switches can also set their connection ports to an enabled or disabled state to form a single ring network between the network switch 10 and other network switches 10, thereby avoiding network topology loops.
[0038] Reference Figure 2 This is a block diagram illustrating an embodiment of a single ring network according to the present disclosure. Here, six of the aforementioned network switches 10 are used as an example (network switches 1-6), and... Figure 2Only connection ports 21A-26A and 21B-26B forming a single ring network are shown; other connection ports 102 are not displayed. The processing circuits 11-16 of these network switches 1-6 preset the corresponding connection ports 21A-26A and 21B-26B to either an enabled or disabled state to form a single ring network. For example, the processing circuit 16 of network switch 6 sets connection port 26A to a disabled state and connection port 26B to an enabled state; the processing circuits 11-15 of network switches 1-5 set their connection ports 21A-25A and 21B-25B to an enabled state, respectively. In this document, filled blocks represent connection ports 102 in a disabled state, and hollow blocks represent connection ports 102 in an enabled state. After establishing the single ring network, network switches 1-6 can transmit data packets to each other, and none of network switches 1-6 will receive data packets sent by itself. For example, data packets transmitted by network switch 1 will not be sent back to network switch 1 via network switch 6.
[0039] In addition to data packets, network switches 10 with all connection ports 102 enabled also forward control packets. That is, upon receiving a control packet, the received control packet is forwarded within the single ring network via another connection port 102 that did not receive the control packet. The control packets may include Forward Control Frames (FF), Recovery Control Frames (RF), and Block Control Frames (BF). These control packets are used to rebuild and restore the network topology of the single ring network, as will be explained later. While connection ports 102 in the disabled state do not forward control packets (i.e., they do not transmit control packets received by another connection port 102 through the disabled connection port 102), they can still receive control packets and can also actively send control packets.
[0040] Reference Figure 3This is a flowchart of an embodiment of the network switch 10 initialization procedure according to the present disclosure. First, in step S31, the processing circuit 101 loads setting parameters. The setting parameters may be stored in a parameter file to set each connection port 102 to a preset enabled or disabled state. In some embodiments, the processing circuit 101 has a memory to store the parameter file. In some embodiments, the processing circuit 101 is coupled to an external memory to read the parameter file stored in the external memory. After step S31, step S32 is executed, whereby the processing circuit 101 determines whether there is a connection port 102 in a disabled state. If not, the processing circuit 101 determines that the network switch 10 is a first type network switch (hereinafter referred to as the first network switch), i.e., step S33; if so, the processing circuit 101 determines that the network switch 10 is a second type network switch (hereinafter referred to as the second network switch), i.e., step S34. If it is the second network switch, the processing circuit 101 sends a forwarding control packet FF through each of the two connection ports 102, i.e., step S35. The role of the forwarding control packet (FF) will be explained later. For example... Figure 2 As shown, network switches 1 to 5, which have connection ports 21A to 25A and 21B to 25B, all of which are in the open state, are the first network switches, and network switch 6, which has a connection port 26A in the closed state and a connection port 26B in the open state, is the second network switch.
[0041] Figure 4 and Figure 5 The flowcharts are of an embodiment of the execution program of the processing circuit 101 of the first network switch and the second network switch according to the present disclosure. Figure 6 This is a schematic diagram of the reconstructed topology according to a first embodiment of an unusual single-ring network based on the present disclosure. Figure 6 This example illustrates a transmission anomaly between connection ports 102 of two first network switches, specifically a transmission anomaly between connection port 23A of network switch 3 and connection port 24B of network switch 4. The transmission anomaly could be caused by, for example, damage to connection port 23A or connection port 24B, damage to the transmission line between connection ports 23A and 24B, or the transmission line becoming disconnected from connection ports 23A or 24B.
[0042] Merge reference Figure 4 and Figure 6In step S41, the processing circuit 13 of network switch 3 determines whether a fault is detected in connection port 23A or connection port 23B. In response to the detection of a fault in connection port 23A, step S42 is executed, whereby the processing circuit 13 of network switch 3 sets the faulty connection port 23A to a closed state and sends a recovery control packet RF through another connection port 23B. Similarly, the processing circuit 14 of network switch 4 also sets the faulty connection port 24B to a closed state upon detecting a fault, and sends another recovery control packet RF through another connection port 24A. The recovery control packet RF sent from connection port 23B is forwarded to network switch 6 via network switches 2 and 1; the recovery control packet RF sent from connection port 24A is forwarded to network switch 6 via network switch 5.
[0043] Merge reference Figure 5 and Figure 6 In step S54, the processing circuit 16 of the network switch 6 determines whether a recovery control packet RF has been received. In response to receiving the recovery control packet RF (indicating an anomaly at connection port 102), step S55 is executed, and the processing circuit 16 of the network switch 6 sets the connection port 26A, which was previously in a closed state, to an enabled state. Here, the connection port 26A, which was originally in a closed state and was intended as a backup connection port, is switched to an enabled state, allowing the single ring network to be re-established and normal operation to resume.
[0044] Figure 7 This is a first schematic diagram illustrating the topology recovery of an anomalous single-ring network according to a first embodiment of the present disclosure. (See also: Combined References) Figure 4 and Figure 7 In step S43, the processing circuit 13 of network switch 3 determines whether the abnormal connection port 23A has recovered. After a repair operation such as maintenance, in response to the detection that connection port 23A has recovered, the processing circuit 13 of network switch 3 executes step S44 and sends a blocking control packet BF through connection port 23B. Similarly, in response to the detection that connection port 24B has recovered, the processing circuit 14 of network switch 4 also sends another blocking control packet BF through connection port 24A. The blocking control packet BF sent by connection port 23B is forwarded to network switch 6 via network switches 2 and 1; the blocking control packet BF sent by connection port 24A is forwarded to network switch 6 via network switch 5.
[0045] Figure 8 This is a second schematic diagram illustrating the topology recovery of an anomalous single-ring network according to a first embodiment of the present disclosure. (See also: Combined References) Figure 5 and Figure 8In step S56, the processing circuit 16 of network switch 6 determines whether a blocking control packet BF has been received. In response to receiving the blocking control packet BF (indicating that the abnormal connection port 102 has recovered), step S57 is executed. The processing circuit 16 of network switch 6 sets the connection port 26A, which is currently enabled, to the disabled state, and sends a forwarding control packet FF through connection port 26B. This forwarding control packet FF is subsequently forwarded by network switches 5, 4, 3, 2, and 1.
[0046] Merge reference Figure 4 and Figure 8 In step S45, the processing circuit 14 of network switch 4 determines whether a forwarding control packet FF has been received. In response to receiving the forwarding control packet FF (indicating that the spare connection port of the second network switch has been switched back to the off state), step S46 is executed, and the processing circuit 14 of network switch 4 sets the connection port 24B, which was in the off state, to the enabled state. Similarly, the processing circuit 13 of network switch 3 also sets the connection port 23A, which was in the off state, to the enabled state in response to receiving the forwarding control packet FF. Thus, the network topology of the single ring network is restored to the state before the anomaly occurred.
[0047] Figure 9 This is a schematic diagram of the reconstructed topology according to a second embodiment of the unusual single-ring network of this disclosure. Figure 9 This example illustrates a scenario where a network switch malfunctions, such as a power outage, system crash (freeze), or damage. Here, we'll use network switch 3 as an example. (See also: [link to reference]). Figure 4 and Figure 9 As in the first embodiment described above, after steps S41 and S42, the processing circuit 12 of network switch 2 and the processing circuit 14 of network switch 4 respectively detect abnormalities in their connection ports 22A and 24B, and respectively set the abnormal connection ports 22A and 24B to a closed state, and send a recovery control packet RF through the other connection ports 22B and 24A.
[0048] Next, similar to the first embodiment described above, the references are merged. Figure 5 and Figure 9 Following steps S54 and S55, the processing circuit 16 of the network switch 6, in response to receiving the recovery control packet RF, sets the connection port 26A, which was in a closed state, to an enabled state. This re-establishes the single ring network and restores normal operation.
[0049] Figure 10 This is a first schematic diagram illustrating the topology recovery of an anomalous single-ring network according to a second embodiment of the present disclosure. (See also: Combined References) Figure 4 and Figure 10In step S43, the processing circuit 12 of network switch 2 determines whether the abnormal connection port 22A has recovered; the processing circuit 14 of network switch 4 determines whether the abnormal connection port 24B has recovered. After repair actions such as power restoration, restart, or maintenance, the processing circuit 12 of network switch 2, in response to detecting that connection port 22A has recovered, executes step S44 and sends a blocking control packet BF through connection port 22B. Similarly, the processing circuit 14 of network switch 4, in response to detecting that connection port 24B has recovered, also sends another blocking control packet BF through connection port 24A.
[0050] Figure 11 This is a second schematic diagram illustrating the topology recovery according to a second embodiment of an anomalous single-ring network based on the present disclosure. (See also: Combined References) Figure 5 and Figure 11 As in the first embodiment described above, after steps S56 and S57, the processing circuit 16 of the network switch 6, in response to receiving the blocking control packet BF, sets the connection port 26A, which is in the enabled state, to the closed state, and sends a forwarding control packet FF through the connection port 26B.
[0051] Merge reference Figure 4 and Figure 11 In step S45, the processing circuit 12 of network switch 2 determines whether a forwarding control packet FF has been received. In response to receiving the forwarding control packet FF, step S46 is executed, and the processing circuit 14 of network switch 4 sets the connection port 24B, which is in a closed state, to an enabled state. Similarly, the processing circuit 12 of network switch 2 also sets the connection port 22A, which is in a closed state, to an enabled state in response to receiving the forwarding control packet FF. Thus, the network topology of the single ring network is restored to the state before the anomaly occurred.
[0052] Figure 12 This is a schematic diagram of the reconstructed topology according to a third embodiment of the unusual single-ring network of this disclosure. Figure 12 This example illustrates a scenario where the second network switch (here, network switch 6) malfunctions. Such malfunctions could include, for example, power outages, system crashes (freezing), or damage. (See combined references.) Figure 4 and Figure 12 As in the first and second embodiments described above, after steps S41 and S42, the processing circuit 11 of network switch 1 and the processing circuit 15 of network switch 5 respectively detect that their connection ports 21B and 25A are abnormal, and set the abnormal connection ports 21B and 25A to a closed state, and send a recovery control packet RF through the other connection ports 21A and 25B.
[0053] Next, similar to the first and second embodiments described above, the following is combined with reference to... Figure 5 and Figure 12 Following steps S54 and S55, the processing circuit 16 of the network switch 6, in response to receiving the recovery control packet RF, sets the connection port 26A, which was in a closed state, to an enabled state. In this way, the single ring network is re-established and can resume normal operation.
[0054] Figure 13 This is a first schematic diagram illustrating the topology recovery according to a third embodiment of an abnormal single-ring network based on this disclosure. (See also: Combined References) Figure 4 and Figure 13 In step S43, the processing circuit 11 of network switch 1 determines whether the abnormal connection port 21B has recovered; the processing circuit 15 of network switch 5 determines whether the abnormal connection port 25A has recovered. After repair actions such as power restoration, restart, or maintenance, the processing circuit 11 of network switch 1, in response to detecting that connection port 21B has recovered, executes step S44 and sends a blocking control packet BF through connection port 21A. Similarly, the processing circuit 15 of network switch 5, in response to detecting that connection port 25A has recovered, also sends another blocking control packet BF through connection port 25B.
[0055] Figure 14 This is a second schematic diagram illustrating the topology recovery according to a third embodiment of an anomalous single-ring network based on this disclosure. (See also: Combined References) Figure 3 and Figure 14 Network switch 6 was repaired and then... Figure 3 The initial procedure is shown. As described in step S35 above, after power-on, the processing circuit 16 of the network switch 6 sends a forwarding control packet FF via connection port 26B. In this embodiment, the forwarding control packet FF is not sent in response to the receipt of a blocking control packet BF.
[0056] Merge reference Figure 4 and Figure 14 In step S45, the processing circuit 11 of network switch 1 determines whether a forwarding control packet FF has been received. In response to receiving the forwarding control packet FF, step S46 is executed, and the processing circuit 15 of network switch 1 sets the connection port 25A, which is in a closed state, to an enabled state. Similarly, the processing circuit 11 of network switch 1 also sets the connection port 21B, which is in a closed state, to an enabled state in response to receiving the forwarding control packet FF. Thus, the network topology of the single ring network is restored to the state before the anomaly occurred.
[0057] Figure 15 This is a schematic diagram of the reconstructed topology of a fourth embodiment of an unusual single-ring network according to the present disclosure. Figure 15This example illustrates a transmission anomaly between the first and second network switches. Specifically, it illustrates a transmission anomaly between connection port 25A of network switch 5 and connection port 26B of network switch 6. The transmission anomaly could be caused by, for example, damage to connection port 25A or connection port 26B, damage to the transmission line between connection ports 25A and 26B, or the transmission line becoming disconnected from connection ports 25A or 26B.
[0058] Merge reference Figure 5 and Figure 15 In step S51, the processing circuit 16 of the network switch 6 determines whether a fault is detected in connection port 26A or connection port 26B. If so, step S52 is executed to determine whether the faulty connection port 102 is in a closed state. If the determination result of step S52 is no, it indicates that the connection port 26B, which is in an enabled state, has malfunctioned. In response to the detection of a faulty connection port 26B, step S53 is executed, and the processing circuit 16 of the network switch 6 sets the faulty connection port 26B to a closed state and sets the closed connection port 26A to an enabled state. In this way, the single ring network is re-established and can resume normal operation. On the other hand, as in the third embodiment, after steps S41 and S42, the processing circuit 15 of the network switch 5 detects a fault in its connection port 25A, sets the faulty connection port 25A to a closed state, and sends a recovery control packet RF through another connection port 25B.
[0059] Generally, the processing circuit 16 of the network switch 6 detects an anomaly in the connection port 26B and executes step S53 earlier than the time when the recovery control packet RF is received. That is, in this embodiment, the processing circuit 16 of the network switch 6 can directly switch the state of the connection port 26A when an anomaly in the connection port 26B is detected, without waiting to receive the recovery control packet RF to switch the state of the connection port 26A to the enabled state.
[0060] If the determination result of step S52 is yes, then the connection port 26A, which is in a closed state, has malfunctioned. In this case, no processing is required because the connection port 26A is in a closed state and no packets are forwarded. In some embodiments, if the determination result of step S52 is yes, the processing circuit 16 of the network switch 6 still sends the recovery control packet RF via the connection port 26B. However, because the connection port 26A is malfunctioning, the processing circuit 16 of the network switch 6 will not receive the recovery control packet RF forwarded by other switches 10, and the processing circuit 16 of the network switch 6 will still not perform any processing.
[0061] Figure 16 This is a first schematic diagram illustrating the topology recovery according to a fourth embodiment of an anomalous single-ring network based on this disclosure. (See also: Combined References) Figure 4 and Figure 16 In step S43, the processing circuit 15 of the network switch 5 determines whether the abnormal connection port 25A has recovered. After a repair operation such as maintenance, the processing circuit 15 of the network switch 5, in response to the detection that the connection port 25A has recovered, executes step S44 and sends a blocking control packet BF through the connection port 25B.
[0062] Figure 17 This is a second schematic diagram illustrating the topology recovery according to a fourth embodiment of an anomalous single-ring network based on this disclosure. (See also: Combined References) Figure 5 and Figure 17 As in the first, second, and third embodiments described above, after steps S56 and S57, the processing circuit 16 of the network switch 6, in response to receiving the blocking control packet BF, sets the connection port 26A, which is in the enabled state, to the closed state, and sets the connection port 26B, which is in the closed state, to the enabled state, so as to send a forwarding control packet FF through the connection port 26B.
[0063] Merge reference Figure 4 and Figure 17 In step S45, the processing circuit 15 of the network switch 5 determines whether a forwarding control packet FF has been received. In response to receiving the forwarding control packet FF, step S46 is executed, and the processing circuit 15 of the network switch 5 sets the connection port 25A, which was in a closed state, to an enabled state. Thus, the network topology of the single ring network is restored to the state before the anomaly occurred.
[0064] It should be noted that in the fourth embodiment, the network switch 6 does not actively detect whether the abnormal connection port 26B has been restored. Instead, it detects the isolation control packet BF sent by the first network switch (network switch 5) coupled to it to obtain the information and execute step S57.
[0065] It is worth noting that, as can be seen from the above description, the second network switch does not forward control packets.
[0066] Neither the aforementioned first nor second network switch is a root bridge. That is, during the formation of a single network (such as initial establishment, reconstruction, and topology restoration), network switches 1-6 do not execute the root bridge determination procedure. When forming a single ring network, network switches 1-6 do not exchange their Media Access Control Address (MAC) and ID to determine the root bridge, and network switches 1-6 do not need to determine whether each connection port 21A-26A and 21B-26B is a root port, a designated port, or an alternate port based on the aforementioned MAC address and ID. This significantly improves the speed of establishing a single ring network.
[0067] Furthermore, the aforementioned control packets do not contain the MAC address and identification code of the sending end (i.e., the network switch 10 that sends the control packet). These control packets are continuously forwarded from one network switch 10 to the next within a single ring network, until they reach a network switch 10 with a closed connection port 102, at which point the forwarding of the control packets stops. In other words, during the initial establishment, reconstruction, or recovery of a single ring network, control packets are not transmitted to the root bridge, which then notifies other network switches 10. This significantly improves the speed of establishing, rebuilding, and recovering a single ring network.
[0068] In some embodiments, network switches 1-6 do not periodically exchange Bridge Protocol Data Units (BPDUs) as defined in the Spanning Tree Protocol (STP), thereby reducing the amount of data exchanged between network switches 11-16. Furthermore, when switching the port states of connection ports 21A-26A and 21B-26B, network switches 1-6 are configured to directly switch from the off state to the on state, or directly switch from the on state to the off state. In other words, during the process of switching from the off state to the on state or from the on state to the off state, connection ports 21A-26A and 21B-26B do not go through other port states (e.g., listening, learning, and discarding) to switch to the off or on state. This means that each connection port 21A-26A and 21B-26B does not need to wait for BPDU to switch its port state, which can speed up the reconstruction and recovery of a single ring network.
[0069] In some embodiments, the aforementioned enabled state can be the forwarding state defined by STP, and the aforementioned disabled state can be the blocking state defined by STP, and the control packet can be the BPDU defined by STP. Accordingly, network switches 11-16 can also be used with STP and Rapid Spanning Tree Protocol (RSTP).
[0070] In some embodiments, the processing circuit 101 is implemented by a central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), a system on a chip (SOC), or the like.
[0071] According to an embodiment of the method for restoring a single ring network topology and a network switch system disclosed herein, the network topology can be automatically rebuilt to maintain the operation of the ring network when an anomaly is detected in connection port 102; and the original network topology can be automatically restored after the anomaly in connection port 102 is detected to be restored. Furthermore, during the establishment, reconstruction, and restoration of the single ring network, the decision-making process of the root bridge is eliminated among the network switches 10, and the role of connection port 102 is not determined by the MAC address and identification code of the network switches 10. Therefore, when the network topology needs to be changed or restored, the network switch 10 does not need to notify other network switches 10 through the root bridge, and a single ring network can be quickly established. Unlike STP and RSTP technologies, the network switch system can complete the construction and restoration of a single ring network within 1 ms, minimizing the amount of data lost by users of the network switch 10.
Claims
1. A method for restoring a single ring network topology, the single ring network comprising at least one first network switch and one second network switch, each first network switch comprising a first connection port and a second connection port, the second network switch comprising a third connection port and a fourth connection port, the first connection port, the second connection port, the third connection port and the fourth connection port being preset to be in an enabled state or a disabled state to form the single ring network, the method for restoring the single ring network topology comprising: In response to the first network switch detecting an abnormality in the first connection port, the first network switch sets the first connection port to the closed state and sends a recovery control packet through the second connection port; In response to the second network switch receiving the recovery control packet, the second network switch sets the third connection port, which was in the off state, to the enabled state; In response to the first network switch detecting that the first connection port has been restored, the first network switch sends a blocking control packet through the second connection port; In response to the second network switch receiving the blocking control packet, the second network switch sets the third connection port, which is in the enabled state, to the disabled state, and sends a forwarding control packet through the fourth connection port; and In response to the first network switch receiving the forwarding control packet, the first network switch sets the first connection port, which is in the closed state, to the enabled state.
2. The method for restoring a single ring network topology as described in claim 1, wherein the second network switch sends the forwarding control packet after power-on.
3. The method for restoring a single ring network topology as described in claim 1, wherein in response to the second network switch detecting an anomaly in the fourth connection port, the second network switch sets the fourth connection port to the closed state and sets the third connection port, which is in the closed state, to the enabled state.
4. The method for restoring a single ring network topology as described in claim 1, wherein the first network switch, having both the first connection port and the second connection port in an enabled state, when receiving any one of the recovery control packet, the blocking control packet, and the forwarding control packet, forwards the received recovery control packet, the blocking control packet, or the forwarding control packet in the single ring network through the first connection port or the second connection port that did not receive the packet.
5. The method for restoring a single ring network topology as described in claim 1, wherein the first connection port, the second connection port, the third connection port, and the fourth connection port switch directly between the enabled state and the disabled state without passing through other port states.
6. The method for restoring a single ring network topology as described in claim 1, wherein neither the at least one first network switch nor the second network switch is a root bridge.
7. The method for restoring a single ring network topology as claimed in claim 1, wherein the at least one first network switch and the second network switch do not send BPDUs defined by the Spanning Tree Protocol in the single ring network.
8. The method for restoring a single ring network topology as described in claim 1, wherein the at least one first network switch and the second network switch did not send their own MAC addresses to other network switches when forming the single ring network.
9. The method for restoring a single ring network topology as described in claim 1, wherein the restoration control packet, the blocking control packet, and the forwarding control packet do not contain the MAC address and identification code of the sending end.
10. A network switch system adapted to form a single ring network, the network switch system comprising: At least one first network switch, including: First connection port; A second connection port, wherein the first connection port and the second connection port are preset to be in an enabled state; and A first processing circuit, coupled to the first connection port and the second connection port, responds to detecting an anomaly in the first connection port by setting the first connection port to a closed state and sending a recovery control packet through the second connection port; responds to detecting that the first connection port has recovered by sending a blocking control packet through the second connection port; and responds to receiving a forwarding control packet by setting the first connection port, which is in the closed state, to the enabled state; and A second network switch, coupled to the first network switch, includes: A third connection port is preset to be in this closed state; A fourth connection port is enabled by default; and A second processing circuit, coupled to the third connection port and the fourth connection port, in response to receiving the recovery control packet, sets the third connection port, which is in the closed state, to the enabled state; and in response to receiving the blocking control packet, sets the third connection port, which is in the enabled state, to the closed state, and sends the forwarding control packet through the fourth connection port.
Citation Information
Patent Citations
Processing method for redundancy checking of ring network
CN101771580A
Processing method for applying rapid spanning tree protocol to monocyclic network topology
CN102821050A