Network switch supporting heterogeneous network coupling backup and network architecture

By designing the main network switch and the backup network switch, using the processing unit to perform the backup method, the heterogeneous network coupling between the main network and the subnet is realized, which solves the problem of redundant protocol consistency in the prior art and improves network efficiency and stability.

CN119629138APending Publication Date: 2025-03-14MOXA INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311328362.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-09-13
Filing Date
2023-10-13
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

In the prior art, when performing network coupling, the main network and the subnet need to use the same redundant protocol, which makes it difficult to expand the network architecture with multiple different redundant protocols, and the effectiveness of the network nodes and the main network are difficult to maintain, especially when connecting multiple subnets.

Method used

By designing a main network switch and a backup network switch, respectively, the main network and the sub-network are respectively configured, and the backup method is performed using the processing unit. By sending control packets and confirming packets, changing network status, and updating the media access control address table according to different redundant protocols, the heterogeneous network coupling between the main network and the sub-network is realized.

Benefits of technology

The main network and the subnet are implemented to operate according to different redundant protocols, which improves the network's effectiveness, solves the problem of redundant protocol consistency during network coupling, and improves the stability and scalability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119629138A_ABST
    Figure CN119629138A_ABST
Patent Text Reader

Abstract

A main network switch is configured in a main network running a first redundancy protocol and is used for coupling a sub-network running a second redundancy protocol, and the main network switch executes a backup method. The backup method comprises the following steps: sending a first control packet through at least one first connection port; receiving an acknowledgement packet of the first control packet in response to sending the first control packet; and switching a state of a second connection port in response to the acknowledgement packet receiving the first control packet, and transmitting a second control packet through the at least one first connection port according to the first redundancy protocol to update a media access control address table of the primary network, and sending a third control packet through the second connection port according to the second redundancy protocol to update a media access control address table of the sub-network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a network coupling backup device and a network architecture, and more particularly to a network switch and a network architecture for heterogeneous network coupling backup. Background Art

[0002] As the industry's requirements for production capacity and cost increase, connecting production equipment to the network has become a trend. Through network connection, data collection and analysis across machines become possible, which improves the speed, flexibility, and efficiency of the process, while reducing costs and producing higher quality products. However, in traditional industrial environments, there are often multiple independent local area networks (LANs) at the same time, which makes integration and management difficult. In this case, the prior art has proposed network coupling technology, which can connect multiple local area networks in series and enable data and function sharing or integration between different local area networks. This technology can solve the problem of mutual communication between different local area networks and improve the efficiency and scalability of the system.

[0003] Generally speaking, the architecture of an industrial control network may require multiple different sub-networks to access the main network (backbone network). In addition, most industrial control networks run redundancy protocols to ensure the stability and reliability of the network. Most sub-networks run redundancy protocols such as Rapid Spanning Tree Protocol (RSTP) and Media Redundancy Protocol (MRP), while the main network mostly runs High-availability Seamless Redundancy (HSR) or a private redundancy protocol defined by the switch manufacturer. However, when coupling the network, the main network and its connected sub-networks generally need to use the same redundancy protocol to operate. Therefore, in the case of multiple different redundancy protocols, the expansion of the network architecture becomes difficult.

[0004] Although the prior art has proposed the coupling technology of heterogeneous networks, there are many restrictions on the connection methods and devices for network coupling. For example, the main path and backup path of the sub-network need to be coupled to the adjacent network nodes of the main network, the network nodes used for connection need to run two different redundant protocols of the main network and the sub-network at the same time, or the main network needs to forward the control packets of the redundant protocol required by the sub-network, etc. In this case, the performance of the network nodes and the main network is difficult to maintain, and the problem is more serious when the number of connected sub-networks is large. Summary of the invention

[0005] Therefore, the object of the present invention is to provide a network coupling method and device for heterogeneous networks, so that when performing network coupling, the main network and the sub-network can operate according to different redundancy protocols respectively, and improve performance while realizing the redundancy mechanism.

[0006] The embodiment of the present invention discloses a main network switch, which is configured in a main network running a first redundant protocol and is used to couple a sub-network running a second redundant protocol. The main network switch includes at least one first connection port coupled to the main network; a second connection port coupled to the sub-network; a processing unit for executing a program code; and a storage unit coupled to the processing unit for storing the program code to instruct the processing unit to execute a backup method for network coupling. The backup method includes sending a first control packet through the at least one first connection port; receiving a confirmation packet of the first control packet in response to sending the first control packet; and switching a state of the second connection port in response to receiving the confirmation packet of the first control packet, sending a second control packet through the at least one first connection port according to the first redundant protocol to update a media access control address table (MAC address table) of the main network, and sending a third control packet through the second connection port according to the second redundant protocol to update a media access control address table of the sub-network.

[0007] The embodiment of the present invention further discloses a backup network switch, which is configured in a main network running a first redundant protocol and is used to couple a sub-network running a second redundant protocol. The backup network switch includes at least one first connection port coupled to the main network; a second connection port coupled to the sub-network; a processing unit for executing a program code; and a storage unit coupled to the processing unit for storing the program code to instruct the processing unit to execute a backup method for network coupling. The backup method includes converting a state of the second connection port; and sending a first control packet according to the first redundant protocol through the at least one first connection port to update a media access control address table (MAC address table) of the main network, and sending a second control packet according to the second redundant protocol through the second connection port to update a media access control address table of the sub-network.

