Multi-instance single-ring topology adjustment method and network switch
The multi-instance single-ring topology method with backup ports and dynamic control packet handling addresses the slow reconstruction issue of STP, ensuring rapid and efficient network adjustments and reduced data loss.
Patent Information
- Application Number
- JP2025042607
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-06-20
- Filing Date
- 2025-03-17
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2045-03-17
AI Technical Summary
Traditional Spanning Tree Protocol (STP) and its improved version, Rapid STP, take significant time to reconstruct network topology, leading to potential data loss due to prolonged downtime during changes, which is unsuitable for modern high-data networks.
A multi-instance single-ring topology adjustment method where network switches have backup ports configured differently for each instance, allowing for rapid recovery and reconfiguration by sending control packets to backup switches to adjust paths dynamically based on link conditions.
Enables faster network topology adjustments and reduces data loss by distributing traffic through different paths and dynamically adapting to link abnormalities, enhancing network stability and efficiency.
Smart Images

Figure 2026003569000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to network topology technology, and more particularly to a multi-instance single ring topology adjustment method and network switch. [Background technology]
[0002] In network technology, the Spanning Tree Protocol (hereinafter simply referred to as "STP") is an important technology for switches, and its purpose is to avoid various problems caused by network loops. Summary of the Invention [Problem to be solved by the invention]
[0003] However, traditional STP requires about 30 seconds to complete construction, and data transmission can only be performed after construction is complete. Also, if the network topology changes, STP takes 30 seconds to return to a stable state, which makes construction time very long.
[0004] For this reason, an improved version of STP, Rapid Spanning Tree Protocol (RSTP), has been proposed in recent years. However, even with Rapid STP, it still takes 2 to 3 seconds to complete and reconstruct the network topology. Therefore, considering the amount of data transmitted on modern networks, Rapid STP still faces the risk of large message loss. [Means for solving the problem]
[0005] In view of the above problems, the present invention has the following configuration.
[0006] The present invention is applied to a single ring network, the single ring network including a plurality of network switches connected in series in a ring shape; Each of the network switches includes two control ports, and two adjacent network switches are connected to each other via the corresponding control ports, and two of the plurality of network switches are a first backup switch and a second backup switch; A multi-instance single-ring topology adjustment method, wherein each of the other network switches is a standard switch, comprising: In a first network instance, a first connection port of the two control ports of the backup switch is preset to a blocked state; In the second network instance, second connection ports of the two control ports of the two backup switches are preset to a blocked state; In response to an abnormality occurring in a link within the single ring network, the network switch connected to the link transmits recovery control packets in the first network instance and the second network instance, respectively, to cause the recovery control packets to be transmitted to the first backup switch and the second backup switch via the single ring network; In response to receiving the recovery control packet, the first backup switch sets the first connection port in the blocked state in the first network instance to a forwarding state, and the second backup switch sets the second connection port in the blocked state in the second network instance to a forwarding state.
[0007] In addition, the first backup switch further includes a redirect port and is connected to a controller via the redirect port, and the first backup switch also responds to receiving the recovery control packet and causes the recovery control packet to be transmitted to the controller via the redirect port.
[0008] In addition, the recovery control packet includes switch abnormality information and connection port abnormality information, the switch abnormality information corresponds to the network switch connected to the abnormal link, and the connection port abnormality information corresponds to the control port of the network switch connected to the abnormal link.
[0009] Furthermore, the controller changes the first route to a second route based on the switch abnormality information and the connection port abnormality information, the first route including the abnormal link and the second route not including the abnormal link.
[0010] and in response to the recovery of the link, the network switch connected to the link transmits block control packets in the first network instance and the second network instance, respectively, and the block control packets are forwarded to the first backup switch and the second backup switch via the single ring network; In response to receiving the block control packet, the first backup switch places the first connection port in the first network instance in a blocked state, and the second backup switch places the second connection port in the second network instance in the blocked state.
[0011] Furthermore, after completing the setting of the block state, the first backup switch and the second backup switch each transmit a transfer control packet, and cause the transfer control packet to be transmitted to the network switch connected to the link via the single ring network; In response to receiving the forwarding control packet, the network switch connected to the link further includes setting the control port connected to the link to the forwarding state.
[0012] Also, the block control packet includes switch recovery information and connection port recovery information, The switch recovery information corresponds to the network switch connected to the link to be recovered, and the connection port recovery information corresponds to the control port of the network switch connected to the link to be recovered.
[0013] Further, the controller changes the second path to a first path based on the switch recovery information and the connection port recovery information, the first path including the recovered link and the second path not including the recovered link.
[0014] Also, in a network switch having two control ports and a processing circuit, The processing circuit is connected to the two control ports and executes the two control ports together. determining whether one of the two control ports is previously set to a blocked state in the network instance; If it is determined that it is set, it determines that it is a backup switch in the network instance, and if it is determined that it is not set, it determines that it is a standard switch in the network instance. If it is determined that it is the standard exchange in the network instance, determining whether an abnormality is detected in a link connected to any one of the control ports, and if an abnormality is detected, setting the control port connected to the abnormal link to the blocked state, and simultaneously executing a determination logic for transmitting recovery control packets by the other control ports based on the network instance; If it is determined that it is the backup switch in the network instance, determining whether the recovery control packet has been received in the network instance, and if it is determined that the recovery control packet has been received, setting the control port in the blocked state in the network instance to a forwarding state; Execute decision logic to send the recovery control packet to the controller via a redirect port.
[0015] The processing circuit also includes: If it determines that it is the standard exchange in the network instance, further executing a determination logic for determining whether a forwarding control packet is received in the network instance, and if it is determined that a forwarding control packet is received, setting the control port in the blocked state in the network instance to a forwarding state; determining whether the link has recovered, and if so, transmitting a block control packet through the control port that is not connected to the link based on the network instance; If it is determined that it is a backup switch in the network instance, it transmits the transfer control packet via the two control ports; determining whether the block control packet is received in the network instance, and if it is determined that the block control packet is received, setting the control port in the forwarding state in the network instance to the blocked state; A decision logic is executed to send the forwarding control packet via the other control port and send the block control packet to the controller via the redirect port. [Effects of the Invention]
[0016] According to the multi-instance single-ring topology adjustment method and network switch proposed in multiple embodiments of the present invention, backup ports of different network switches are arranged for different network instances, and the virtual area network traffic under each network instance passes through different paths to distribute the traffic. In addition, when a link abnormality occurs, each network instance can send a control packet to adjust and recover the topology.
[0017] Additionally, in some embodiments, block and recovery control packets are forwarded to the controller via a redirect port, allowing further dynamic adjustment of the data path based on link conditions. [Brief explanation of the drawings]
[0018] [Figure 1] 1 is a block diagram illustrating an embodiment of a network switch of the present invention. [Figure 2] FIG. 1 is a block diagram of a single-ring network-based embodiment of the present invention. [Figure 3A] FIG. 2 is a schematic diagram of an initial state of a single ring network in a first network instance according to an embodiment of the present invention; [Figure 3B] FIG. 2 is a schematic diagram of an initial state of a single ring network in a second network instance according to an embodiment of the present invention; [Figure 4] 1 is a flowchart (1) of a method for adjusting a multi-instance single ring topology according to an embodiment of the present invention; [Figure 5A] 2 is a schematic diagram of an anomaly occurring in a first network instance of a single ring network according to an embodiment of the present invention; [Figure 5B] FIG. 10 is a schematic diagram of an anomaly occurring in a second network instance of a single ring network according to an embodiment of the present invention. [Figure 6A] 2 is a schematic diagram of an alternative topology of a single ring network in a first network instance according to an embodiment of the present invention; FIG. [Figure 6B] FIG. 2 is a schematic diagram of an alternative topology of a single ring network in a second network instance according to an embodiment of the present invention. [Figure 7] 1 is a flowchart (2) of a method for adjusting a multi-instance single ring topology according to an embodiment of the present invention; [Figure 8A]FIG. 2 is a schematic diagram of link recovery in a first network instance of a single ring network according to an embodiment of the present invention. [Figure 8B] FIG. 2 is a schematic diagram of link recovery in a second network instance of a single ring network according to an embodiment of the present invention. [Figure 9A] FIG. 2 is a schematic diagram of topology recovery for a single ring network in a first network instance according to an embodiment of the present invention; [Figure 9B] FIG. 10 is a schematic diagram of topology recovery for a single ring network in a second network instance according to an embodiment of the present invention; [Figure 10] 4 is a flowchart of an initialization process for a network switch in accordance with embodiments of the present invention. [Figure 11] 10 is a flowchart illustrating the execution procedure of a processing circuit of a standard exchange in accordance with several embodiments of the present invention. [Figure 12] 10 is a flowchart illustrating the execution procedure of a processing circuit of a backup switch according to several embodiments of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0019] First, an embodiment of the present invention will be described with reference to Fig. 1. Here, Fig. 1 is a block diagram showing an embodiment of a network switch 10 of the present invention. As shown in Fig. 1, the network switch 10 includes a processing circuit 101 and a plurality of control ports 102. Here, Fig. 1 shows an example of a network switch 10 including two control ports 102. However, the present invention is not limited to this, and the network switch 10 may include other connection ports.
[0020] The control port 102 can be in a forwarding state (hereinafter also referred to as a "transfer state") or a blocking state (hereinafter also referred to as a "block state") by default. The processing circuit 101 is connected to the control port 102 and can set the state of the control port 102 to the forwarding state or the block state.
[0021] When the network switch 10 is in the path of a single loop network (or simply referred to as a "single ring network"), if the control port 102 is in a forwarding state, the control port 102 can receive data packets sent by the previous network switch 10 in the single ring network, and can forward data packets received from other control ports 102 to the next network switch 10 in the single ring network.
[0022] In other words, a controlled port 102 in the forwarding state can receive and forward data packets.
[0023] When a control port 102 is in a blocked state, the control port 102 can receive data packets sent by the previous network switch 10, but the data packets are not forwarded to the next network switch 10 via other control ports 102. In other words, a control port 102 in a blocked state can receive data packets, but does not forward data packets.
[0024] Based on this, the processing circuit 101 sets the control port 102 to a forwarding state or a blocking state, and the control port 102 of the network switch 10 can be connected to a connection port of another identical network switch 10 via a transmission path. The other network switches 10 can also set their control ports 102 to a forwarding state or a blocking state. In order to avoid a network topology loop, a single ring network is formed between the network switch 10 and the other network switches 10.
[0025] In this embodiment, a network switch 10 whose control ports 102 are in a blocked state by default (hereinafter also referred to as "pre-set") is called a backup switch. A network switch 10 that does not have any control ports 102 that are in a blocked state by default (i.e., all of its control ports 102 are in a forwarding state by default) is called a normal switch. A control port 102 that is set to a blocked state by default may also be called a backup port.
[0026] Next, a description will be given with reference to Fig. 2, which is a block diagram of an embodiment based on a single ring network of the present invention. This embodiment includes four of the above-mentioned network switches 10. Network switches 1 to 4 are connected in series in a ring shape, and adjacent network switches 1 to 4 are connected via corresponding control ports 11A to 14A and 11B to 14B, respectively.
[0027] The processing circuits 11 to 14 of these network switches 1 to 4 set the corresponding control ports 11A to 14A, 11B to 14B to a forwarding state or a blocking state by default.
[0028] When this single ring network is applied to multiple instances, in each instance, one of all control ports 11A-14A and 11B-14B in the single ring network is set to a blocked state (i.e., as a backup port) by default. Furthermore, the control ports 102 preset to a blocked state in different network instances are different from each other.
[0029] Each network instance can support one or more Virtual Local Area Networks (VLANs).
[0030] Since the control port 102 that is in a blocked state by default differs for each network instance, the traffic distribution path of the virtual area network of each network instance differs, and traffic can be distributed.
[0031] 2, in this embodiment, the network switch 1 also has another connection port (hereinafter referred to as a redirect port 21). The redirect port is connected to a controller 26 and a network device 27 via a hub 25. The network switch 3 has another connection port 22. The other connection port is connected to a network device 28.
[0032] The network device 27 and the network device 28 can communicate with each other via a single ring network. The network devices 27 and 28 and the controller 26 may be terminal devices such as computers, mobile phones, tablet PCs, and servers.
[0033] In this embodiment, the network exchange 1 may have other connection ports (not shown). Note that the connection to the network device 27 is not limited to the case where the connection to the network device 27 is via the redirect port 21.
[0034] Next, an embodiment of the present invention will be described with reference to Figures 3A and 3B, where Figure 3A is a schematic diagram of an initial state of a single ring network in a first network instance according to an embodiment of the present invention, and Figure 3B is a schematic diagram of an initial state of a single ring network in a second network instance according to an embodiment of the present invention.
[0035] In this embodiment, the single ring network includes two backup switches (including a first backup switch and a second backup switch), i.e., the control ports 102 that are in a blocked state by default in the two network instances are located on different network switches 10.
[0036] 3A, here, network switch 1 is used as a first backup switch. In the first network instance, control port 11A (first port) of network switch 1 is preset (by default) to a blocked state, and the remaining control ports 12A to 14A and 11B to 14B are preset to a forwarding state.
[0037] As shown in FIG. 3B, network switch 4 is a second backup switch, and in the second network instance, control port 14A (second port) of network switch 4 is set to a blocked state by default, and the remaining control ports 11A-13A, 11B-14B are set to a forwarding state by default. In this embodiment, a control port 102 in a blocked state is represented by a colored block filled with black, and a control port 102 in a forwarding state is represented by a white block.
[0038] After the single ring network is constructed, the network switches 1 to 4 can transmit data packets to each other, and none of the network switches 1 to 4 will repeatedly transmit a data packet that it has transmitted itself.
[0039] 3A, network switch 1 transmits a data packet via control port 11B. The data packet passes through network switches 4, 3, and 2 in order, and then is returned from network switch 2 to network switch 1's blocked control port 11A, where the data packet is no longer forwarded.
[0040] In addition to forwarding data packets, a network switch 10 whose control port 102 is in the forwarding state also forwards control packets.
[0041] That is, when one control port 102 of the network switch 10 receives a control packet, it forwards the control packet through the other control ports 102 .
[0042] The control packets may include a Forward Control Frame (FF), a Recovery Control Frame (RF), and a Block Control Frame (BF).
[0043] These control packets are used for readjustment and recovery of the network topology of the single ring network, as described below.
[0044] Although a blocked control port 102 does not forward control packets (i.e., control packets received by other controlled ports 102 are not transmitted through a blocked control port 102), a blocked controlled port 102 can still receive control packets and can also actively transmit control packets.
[0045] Next, a description will be given with reference to Figure 4. Figure 4 is a flowchart (1) of a method for adjusting a multi-instance single ring topology according to an embodiment of the present invention.
[0046] Step S81: As shown in FIG. 3A, in the first network instance, the first port (here, control port 11A) of the two control ports 102 of the first backup switch (here, network switch 1) is pre-set to a blocked state. Step S82: As shown in FIG. 3B, in the second network instance, one of the two control ports 102 (here, control port 14A) of the second backup switch (here, network switch 4) is pre-set to a blocked state.
[0047] It can be seen that the two network instances each employ a control port 102 of a different network switch 10 and are set to a blocked state.
[0048] Thus, when a data packet sent by network device 27 is transmitted to network device 28 over the single-ring network, the data packet is transmitted along a first path P1 under a first network instance (shown in FIG. 3A) and along a second path P2 under a second network instance (shown in FIG. 3B).
[0049] That is, packets sent to a destination device (such as the aforementioned network device 28) via a single ring network are sent along different routes (first route P1 and second route P2) in the first network instance and the second network instance. Step S83: When an abnormality occurs in a link in the single ring network, the network switches 2 and 3 connected to the link send a recovery control packet RF to the corresponding network instance, and the recovery control packet RF is sent to the first backup switch and the second backup switch via the single ring network.
[0050] 5A and 5B, which are schematic diagrams illustrating an abnormality occurring in a single ring network in a first network instance and a second network instance according to an embodiment of the present invention, respectively. Here, the case where the link between network switch 2 and network switch 3 is abnormal is taken as an example.
[0051] The network switch 2 detects the link abnormality via the control port 12A and transmits a recovery control packet RF via another control port 12B.
[0052] Similarly, the network switch 3 detects a link abnormality via a control port 13B and transmits a recovery control packet RF via another control port 13A.
[0053] In the present invention, the control port 102 connected to the abnormal link is also called an abnormal port, and the network switch 10 that detects the link abnormality is called an abnormal switch.
[0054] In the first network instance, the recovery control packet RF is forwarded through other network switches 10 and ultimately sent to network switch 1 (first backup switch).
[0055] In the second network instance, the recovery control packet RF is sent via another network switch 10 and finally to network switch 4 (the second backup switch).
[0056] Examples of link abnormalities include damage to the control port 12A or the control port 13B, damage to the transmission path between the control port 12A and the control port 13B, or other physical layer abnormalities that cause the transmission path to be disconnected from the connection between the control port 12A or the control port 13B. However, the present invention is not limited to this, and the abnormality may also be an abnormality caused by congestion. In this case, link abnormalities in the two network instances may occur in different locations, and even if one network instance is abnormal, the other network instance may not be abnormal.
[0057] In this embodiment, the link abnormality may occur in a specific network switch 10. For example, if a failure occurs in network switch 3, control port 12A of network switch 1 and control port 14B of network switch 4, which are connected to network switch 2, become abnormal ports, and network switches 2 and 4 that detect the link abnormality are called abnormal switches.
[0058] In order to avoid redundant explanation, in this embodiment, a link abnormality between network switch 2 and network switch 3 is taken as an example, and the subsequent processing is explained. However, since a person skilled in the art can think of the same in the case where an abnormality occurs in other locations, an explanation of abnormalities in all network switches 10 will be omitted.
[0059] Step S84: In response to receiving the recovery control packet RF (shown in Figures 6A and 6B), the first backup switch (here, network switch 1) sets the first port (control port 11A) of the first network instance in the blocked state to the forwarding state.
[0060] Also, the second backup switch (here, network switch 4) sets the second port (control port 14A) of the second network instance that was in the blocked state to the forwarding state.
[0061] 6A and 6B are schematic diagrams of alternative topologies for a first network instance and a second network instance, respectively, of a single ring network in accordance with an embodiment of the present invention.
[0062] Here, the control ports 11A and 14A, which were originally in a blocked state, are used as backup ports, and by switching the backup ports to a forwarding state, the single ring network is readjusted and can be restored to normal operation.
[0063] In some embodiments, the backup switch (here, the first backup switch, i.e., network switch 1) has a redirect port 21, and in response to receiving the recovery control packet RF, the first backup switch transmits the recovery control packet RF to the controller 26 via the redirect port 21. The recovery control packet RF includes switch abnormality information and port abnormality information when it is generated. Specifically, the recovery control packet RF transmitted by the network switch 2 includes switch abnormality information corresponding to the network switch 2 and port abnormality information corresponding to the control port 12A.
[0064] Similarly, the recovery control packet RF transmitted by the network switch 3 includes switch abnormality information corresponding to the network switch 3 and port abnormality information corresponding to the control port 13B.
[0065] In this way, the controller 26 can know that the topology of the single ring network has changed based on the switch abnormality information and port abnormality information contained in the received recovery control packet RF, and can then know which network switch 10 and which control port 102 are abnormal.
[0066] In this way, the controller 26 can dynamically adjust the settings of each network switch 10 in the single ring network based on the switch anomaly information and the port anomaly information, and change the first path including the abnormal link to a second path that does not include the abnormal link, with the change being performed at the second layer, the Data Link Layer.
[0067] For example, the first route of the second network instance is network switch 1-2-3, and the second route of the modified second network instance is network switch 1-4-3.
[0068] Each network switch 10 stores a static forwarding database, and controller 26 is responsible for setting up entries in each static forwarding database to implement the above-described route changes.
[0069] Reference is now made to Table 1, which shows the forwarding entries for the network switches of Figures 3A and 3B (i.e., the initial state).
[0070] For example, in the first network instance, when network switch 1 receives a data packet whose destination address is the address of network device 27, it forwards the data packet via redirect port 21. When network switch 1 receives a data packet whose destination address is the address of network device 28, it forwards the data packet via control port 11B.
[0071] Table 1 TIFF2026003569000002.tif175170
[0072] Reference is now made to Table 2, which is a forwarding entry for network switch 10 of Figures 6A and 6B (alternative topology).
[0073] Table 2 TIFF2026003569000003.tif174167
[0074] The following description will be given with reference to Figures 7, 8A, and 8B. Figure 7 is a flowchart (2) of a method for adjusting a multi-instance single-ring topology according to an embodiment of the present invention. Figures 8A and 8B are schematic diagrams of link recovery in a first network instance and a second network instance of a single-ring network according to an embodiment of the present invention.
[0075] Step S91: In response to the recovery of the link, the network switches 2 and 3 connected to the link send a block control packet BF based on the corresponding network instance, causing the block control packet BF to be sent to the first backup switch (here, network switch 1) and the second backup switch (here, network switch 4) via the single-ring network.
[0076] Specifically, the block control packet BF is transmitted via a control port 12B, 13A that is different from the abnormal control port 12A, 13B.
[0077] Step S92: In response to receiving the block control packet BF, the first backup switch sets the first port (control port 11A) of the first network instance to a blocked state (shown in FIG. 8A).
[0078] The second backup switch sets the second port (control port 14A) of the second network instance to a blocked state (as shown in FIG. 8B).
[0079] Please refer to Figures 7, 9A and 9B, which are schematic diagrams of topology recovery of a single ring network in a first network instance and a second network instance in this embodiment, respectively.
[0080] Step S93: After the first backup switch and the second backup switch complete setting the block state, they each send a forwarding control packet FF to the corresponding network instance, causing the forwarding control packet FF to be sent to the network switches 2 and 3 connected to the link via the single ring network.
[0081] Step S94: Upon receiving the forwarding control packet FF, the network switches 2 and 3 connected to the link set the control ports 12A and 13B connected to the link to a forwarding state, thereby recovering the network topology of the single-ring network to the state before the abnormality occurred.
[0082] Furthermore, by using different network switches 10 as backup switches in different network instances, the networks of the corresponding instances can perform topology transformations faster.
[0083] In this embodiment, as shown in Figures 8A and 8B, the first backup switch also sends a block control packet BF to the controller 26 via the redirect port 21. The block control packet BF carries switch recovery information and connection port recovery information when generated.
[0084] Specifically, the block control packet BF transmitted by the network switch 2 includes switch recovery information corresponding to the network switch 2 and connection port recovery information corresponding to the control port 12A.
[0085] Similarly, the block control packet BF sent by the network switch 3 includes switch recovery information corresponding to the network switch 3 and connection port recovery information corresponding to the control port 13B.
[0086] In this way, the controller 26 can know that the topology of the single ring network has changed through the switch recovery information and connection port recovery information in the received block control packet BF, and can know which network switch 10 has recovered from the abnormality and which control port 102 has recovered from the abnormality.
[0087] In this way, the controller 26 can dynamically adjust the settings of each network switch 10 in the single ring network based on the switch recovery information and the connection port recovery information, and change the second route that previously did not include the recovered link to a first route that includes the recovered link.
[0088] The change is performed at the second layer, the Data Link Layer, e.g., the first route for the second network instance is network switch 1-2-3, and the second route for the second network instance is network switch 1-4-3.
[0089] Each network switch 10 stores a static forwarding database, and the controller 26 is responsible for configuring the entries in each static forwarding database to implement the above-mentioned route changes. See Table 1 for the forwarding entries of the network switch 10 when the topology is recovered.
[0090] Next, to facilitate the realization of the single ring network of the above embodiment, the execution procedure of each network switch 10 constituting the single ring network will be described. The description will be made with reference to FIG. 10. Here, FIG. 10 is a flowchart of the initialization process of the network switch in multiple embodiments of the present invention. First, in step S31, the processing circuit 101 loads configuration parameters. The configuration parameters may be stored in a parameter file for setting each control port 102 to a forwarding state or a blocking state by default.
[0091] In this embodiment, the processing circuitry 101 has a memory that stores the parameter file. In some embodiments, the processing circuitry 101 is connected to an external storage device and reads the parameter file stored in the external storage device.
[0092] After step S31, step S32 is executed, in which the processing circuit 101 determines whether or not there is a controlled port 102 in a blocked state in each network instance.
[0093] If not, the processing circuit 101 determines that the network switch 10 is a standard switch within the network instance (step S33).
[0094] If so, the processing circuit 101 determines that the network switch 10 is a backup switch in the network instance (step S34). After steps S33 and S34, the processing circuit 101 transmits a forwarding control packet FF via each of the two control ports 102 (step S35).
[0095] Next, a description will be given with reference to Fig. 11. Here, Fig. 11 is a flowchart showing the execution procedure of the processing circuit of the standard switch 101 in multiple embodiments of the present invention. In step S41, the processing circuit 101 determines whether or not an abnormality has been detected in the control port 102 in the network instance (i.e., whether or not a link abnormality has been detected).
[0096] In response to detecting an abnormality at the control port 102, step S42 is executed, in which the processing circuit 101 sets the abnormal control port 102 in this network instance to a blocked state and transmits a recovery control packet RF via another control port 102 depending on the network instance.
[0097] In step S43, the processing circuit 101 determines whether the abnormal connection port has recovered.
[0098] After repair work such as maintenance, the processing circuit 101, in response to detecting that the control port 102 in the network instance has recovered, executes step S44 and transmits a block control packet BF via another control port 102 based on this network instance.
[0099] In step S45, the processing circuit 101 determines whether or not a forwarding control packet FF has been received. If the forwarding control packet FF has been received (indicating that the backup port of the backup switch has returned to the blocked state), step S46 is executed, and the processing circuit 101 sets the control port 102 in the blocked state in the network instance to the forwarding state.
[0100] Next, a description will be given with reference to Fig. 12. Here, Fig. 12 is a flowchart showing the execution procedure of the processing circuit 101 of the backup switch in multiple embodiments of the present invention. In step S51, the processing circuit 101 determines whether an abnormality has been detected in the control port 102 of the network instance (i.e., whether an abnormality in the link has been detected).
[0101] If detected, step S52 is executed to determine whether the abnormal control port 102 of this network instance is a backup port.
[0102] If the determination result in step S52 is "No", this means that an abnormality has occurred in another control port 102 in the forwarding state (the network topology needs to be further adjusted in order to execute step S53).
[0103] In step S53, the processing circuit 101 sets the abnormal control port 102 of the network instance to a blocked state and sets the backup port of the network instance to a forwarding state, so that the single ring network can be re-adjusted and normal operation can be restored.
[0104] If the determination result in step S52 is "Yes," this means that an abnormality has occurred in the control port 102 and it is in a blocked state, and no further processing is required at this point. This is because the abnormal control port 102 is in a blocked state and does not forward packets, so it does not affect packet delivery.
[0105] In step S54, the processing circuit 101 determines whether or not a recovery control packet RF has been received at the network instance.
[0106] In response to receiving the recovery control packet RF (indicating that an abnormality has occurred in the control port 102 of another network switch 10), step S55 is executed, in which the processing circuit 101 sets the control port 102 (backup port) in the blocked state in this network instance to the forwarding state. Also, if the backup switch has a redirect port 21, the recovery control packet RF is sent via the redirect port 21.
[0107] Here, the control port 102, which was originally in a blocked state, is used as a backup port, and by switching the backup port to a forwarding state, the single ring network is readjusted and can return to normal operation.
[0108] In step S56, the processing circuit 101 determines whether or not a block control packet BF has been received at the network instance.
[0109] In response to receiving the block control packet BF (indicating that the abnormal control port 102 of the other network switch 10 has recovered), step S57 is executed, in which the processing circuit 101 sets the backup port of this network instance to a blocked state, and a forwarding control packet FF is sent via the control port 102, and if the backup switch has a redirect port 21, the block control packet BF is sent via the redirect port 21.
[0110] In the above-described embodiments, the processing circuit 101 is realized by a central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), a system on a chip (SOC), or the like.
[0111] In addition, in some embodiments, the forwarding state is a forwarding state defined by STP, the blocking state is a blocking state defined by STP, and the control packet is a BPDU defined by STP. Based on this, the network switches 11-14 can also be adapted to STP and Rapid Spanning Tree Protocol (RSTP). The network instance described above is deployed based on Multiple Spanning Tree Protocol (MSTP).
[0112] According to the multi-instance single-ring topology adjustment method and network switch proposed in multiple embodiments of the present invention, different network instances are configured on the backup ports of different network switches 10, and the virtual area network traffic of each network instance passes through different paths to distribute the traffic. In addition, when a link abnormality occurs, each network instance can send a control packet to adjust and recover the topology.
[0113] Additionally, in some embodiments, block control packets BF and recovery control packets RF are forwarded to controller 26 via redirect port 21 to allow further dynamic adjustment of the data path based on link conditions. [Explanation of symbols]
[0114] 1~4, 10 Network exchange 11~14 Processing circuit 101 Processing circuit 102 Control Port 11A~14A, 11B~14B control ports 21 Redirect port 22 connection ports 25 Hub 26 Controller 27, 28 Network Devices BF Block control packet FF forwarding control packet P1 First pass P2 Second pass RF Recovery Control Packet Steps S31 to S35 Steps S41 to S46 S51~S57 steps S81~S84 steps S91~S94 steps
Claims
1. The present invention is applied to a single ring network, the single ring network including a plurality of network switches connected in series in a ring shape; each of the network switches includes two control ports, and two adjacent network switches are connected to each other via the corresponding control ports, and two of the plurality of network switches are a first backup switch and a second backup switch; A multi-instance single-ring topology adjustment method, wherein each of the other network switches is a standard switch, comprising: In a first network instance, a first connection port of the two control ports of the backup switch is preset to a blocked state; In the second network instance, second connection ports of the two control ports of the two backup switches are preset to a blocked state; In response to an abnormality occurring in a link within the single ring network, the network switch connected to the link transmits recovery control packets in the first network instance and the second network instance, respectively, to cause the recovery control packets to be transmitted to the first backup switch and the second backup switch via the single ring network; In response to receiving the recovery control packet, the first backup switch sets the first connection port in the blocked state in the first network instance to a forwarding state, and the second backup switch sets the second connection port in the blocked state in the second network instance to a forwarding state. A method for adjusting a multi-instance single ring topology, comprising:
2. The first backup switch further includes a redirect port and is connected to a controller via the redirect port, and the first backup switch also responds to receiving the recovery control packet and causes the controller to transmit the recovery control packet via the redirect port.
2. The method for adjusting a multi-instance single ring topology according to claim 1.
3. The recovery control packet includes switch abnormality information and connection port abnormality information, the switch abnormality information corresponds to the network switch connected to the abnormal link, and the connection port abnormality information corresponds to a control port of the network switch connected to the abnormal link.
3. The method for adjusting a multi-instance single ring topology according to claim 2.
4. The controller changes the first route to a second route based on the switch abnormality information and the connection port abnormality information, the first route including the abnormal link and the second route not including the abnormal link.
4. The method for adjusting a multi-instance single ring topology according to claim 3.
5. In response to the recovery of the link, the network switch connected to the link transmits block control packets in the first network instance and the second network instance, respectively, and the block control packets are forwarded to the first backup switch and the second backup switch via the single ring network; In response to receiving the block control packet, the first backup switch places the first connection port in the first network instance in a blocked state, and the second backup switch places the second connection port in the second network instance in the blocked state.
2. The method for adjusting a multi-instance single ring topology according to claim 1.
6. After completing the setting of the block state, the first backup switch and the second backup switch each transmit a transmission control packet, and cause the transmission control packet to be transmitted to the network switch connected to the link via the single ring network; In response to receiving the forwarding control packet, the network switch connected to the link further includes setting the control port connected to the link to the forwarding state. The method for adjusting a multi-instance single ring topology according to claim 5 .
7. The block control packet includes switch recovery information and connection port recovery information; The switch recovery information corresponds to the network switch connected to the link to be recovered, and the connection port recovery information corresponds to the control port of the network switch connected to the link to be recovered. The method for adjusting a multi-instance single ring topology according to claim 5 .
8. The controller changes the second path to a first path based on the switch recovery information and the connection port recovery information, the first path including the recovered link, and the second path not including the recovered link. The method for adjusting a multi-instance single ring topology according to claim 7 .
9. 1. A network switch having two control ports and a processing circuit, The processing circuit is connected to the two control ports and executes the two control ports together. determining whether one of the two control ports is previously set to a blocked state in the network instance; If it is determined that it is set, it determines that it is a backup switch in the network instance, and if it is determined that it is not set, it determines that it is a standard switch in the network instance. If it is determined that it is the standard exchange in the network instance, Determine whether an abnormality is detected in a link connected to any one of the control ports, and if an abnormality is detected, set the control port connected to the abnormal link to the blocked state, and execute a determination logic to transmit a recovery control packet to the other control ports based on the network instance; If it is determined that it is the backup switch in the network instance, determining whether the recovery control packet has been received in the network instance, and if it is determined that the recovery control packet has been received, setting the control port in the blocked state in the network instance to a forwarding state; Execute decision logic to send the recovery control packet to a controller via a redirect port. A network switch characterized by:
10. The processing circuitry If it determines that it is the standard exchange in the network instance, further executing a determination logic for determining whether a forwarding control packet is received in the network instance, and if it is determined that a forwarding control packet is received, setting the control port in the blocked state in the network instance to a forwarding state; determining whether the link has recovered, and if so, transmitting a block control packet through the control port that is not connected to the link based on the network instance; If it is determined that it is a backup switch in the network instance, it transmits the transfer control packet via the two control ports; determining whether the block control packet is received in the network instance, and if it is determined that the block control packet is received, setting the control port in the forwarding state in the network instance to the blocked state; Execute a decision logic to send the forwarding control packet via the other control port and send the block control packet to the controller via the redirect port.
10. The network switch of claim 9.