The present invention relates to a network coupling redundancy method, network switch and network architecture, and more particularly, to a network coupling redundancy method, network switch and network architecture using a backup network switch to backup multiple primary network switches in network coupling.
With the burgeoning demand for capacity and cost-efficiency in the industry, network connectivity for production equipment has become a growing trend. The network connectivity enables cross-machine data collection and analysis, enhancing the speed, flexibility, and efficiency of the manufacturing processes. It also leads to the production of higher quality products and cost reduction. However, traditional industrial environments often consists of multiple independent Local Area Networks (LANs), each composed of various redundant network technologies, causing complicate integration and management. In this situation, network coupling technology has been proposed, which connects multiple LANs to facilitate data and function sharing or integration across different LANs. This technology solves the interoperability and compatibility issues across different LANs and improves system efficiency and reliability.
In order to prevent network inoperability due to a single link failure during network coupling, a second link is generally built as a backup link to bolster the reliability and stability of network coupling. However, current solutions predominantly employ two network switches for network coupling, one of which operates as the primary network switch while the other stands by as a backup network switch. In other words, connecting each subnet requires two network switches. This approach can be problematic when connecting a large number of subnets as it not only escalates construction costs but also increases the volume of related control packets, thereby impacting performance. Moreover, in industrial control networks, there are often multiple different subnets that need to be connected to the backbone network. Therefore, there is a pressing need for further improvements to enhance efficiency and reduce costs.
Therefore, the present invention aims at providing a one-to-many redundancy method and network switch, so as to realize a redundant mechanism while reducing costs and improving efficiency when performing network coupling.
An embodiment of the present invention discloses a primary network switch. The primary network switch is configured in a switch group of a main network and coupled to at least one first subnet of a subnet group through at least one first link. The primary network switch includes a processing unit and a storage unit. The processing unit is configured to execute a program code. The storage unit is coupled to the processing unit and configured to store the program code to instruct the processing unit to execute a network coupling redundancy method. The network coupling redundancy method includes receiving a first control packet from a backup network switch of the switch group; in response to not receiving the first control packet, performing link change according to a first condition; in response to receiving the first control packet, sending a first acknowledgment (ACK) packet comprising a connection status of the at least one first subnet; sending a second control packet to the backup network switch; and in response to sending the second control packet, receiving a second ACK packet from the backup network switch, and performing link change after receiving the second ACK packet.
An embodiment of the present invention further discloses a backup network switch. The backup network switch is configured in a switch group of a main network and coupled to at least one first subnet of a subnet group through at least one first link. The backup network switch includes a processing unit and a storage unit. The processing unit is configured to execute a program code. The storage unit is coupled to the processing unit and configured to store the program code to instruct the processing unit to execute a network coupling redundancy method. The network coupling redundancy method includes periodically sending a first control packet comprising a connection status of the at least one first subnet to at least one primary network switch of the switch group; in response to sending the first control packet, at least receiving one first acknowledgement (ACK) packet from the at least one primary network switch; performing link change according to a first condition; and in response to receiving a second control packet from the at least one primary network switch, sending a second ACK packet and performing link change according to the second control packet.
An embodiment of the present invention further discloses a network architecture for network coupling and backup, and the network architecture includes a plurality of subnets and a main network. The plurality of subnets belongs to a plurality of subnet groups. The main network includes a plurality of switch groups, and each switch group of the plurality of switch groups is coupled to a subnet group of the plurality of subnet groups. The each switch group of the plurality of switch groups includes at least one primary network switch and a backup network switch. The at least one primary network switch is coupled to the subnet group, and each primary network switch of the at least one primary network switch is coupled to at least one first subnet of the subnet group through at least one first link. The backup network switch is coupled to the subnet group through at least one second link. The each switch group of the plurality of switch groups is configured to execute a network coupling redundancy method, and the network coupling redundancy method includes sending, by the backup network switch, a first control packet comprising a connection status of the at least one second link periodically; in response to receiving the first control packet, the each primary network switch of the at least one primary network switch sending a first acknowledgement (ACK) packet comprising a connection status of the at least one first link; performing, by the backup network switch, link change according to a first condition; sending, by the at least one primary network switch, a second control packet according to a second condition; in response to receiving the second control packet, the backup network switch sending a second ACK packet and performing link change according to the second control packet; and in response to receiving the second ACK packet, the at least one primary network switch performing link change.
These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings.
Certain t are used throughout the description and following claims to refer to particular components. As one skilled in the art will appreciate, hardware manufacturers may refer to a component by different names. This document does not intend to distinguish between components that differ in name but not function. In the following description and in the claims, the terms “include” and “comprise” are utilized in an open-ended fashion, and thus should be interpreted to mean “include, but not limited to”. Also, the term “couple” is intended to mean either an indirect or direct electrical connection. Accordingly, if one device is coupled to another device, that connection may be through a direct electrical connection, or through an indirect electrical connection via other devices and connections.
Please refer to
Therefore, the present invention provides a network coupling redundancy method to enable a backup network switch to simultaneously backup multiple operating primary network switches connected to subnets. Moreover, by grouping the backup network switch and the corresponding primary network switches into the same group (hereinafter referred to as switch group), the main network may connect multiple different subnet groups through multiple switch groups. In this architecture, the network switches only need to process control packets belonging to the same switch group, and the control packets are capable of carrying the connection status of multiple subnets at the same time, further reducing the amount of control packets to be processed.
Please refer to
In detail, the group G1 comprises a switch group C1 and a subnet group S1. The switch group C1 comprises a backup network switch 22_1 and a plurality of primary network switches 22_2-22_5, and the subnet group S1 comprises subnets N1-N4. The plurality of primary network switches 22_2-22_5 are coupled to the subnets N1-N4 through a plurality of links L5-L8 respectively, and the backup network switch 22_1 serves as a backup for the primary network switches 22_2-22_5 and is coupled to the subnets N1-N4 through a plurality of links L1-L4. Similarly, the group G2 comprises a switch group C2 and a subnet group S2. The switch group C2 comprises a backup network switch 24_1 and a plurality of primary network switches 24_2-24_3, and the subnet group S2 comprises subnets N5-N7. The primary network switch 24_2 is coupled to the subnets N5 and N6 through links L12 and L13 respectively, and the primary network switch 24_3 is coupled to the subnet N7 through a link L14. The backup network switch 24_1 serves as a backup for the primary network switches 24_2 and 24_3 and is coupled to the subnets N5-N7 through links L9-L11. The group G3 comprises a switch group C3 and a subnet group S3. The switch group C3 comprises a backup network switch 26_1 and a primary network switch 26_2, and the subnet group S3 comprises subnets N8-N10. The primary network switch 26_2 is coupled to the subnets N8-N10 through links L18-L20 respectively. The backup network switch 26_1 serves as a backup for the primary network switch 26_2 and is coupled to the subnets N8-N10 through links L15-L17.
For illustrative purposes, the network system 2 shown in
In the network system 2, the network switches in the same switch group transmit information by exchanging control packets (frames) to obtain the connection status between other network switches and the connected subnets. In the embodiment of the present invention, the control packets may be transmitted in the main network 20 or the subnets N1-N10 by multicast, and a group identification (ID) of the group may be carried in the destination address in the control packet header for identification by the network switches in the main network 20. The network switches may merely read the control packets with the same group ID thereto, and may forward control packets with different group ID directly without processing.
Please refer to
Furthermore, the payload 34 of the control packet 3 comprises a command 340, a sender address 341, a partner address 342, a link number 343, at least one link ID 344 and the corresponding connection status 345. Specifically, the command 340 is used to identify different types of control packets; the sender address 341 is a MAC address of a primary network switch or a backup network switch that sends the control packet; the partner address 342 is a MAC address of the destination of the control packet. For example, when a primary network switch sends a control packet, the partner address 342 may be the MAC address of the network switch belonging to the same group. In addition, the link number 343 is the number of link connection statuses carried by the control packet; the link ID 344 is a subnet ID connected by the link, and the connection status 345 is the connection status of the link corresponding to the subnet (i.e., a connection status of a subnet). The connection status 345 may be determined to be link-up or link-down according to whether to receive an electric signal of a link. In should be noted, the control packet 3 only illustrates the necessary fields for implementing the embodiment of the present invention, and is not limited thereto. Those skilled in the art need to adjust the specific content of the control packet 3 according to actual needs.
The groups G1-G3 in the embodiment of the present invention may be regarded as the smallest unit for implementing the network coupling redundancy method in the network system 2. In other words, each group is coupled to a subnet group for the main network 20, where the data forwarding is performed by at least one primary network switch, and the backup is performed by one backup network switch on standby. The network coupling redundancy method in the network system 2 may be summarized into a network coupling redundancy process 4 as shown in
According to the network coupling redundancy process 4, the backup network switch periodically sends a first control packet (Step 402) and determines a status of the primary network switches according to a first ACK packet acknowledged by the primary network switch (Step 404). When a first condition is satisfied, the primary network switch may be determined to be invalid (such as failure or fails to connect), and link change should be performed for backup (Step 406). Furthermore, when a second condition is satisfied, the primary network switch determines that link change should be performed, thus sending a second control packet to the backup network switch (Step 408). The backup network switch then responds a second ACK packet to the second control packet, and performs link change according to the second control packet (Step 410). Finally, after receiving the second ACK packet, the primary network switch performs link change (Step 412). For the contents of the first control packet, the first ACK packet, the second control packet and the second ACK packet mentioned above, please refer to the control packet 3 in
Specifically, please refer to
Please continue to refer to
The contents of the payload 34 of the first ACK packet P1_ACK sent by the primary network switch 24_3 may be shown in Table 3 below. In Table 3, the sender address 341 is the MAC address “MAC3” of the primary network switch 24_3, and the partner address 342 is the MAC address “MAC1” of the backup network switch 24_1. The link number 343 is the number of the subnets connected by the primary network switch 24_3, and the pair of the link ID 344 and the connection status 345 carries the connection status of link L14 between the primary network switch 24_3 and the subnet N7. As shown in Table 3, when the connection status 345 is link-up, it means that the link L14 connecting the primary network switch 24_3 to the subnet N7 is operating normally.
In Step 406, the backup network switch 24_1 receives the first ACK P1_ACK packets from the primary network switches 24_2 and 24_3. Through the first ACK packet P1_ACK, the backup network switch 24_1 may obtain the connection statuses between the primary network switches 24_2-24_3 and the subnets N5-N7. When the backup network switch 24_1 does not receive the first ACK packet P1_ACK from one of the primary network switches 24_2-24_3, the backup network switch 24_1 should confirm whether the first condition is met to determine whether to perform link change. The first condition may be the condition that the first ACK packet P1_ACK from the same primary network switch is not received for more than a predetermined number of times or more than a predetermined time, and is not limited thereto. When the first condition is satisfied, the backup network switch 24_1 may determine that the primary network switch has failed (or malfunctioned), and perform link change for backup. Please refer to
Please refer to
As an example, the primary network switch 24_2 detects that the link L12 between the primary network switch 24_2 and the subnet N5 has failed as shown in
Please refer to
According to the network coupling redundancy process 4, in Step 410, after receiving the second ACK packet P2_ACK from the backup network switch 24_1, the primary network switch 24_2 has to change the port connected to the link L12 from the forwarding state to the blocking state, and change the main network switch 24_2 to the blocking state. Then, the data forwarding between the main network 20 and the subnet N5 will be handed over to the link L9 and performed by the backup network switch 24_1.
On the other hand, according to the network coupling redundancy process 4, when the primary network switch 24_2 detects that the link L12 between the primary network switch 24_2 and the subnet N5 is restored, the primary network switch 24_2 may send the second control packet P2 to the main network 20 again to request link change. The contents of the payload 34 of the second control packet P2 may be shown in Table 6 below. In Table 4, the link ID 344 carrying the subnet connected to the primary network switch 24_2 is 5, and the corresponding connection status 345 is link-up. In other words, the link L12 resumes the link-up state. When receiving the second control packet P2, the backup network switch 24_1 may reply with the second ACK packet P2_ACK and perform link change. That is to say, the connection between the main network 20 and the subnet N5 may be switched from the link L9 connected by the backup network switch 24_1 to the link L12 connected by the primary network switch 24_2. During this process, the backup network switch 24_1 has to change the port connecting to the link L9 from the forwarding state to the blocking state to continue to standby as a backup, while the primary network switch 24_2 has to change the port connecting to the link L12 from the blocking state to the forwarding state to forward the data between the main network 20 and the subnet N5 again.
Accordingly, the network system 2 divides the network switches of the main network 20 into the plurality of switch groups by means of grouping, which are connected to the plurality of subnet groups. By specially setting the multicast address (destination address 31) in the control packet, the switch groups do not interfere with each other. In each switch group, a backup network switch may simultaneously back up multiple primary network switches, thus reducing the number of required devices. Furthermore, the switch group realizes the redundancy method of network coupling through the exchange of control packets. The control packets carry the connection status of a plurality of links at the same time, which effectively reduces the number of control packets in circulation, and is compatible with various ways of connecting between the primary network switches and the subnets at the same time.
About the network coupling redundancy method implemented by the backup network switch mentioned above may be summarized into processes 70 and 72 as shown in
According to the process 70, in Step 701, the backup network switch 24_1 periodically sends a first control packet to the main network 20 or the subnets N5-N7, and the first control packet comprises the connection status between the backup network switch 24_1 and the subnets N5-N7. In Step 702, the backup network switch 24_1 receives first ACK packets from the primary network switches 24_2 and 24_3 belonging to the same group. In Step 703, the backup network switch 24_1 determines the operating status of the primary network switches 24_2 and 24_3 based on the received first ACK packets. When the received first ACK packets meet the first condition, the backup network switch 24_1 determines that one of the primary network switches 24_2 and 24_3 has failed, and executes Step 704. Taking the failure of the primary network switch 24_2 as an example, in Step 704, the backup network switch 24_1 provides backup for the primary network switch 24_2 and performs link change. The subnets N5 and N6, which are originally connected by the primary network switch 24_2, are instead connected by the backup network switch 24_1 through links L9 and L10 for data forwarding between the main network 20 and the subnets N5 and N6.
While the backup network switch executes the process 70, the process 72 is also executed in parallel to monitor whether there is a second control packet sent from the primary network switch. The process 72 comprises the following steps:
According to the process 72, in Step 721, the backup network switch 24_1 continues to monitor the second control packets sent from the primary network switches 24_2 and 24_3 of the same group, and the second control packet comprises the connection statuses between the primary network switch and the connected subnets. In Step 722, the backup network switch 24_1 determines whether the second control packet is received. If the second control packet is received, the backup network switch 24_1 executes Step 723. Taking the backup network switch 24_1 receiving the second control packet from the primary network switch 24_2 as an example, in Step 723, the backup network switch 24_1 sends a second ACK packet to the primary network switch 24_2. Then, in Step 724, the backup network switch 24_1 performs link change according to the connection status carried in the second control packet.
The network coupling redundancy method implemented by the primary network switch mentioned above may be summarize into processes 80 and 82 as shown in
According to the process 80, in Step 801, the primary network switch 24_2 waits for a first control packet from the backup network switch 24_1 in the same group, and determines whether the first control packet is received in Step 802. If the first control packet is received by the primary network switch 24_2, the primary network switch 24_2 may determine that the backup network switch 24_1 is operating normally, and then send a first ACK packet to the backup network switch 24_1 in Step 803. If the first control packet is not received by the primary network switch 24_2, the primary network switch 24_2 has to determine whether a third condition is met in Step 804 for subsequent processing. The third condition comprises determining that the backup network switch 24_1 has failed and the connection status of a link connected to the primary network switch 24_2 is link-up and the corresponding port is not in the forwarding state. Determining whether the backup network switch 24_1 has failed may be based on not receiving the first control packet sent by the backup network switch 24_1 for more than a predetermined time, and is not limited thereto. When the third condition is met, the primary network switch 24_2 performs link change in Step 805 to replace the link originally backed up by the failed backup network switch 24_1. The first ACK packet comprises the connection status of the links L12 and L13 between the primary network switch 24_2 and the connected subnets N5 and N6.
While the primary network switch executes the process 80, the process 82 is also executed in parallel to notify the backup network switch when link change is required. The process 82 comprises the following steps:
According to the process 82, in Step 821, the primary network switch 24_2 continues to detect the connection status between the primary network switch 24_2 and the subnets N5 and N6. In Step 822, the primary network switch 24_2 determines whether a second condition is satisfied. If the second condition is satisfied, the primary network switch 24_2 executes Step 823. Taking the failure of the link L12 between the primary network switch 24_2 and the subnet N5 as an example, the primary network switch 24_2 sends a second control packet to the backup network switch 24_1 in Step 823. The contents of the payload 34 of the second control packet are shown in Table 4, in which the link L12 connected to the subnet N5 is in a non-connected state (link-down), and the backup network switch 24_1 may perform link change accordingly. Next, in Step 824, the primary network switch 24_2 receives a second ACK packet from the backup network switch 24_1. Finally, in Step 825, the primary network switch 24_2 performs link change.
In the embodiment of the present invention, the first control packet and the first confirmation packet may carry connection statuses of the links related to multiple subnets at the same time, and thus the number of packets may be effectively reduced. The second control packet and the second confirmation packet may carry only the subnets that need to perform link change and the corresponding link information, and thus the amount of information in the packets may be reduced. Moreover, through this mechanism, network configuration errors may be detected and fault-tolerated, and error messages may be reported.
Please refer to
Please refer to
It should be noted, although the primary network switch 28_3 sends the first ACK packet and the second control packet to the backup network switch 28_1, the backup network switch 28_4 belonging to the same group G5 may also receive the first ACK packet and the second control packet from the primary network switch 28_3. Specifically, as mentioned above, the control packets of the same group are sent to the main network 20 by multicast through the destination address 31 with the group ID. Therefore, all of the network switches 28_1-28_4 belonging to the same group are able to read and parse the control packets sent by each other. Therefore, the backup network switch 28_4 is also able to parse the first ACK packet and the second control packet sent from the primary network switch 28_3 to the backup network switch 28_1, and then obtains information of the backup performed by another backup network switch 28_1 according to the partner address 342. In this situation, when the primary network switch 28_3 fails, the backup network switch 28_4 does not need to perform link change for backup. Accordingly, the network system 2 is capable of effectively detecting errors and tolerating errors.
Please refer to
Furthermore, please refer to
The network device 120 is used to represent the necessary components required to implement the embodiments of the present invention, and those skilled in the art may make various modifications and adjustments accordingly, and is not limited to this. For example, when the network device 120 is applied to implement the primary network switch, the processes 80 and 82 of the network coupling redundancy method may be complied into the program code 1204, stored in the storage unit 1202, and executed by the processing unit 1200. When the network device 120 is applied to implement the backup network switch, the processes 70 and 72 of the network coupling redundancy method may be complied into the program code 1204, stored in the storage unit 1202, and executed by the processing unit 1200. Moreover, the storage unit 1202 is also used for storing the information about the connection statuses between the network switches belonging to the same switch group and the subnets connected thereto, as well as the data required for running the network coupling redundancy method, and is not limited thereto.
In summary, the present invention provides a network coupling redundancy method, a device and a network architecture that can enable a backup network switch to backup for multiple primary network switches during network coupling, reducing the number of devices required. By dividing the network switches into multiple groups through grouping, the groups are not interfering with each other, thus reducing the number of control packets that need to be processed. In addition, the control packet is capable of carrying the connection statuses of multiple links at the same time, further reducing the number of control packets. Accordingly, the reliability and stability of the network coupling can be ensured while reducing cost and improving performance, thus improving the shortcomings of the prior arts.
Those skilled in the art will readily observe that numerous modifications and alterations of the device and method may be made while retaining the teachings of the invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
112134838 | Sep 2023 | TW | national |