Method, device, medium and equipment for implementing backup link switching of redundant DRP ring
By enabling the fast switching function and clear message sending in the DRP ring, the slave link is directly switched to the master state, which solves the problem of insufficient switching performance of DRP ring backup link in the existing technology, and realizes the completion of the link within 50ms High-efficiency performance of switching.
Patent Information
- Application Number
- CN202311812464.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-26
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2043-12-26
AI Technical Summary
The existing DRP ring backup link switching method has insufficient switching performance in high-reliability real-time systems, and cannot complete link switching within 50ms, which cannot meet the needs of high-reliability real-time systems.
After receiving the master link down message on the slave node, the quick switching function is enabled, the slave link status is switched to the master status, and the clear message is sent to all nodes in the DRP ring, and the routing information is cleared directly to avoid passing the announcement. The packets are elected to realize link switching.
It significantly shortens the link switching time, can complete the switching within 50ms, improves the link switching performance, and meets the needs of high-reliability real-time systems.
Smart Images

Figure CN117768382B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of redundant ring networks of industrial Ethernet switches, and in particular to a method and device for implementing backup link switching of a redundant DRP ring, a redundant DRP ring, a computing device, and a storage medium. Background Art
[0002] The Distributed Redundancy Protocol (DRP) backup link implements the backup of multiple links (2 or more) between two DRP rings. Figure 1 is a schematic diagram of a specific DRP ring network and a DRP backup link, such as Figure 1 As shown, switching devices 1, 2, and 3 (called DRP nodes) constitute the first DRP ring, and switching devices 4, 5, and 6 (called DRP nodes) constitute the second DRP ring. There is a chain between device 1 of the first DRP ring and device 4 of the second DRP ring, device 2 of the first DRP ring and device 5 of the second DRP ring, and device 3 of the first DRP ring and device 6 of the second DRP ring, forming three links. The first DRP ring exchanges data with the second DRP ring through these three links. The DRP nodes in the first DRP ring are configured, and the DRP nodes in the first DRP ring send announce messages to each other to elect and determine the master and backup links, wherein the link corresponding to the DRP node with a higher priority (only one) is determined as the master link, and the ports of the two DRP nodes on the two DRP rings connected by the master link are in the forward state (F, forwarding state, data can be sent and received), and other links are elected as backup links, and the ports of the two DRP nodes on the two DRP rings connected by other links are in the block state (B, blocking state) to prevent loops. When the master link is link down (disconnected from the network), the DRP node in the first DRP ring where the master link is located will send a master link down message to other DRP nodes in the ring, and the master link will switch to the slave state. After receiving the master link down message, the DRP nodes in the first DRP ring where other slave links are located will start sending announce messages to each other for election. The DRP node that receives a higher priority announce message continues to maintain the slave state, and its port continues to be in the block state. The slave device (DRP node) that does not receive a higher priority announce message for three consecutive times (can also be set to other) switches to the master state. Because the sending interval of the announce message is 1 second, the DRP backup switching time is about 3 seconds, and its switching performance is about 3 seconds.
[0003] In real-time systems requiring high reliability, only two links are usually configured, such as Figure 2 As shown, the switching performance is required to be within 50ms (or shorter time), while the switching performance of the existing switching method is about 3 seconds, which does not meet the switching performance requirements of high-reliability real-time systems. A backup link switching method with more optimized switching performance is needed. Summary of the invention
[0004] In view of the above problems in the prior art, the present application provides a method and apparatus for implementing backup link switching of a redundant DRP ring, a redundant DRP ring, a computing device and a storage medium, so as to optimize the switching performance of the backup link of the DRP ring and shorten the switching time.
[0005] To achieve the above-mentioned purpose, the first aspect of the present application provides a method for implementing backup link switching of a redundant DRP ring, wherein the redundant DRP ring includes a first DRP ring and a second DRP ring; the first DRP ring includes a plurality of first DRP nodes, wherein the plurality of first DRP nodes are connected in sequence; the second DRP ring includes a plurality of second DRP nodes, wherein the plurality of second DRP nodes are connected in sequence; a first DRP node in the first DRP ring is connected to a second DRP node in the second DRP ring, and the first DRP node in the first DRP ring is configured as a master node; another first DRP node in the first DRP ring is connected to another second DRP node in the second DRP ring, and the another first DRP node in the first DRP ring is configured as a slave node, and the method is applied to the slave node, and the method includes:
[0006] The slave node receives a master link down message sent by the master node in the first DRP ring, where the master link down message indicates that the link connecting the master node and the second DRP ring is disconnected;
[0007] When the fast switching function is enabled on the slave node, the slave state of the link connecting the slave node to the second DRP ring is switched to the master state, the port connecting the slave node to the second DRP ring is released, and the routing information is cleared;
[0008] The slave node sends a table clearing message to all other nodes in the first DRP ring and the second DRP ring, so that all other nodes clear the routing information.
[0009] From the above, in this application, when the master link is disconnected, the master node where the link is located sends link disconnection information to the slave node, and the slave node enables the fast switching function. There is no need to elect the master node through the announce message. The slave link state of the slave node can be switched to the master state immediately, which can improve the link switching performance and shorten the link switching time.
[0010] As a possible implementation manner of the first aspect, the slave node sends a table clearing message to all other nodes in the first DRP ring and the second DRP ring, including:
[0011] The slave node sends a table clearing message to all other nodes in the first DRP ring and the second DRP ring in a broadcast or multicast manner.
[0012] From the above, the present application adopts broadcast or multicast mode to send the table clearing message, so that multiple nodes can receive the table clearing message at one time, saving the time of sending the table clearing message and improving the link switching performance.
[0013] To achieve the above-mentioned purpose, the second aspect of the present application provides a method for implementing backup link switching of a redundant DRP ring, wherein the redundant DRP ring includes a first DRP ring and a second DRP ring; the first DRP ring includes a plurality of first DRP nodes, wherein the plurality of first DRP nodes are connected in sequence; the second DRP ring includes a plurality of second DRP nodes, wherein the plurality of second DRP nodes are connected in sequence; a first DRP node in the first DRP ring is connected to a second DRP node in the second DRP ring, and the first DRP node in the first DRP ring is configured as a master node; another first DRP node in the first DRP ring is connected to another second DRP node in the second DRP ring, and the another first DRP node in the first DRP ring is configured as a slave node, and the method is applied to the master node, and the method includes:
[0014] When the master node determines that the master link connected to the second DRP ring is link down, it sends a master link down message to other nodes in the first DRP ring, so that when the slave node with the fast switching function is received, it switches the slave state of the link connected to the second DRP ring to the master state, releases the port connected to the second DRP ring, clears the routing information and sends a clearing message for clearing the routing information to all other nodes in the first DRP ring and the second DRP ring.
[0015] From the above, in this application, when the master link is disconnected, the master node where the link is located sends link disconnection information to the slave node, and the slave node enables the fast switching function. There is no need to elect the master node through the announce message. The slave link state of the slave node can be switched to the master state immediately, which can improve the link switching performance and shorten the link switching time.
[0016] As a possible implementation of the first aspect, the following also includes:
[0017] When the master node determines that the master link connected to the second DRP ring is link down, the master node switches the master state of the master link to the slave state, and blocks the port connected to the second DRP ring.
[0018] As described above, the master node immediately switches its state to the slave state when the master link is link down, and blocks its port connected to the second DRP ring. In this way, when the master link is link up, there will not be two links in the master state, and no loop will occur between the two DRP rings.
[0019] As a possible implementation manner of the first aspect, before the master node determines that the master link connected to the second DRP ring is down, the method further includes:
[0020] When receiving the link down information, if the state of the link down link is the master state, the node is the master node and sends a master link down message to other nodes in the first DRP ring; if the state of the link down link is the slave state, the node corresponding to the link down link is determined to be the slave node and the operation ends.
[0021] As described above, when receiving the link down information, first determine whether it is the master link link down or the slave link link down. If it is the slave link link down, do not do anything. If it is the master link link down, the master node sends a master link down message to other nodes in the first DRP ring.
[0022] In a third aspect, the present application provides a backup link switching device for implementing a redundant DRP ring, wherein the redundant DRP ring includes a first DRP ring and a second DRP ring; the first DRP ring includes a plurality of first DRP nodes, wherein the plurality of first DRP nodes are connected in sequence; the second DRP ring includes a plurality of second DRP nodes, wherein the plurality of second DRP nodes are connected in sequence; a first DRP node in the first DRP ring is connected to a second DRP node in the second DRP ring, and the first DRP node in the first DRP ring is configured as a master node; another first DRP node in the first DRP ring is connected to another second DRP node in the second DRP ring, and the another first DRP node in the first DRP ring is configured as a slave node, the device comprising:
[0023] A receiving module, used to receive a master link down message sent by the master node in the first DRP ring, where the master link down message indicates that a link connecting the master node and the second DRP ring is disconnected;
[0024] A switching module, used for switching the slave state of the link connected to the second DRP ring to the master state when the fast switching function is enabled, releasing the port connected to the second DRP ring, and clearing the routing information;
[0025] The table clearing message sending module is used to send table clearing messages to all other nodes in the first DRP ring and the second DRP ring, so that all other nodes clear routing information.
[0026] In a fourth aspect, the present application provides a backup link switching device for implementing a redundant DRP ring, wherein the redundant DRP ring includes a first DRP ring and a second DRP ring; the first DRP ring includes a plurality of first DRP nodes, wherein the plurality of first DRP nodes are connected in sequence; the second DRP ring includes a plurality of second DRP nodes, wherein the plurality of second DRP nodes are connected in sequence; a first DRP node in the first DRP ring is connected to a second DRP node in the second DRP ring, and the first DRP node in the first DRP ring is configured as a master node; another first DRP node in the first DRP ring is connected to another second DRP node in the second DRP ring, and the another first DRP node in the first DRP ring is configured as a slave node, and the master node includes:
[0027] The fast switching module is used to send a master link down message to other nodes in the first DRP ring when it is determined that the master link link connected to the second DRP ring is down, so that the slave node enabled with the fast switching function switches the slave state of the link connected to the second DRP ring to the master state when receiving the master link down message, releases the port connected to the second DRP ring, clears the routing information and sends a clearing message for clearing the routing information to all other nodes in the first DRP ring and the second DRP ring.
[0028] A fifth aspect of the present application provides a redundant DRP ring, including a first DRP ring and a second DRP ring;
[0029] The first DRP ring includes a plurality of first DRP nodes, wherein the plurality of first DRP nodes are connected in sequence;
[0030] The second DRP ring includes a plurality of second DRP nodes, wherein the plurality of second DRP nodes are connected in sequence;
[0031] A first DRP node in the first DRP ring is connected to a second DRP node in the second DRP ring, and the first DRP node in the first DRP ring is configured as a master node;
[0032] Another first DRP node in the first DRP ring is connected to another second DRP node in the second DRP ring, and the another first DRP node in the first DRP ring is configured as a slave node;
[0033] The master node and the slave node are configured to execute any one of the methods described in the first aspect above.
[0034] A sixth aspect of the present application provides a computing device, including:
[0035] processor, and
[0036] A memory having program instructions stored thereon, wherein when the program instructions are executed by the processor, the processor executes any of the methods described in the first aspect above, or, when the program instructions are executed by the processor, the processor executes any of the methods described in the second aspect above.
[0037] The seventh aspect of the present application provides a computer-readable storage medium having program instructions stored thereon, wherein when the program instructions are executed by a computer, the computer implements any of the methods described in the first aspect above, or, when the program instructions are executed by a computer, the computer implements any of the methods described in the second aspect above. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 It is a schematic structural diagram of a redundant DRP ring with multiple backup links;
[0039] Figure 2 It is a schematic structural diagram of a redundant DRP ring with dual backup links for a real-time system requiring high reliability;
[0040] Figure 3 It is a flowchart of a first embodiment of a method for implementing a backup link switching of a redundant DRP ring provided by an embodiment of the present application;
[0041] Figure 4 A flowchart of a specific implementation method of a backup link switching method for a redundant DRP ring provided in an embodiment of the present application;
[0042] Figure 5 A schematic structural diagram of a backup link switching device for implementing a redundant DRP ring provided in an embodiment of the present application;
[0043] Figure 6 It is a structural schematic diagram of a computing device provided in an embodiment of the present application.
[0044] It should be understood that the size and shape of each block diagram in the above structural diagram are for reference only and should not constitute an exclusive interpretation of the embodiment of the present invention. The relative position and inclusion relationship between the blocks presented in the structural diagram are only schematic representations of the structural association between the blocks, and do not limit the physical connection method of the embodiment of the present invention. DETAILED DESCRIPTION
[0045] The technical solution provided by the present application is further described below with reference to the accompanying drawings and examples. It should be understood that the system structure and business scenarios provided in the examples of the present application are mainly to illustrate the possible implementation methods of the technical solution of the present application and should not be interpreted as the only limitation on the technical solution of the present application. It is known to those of ordinary skill in the art that with the evolution of the system structure and the emergence of new business scenarios, the technical solution provided by the present application is also applicable to similar technical problems.
[0046] It should be understood that the backup link switching solution of the DRP ring provided in the embodiment of the present application includes a backup link switching method and device for implementing a redundant DRP ring, and a redundant DRP ring. Since the principles of solving the problems in these technical solutions are the same or similar, in the introduction of the following specific embodiments, some repetitions may not be repeated, but it should be regarded as that these specific embodiments have been referenced to each other and can be combined with each other.
[0047] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those generally understood by those skilled in the art to which the present application belongs. If there is any inconsistency, the meaning described in this specification or the meaning derived from the content recorded in this specification shall prevail. In addition, the terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application. In order to accurately describe the technical contents in this application, and in order to accurately understand the present invention, the following explanation or definition is given to the terms used in this specification before describing the specific embodiments.
[0048] [Implementation Example of Redundant DRP Ring]
[0049] The present application proposes a redundant DRP ring, including a first DRP ring and a second DRP ring;
[0050] The first DRP ring includes a plurality of first DRP nodes, wherein the plurality of first DRP nodes are connected in sequence;
[0051] The second DRP ring includes a plurality of second DRP nodes, wherein the plurality of second DRP nodes are connected in sequence;
[0052] A first DRP node in the first DRP ring is connected to a second DRP node in the second DRP ring, and the first DRP node in the first DRP ring is configured as a master node;
[0053] Another first DRP node in the first DRP ring is connected to another second DRP node in the second DRP ring, and the another first DRP node in the first DRP ring is configured as a slave node;
[0054] The master node and the slave node are configured to execute a backup link switching method for implementing a redundant DRP ring (described in detail below).
[0055] In this embodiment, the redundant DRP ring proposed in this application is configured in a real-time system requiring high reliability. For a real-time system requiring high reliability, the network topology of the redundant DRP ring required is usually relatively simple, and the backup link between the DRP rings is usually a dual-link backup. Figure 2 The redundant DRP ring is described using the following example.
[0056] The first DRP node is DRP node (device) 1, 2, 3, and the second DRP node is DRP node (device) 4, 5, 6. DRP nodes (devices) 1, 2, 3 are connected in sequence to form the first DRP ring, and DRP nodes (devices) 4, 5, 6 are connected in sequence to form the second DRP ring. There is a chain between DRP node 1 of the first DRP ring and DRP node 4 of the second DRP ring. The link state of the link is configured as the master state, and the backup ports of DRP node 1 and DRP node 4 are set to the forward state (F, forwarding state, data can be sent and received). There is a chain between DRP node 3 of the first DRP ring and DRP node 6 of the second DRP ring. The link state of the link is configured as the slave state, and the backup ports of DRP node 3 and DRP node 6 are set to the block state (B, blocking state, data cannot be sent or received to prevent loops). A fast switching function can be configured on the DRP node 3, which is used to quickly switch the slave state of its connection link to the master state when the master link is down. Then the master node and the slave node are configured to execute the backup link switching method for implementing a redundant DRP ring (described in detail below).
[0057] [First embodiment of a method for implementing a backup link switching method for a redundant DRP ring]
[0058] An embodiment of the present application provides a method for implementing backup link switching of a redundant DRP ring, wherein the redundant DRP ring includes a first DRP ring and a second DRP ring; the first DRP ring includes a plurality of first DRP nodes, wherein the plurality of first DRP nodes are connected in sequence; the second DRP ring includes a plurality of second DRP nodes, wherein the plurality of second DRP nodes are connected in sequence; a first DRP node in the first DRP ring is connected to a second DRP node in the second DRP ring, and the first DRP node in the first DRP ring is configured as a master node; another first DRP node in the first DRP ring is connected to another second DRP node in the second DRP ring, and the another first DRP node in the first DRP ring is configured as a slave node, and the method is applied to the slave node, such as Figure 3 As shown, the method includes:
[0059] S310: The slave node receives a master link down message sent by the master node in the first DRP ring, where the master link down message indicates that the link between the master node and the second DRP ring is disconnected;
[0060] S320: When the fast switching function is enabled on the slave node, the slave state of the link connected to the second DRP ring is switched to the master state, the port connected to the second DRP ring is released, and the routing information is cleared;
[0061] S330: The slave node sends a table clearing message to all other nodes in the first DRP ring and the second DRP ring, so that all other nodes clear routing information.
[0062] In the above embodiment, the method is applied to a real-time system requiring high reliability, and the redundant DRP ring corresponding to the real-time system requiring high reliability is as follows: Figure 2 As shown. When the master node (i.e., DRP node 1) determines that the master link link of the DRP node 4 to which it is connected is down, it can send (in broadcast or multicast mode) a master link down message to DRP node 2 and DRP node 3 in the first DRP ring. When the slave node (i.e., DRP node 3) receives the master link down message and then checks that it is configured with the fast switching function, the slave node enables the fast switching function and directly switches the slave state of the link connected to the second DRP ring to the master state. Then the backup interface of the slave node (the interface connected to the slave link) is changed from the B (Block) state to the F (Forward) state. At the same time, the slave node sends the backup interface status modification information to the DRP node 6 connected to the slave link, and the DRP node 6 modifies its backup interface from the B state to the F state.
[0063] Among them, DRP node 2 is not a slave node, so DRP node 2 does not perform any operation.
[0064] Among them, DRP node 2 and DRP node 3 determine whether they are slave nodes according to whether they are configured with link slave status.
[0065] It is understandable that there may be multiple slave nodes in the first DRP ring, and the slave node that first receives the master linkdown message executes the above steps S310 to S330.
[0066] At the same time, when a routing entry in the network is no longer valid or reachable, a clearing message needs to be sent to notify other routers that the routing entry has expired and needs to be cleared, so that the router can maintain the accuracy of its routing table, thereby avoiding sending data packets to invalid paths and ensuring the correct forwarding of data packets. This is crucial to the stability and reliability of the network, because incorrect routing entries may cause data packet loss or network failure. Therefore, after switching the backup link, the slave node needs to clear its existing original routing information. The slave node also needs to send clearing messages to DRP nodes 1 and DRP nodes 2 in the first DRP ring and DRP nodes 4, 5, and 6 in the second DRP ring, so that DRP nodes 1 and DRP nodes 2 in the first DRP ring and DRP nodes 4, 5, and 6 in the second DRP ring can clear their original routing information.
[0067] The clearing message may include source address, destination address, routing entry information, clearing reason, other information, etc.
[0068] 1. Source address: The IP address or identifier of the router that sends the table clearing message. In this application, the source address is the IP address or identifier of the slave node (DRP node 3).
[0069] 2. Destination address: the destination address of the routing entry to be cleared. In this application, the destination address is the IP address or identifier of the DRP node 1 and DRP node 2 in the first DRP ring and the DRP nodes 4, 5, and 6 in the second DRP ring.
[0070] 3. Routing entry information: information of the routing entry to be cleared, including the target network address, subnet mask, next hop address, etc. The routing entry to be cleared in this application refers to the information of the original master link connecting DRP node 1 and DRP node 4 through which the data passes.
[0071] 4. Clearance reason: indicates the reason why the routing entry is to be cleared, such as the target network is no longer reachable, or the routing entry has expired, etc. The clearance reason in this application is that the original master link connecting DRP node 1 and DRP node 4 is down.
[0072] 5. Other information: It may also include other information related to table clearing, such as the sequence number and timestamp of the table clearing message.
[0073] The specific format and information content of the clear table message may vary due to different routing protocols and operating systems. The above information is only an example of the common components of the clear table message, which may be different in actual applications and is not specifically limited in this application.
[0074] From the above, in this application, when the master link is disconnected, the master node where the link is located sends link disconnection information to the slave node, and the slave node enables the fast switching function. There is no need to elect the master node through the announce message. The slave link state of the slave node can be switched to the master state immediately. This can improve the link switching performance and greatly shorten the link switching time. The switching time can be controlled within 50ms.
[0075] In some embodiments, the slave node sends a table clearing message to all other nodes in the first DRP ring and the second DRP ring, including:
[0076] The slave node sends a table clearing message to all other nodes in the first DRP ring and the second DRP ring in a broadcast or multicast manner.
[0077] In these embodiments, since the slave node needs to send clearing messages to multiple other nodes, it can be sent in the form of broadcast or multicast, so that multiple nodes can receive the clearing messages at one time, saving time for sending clearing messages and improving link switching performance.
[0078] From the above, in this application, when the master link is disconnected, the master node where the link is located sends link disconnection information to the slave node, and the slave node enables the fast switching function, which can immediately switch the slave link state to the master state, thereby improving the link switching performance and shortening the link switching time.
[0079] In some embodiments, if the slave node determines that it is not configured with a fast switching function, it cannot perform fast switching and uses the original switching method. When no higher priority announce message is received within a preset time, the slave state of the link connecting the second DRP ring is switched to the master state.
[0080] It is understandable that identification information indicating whether the fast switching function is provided may be set in the DRP node in the DRP ring, and whether the node is configured with the fast switching function may be determined through the identification information.
[0081] [Second embodiment of a backup link switching method for implementing a redundant DRP ring]
[0082] The present application proposes a backup link switching method for implementing a redundant DRP ring, wherein the redundant DRP ring includes a first DRP ring and a second DRP ring; the first DRP ring includes a plurality of first DRP nodes, wherein the plurality of first DRP nodes are connected in sequence; the second DRP ring includes a plurality of second DRP nodes, wherein the plurality of second DRP nodes are connected in sequence; a first DRP node in the first DRP ring is connected to a second DRP node in the second DRP ring, and the first DRP node in the first DRP ring is configured as a master node; another first DRP node in the first DRP ring is connected to another second DRP node in the second DRP ring, and the another first DRP node in the first DRP ring is configured as a slave node, and the method is applied to the master node, and the method includes:
[0083] When the master node determines that the master link connected to the second DRP ring is link down, it sends a master link down message to other nodes in the first DRP ring, so that when the slave node with the fast switching function is received, it switches the slave state of the link connected to the second DRP ring to the master state, releases the port connected to the second DRP ring, clears the routing information and sends a clearing message for clearing the routing information to all other nodes in the first DRP ring and the second DRP ring.
[0084] In the above embodiment, when the master node (i.e., DRP node 1) determines that the master link link of the DRP node 4 to which it is connected is down, it can send (in a broadcast or multicast manner) a master link down message to DRP node 2 and DRP node 3 in the first DRP ring. When the slave node (i.e., DRP node 3) receives the master link down message and then checks that it is configured with a fast switching function, the slave node directly switches the slave state of the link connected to the second DRP ring to the master state. Then the backup interface of the slave node (the interface connected to the slave link) is changed from the B state to the F state. At the same time, the slave node sends the backup interface status modification information to the DRP node 6 connected to the slave link, and the DRP node 6 modifies its backup interface from the B state to the F state.
[0085] At the same time, when a routing entry in the network is no longer valid or reachable, a clearing message needs to be sent to notify other routers that the routing entry has expired and needs to be cleared, so that the router can maintain the accuracy of its routing table, thereby avoiding sending data packets to invalid paths and ensuring the correct forwarding of data packets. This is crucial to the stability and reliability of the network, because incorrect routing entries may cause data packet loss or network failure. Therefore, after switching the backup link, the slave node needs to clear its existing original routing information. The slave node also needs to send clearing messages to DRP nodes 1 and DRP nodes 2 in the first DRP ring and DRP nodes 4, 5, and 6 in the second DRP ring, so that DRP nodes 1 and DRP nodes 2 in the first DRP ring and DRP nodes 4, 5, and 6 in the second DRP ring can clear their original routing information.
[0086] From the above, in this application, when the master link is disconnected, the master node where the link is located sends link disconnection information to the slave node, and the slave node enables the fast switching function. There is no need to elect the master node through the announce message. The slave link state of the slave node can be switched to the master state immediately, which can improve the link switching performance and shorten the link switching time.
[0087] In the above embodiment, the slave node sends the clearing message to all other nodes in the first DRP ring and the second DRP ring in a broadcast or multicast manner. The clearing message is sent in the form of broadcast or multicast so that multiple nodes can receive the clearing message at one time, saving the time of sending the clearing message and improving the link switching performance.
[0088] In some embodiments, it also includes:
[0089] When the master node determines that the master link connected to the second DRP ring is link down, the master node switches the master state of the master link to the slave state, and blocks the port connected to the second DRP ring.
[0090] In this embodiment, the master node immediately switches its state to slave state when the master link is link down, and blocks its port connected to the second DRP ring, so that when the master link is link up, there will not be two links in master state, and no loop will occur between the two DRP rings. At the same time, the original master link port is changed from F to B.
[0091] In some embodiments, before the master node determines that the master link connected to the second DRP ring is link down, the method further includes:
[0092] When receiving link link down information, if the state of the link down link is the master state, a master link down message is sent to other nodes in the first DRP ring; if the state of the link down link is the slave state, the node corresponding to the link down link is determined to be a slave node, and the operation ends.
[0093] In this embodiment, when receiving the link link down information, it is first determined whether it is the master link link down or the slave link link down. If it is the slave link link down, the slave node receives the link link down information, and the slave node does not perform any operation; if it is the master link link down, the master node sends (i.e. broadcast or multicast) a master link down message to other nodes in the first DRP ring.
[0094] [A specific implementation method for implementing a backup link switching method for a redundant DRP ring]
[0095] This application is applicable to a DRP ring with two links. Figure 2 For example, the two links are set as the master link between device 1 and device 4, and the slave link between device 3 and device 6. When one of the two links is linkdown, use this application Figure 4 The backup link switching method for implementing a redundant DRP ring is provided to perform backup link switching, such as Figure 4 The steps shown are as follows:
[0096] S1. When a link is link down, device 1 or device 3 in the first DRP ring connected to the link down link can receive a link link down message, and device 1 or device 3 obtains the link state of the link down link. If the link state is the master state, the master link connected to device 1 is link down, and device 1 broadcasts a master link down message to devices 2 and 3 in the first DRP ring. The master state of the link connected to device 1 is changed to the slave state, and the link port between device 1 and device 4 is changed from F to B.
[0097] S2. If the link state is slave, the slave link connected to device 3 is link down, and the operation ends.
[0098] S3, after receiving the master link down message, device 3 determines that it is configured with the fast switching function, enables the fast switching function, switches the slave state of the link connecting the second DRP ring to the master state, and clears the routing information. At the same time, the link port between device 3 and device 6 is changed from B to F. Device 2 is not a slave node, so device 2 does not perform any operation;
[0099] S4. Device 3 broadcasts a table clearing message to devices 1 and 2 in the first DRP ring and devices 4, 5, and 6 in the second DRP ring. Devices 1 and 2 and devices 4, 5, and 6 in the second DRP ring clear routing information based on the table clearing message.
[0100] [First Embodiment of a Backup Link Switching Device for Implementing a Redundant DRP Ring]
[0101] like Figure 5 As shown, the embodiment of the present application provides a backup link switching device for implementing a redundant DRP ring, which can be used to implement the backup link switching method for implementing a redundant DRP ring in the above embodiment, such as Figure 5 As shown, in the backup link switching device for implementing a redundant DRP ring, the redundant DRP ring includes a first DRP ring and a second DRP ring; the first DRP ring includes a plurality of first DRP nodes, wherein the plurality of first DRP nodes are connected in sequence; the second DRP ring includes a plurality of second DRP nodes, wherein the plurality of second DRP nodes are connected in sequence; a first DRP node in the first DRP ring is connected to a second DRP node in the second DRP ring, and the first DRP node in the first DRP ring is configured as a master node; another first DRP node in the first DRP ring is connected to another second DRP node in the second DRP ring, and the another first DRP node in the first DRP ring is configured as a slave node, and the slave node includes: a receiving module 610, a switching module 620, and a table clearing message sending module 630.
[0102] A receiving module, used to receive a master link down message sent by the master node in the first DRP ring, where the master link down message indicates that a link connecting the master node and the second DRP ring is disconnected;
[0103] A switching module, used for switching the slave state of the link connected to the second DRP ring to the master state and clearing the routing information when the fast switching function is enabled;
[0104] The table clearing message sending module is used to send table clearing messages to all other nodes in the first DRP ring and the second DRP ring, so that all other nodes clear routing information.
[0105] For details, please refer to the detailed description in the first embodiment of the method, which will not be repeated here.
[0106] [Second embodiment of a backup link switching device for implementing a redundant DRP ring]
[0107] The embodiment of the present application provides a backup link switching device for implementing a redundant DRP ring, which can be used to implement the backup link switching method for implementing a redundant DRP ring in the above embodiment. Specifically, in the backup link switching device for implementing a redundant DRP ring, the redundant DRP ring includes a first DRP ring and a second DRP ring; the first DRP ring includes a plurality of first DRP nodes, wherein the plurality of first DRP nodes are connected in sequence; the second DRP ring includes a plurality of second DRP nodes, wherein the plurality of second DRP nodes are connected in sequence; a first DRP node in the first DRP ring is connected to a second DRP node in the second DRP ring, and the first DRP node in the first DRP ring is configured as a master node; another first DRP node in the first DRP ring is connected to another second DRP node in the second DRP ring, and the other first DRP node in the first DRP ring is configured as a slave node, and the master node includes:
[0108] The fast switching module is used to send a master link down message to other nodes in the first DRP ring when it is determined that the master link link connected to the second DRP ring is down, so that the slave node enabled with the fast switching function switches the slave state of the link connected to the second DRP ring to the master state when receiving the master link down message, releases the port connected to the second DRP ring, clears the routing information and sends a clearing message for clearing the routing information to all other nodes in the first DRP ring and the second DRP ring.
[0109] For details, please refer to the detailed description in the second embodiment of the method, which will not be repeated here.
[0110] [Embodiment of the computing device of the present application]
[0111] Figure 6900 is a schematic structural diagram of a computing device 900 provided in an embodiment of the present application. The computing device can be used as a backup link switching device for implementing a redundant DRP ring, and executes each optional embodiment of the backup link switching method for implementing a redundant DRP ring. The computing device can be a terminal, or a chip or chip system inside the terminal. Figure 6 As shown, the computing device 900 includes: a processor 910 , a memory 920 , and a communication interface 930 .
[0112] It should be understood that Figure 6 The communication interface 930 in the computing device 900 shown may be used to communicate with other devices, and may specifically include one or more transceiver circuits or interface circuits.
[0113] The processor 910 may be connected to a memory 920. The memory 920 may be used to store the program code and data. Therefore, the memory 920 may be a storage unit inside the processor 910, or an external storage unit independent of the processor 910, or a component including a storage unit inside the processor 910 and an external storage unit independent of the processor 910.
[0114] Optionally, the computing device 900 may further include a bus. The memory 920 and the communication interface 930 may be connected to the processor 910 via the bus. The bus may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 A line without an arrow is used to represent the bus, but this does not mean that there is only one bus or one type of bus.
[0115] It should be understood that in the embodiment of the present application, the processor 910 may adopt a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. Alternatively, the processor 910 may adopt one or more integrated circuits to execute relevant programs to implement the technical solutions provided in the embodiment of the present application.
[0116] The memory 920 may include a read-only memory and a random access memory, and provides instructions and data to the processor 910. A portion of the processor 910 may also include a nonvolatile random access memory. For example, the processor 910 may also store information on the device type.
[0117] When the computing device 900 is running, the processor 910 executes the computer-executable instructions in the memory 920 to perform any operation step of the above method and any optional embodiment thereof.
[0118] It should be understood that the computing device 900 according to the embodiment of the present application can correspond to the corresponding subjects in the methods according to the embodiments of the present application, and the above-mentioned and other operations and / or functions of each module in the computing device 900 are respectively for implementing the corresponding processes of each method of the present embodiment. For the sake of brevity, they will not be repeated here.
[0119] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0120] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0121] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0122] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0123] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0124] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0125] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, it is used to execute the above method, which includes at least one of the solutions described in the above embodiments.
[0126] The computer storage medium of the embodiment of the present application can adopt any combination of one or more computer-readable media. Computer-readable media can be computer-readable signal media or computer-readable storage media. Computer-readable storage media can be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination of the above. More specific examples (non-exhaustive lists) of computer-readable storage media include: electrical connections with one or more wires, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this document, computer-readable storage media can be any tangible medium containing or storing programs, which can be used by instruction execution systems, devices or devices or used in combination with them.
[0127] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0128] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0129] Computer program code for performing the operation of the present application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect through the Internet).
[0130] In addition, the words "first, second, third, etc." or module A, module B, module C and other similar terms in the specification and claims are only used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that the specific order or sequence can be interchanged where permitted so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0131] In the above description, the numbers representing the steps, such as S110, S120, etc., do not necessarily mean that the steps will be executed in this manner. If permitted, the order of the steps can be interchanged or they can be executed simultaneously.
[0132] The term "comprising" as used in the description and claims should not be interpreted as being limited to what is listed thereafter; it does not exclude other elements or steps. Therefore, it should be interpreted as specifying the presence of the features, integers, steps or components mentioned, but does not exclude the presence or addition of one or more other features, integers, steps or components and groups thereof. Therefore, the expression "a device comprising means A and B" should not be limited to a device consisting of components A and B only.
[0133] References to "one embodiment" or "an embodiment" in this specification mean that a particular feature, structure, or characteristic described in conjunction with the embodiment is included in at least one embodiment of the present application. Therefore, the phrases "in one embodiment" or "in an embodiment" appearing in various places in this specification do not necessarily refer to the same embodiment, but may refer to the same embodiment. In addition, in one or more embodiments, the particular features, structures, or characteristics can be combined in any appropriate manner, as would be apparent to one of ordinary skill in the art from this disclosure.
[0134] Note that the above are only preferred embodiments of the present application and the technical principles used. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may also include more other equivalent embodiments without departing from the concept of the present application, all of which belong to the scope of protection of the present application.
Claims
1. A method for implementing backup link switching of a redundant DRP ring, characterized in that: The redundant DRP ring includes a first DRP ring and a second DRP ring; the first DRP ring includes a plurality of first DRP nodes, wherein the plurality of first DRP nodes are connected in sequence; the second DRP ring includes a plurality of second DRP nodes, wherein the plurality of second DRP nodes are connected in sequence; a first DRP node in the first DRP ring is connected to a second DRP node in the second DRP ring, and the first DRP node in the first DRP ring is configured as a master node; another plurality of first DRP nodes in the first DRP ring are connected to another plurality of second DRP nodes in the second DRP ring, and the another plurality of first DRP nodes in the first DRP ring are configured as slave nodes, and there are multiple slave nodes, and the method is applied to the slave nodes, and the method includes: The slave node receives a master link down message sent by the master node in the first DRP ring, where the master link down message indicates that the link between the master node and the second DRP ring is disconnected; When the slave node that first receives the master link down message and is configured with the fast switching function enables the fast switching function, the slave state of the link connected to the second DRP ring is switched to the master state, and the port connected to the second DRP ring is released, and the routing information is cleared, and the backup interface state modification information is sent to the second DRP node connected to the slave node that first receives the master link down message and is configured with the fast switching function, and the second DRP node connected to the slave node that first receives the master link down message and is configured with the fast switching function modifies its backup interface from the blocking state to the forwarding state; The slave node sends a table clearing message to all other nodes in the first DRP ring and the second DRP ring, so that all other nodes clear the routing information.
2. The method according to claim 1, characterized in that The slave node sends a table clearing message to all other nodes in the first DRP ring and the second DRP ring, including: The slave node sends a table clearing message to all other nodes in the first DRP ring and the second DRP ring in a broadcast or multicast manner.
3. A method for implementing a backup link switching of a redundant DRP ring, characterized in that: The redundant DRP ring includes a first DRP ring and a second DRP ring; the first DRP ring includes a plurality of first DRP nodes, wherein the plurality of first DRP nodes are connected in sequence; the second DRP ring includes a plurality of second DRP nodes, wherein the plurality of second DRP nodes are connected in sequence; a first DRP node in the first DRP ring is connected to a second DRP node in the second DRP ring, and the first DRP node in the first DRP ring is configured as a master node; another plurality of first DRP nodes in the first DRP ring are connected to another plurality of second DRP nodes in the second DRP ring, and the another plurality of first DRP nodes in the first DRP ring are configured as slave nodes, and there are multiple slave nodes. The method is applied to the master node, and the method includes: When the master node determines that the master link link connected to the second DRP ring is down, it sends a master link down message to other nodes in the first DRP ring, so that when the slave node with the fast switching function enabled first receives the master link down message, it switches the slave state of the link connected to the second DRP ring to the master state, releases its port connected to the second DRP ring, clears the routing information and sends a clearing message for clearing the routing information to all other nodes in the first DRP ring and the second DRP ring, sends the modification backup interface status information to the second DRP node connected to the slave node that first receives the master link down message and is configured with the fast switching function, and the second DRP node connected to the slave node that first receives the master link down message and is configured with the fast switching function changes its backup interface from the blocking state to the forwarding state.
4. The method according to claim 3, characterized in that Also includes: When the master node determines that the master link connected to the second DRP ring is link down, the master state of the master link is switched to the slave state, and the port connected to the second DRP ring is blocked.
5. The method according to claim 3, characterized in that Before the master node determines that the master link connected to the second DRP ring is link down, the following steps are also included: When receiving the link down information, if the link down link is in the master state, a master link down message is sent to other nodes in the first DRP ring; if the link down link is in the slave state, the node corresponding to the link down link is determined to be a slave node, and the operation ends.
6. A backup link switching device for implementing a redundant DRP ring, characterized in that: The redundant DRP ring includes a first DRP ring and a second DRP ring; the first DRP ring includes a plurality of first DRP nodes, wherein the plurality of first DRP nodes are connected in sequence; the second DRP ring includes a plurality of second DRP nodes, wherein the plurality of second DRP nodes are connected in sequence; a first DRP node in the first DRP ring is connected to a second DRP node in the second DRP ring, and the first DRP node in the first DRP ring is configured as a master node; another plurality of first DRP nodes in the first DRP ring are connected to another plurality of second DRP nodes in the second DRP ring, and the another plurality of first DRP nodes in the first DRP ring are configured as slave nodes, and there are multiple slave nodes, and the slave nodes include: A receiving module, used to receive a master link down message sent by the master node in the first DRP ring, where the master link down message indicates that a link connecting the master node and the second DRP ring is disconnected; A switching module, used for, when the slave node that first receives the master link down message and is configured with the fast switching function enables the fast switching function, switching the slave state of the link connected to the second DRP ring to the master state, releasing the port connected to the second DRP ring, clearing the routing information, sending the modification backup interface state information to the second DRP node connected to the slave node that first receives the master link down message and is configured with the fast switching function, and the second DRP node connected to the slave node that first receives the master link down message and is configured with the fast switching function changes its backup interface from the blocking state to the forwarding state; The table clearing message sending module is used to send table clearing messages to all other nodes in the first DRP ring and the second DRP ring, so that all other nodes clear routing information.
7. A backup link switching device for implementing a redundant DRP ring, characterized in that: The redundant DRP ring includes a first DRP ring and a second DRP ring; the first DRP ring includes a plurality of first DRP nodes, wherein the plurality of first DRP nodes are connected in sequence; the second DRP ring includes a plurality of second DRP nodes, wherein the plurality of second DRP nodes are connected in sequence; a first DRP node in the first DRP ring is connected to a second DRP node in the second DRP ring, and the first DRP node in the first DRP ring is configured as a master node; another plurality of first DRP nodes in the first DRP ring are connected to another plurality of second DRP nodes in the second DRP ring, and the another plurality of first DRP nodes in the first DRP ring are configured as slave nodes, and there are multiple slave nodes, and the master node includes: The fast switching module is used to send a master link down message to other nodes in the first DRP ring when it is determined that the master link link connected to the second DRP ring is down, so that when the slave node with the fast switching function enabled first receives the master link down message, the slave state of the link connected to the second DRP ring is switched to the master state, the port connected to the second DRP ring is released, and the routing information is cleared and a clearing message for clearing the routing information is sent to all other nodes in the first DRP ring and the second DRP ring, and the backup interface status modification information is sent to the second DRP node connected to the slave node that first receives the master link down message and is configured with the fast switching function, and the second DRP node connected to the slave node that first receives the master link down message and is configured with the fast switching function changes its backup interface from a blocking state to a forwarding state.
8. A redundant DRP ring, characterized in that: including a first DRP ring and a second DRP ring; The first DRP ring includes a plurality of first DRP nodes, wherein the plurality of first DRP nodes are connected in sequence; The second DRP ring includes a plurality of second DRP nodes, wherein the plurality of second DRP nodes are connected in sequence; A first DRP node in the first DRP ring is connected to a second DRP node in the second DRP ring, and the first DRP node in the first DRP ring is configured as a master node; Another plurality of first DRP nodes in the first DRP ring are connected to another plurality of second DRP nodes in the second DRP ring, and the another plurality of first DRP nodes in the first DRP ring are configured as slave nodes; there are multiple slave nodes; The master node and the slave node are configured to execute the method according to any one of claims 1 to 5.
9. A computing device, characterized in that include: processor, and A memory having program instructions stored thereon, wherein when the program instructions are executed by the processor, the processor is caused to execute the method according to any one of claims 1 to 5.
10. A computer-readable storage medium, characterized in that: Program instructions are stored thereon, and when the program instructions are executed by a computer, the computer is caused to execute the method according to any one of claims 1 to 5.