[0008] An embodiment of the present invention further discloses a network architecture for network coupling, comprising a sub-network, operating according to a first redundant protocol; a main network, operating according to a second redundant protocol; a main network switch, arranged in the main network, coupled to the main network through at least one first connection port, and coupled to the sub-network through a second connection port; and a backup network switch, arranged in the main network, coupled to the main network through at least one third connection port, and coupled to the sub-network through a fourth connection port. The main network switch and the backup network switch perform a backup method for network coupling, the backup method comprising the main network switch sending a first control packet through the at least one first connection port; in response to receiving the first control packet, the backup network switch sends an acknowledgment packet of the first control packet and performs link switching, sends a second control packet through the at least one third connection port according to the second redundancy protocol to update a MAC address table of the main network, and sends a third control packet through the fourth connection port according to the first redundancy protocol to update a MAC address table of the sub-network; and in response to receiving the acknowledgment packet of the first control packet, the main network switch performs link switching, sends a fourth control packet through the at least one first connection port according to the second redundancy protocol to update a MAC address table of the main network, and sends a fifth control packet through the second connection port according to the first redundancy protocol to update a MAC address table of the sub-network. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 A schematic diagram of a network system. Figure 2 It is a partial schematic diagram of a network system according to an embodiment of the present invention. Figure 3 A polling flow diagram of a network-coupled backup method according to an embodiment of the present invention is shown. Figure 4 It is a schematic diagram of an implementation of a polling process executed by a network system according to an embodiment of the present invention. Figure 5 A schematic diagram of a link activation process of a network coupling backup method according to an embodiment of the present invention. Figure 6 It is a schematic diagram of an implementation of a link activation process performed by a standby network switch according to an embodiment of the present invention. Figure 7 It is a schematic diagram of an implementation of a link activation process performed by a master network switch according to an embodiment of the present invention. Figure 8 The diagram is a schematic diagram of a polling process executed by a standby network switch according to an embodiment of the present invention. Fig. 9It is a schematic diagram of a polling process executed by a master network switch according to an embodiment of the present invention. Fig.10 A schematic diagram of a link switching process of a network coupling backup method according to an embodiment of the present invention. Fig.11 It is a schematic diagram of an implementation of a link switching process executed by a network system according to an embodiment of the present invention. Fig.12 It is a schematic diagram of an implementation of a link switching process executed by a network system according to an embodiment of the present invention. Fig.13A and Fig. 13B It is a schematic diagram of another implementation of a link switching process executed by a network system according to an embodiment of the present invention. Fig.14 It is a schematic diagram of another implementation of a link switching process executed by a network system according to an embodiment of the present invention. Fig.15 The figure is a schematic diagram of a link switching process executed by a master network switch according to an embodiment of the present invention. Fig.16 The figure is a schematic diagram of a link switching process executed by a standby network switch according to an embodiment of the present invention. Fig.17 Schematic diagram of a coupled chain network according to an embodiment of the present invention. Fig.18 FIG. 2 is a schematic diagram of a redundancy method for performing network coupling when coupling a chain network according to an embodiment of the present invention. Fig.19 FIG. 1 is a schematic diagram of a network device according to an embodiment of the present invention.

[0010] A~D: Redundancy Protocol 1: Network system 10: Main Network 12_1~12_3: Sub-network 14_1~14_3: Main network switch 16_1~16_3: Backup network switch N1~N3: Network L1~L6: Link 20: Subnetwork 22: Main network switch 24: Backup network switch 26, 28: Network switch 220, 222, 224, 240, 242, 244: Connection ports 30: Process 300~314: Steps P1: Polling Packet P1_ACK: Acknowledgement packet of polling packet 50: Process 500~508: Steps TC1, TC2: Topology update packets 80, 90, 1000: Process 800~812、900~912、1000~1018: Steps LC1: Link Switch Packet LC1_ACK: Link switch packet confirmation packet LT1: Link Confirmation Packet LT1_ACK: Link acknowledgment packet 150, 160: Process 1500~1526、1600~1616: Steps P2: Polling Packet P2_ACK: Acknowledgement packet of polling packet LC2: Link Switch Packet LC2_ACK: Link switch packet acknowledgment packet 190: Network Device 1900: Processing Unit 1902: Storage Unit 1904: Program Code DETAILED DESCRIPTION

[0011] Certain words are used in the specification and subsequent patent applications to refer to specific components. It should be understood by those skilled in the art that hardware manufacturers may use different terms to refer to the same component. This specification and subsequent patent applications do not use differences in names as a way to distinguish components, but use differences in the functions of the components as the criteria for distinction. The term "including" mentioned throughout the specification and subsequent patent applications is an open-ended term and should be interpreted as "including but not limited to". In addition, the term "coupled" herein includes any direct and indirect electrical connection means. Therefore, if the text describes a first device coupled to a second device, it means that the first device can be directly electrically connected to the second device, or indirectly electrically connected to the second device through other devices or connection means.

[0012] Please refer to Figure 1 , Figure 1It is a schematic diagram of a network system 1. In the network system 1, a main network 10 is coupled to a plurality of sub-networks 12_1 to 12_3. The main network 10 operates according to a redundant protocol A, and the sub-networks 12_1 to 12_3 operate according to redundant protocols B to D, respectively. Specifically, the main network 10 is coupled to the sub-networks 12_1 to 12_3 through a plurality of main network switches 14_1 to 14_3 via a plurality of main links; at the same time, the main network 10 is also coupled to the sub-networks 12_1 to 12_3 through a plurality of backup network switches 16_1 to 16_3 via a plurality of backup links. The plurality of backup network switches 16_1 to 16_3 and their backup links serve as backups for the plurality of main network switches 14_1 to 14_3 and their main links, and are in standby status. Figure 1 It can be seen that the network system 1 has a situation where multiple networks using different redundant protocols are coupled. In the prior art, the switch used to connect the sub-networks may need to run two different redundant protocols at the same time. For example, the network switches 14_1 and 16_1 need to run redundant protocols A and B at the same time, the network switches 14_2 and 16_2 need to run redundant protocols A and C at the same time, and the network switches 14_3 and 16_3 need to run redundant protocols A and D at the same time. This operation mode causes a great performance burden on the network switch. On the other hand, in the prior art, the entire main network 10 may be regarded as a single path, and the control packets of the redundant protocols related to the sub-networks 12_1 to 12_3 are forwarded on the main network 10. In this case, when the number of coupled sub-networks increases, the amount of control packets on the main network 10 also increases greatly, affecting the performance. What's more, in the prior art, it may not be possible to couple networks that are compatible with more than two redundant protocols at the same time.

[0013] Therefore, the present invention proposes a network coupling architecture and a network switch backup method therein to improve the shortcomings of the prior art. Among them, the main network switch, the backup network switch and the link connected to the sub-network can be regarded as a coupling network, which serves as a communication bridge between the main network and the sub-network, so that when the network switch performs network backup such as link switching, the main network and the sub-network can be notified of the information related to the new path according to the redundancy protocol running by the main network and the sub-network. Accordingly, the main network and the sub-network can be connected and communicated with each other while running according to different redundancy protocols, without interfering with each other, bringing stable performance.

[0014] Please refer to Figure 2 , Figure 2 for Figure 1 A partial schematic diagram of a network system 1. Specifically, Figure 2 The embodiment of the present invention shows the connection between the main network 10, the sub-network 20, the main network switch 22 and the backup network switch 24. Figure 1The main network switch 22 represents the main network switch corresponding to the sub-network 20 among the main network switches 14_1 to 14_3, and the backup network switch 24 represents the backup network switch corresponding to the sub-network 20 among the backup network switches 16_1 to 16_3. Figure 2 As shown, the main network switch 22 is configured in the main network 10, connected to the main network 10 via the connection ports 222 and 224 via the links L3 and L4, and connected to the sub-network 20 via the connection port 220 via the link L1 and forwards data. On the other hand, the backup network switch 24 is configured in the main network 10, connected to the main network 10 via the connection ports 242 and 244 via the links L5 and L6, and connected to the sub-network 20 via the connection port 240 via the link L2 and stands by as a backup for the main network switch 22. It should be noted that the main network 10 is Figure 2 The main network 10 is shown as a ring network, but it is not limited to this. The main network 10 can be various types of network topologies and suitable for different redundancy protocols. Therefore, although the main network switch 22 and the backup network switch 24 are shown as being connected to the main network 10 through two connection ports, they are not limited to this. According to different network topologies, different numbers of connection ports and links can be used to connect to the main network. In addition, Figure 2 The main network switch 22 and the backup network switch 24 are shown as being adjacent to each other, but the present invention is not limited thereto. The main network switch 22 and the backup network switch 24 may be adjacent to each other (links L4 and L5 are the same link), or may be connected to each other through other network devices (not shown) on the main network 10. Figure 2 ) are connected (links L4 and L5 are different links).

[0015] exist Figure 2In the embodiment of the present invention, the network system 1 can be regarded as composed of three networks N1 to N3 operating with a redundancy mechanism. Network N1 is a main network 10 including a main network switch 22 and a backup network switch 24, which operates according to a redundancy protocol A. When any device or link therein fails or fails, redundancy can be performed according to the operation mode of the redundancy protocol A. Network N2 is a sub-network 20 including network switches 26 and 28, which operates according to a redundancy protocol B. When any device or link therein fails or fails, redundancy can be performed according to the operation mode of the redundancy protocol B. Network N1 and network N2 operate according to different redundancy protocols respectively and do not affect each other. On the other hand, network N3 includes a main network switch 22, a backup network switch 24, network switches 26 and 28, and links L1 and L2, that is, the aforementioned coupling network. When any device or link therein fails or fails, the links L1 and L2 are switched, and the operation of different redundancy protocols in the main network 10 and the sub-network 20 is not affected. Specifically, when a link switch is performed in the network N3, the main network switch 22 and the backup network switch 24 can send a notification of topology update to the main network 10 through the connection ports 222, 224 and the connection ports 242, 244 according to the redundancy protocol A. At the same time, the main network switch 22 and the backup network switch 24 can also send a notification of topology update to the sub-network 20 through the connection ports 220 and the connection ports 240 according to the redundancy protocol B. In this way, network coupling can be free from the restrictions of different redundancy protocols.

[0016] An implementation of a network coupling backup method in the network system 1 can be summarized as a polling process 30, such as Figure 3 The polling process 30 includes the following steps:

[0017] Step 300: Start.

[0018] Step 302: The standby network switch 24 periodically sends a polling packet P1.

[0019] Step 304: The primary network switch 22 determines whether it has not received the first polling packet P1 for a predetermined time. If so, execute step 306; otherwise, execute step 308.

[0020] Step 306: The master network switch 22 performs a link activation process.

[0021] Step 308: In response to receiving the polling packet P1, the primary network switch 22 replies with an acknowledgment packet P1_ACK.

[0022] Step 310: The standby network switch 24 determines whether it has not received the confirmation packet P1_ACK for a predetermined number of times. If so, execute step 312; otherwise, execute step 314.

[0023] Step 312: The standby network switch 24 performs a link activation process.

[0024] Step 314: End.

[0025] Please also refer to Figure 4 , Figure 4 1 is a schematic diagram of an implementation of the polling process 30 performed by the network system 1 according to an embodiment of the present invention. According to the polling process 30, the standby network switch 24 periodically sends a polling packet P1 to the main network 10 through the connection ports 242 and 244 (step 302), and determines the status of the main network switch 22 according to whether the main network switch replies with an acknowledgement packet P1_ACK (step 310). When the main network switch 22 receives the first control packet P1, it sends an acknowledgement packet P1_ACK to the main network 10 through the connection ports 222 and 224 (step 308). If the standby network switch 24 periodically sends the polling packet P1 but has not received the acknowledgement packet P1_ACK for a predetermined number of times, the standby network switch 24 can determine that the main network switch 22 has failed (for example, power failure or failure), and therefore, the standby network switch 24 needs to perform a link activation process to enable the link L2 to communicate with the sub-network 20 (step 312). Another situation where the confirmation packet P1_ACK is not received may be caused by the failure of all links (L3, L4) between the main network switch 22 and the main network 10 at the same time. The backup network switch 24 also needs to perform a link activation process to enable the link L2 to communicate with the sub-network 20 (step 312). In addition, when all links (L5, L6) connecting the backup network switch 24 to the main network 10 fail at the same time, the backup network switch 24 also needs to perform a link activation process to enable the link L2 to communicate with the main network 10 and the sub-network 20 (step 312). On the contrary, when the backup network switch 24 continues to receive the confirmation packet P1_ACK from the main network switch 22, it can be determined that the main network switch 22 is operating normally, so the backup network switch 24 can maintain a standby state. It should be noted that when the standby network switch 24 is just started and has not yet received the confirmation packet P1_ACK, the standby network switch 24 does not perform the link activation process, thereby avoiding unnecessary link switching to ensure system stability.

[0026] On the other hand, when the polling packet P1 periodically sent from the backup network switch 24 has not been received for a predetermined time (step 304), the main network switch 22 may determine that the backup network switch 24 has failed, and perform a link activation process to activate the link L1 to communicate with the sub-network 20 (step 306). Similarly, another situation in which the polling packet P1 is not received may be caused by the failure of all links (L5, L6) between the backup network switch 24 and the main network 10 at the same time. The main network switch 22 also needs to perform a link activation process to activate the link L1 to communicate with the sub-network 20 (step 306). In addition, when all links (L3, L4) connecting the main network switch 22 to the main network 10 fail at the same time, the backup main network switch 22 also needs to perform a link activation process to activate the link L1 to communicate with the main network 10 and the sub-network 20 (step 306). It should be noted that the link activation process of the main network switch 22 is only limited to the case where the backup network switch 24 backs up the main network switch 22 through the link L2. That is, when the main network switch 22 and the link L1 operate normally and communicate with the sub-network 20 via the link L1, the link activation process of the link L1 does not need to be performed.

[0027] The link activation process performed by the main network switch 22 and the backup network switch 24 can be summarized as a link activation process 50. Figure 5 The link activation process 50 includes the following steps:

[0028] Step 500: Start.

[0029] Step 502: Convert the connection port connected to the sub-network 20 to a forwarding state.

[0030] Step 504 : Send a topology update packet TC1 from the connection port connected to the primary network 10 according to the redundancy protocol A.

[0031] Step 506 : Send a topology update packet TC2 from the connection port connected to the sub-network 10 according to the redundancy protocol B.

[0032] Step 508: End.

[0033] Please also refer to Figure 6 , Figure 6 1 is a schematic diagram of an implementation of the link activation process 50 performed by the backup network switch 24 in the network system 1 according to an embodiment of the present invention. Figure 6 In step 310, the backup network switch 24 determines that the main network switch 22 fails, and then performs the link activation process in step 312. Figure 6As shown, according to the link activation process 50, in step 502, the backup network switch 24 first converts the state of the connection port 240 to the forwarding state (marked as F). Next, the backup network switch 24 needs to notify the main network 10 and the sub-network 20 respectively that the network needs to perform a topology update. In step 504, the backup network switch 24 sends a topology update packet TC1 to the main network 10 through the connection ports 242 and 244 according to the redundant protocol A, and the network device in the main network 10 can update the media access control address table (MACaddress table) according to the topology update packet TC1 (i.e., flush MAC). On the other hand, in step 506, the backup network switch 24 sends a topology update packet TC2 to the sub-network 20 through the connection port 240 according to the redundant protocol B, and the network device in the sub-network 20 can update the media access control address table according to the topology update packet TC2. Accordingly, the main network 10 and the sub-network 20 can continue to operate according to the redundant protocols A and B respectively. It should be noted that Figure 6 Although the case where the main network switch 22 fails is shown, the present invention is also applicable to the case where the links L3 and L4 fail simultaneously.

[0034] Please continue to refer to Figure 7 , Figure 7 It is a schematic diagram of an implementation of the link activation process 50 executed by the main network switch 22 in the network system 1 according to an embodiment of the present invention. Figure 7 In step 304, the main network switch 22 determines that the backup network switch 24 fails, and then performs the link activation process in step 306. Figure 7 As shown, according to the link activation process 50, in step 502, the main network switch 22 first converts the state of the connection port 220 to the forwarding state (marked as F). Next, the main network switch 22 needs to notify the main network 10 and the sub-network 20 respectively that the network needs to perform a topology update. In step 504, the main network switch 22 sends a topology update packet TC1 to the main network 10 through the connection ports 222 and 224 according to the redundant protocol A, and the network devices in the main network 10 can update the media access control address table according to the topology update packet TC1. On the other hand, in step 506, the main network switch 22 sends a topology update packet TC2 to the sub-network 20 through the connection port 220 according to the redundant protocol B, and the network devices in the sub-network 20 can update the media access control address table according to the topology update packet TC2. Accordingly, the main network 10 and the sub-network 20 can continue to operate according to the redundant protocols A and B respectively. It should be noted that Figure 7 Although the situation in which the backup network switch 24 fails is shown, the present invention is also applicable to the situation in which the links L5 and L6 fail simultaneously.

[0035] The above method for the standby network switch 24 to perform the polling process 30 can be summarized as a process 80, such as Figure 8 The process 80 comprises the following steps:

[0036] Step 800: Start.

[0037] Step 802: Periodically send a polling packet P1.

[0038] Step 804: Wait for an acknowledgment packet P1_ACK of the polling packet P1.

[0039] Step 806: Determine whether the confirmation packet P1_ACK is received. If yes, execute step 804; if no, execute step 808.

[0040] Step 808: Determine whether the confirmation packet P1_ACK has not been received for a predetermined number of times. If yes, execute step 810; otherwise, execute step 804.

[0041] Step 810: Perform link activation process.

[0042] Step 812: End.

[0043] According to the process 80, the standby network switch 24 periodically sends a polling packet P1 to the main network 10 through the connection ports 242 and 244 (step 802), and waits for the confirmation packet P1_ACK from the main network switch 22 (step 804), thereby continuously monitoring the status of the main network switch 22. If the standby network switch 24 receives the confirmation packet P1_ACK as expected, it can be determined that the main network switch 22 is operating normally and continues to wait for the next confirmation packet P1_ACK; if the confirmation packet P1_ACK is not received, further judgment is required (step 806). When the standby network switch 24 fails to receive the confirmation packet P1_ACK from the main network switch 22 for a predetermined number of times, it can be determined that the main network switch 22 has failed and a link activation process is required to perform backup for it (step 810). Accordingly, the standby network switch 24 converts the status of the connection port 240 to the forwarding state, and notifies the main network 10 and the sub-network 20 to perform topology updates according to the redundancy protocols A and B respectively.

[0044] The above method for the main network switch 22 to perform the polling process 30 can be summarized as a process 90, such as Fig. 9 The process 90 comprises the following steps:

[0045] Step 900: Start.

[0046] Step 902: Wait for the polling packet P1.

[0047] Step 904: Determine whether the polling packet P1 is received. If yes, execute step 906; if no, execute step 908.

[0048] Step 906: Send an acknowledgment packet P1_ACK for the polling packet P1.

[0049] Step 908: Determine whether the polling packet P1 has not been received for a predetermined time. If yes, execute step 910; otherwise, execute step 902.

[0050] Step 910: Perform link activation process.

[0051] Step 912: End.

[0052] According to process 90, the main network switch 22 waits for the polling packet P1 from the backup network switch 24, and sends the confirmation packet P1_ACK of the polling packet P1 through the connection ports 222 and 224. In this way, when reporting the status of the main network switch 22 itself, the status of the backup network switch 24 can also be monitored at the same time. First, the main network switch 22 continues to wait for the polling packet P1 from the backup network switch 24 (step 902). If the main network switch receives the polling packet P1, it can be determined that the backup network switch 24 is operating normally and continues to wait for the next polling packet P1; if the polling packet P1 is not received, further judgment is required (step 904). After receiving the polling packet P1, the main network switch 22 needs to send a confirmation packet P1_ACK to respond to the backup network switch 24 (step 906). If the polling packet P1 is not received for a predetermined time (step 908), it can be determined that the backup network switch 24 has failed and a link activation process is required to connect to the sub-network 20 (step 910). Accordingly, the main network switch 22 converts the state of the connection port 220 to a forwarding state and notifies the main network 10 and the sub-network 20 to perform topology updates according to the redundancy protocols A and B, respectively.

[0053] Accordingly, through the polling process 30 , the main network switch 22 and the backup network switch 24 in the network system 1 can monitor each other's status and enable the link with the sub-network 10 for communication when necessary.

[0054] Furthermore, in addition to monitoring the status of the main network switch 22 and the backup network switch 24, the network system 1 also needs to monitor the status of the links L1 and L2 at the same time, so that when any link of the links L1 and L2 fails (link-down), the link can be switched in time to maintain the communication between the main network 10 and the sub-network 20. In the embodiment of the present invention, an implementation of the backup method for network coupling in the network system 1 can be summarized as a link switching process 100, such as Fig.10The link switching process 100 includes the following steps:

[0055] Step 1000: Start.

[0056] Step 1002: The primary network switch 22 detects the connection status of the link L1.

[0057] Step 1004: The primary network switch 22 determines whether the connection status of the link L1 has changed. If yes, execute step 1006; if no, execute step 1002.

[0058] Step 1006: The main network switch 22 determines whether the connection state of the link L1 is a link-up state or a link-down state. If it is a link-up state, execute step 1008; if it is a link-down state, execute step 1012.

[0059] Step 1008: The primary network switch 22 sends a connection confirmation packet LT1 through the link L1.

[0060] Step 1010: In response to receiving the connection confirmation packet LT1 or the timer expiring, execute step 1012.

[0061] Step 1012: The primary network switch 22 sends a link switching packet LC1.

[0062] Step 1014: In response to receiving the link switching packet LC1, the standby network switch 24 replies with an acknowledgment packet LC1_ACK.

[0063] Step 1016: The main network switch 22 and the backup network switch 24 perform link switching.

[0064] Step 1018: End.

[0065] According to process 100, the main network switch 22 must monitor the connection status of the link L1 connected to the sub-network 20 at any time. It can determine whether it is connected or disconnected (failed) based on whether the electrical signal of the link L1 is received (step 1002). When the status of the link L1 changes, the main network switch 22 needs to further determine the subsequent handling method (step 1004). When the status of the link L1 changes from the connected state to the disconnected state, the backup network switch 24 needs to perform backup and switch the connection link between the main network 10 and the sub-network 20 to the link L2 (steps 1012-1016); when the status of the link L1 changes from the disconnected state to the connected state, the main network switch 22 needs to further send a connection confirmation packet LT1 to the sub-network 20 to confirm the status of the link L1, and switch the connection link between the main network 10 and the sub-network 20 back to the link L1 (steps 1008-1016). In the case where link switching is required, the main network switch 22 can send a link switching packet LC1 to the main network 10 through the connection ports 222 and 224 to notify the backup network switch 24 to switch the links L1 and L2 (step 1012). After receiving the link switching packet LC1, the backup network switch 24 can send an acknowledgment packet LC1_ACK of the link switching packet LC1 to the main network 10 through the connection ports 242 and 244 (step 1014), and then perform link switching. In step 1016, the main network switch 22 and the backup network switch 24 need to perform link switching respectively. Step 1016 is similar to the aforementioned link activation process 50. The main network switch 22 and the backup network switch 24 need to change the status of the connection ports 220 and 240 corresponding to the links L1 and L2 connected to the sub-network 20, and send topology update packets TC1 and TC2 to the main network 10 and the sub-network 20 respectively.

[0066] Please refer to Fig.11 , Fig.12 , Fig.11 , Fig.12 This is a schematic diagram of an implementation of the link switching process 100 executed by the network system 1 in an embodiment of the present invention. Fig.11 Specifically, the situation in which it is determined that the link L1 changes from the connected state to the unconnected state in step 1006 is illustrated. In step 1012, the primary network switch 22 can send a link switching packet LC1 to the primary network 10 through the connection ports 222 and 224. Then, in step 1014, after receiving the link switching packet LC1, the backup network switch 24 replies an acknowledgment packet LC1_ACK to the primary network 10 through the connection ports 242 and 244, and performs link switching according to the instruction of the link switching packet LC1.

[0067] like Fig.12As shown, after receiving the link switching packet LC1, the standby network switch 24 enables the link L2 according to the instruction of the link switching packet LC1 to communicate with the sub-network 20. Similar to the link enabling process 50, the standby network switch 24 needs to convert the connection port 240 connected to the sub-network 20 to the forwarding state (labeled as F). Next, the standby network switch 24 needs to notify the main network 10 and the sub-network 20 respectively that the network topology needs to be updated. The standby network switch 24 sends a topology update packet TC1 to the main network 10 through the connection ports 242 and 244 according to the redundancy protocol A, so that the network devices in the main network 10 can update the media access control address table according to the topology update packet TC1. On the other hand, the standby network switch 24 sends a topology update packet TC2 to the sub-network 20 through the connection port 240 according to the redundancy protocol B, so that the network devices in the sub-network 20 can update the media access control address table according to the topology update packet TC2.

[0068] On the other hand, after the main network switch 22 receives the confirmation packet LC1_ACK from the backup network switch 24, the main network switch 22 needs to switch the connection port 220 connected to the sub-network 20 to a blocking state (marked as B), and similarly needs to notify the main network 10 and the sub-network 20 that the network topology needs to be updated. Since the link L1 has failed, in this case, the main network switch 22 only needs to send the topology update packet TC1 to the main network 10 through the connection ports 222 and 224 according to the redundancy protocol A, so that the network devices in the main network 10 can update the media access control address table according to the topology update packet TC1.

[0069] Please refer to Fig.13A , Fig. 13B and Fig.14 , Fig.13A , Fig. 13B and Fig.14 FIG. 13A is a schematic diagram of another implementation of the link switching process 100 executed by the network system 1 in an embodiment of the present invention. Fig. 13B Specifically depicted is the situation where it is determined that the link L1 is switched from a disconnected state to a connected state in step 1006. In this case, the communication between the main network 10 and the sub-network 20 needs to be switched from the link L2 back to the link L1 by the main network switch 22, and the backup network switch 24 is on standby again.

[0070] exist Fig.13AIn step 1008, the main network switch 22 may additionally send a connection confirmation packet LT1 to the sub-network 20 to confirm the status of the network switch 26 on the sub-network 20 connected to the link L1. In step 1008, the main network switch 22 may first send the connection confirmation packet LT1 via the link L1 through the connection port 220. The connection confirmation packet LT1 sent by the main network switch 22 on the main network 10 may be transmitted through the link L1, the sub-network 20, and the link L2 in sequence, and then returned to the main network 10 again, and finally received by the main network switch 22 through the connection port 222 or 224. Then, in step 1010, after the main network switch 22 waits for the connection confirmation packet LT1 to be transmitted through the sub-network 20 and returned to the main network 10, it can be confirmed that the link L1 and the network switch 26 on the sub-network 20 connected to the link L1 are ready, so the link switching can be performed immediately. On the other hand, when the primary network switch 22 does not receive the connection confirmation packet LT1 sent by itself, it can also wait for the timer to expire before performing link switching. After receiving the connection confirmation packet LT1 or the timer expires, in step 1012, the primary network switch 22 can send a link switching packet LC1 to the primary network 10 through the connection ports 222 and 224 to notify the backup network switch 24 to switch the links L1 and L2. Then, in step 1014, after receiving the link switching packet LC1, the backup network switch 24 replies with an acknowledgement packet LC1_ACK to the primary network 10 through the connection ports 242 and 244, and performs link switching according to the instruction of the link switching packet LC1.

[0071] Please refer to Fig. 13B In one embodiment, when the network switch 26 connected to the link L1 receives the connection confirmation packet LT1 sent by the main network switch 22, it can send a confirmation packet LT1_ACK of the connection confirmation packet LT1 to the main network switch 22 via the link L1. In step 1010, the main network switch 22 waits for the confirmation packet LT1_ACK replied from the network switch 26 or the expiration of a timer. In the case that the network switch 26 can recognize the connection confirmation packet LT1, the network switch 26 will reply with the confirmation packet LT1_ACK. The main network switch 22 can also confirm that the link L1 and the network switch 26 are ready through the confirmation packet LT1_ACK, and immediately perform the link switch. In the case that the network switch 26 cannot recognize the connection confirmation packet LT1, the main network switch 22 will not receive the confirmation packet LT1_ACK from the network switch 26. In this case, the main network switch 22 will wait for the expiration of the timer before performing the link switch.

[0072] exist Fig.14In the embodiment, after receiving the link switching packet LC1, the standby network switch 24 blocks the link L2 according to the instruction of the link switching packet LC1 to stop the communication with the sub-network 20. Similar to the link activation process 50, the standby network switch 24 needs to convert the connection port 240 connected to the sub-network 20 to a blocking state. Then, the standby network switch 24 needs to notify the main network 10 and the sub-network 20 respectively that the network topology needs to be updated. The standby network switch 24 sends a topology update packet TC1 to the main network 10 through the connection ports 242 and 244 according to the redundancy protocol A, so that the network devices in the main network 10 can update the media access control address table according to the topology update packet TC1. On the other hand, the standby network switch 24 sends a topology update packet TC2 to the sub-network 20 through the connection port 240 according to the redundancy protocol B, so that the network devices in the sub-network 20 can update the media access control address table according to the topology update packet TC2.

[0073] On the other hand, after the main network switch 22 receives the confirmation packet LC1_ACK from the backup network switch 24, the main network switch 22 needs to switch the connection port 220 connected to the sub-network 20 to the forwarding state, and similarly needs to notify the main network 10 and the sub-network 20 that the network topology needs to be updated. In this case, the main network switch 22 needs to send a topology update packet TC1 to the main network 10 through the connection ports 222 and 224 according to the redundancy protocol A, so that the network devices in the main network 10 can update the media access control address table according to the topology update packet TC1. On the other hand, the main network switch 22 sends a topology update packet TC2 to the sub-network 20 through the connection port 220 according to the redundancy protocol B, so that the network devices in the sub-network 20 can update the media access control address table according to the topology update packet TC2.

[0074] Accordingly, the network system 1 monitors the status of the links L1 and L2, and switches the links in time according to the status of the link L1 to maintain the communication between the main network 10 and the sub-network 20. In the embodiment of the present invention, the main network switch 22 can further confirm the connection status of the link L1 through the connection confirmation packet LT1 or the confirmation packet LT1_ACK of the connection confirmation packet, and can notify the backup network switch 24 to perform link switching through the link switching packet LC1. In addition. Through the topology update packets TC1 and TC2, the main network switch 2 and the backup network switch 24 can respectively notify the main network 10 and the sub-network 20 to update the media access control address table according to different redundancy protocols.

[0075] The above method for the master network switch 22 to perform the link switching process 100 can be summarized as a process 150, such as Fig.15 The process 150 comprises the following steps:

[0076] Step 1500: Start.

[0077] Step 1502: Detect the connection status of link L1.

[0078] Step 1504: Determine whether the connection status of link L1 has changed. If yes, execute step 1506; if no, execute step 1502.

[0079] Step 1506: Determine whether the connection state of the link L1 is connected or disconnected. If it is connected, execute step 1508; if it is disconnected, execute step 1518.

[0080] Step 1508: Send a connection confirmation packet LT1 via the link L1.

[0081] Step 1510: In response to receiving the connection confirmation packet LT1 or the timer expiring, execute step 1512.

[0082] Step 1512: Send a link switch packet LC1.

[0083] Step 1514: In response to receiving an acknowledgment packet LC1_ACK of the link switching packet LC1 or the timer expiring, execute step 1516.

[0084] Step 1516: Convert the connection port 220 connected to the sub-network 20 to a forwarding state.

[0085] Step 1518: Send a link switch packet LC1.

[0086] Step 1520: In response to receiving an acknowledgment packet LC1_ACK of the link switching packet LC1 or the timer expiring, execute step 1522.

[0087] Step 1522: Convert the connection port 220 connected to the sub-network 20 to a blocking state.

[0088] Step 1524: Send a topology update packet TC1 from the connection ports 222 and 224 according to the redundant protocol A; send a topology update packet TC2 from the connection port 220 according to the redundant protocol B.

[0089] Step 1526: End.

[0090] The above method for the backup network switch 24 to perform the link switching process 100 can be summarized as a process 160, such as Fig.16 Process 160 includes the following steps:

[0091] Step 1600: Start.

[0092] Step 1602: Wait for the link switch packet LC1.

[0093] Step 1604: Determine whether the link switching packet LC1 is received. If yes, execute step 1606; if no, execute step 1602.

[0094] Step 1606: Send an acknowledgment packet LC1_ACK for the link switch packet LC1.

[0095] Step 1608: Determine whether to enable or block the link L2 according to the link switching packet LC1. If enabled, execute step 1610; if blocked, execute step 1612.

[0096] Step 1610: Convert the connection port 240 connected to the sub-network 20 to a forwarding state.

[0097] Step 1612: Convert the connection port 240 connected to the sub-network 20 to a blocking state.

[0098] Step 1614: Send a topology update packet TC1 from the connection ports 242 and 244 according to the redundant protocol A; send a topology update packet TC2 from the connection port 240 according to the redundant protocol B.

[0099] Step 1616: End.

[0100] It should be noted that in the embodiment of the present invention, the message exchange between the main network switch 22 and the backup network switch 24 is carried out through the polling packet P1, the confirmation packet P1_ACK of the polling packet P1, the link switching packet LC1, and the confirmation packet LC1_ACK of the link switching packet LC1, which are transmitted through the main network 10 and will not flow into the sub-network 20. However, when the sub-network 20 is a chain network, the sub-network 20 will not have a sufficient redundancy mechanism to cope with any link failure in the network. Therefore, when a link failure occurs in the chain network, part of the network communication will be interrupted. In this case, the embodiment of the present invention transmits the polling packet, the confirmation packet of the polling packet, the link switching packet, and the confirmation packet of the link switching packet through the chain network to exchange messages between the main network switch 22 and the backup network switch 24, and thereby monitor the network status of the chain network. It should be noted that the method of transmitting polling packets, confirmation packets of polling packets, link switching packets and confirmation packets of link switching packets through a chain network to perform message exchange between the main network switch 22 and the backup network switch 24 is applicable to networks with various network topologies and is not limited to use in chain networks.

[0101] Please refer to Fig.17 , Fig.17 FIG. 2 is a schematic diagram of executing an embodiment of the present invention when the sub-network 20 is a chain network. Fig.17In the embodiment, the network switches 26 and 28 are connected to the head and tail of the chain network respectively, and are connected to the main network switch 22 and the backup network switch 24 through the links L1 and L2 respectively. Under normal circumstances, the connection port 220 of the main network switch 22 is in a forwarding state, which is used for communication between the main network 20 and the chain network, and the connection port 240 of the main network switch 22 is in a blocking state, which is on standby as a backup for the main network switch 22. According to the polling process 30, the main network switch 22 periodically sends a polling packet P2 to the chain network via the link L2, and the main network switch 22 receives the polling packet P2 from the chain network via the link L1. Similarly, the main network switch 22 also sends an acknowledgment packet P2_ACK of the polling packet P2 to the chain network via the link L1, and the backup network switch 24 also receives the acknowledgment packet P2_ACK from the chain network via the link L2. When the main network switch 22 does not receive the polling packet P2 for a predetermined time, the main network switch 22 can determine that the backup network switch 24 fails or a link fails in the chain network, resulting in a network outage. In this case, the link L1 needs to be enabled to ensure that all network devices in the chain network can be connected to the network. Similarly, when the backup network switch 24 sends out the polling packet P2 but has not received the confirmation packet P2_ACK for a predetermined number of times, the backup network switch 24 can determine that the main network switch 22 fails or a link fails in the chain network, resulting in a network outage. In this case, the link L2 needs to be enabled to ensure that all network devices in the chain network can be connected to the network. Similarly, according to the link switching process 100, the link switching packet LC2 and its confirmation packet LC2_ACK are also transmitted through the chain network. When the main network switch 22 sends out the link switching packet LC2 but has not received the confirmation packet LC2_ACK for a predetermined number of times, the main network switch 22 can determine that the backup network switch 24 fails or a link fails in the chain network, resulting in a network outage. In this case, link L1 needs to be enabled to ensure that all network devices in the chain network can be connected to the network.

[0102] Please refer to Fig.18 , Fig.18The schematic diagram of executing an embodiment of the present invention when the sub-network 20 is a chain network illustrates a situation when a link in the chain network fails. In this situation, the backup network switch 24 periodically sends a polling packet P2 to the chain network via the link L2, but will not receive an acknowledgment packet P2_ACK from the main network switch 22. Therefore, the backup network switch 24 needs to enable the link L2 to ensure that all network devices in the chain network can be connected to the network. According to the link activation process 50, in step 502, the backup network switch 24 first converts the state of the connection port 240 to the forwarding state. Then, the backup network switch 24 needs to notify the main network 10 and the chain network that a topology update is required. In step 504, the backup network switch 24 sends a topology update packet TC1 to the main network 10 through the connection ports 242 and 244 according to the redundancy protocol A, and the network devices in the main network 10 can update the media access control address table according to the topology update packet TC1. On the other hand, in step 506, the backup network switch 24 sends a topology update packet TC2 to the chain network through the connection port 240 according to the redundancy protocol B. The network devices in the chain network can update the media access control address table according to the topology update packet TC2. In this way, the communication between the chain network and the main network 20 can be ensured. It should be noted that Fig.18 Although the diagram shows a situation where some links in a chain network fail, the diagram is also applicable to a situation where the main network switch 22 fails.

[0103] In addition, in the embodiment of the present invention, all control packets must be transmitted and received through the connection port connected to the main network 10 or the connection port connected to the sub-network 20. Taking the main network switch 22 as an example, all control packets must be transmitted and received through the connection port 220 connected to the sub-network 20 and the connection ports 222 and 224 connected to the main network 10. When the main network switch 22 receives control packets through the connection ports other than the connection ports 220, 222 and 224, it can be determined that an erroneous network connection method has occurred, which may cause a network loop. In this case, the main network switch 22 will convert the state of the connection port 220 to a blocking state for a predetermined time and report an error message. Similarly, taking the backup network switch 24 as an example, all control packets must be transmitted and received through the connection port 240 connected to the sub-network 20 and the connection ports 242 and 244 connected to the main network 10. When the backup network switch 24 receives a control packet through a connection port other than the connection ports 240, 242, and 244, it can be determined that an erroneous network connection mode has occurred, which may cause a network loop. In this case, the backup network switch 24 will convert the state of the connection port 240 to a blocking state for a predetermined time and report an error message. Accordingly, the embodiment of the present invention can detect an erroneous network connection mode.

[0104] For further information, please refer to Fig.19 , which is a schematic diagram of a network device 190 according to an embodiment of the present invention. The network device 190 can be used to implement the main network switch 22 and the backup network switch 24 according to an embodiment of the present invention. Fig.19 As shown, the network device 190 may include a processing unit 1900 and a storage unit 1902. The processing unit 1900 may be a general purpose processor, a microprocessor, an application specific integrated circuit (ASIC), etc. or a combination thereof. The storage unit 1902 is coupled to the processing unit 1900 and may be any data storage device for storing a program code 1904, and the program code 1904 is read and executed by the processing unit 1900. For example, the storage unit 1902 may be a read-only memory (ROM), a flash memory, a random access memory (RAM), a hard disk, an optical data storage device, and a non-volatile storage unit, etc., but is not limited thereto. In addition, the device 190 further includes a plurality of connection ports (not shown in the figure) for connecting a plurality of network devices of the sub-network and the main network.

[0105] The network device 190 is used to represent the necessary elements required to implement the embodiments of the present invention. A person skilled in the art may make different modifications and adjustments accordingly, but the invention is not limited thereto. For example, when the network device 190 is used to implement the main network switch 22, the processes 50, 90, and 150 of the network coupling backup method may be compiled into program code 1904 and stored in the storage unit 1902, and the network coupling backup method is executed by the processing unit 1900. When the network device 190 is used to implement the backup network switch 24, the processes 50, 80, and 160 of the network coupling backup method may be compiled into program code 1904 and stored in the storage unit 1902, and the network coupling backup method is executed by the processing unit 1900. In addition, the storage unit 1902 is also used to store data required when the network coupling backup method is running, but the invention is not limited thereto.

[0106] In summary, the present invention provides a network coupling architecture, a network switch and a backup method thereof, which can enable different coupled networks to connect and communicate with each other while operating according to different redundant protocols, and do not interfere with each other, thereby bringing stable performance. Among them, the network switches can monitor the network status and exchange information to achieve the purpose of backup through control packets, such as polling packets, connection confirmation packets, and link switching packets; by sending topology update packets of different redundant protocols to different networks, each network link can be notified of updated information without affecting the operation of each redundant protocol. In addition, when coupling a chain network, by changing the sending direction of the polling packet and the link switching packet, a monitoring and backup mechanism for the chain network can be achieved. Accordingly, the present invention improves the shortcomings of the prior art. The above descriptions are only preferred embodiments of the present invention. All equivalent changes and modifications made according to the claims of the present invention shall fall within the protection scope of the present invention.

Claims

1. A main network switch, characterized in that: A main network switch configured to run a first redundancy protocol and coupled to a sub-network running a second redundancy protocol, the main network switch comprising: At least one first connection port coupled to the main network; a second connection port coupled to the sub-network; a processing unit for executing a program code; as well as A storage unit, coupled to the processing unit, is used to store the program code to instruct the processing unit to execute a backup method for network coupling, the backup method comprising: Sending a first control packet through the at least one first connection port; In response to sending the first control packet, receiving an acknowledgment packet for the first control packet; as well as In response to receiving the confirmation packet of the first control packet, converting a state of the second connection port, sending a second control packet through the at least one first connection port according to the first redundant protocol to update a media access control address table of the main network, and sending a third control packet through the second connection port according to the second redundant protocol to update a media access control address table of the sub-network.

2. The main network switch according to claim 1, characterized in that: The program code instructs the processing unit to execute the redundancy method in response to a link failure of the second connection port, so that the state of the second connection port is converted into a blocking state.

3. The main network switch according to claim 1, characterized in that: The program code instructs the processing unit to execute the backup method in response to satisfying a main line switching condition, the state of the second connection port is converted to a forwarding state, and the step of sending the first control packet through the at least one first connection port is in response to receiving the fourth control packet through the at least one first connection port after sending a fourth control packet through the second connection port or the expiration of a timer.

4. The main network switch according to claim 3, characterized in that: The main line switching condition is that the link of the second connection port recovers or the links of the at least one first connection port are all invalid.

5. The main network switch according to claim 3, characterized in that: The redundancy method further includes receiving a fifth control packet from a backup network switch on the main network coupled to the sub-network, and sending a confirmation packet of the fifth control packet in response to receiving the fifth control packet.

6. The main network switch according to claim 5, characterized in that: The main line switching condition is in response to not receiving the fifth packet for a predetermined time.

7. The main network switch according to claim 5, characterized in that: The first control packet and the confirmation packet of the fifth control packet are transmitted through the second connection port via the sub-network.

8. The main network switch according to claim 7, characterized in that: The sub-network is a chain network.

9. The main network switch according to claim 8, characterized in that: The main line switching condition is in response to not receiving the fifth control packet for a predetermined time or not receiving the confirmation packet of the first control packet after sending the first control packet.

10. The main network switch according to claim 1, characterized in that: A third connection port is also included. When the main network switch receives any control packet through the third connection port, the backup method further includes converting the state of the second connection port to a blocking state for a predetermined time and reporting an error message.

11. A backup network switch, characterized in that: A main network configured to run a first redundancy protocol and coupled to a sub-network running a second redundancy protocol, the backup network switch comprising: At least one first connection port coupled to the main network; a second connection port coupled to the sub-network; a processing unit for executing a program code; as well as A storage unit, coupled to the processing unit, is used to store the program code to instruct the processing unit to execute a backup method for network coupling, the backup method comprising: converting a state of the second connection port; and A first control packet is sent through the at least one first connection port according to the first redundancy protocol to update a media access control address table of the main network, and a second control packet is sent through the second connection port according to the second redundancy protocol to update a media access control address table of the sub-network.

12. The backup network switch according to claim 11, characterized in that: The program code instructs the processing unit to execute the redundancy method in response to receiving a third control packet and sending a confirmation packet of the third control packet through the at least one first connection port, and the state of the second connection port is converted into a blocking state or a forwarding state.

13. The backup network switch according to claim 12, wherein: The confirmation packet of the third control packet is transmitted through the second connection port via the sub-network.

14. The backup network switch according to claim 13, characterized in that: The sub-network is a chain network.

15. The backup network switch according to claim 11, characterized in that: The program code instructs the processing unit to execute the redundancy method in response to all links of the at least one first connection port failing and the state of the second connection port being converted into a forwarding state.

16. The backup network switch according to claim 11, characterized in that: The program code stored in the storage unit is further used to instruct the processing unit to execute: Periodically sending a fourth control packet through the at least one first connection port; as well as In response to not receiving a confirmation packet of the fourth control packet from a main network switch on the main network coupled to the sub-network for a predetermined number of times, the redundancy method is executed and the state of the second connection port is converted to a forwarding state.

17. The backup network switch according to claim 16, wherein: The fourth control packet is transmitted via the sub-network through the second connection port.

18. The backup network switch according to claim 17, characterized in that: The sub-network is a chain network.

19. The backup network switch according to claim 11, characterized in that: A third connection port is also included. When the backup network switch receives any control packet through the third connection port, the state of the second connection port is converted into a blocking state for a predetermined time and an error message is reported.

20. A network architecture for network coupling, characterized in that: Include: a sub-network operating according to a first redundancy protocol; a primary network operating according to a second redundancy protocol; A main network switch, disposed in the main network, coupled to the main network through at least a first connection port, and coupled to the sub-network through a second connection port; as well as a backup network switch, disposed in the main network, coupled to the main network through at least a third connection port, and coupled to the sub-network through a fourth connection port; The main network switch and the backup network switch perform a backup method for network coupling, and the backup method includes: The main network switch sends a first control packet through the at least one first connection port; In response to receiving the first control packet, the backup network switch sends an acknowledgment packet of the first control packet and performs link switching, sends a second control packet according to the second redundancy protocol through the at least one third connection port to update the media access control address table of the primary network, and sends a third control packet according to the first redundancy protocol through the fourth connection port to update the media access control address table of the sub-network; and In response to receiving the confirmation packet of the first control packet, the main network switch performs link switching, sends a fourth control packet according to the second redundancy protocol through the at least one first connection port to update a media access control address table of the main network, and sends a fifth control packet according to the first redundancy protocol through the second connection port to update a media access control address table of the sub-network.

21. The network architecture of claim 20, wherein: The main network switch and the backup network switch execute the redundancy method in response to a link failure of the second connection port of the main network switch.

22. The network architecture of claim 20, wherein: The main network switch and the backup network switch execute the backup method in response to a main line switching condition being met, and the step of the main network switch sending a first control packet through the at least one first connection port in response to the main network switch sending a sixth control packet through the second connection port and then receiving the sixth control packet through the at least one first connection port or the expiration of a timer.

23. The network architecture of claim 22, wherein: The main line switching condition is that the link of the second connection port recovers or the links of the at least one first connection port are all invalid.

24. The network architecture of claim 22, wherein: The backup network switch periodically sends a seventh control packet through the at least one third connection port, and in response to receiving the seventh control packet, the primary network switch sends an acknowledgment packet of the seventh control packet.

25. The network architecture of claim 24, wherein: The primary line switching condition is responsive to the primary network switch not receiving the seventh packet for a predetermined time.

26. The network architecture of claim 24, wherein: The first control packet and the confirmation packet of the seventh control packet are transmitted through the sub-network via the second connection port, and the confirmation packet of the first control packet and the seventh packet are transmitted through the sub-network via the fourth connection port.

27. The network architecture of claim 26, wherein: The sub-network is a chain network.

28. The network architecture of claim 27, wherein: The master line switching condition is responsive to the master network switch not receiving the seventh control packet for a predetermined time or not receiving the confirmation packet of the first control packet after sending the first control packet.

29. The network architecture of claim 23, wherein: The backup network switch also executes the backup method in response to not receiving a confirmation packet of the seventh control packet from the primary network switch for a predetermined number of times, and the state of the fourth connection port is converted into a forwarding state.

30. The network architecture of claim 24, wherein: The backup network switch executes the backup method in response to all links of the at least one third connection port failing, and the state of the fourth connection port is converted to a forwarding state.