CN109525445B - Link switching method, link redundancy backup network and computer readable storage medium - Google Patents

Link switching method, link redundancy backup network and computer readable storage medium Download PDF

Info

Publication number
CN109525445B
CN109525445B CN201811644041.9A CN201811644041A CN109525445B CN 109525445 B CN109525445 B CN 109525445B CN 201811644041 A CN201811644041 A CN 201811644041A CN 109525445 B CN109525445 B CN 109525445B
Authority
CN
China
Prior art keywords
ring
inter
node
network
state
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811644041.9A
Other languages
Chinese (zh)
Other versions
CN109525445A (en
Inventor
王小军
邢纪哲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Armyfly Technology Co Ltd
Original Assignee
Beijing Armyfly Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Armyfly Technology Co Ltd filed Critical Beijing Armyfly Technology Co Ltd
Priority to CN201811644041.9A priority Critical patent/CN109525445B/en
Publication of CN109525445A publication Critical patent/CN109525445A/en
Application granted granted Critical
Publication of CN109525445B publication Critical patent/CN109525445B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0668Management of faults, events, alarms or notifications using network fault recovery by dynamic selection of recovery network elements, e.g. replacement by the most appropriate element after failure
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/42Loop networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity

Abstract

The invention discloses a link switching method, a link redundancy backup network and a computer readable storage medium, wherein the link switching method is applied to the redundancy backup network comprising at least two ring networks and comprises the following steps: each node of the inter-ring redundancy backup ports in the first ring network in the blocking state periodically sends an inter-ring interaction notification message through the inter-ring redundancy backup ports respectively, when any node in the second ring network determines that one ring port in the second ring network is in the disconnection state, a first inter-ring interaction notification response message is sent, and after at least one node in the first ring network receives the first inter-ring interaction notification response message, one of the inter-ring redundancy backup ports in the blocking state is selected to be set to be in the forwarding state. The link switching method, the link redundancy backup network and the computer readable storage medium disclosed by the invention can avoid the problem that two links which cannot be communicated exist in a ring due to the failure of two ring ports of nodes in the ring network.

Description

Link switching method, link redundancy backup network and computer readable storage medium
Technical Field
Embodiments of the present invention relate to network technologies, and in particular, to a link switching method, a link redundancy backup network, and a computer-readable storage medium.
Background
In industrial networks, in order to improve the reliability of data transmission, a ring topology is generally employed to provide redundant protection of data transmission. When the ring topology is used, the corresponding ring network control mechanism is required to be adopted to avoid broadcast storm generated in the network, and the ring network can be switched to the standby link in real time to ensure normal transmission of data messages when link failure or node failure occurs in the ring network.
For example, a Distributed Redundancy Protocol (DRP) is a dedicated ring network protection Protocol, and a network topology change condition is obtained by performing a periodic topology detection on a certain device in a ring network or by actively reporting all devices. However, in the existing DRP protocol, when implementing redundancy backup, switching of backup ports between rings can only be implemented on a single side, and only a ring configured with a backup port can perform switching of backup ports according to the real-time condition of a link, while a ring network on one side without a backup port is not configured, and cannot notify the connection state of its own device to a ring on the opposite side, so that if two ring ports in a ring without a backup port are failed, two links in the ring cannot be intercommunicated, which affects the reliability of the industrial network.
Disclosure of Invention
The invention provides a link switching method, a link redundancy backup network and a computer readable storage medium, which can avoid the problem that two links which can not be communicated exist in a ring due to the failure of two ring ports of nodes in the ring network.
In a first aspect, an embodiment of the present invention provides a link switching method, which is applied to a redundant backup network including at least two ring networks, where each ring network includes at least three nodes, and the at least two ring networks include a first ring network and a second ring network, where at least two nodes in the first ring network are connected to each node in the second ring network through an inter-ring backup link, and ports on the at least two nodes in the first ring network, which are connected to nodes in the second ring network through the inter-ring backup links, are inter-ring redundant backup ports, where an inter-ring redundant backup port of one node in the first ring network is in a forwarding state, and other inter-ring redundant backup ports in the first ring network are in a blocking state, and the method includes:
each node of an inter-ring redundancy backup port in a first ring network in a blocking state periodically sends an inter-ring interaction notification message to a second ring network through the inter-ring redundancy backup port respectively;
after each node in the second ring network receives the inter-ring interaction notification message through the inter-ring backup link, determining the ring port connection state of each node in the second ring network;
when any node in the second ring network determines that one ring port in the second ring network is in a disconnected state, sending a first inter-ring interaction notification response message to the first ring network through an inter-ring backup link connected with the first ring network;
when at least one node in the first ring network receives a first inter-ring interaction notification response message, the node in the first ring network which receives the first inter-ring interaction notification response message selects an inter-ring redundancy backup port to be switched from the inter-ring redundancy backup ports in the blocking state through a preset mechanism, and sets the state of the inter-ring redundancy backup port to be switched to a forwarding state.
In a possible implementation manner of the first aspect, after at least one node in the first ring network receives the first inter-ring interaction notification response packet, the node in the first ring network that receives the first inter-ring interaction notification response packet selects, through a preset mechanism, an inter-ring redundancy backup port to be switched from the inter-ring redundancy backup ports that are in a blocking state, and sets the state of the inter-ring redundancy backup port to be switched to a forwarding state, including:
when at least one node in the first ring network receives the first inter-ring interaction notification response message, analyzing the first inter-ring interaction notification response message, and determining that the spanning tree STP state in the first inter-ring interaction notification response message is a forwarding state, the node in the first ring network receiving the first inter-ring interaction notification response message selects an inter-ring redundancy backup port to be switched from the inter-ring redundancy backup ports in a blocking state through a preset mechanism, and sets the state of the inter-ring redundancy backup port to be switched as the forwarding state.
In a possible implementation manner of the first aspect, after at least one node in the first ring network receives the first inter-ring interaction notification response packet, the node in the first ring network that receives the first inter-ring interaction notification response packet selects, through a preset mechanism, an inter-ring redundancy backup port to be switched from the inter-ring redundancy backup ports that are in a blocking state, and sets the state of the inter-ring redundancy backup port to be switched to a forwarding state, including:
when at least one node in the first ring network receives the first inter-ring interaction notification response message, the node in the first ring network which receives the first inter-ring interaction notification response message selects an inter-ring redundancy backup port corresponding to the inter-ring backup link with the optimal link quality as the inter-ring redundancy backup port to be switched according to the link quality of the inter-ring backup link which is connected between each node in the first ring network and each node in the second ring network, and sets the state of the inter-ring redundancy backup port to be switched as a forwarding state.
In a possible implementation manner of the first aspect, after at least one node in the first ring network receives the first inter-ring interaction notification response packet, the node in the first ring network that receives the first inter-ring interaction notification response packet selects, through a preset mechanism, an inter-ring redundancy backup port to be switched from the inter-ring redundancy backup ports that are in a blocking state, and sets the state of the inter-ring redundancy backup port to be switched to a forwarding state, the method further includes:
when a node in a second ring network, which sends a first inter-ring interaction notification response message to a first ring network, determines that all ring ports in the second ring network are in a connection state, sending a second inter-ring interaction notification response message to the first ring network through an inter-ring backup link connected with the first ring network, wherein the STP state in the second inter-ring interaction notification response message is a blocking state;
after receiving the second inter-ring interaction notification response message through the inter-ring redundant backup port, the node in the first ring network analyzes the second inter-ring interaction notification response message, determines that the STP state in the second inter-ring interaction notification response message is a blocking state, and sets the state of the inter-ring redundant backup port in a forwarding state as the blocking state if the inter-ring redundant backup port per se is the forwarding state.
In a possible implementation manner of the first aspect, the inter-ring interaction notification packet, the first inter-ring interaction notification response packet, and the second inter-ring interaction notification response packet include at least one of a version number, a packet type, a packet sending port identifier, an STP state of the packet sending port, and a ring identifier where the packet sending node is located.
In a second aspect, an embodiment of the present invention further provides a link redundancy backup network, where the link redundancy backup network includes at least two ring networks, each ring network includes at least three nodes, the at least two ring networks include a first ring network and a second ring network, at least two nodes in the first ring network are connected to each node in the second ring network through an inter-ring backup link, and ports where the at least two nodes in the first ring network are connected to the nodes in the second ring network through the inter-ring backup link are inter-ring redundancy backup ports, where an inter-ring redundancy backup port of a node in the first ring network is in a forwarding state and the remaining inter-ring redundancy backup ports in the first ring network are in a blocking state;
the nodes in the first ring network are used for periodically sending ring interaction notification messages to the second ring network through the redundancy backup ports respectively when the ring redundancy backup ports are in a blocking state;
the nodes in the second ring network are used for determining the ring port connection state of each node in the second ring network after receiving the inter-ring interaction notification message through the inter-ring backup link;
the node in the second ring network is also used for sending a first inter-ring interaction notification response message to the first ring network through the inter-ring backup link connected with the first ring network when determining that one ring port in the second ring network is in a disconnected state;
and the node in the first ring network is also used for selecting the redundancy backup port between rings to be switched from the redundancy backup ports between rings in the blocking state through a preset mechanism after receiving the first interaction notification response message between rings, and setting the state of the redundancy backup port between rings to be switched as a forwarding state.
In a possible implementation manner of the second aspect, the node in the first ring network is specifically configured to, after receiving the first inter-ring interaction notification response message, parse the first inter-ring interaction notification response message, determine that a spanning tree STP state in the first inter-ring interaction notification response message is a forwarding state, select, through a preset mechanism, an inter-ring redundancy backup port to be switched from among inter-ring redundancy backup ports in a blocking state, and set the state of the inter-ring redundancy backup port to be switched as the forwarding state.
In a possible implementation manner of the second aspect, the node in the first ring network is specifically configured to, after receiving the first inter-ring interaction notification response packet, select, according to the link quality of the inter-ring backup link that connects each node in the first ring network with each node in the second ring network, an inter-ring redundancy backup port corresponding to the inter-ring backup link with the optimal link quality as the inter-ring redundancy backup port to be switched, and set the state of the inter-ring redundancy backup port to be switched as the forwarding state.
In a possible implementation manner of the second aspect, the node in the second ring network is further configured to send, after sending the first inter-ring interaction notification response message to the first ring network, a second inter-ring interaction notification response message to the first ring network through an inter-ring backup link connected to the first ring network when it is determined that all ring ports in the second ring network are in a connected state, where an STP state in the second inter-ring interaction notification response message is a blocking state;
the node in the first ring network is further configured to, after receiving the second inter-ring interaction notification response message through the inter-ring redundant backup port, analyze the second inter-ring interaction notification response message, determine that an STP state in the second inter-ring interaction notification response message is a blocking state, and set the state of the inter-ring redundant backup port in a forwarding state as the blocking state if the inter-ring redundant backup port is in the forwarding state.
In a third aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement a link switching method according to any one of the possible implementation manners of the first aspect.
The link switching method, the link redundancy backup network and the computer readable storage medium provided by the embodiment of the invention are applied to a redundancy backup network comprising at least two ring networks, firstly, each node in a first ring network with an inter-ring redundancy backup port in a blocking state periodically sends an inter-ring interaction notification message to a second ring network through the redundancy backup port, when each node in the second ring network receives the inter-ring interaction notification message through the inter-ring backup link, the connection state of each node in the second ring network is determined, then when any node in the second ring network determines that one ring port in the second ring network is in a disconnection state, a first inter-ring interaction notification response message is sent to the first ring network through the inter-ring backup link connected with the first ring network, so that when at least one node in the first ring network receives the first inter-ring interaction notification response message, the nodes in the first ring network which receive the first inter-ring interaction notification response message select the inter-ring redundancy backup ports to be switched from the inter-ring redundancy backup ports in the blocking state through a preset mechanism, and set the state of the inter-ring redundancy backup ports to be switched to be a forwarding state, so that when a plurality of nodes in a second ring network which is not provided with the inter-ring redundancy backup ports are disconnected in the second ring network, the network can still be accessed, and the problem that the nodes in the ring network are disconnected from the network due to the failure of the ring ports is avoided.
Drawings
FIG. 1 is a schematic diagram of a ring network configured with redundant backup links;
fig. 2 is a flowchart of a first embodiment of a link switching method according to the present invention;
FIG. 3 is a diagram illustrating an inter-ring redundant backup port switching performed by a node configured with an inter-ring redundant backup port;
fig. 4 is a schematic link switching diagram of a link switching method according to an embodiment of the present invention;
fig. 5 is a flowchart of a second embodiment of a link switching method according to the present invention;
fig. 6 is a schematic structural diagram of a first embodiment of a link redundancy backup network according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Industrial network refers to a network used in an industrial environment and serving industrial production, and the reliability of the industrial network has a great influence on the industrial production, so that the reliability of the industrial network is the most important performance parameter. In order to improve the reliability of the industrial network, a certain redundancy protocol is adopted in the industrial network to provide redundancy protection for data transmission in the network. For example, the DRP is a ring network protection protocol used in an industrial network, and performs topology detection periodically by a certain device in the ring network or actively reports to obtain a network topology change situation by all devices, and performs redundancy backup by using a certain mechanism when a network fails.
However, when the existing DRP technology implements redundancy backup, switching of inter-ring backup ports can only be implemented on a single side, and only a ring configured with an inter-ring redundancy backup port can perform switching of the inter-ring redundancy backup ports according to a real-time situation of a link, while a ring network on one side not configured with a backup port cannot notify a connection state of its own device to a ring on an opposite end, so that if multiple devices connected in the ring not configured with the inter-ring redundancy backup port are disconnected from the link, so that the multiple devices connected are disconnected from other devices in the ring, the devices connected to each other are isolated and cannot be connected, thereby affecting reliability of an industrial network. As shown in fig. 1, fig. 1 is a schematic diagram of a ring network configured with redundant backup links, and in fig. 1, a first ring network 11 and a second ring network 12 are two ring networks in an industrial network. The first ring network 11 includes three nodes, i.e., a first node 111, a third node 112, and a fifth node 113, and the second ring network 12 includes four nodes, i.e., a second node 121, a fourth node 122, a sixth node 123, and an eighth node 124. The number of nodes in the first ring network 11 and the second ring network 12 is not limited in the figure, and as long as each ring network includes more than three nodes, redundant backup links can be connected between the ring networks.
The nodes in the first ring network 11 and the second ring network 12 are connected through the intra-ring ports in the ring network, and when the DPR protocol is applied, the nodes in the ring network can implement intra-ring switching, for example, when the connection between the first node 111 and the third node 112 fails, the intra-ring ports of the first node 111 and the fifth node 113 are connected, so as to implement inter-communication in the ring network. The connection between the ring networks is realized through an inter-ring backup link, the inter-ring backup link is established between different nodes in the two rings, for example, the backup link 131 between the first node 111 and the second node 121, and the backup link 132 between the third node 112 and the fourth node 121, but other backup links may also be established between nodes between the first ring network 11 and the second ring network 12, for example, the inter-ring backup link is established between the first node 111 and the fourth node 122 or the inter-ring backup link is established between the fifth node 123 and the sixth node 123. Wherein, only the first node 111 and the second node 112 in the first ring network 11 are configured with a first inter-ring redundancy backup port 141 and a second inter-ring redundancy backup port 142, respectively. However, in order to avoid broadcast storm generated in the ring networks, only one of the plurality of backup links between two ring networks is in a forwarding state at the same time, and can normally forward the message, while the other backup links are all in a blocking state, and cannot forward the service message but can only transmit the control message, for example, between the first ring network 11 and the second ring network 12, only the first inter-ring redundancy backup port 141 is in the forwarding state, and the second inter-ring redundancy backup port 142 is in the blocking state.
In the two ring networks for establishing the inter-ring backup link, only the node in one ring network is configured with the inter-ring redundant backup port, and the backup link can be switched only when the node in the ring network configured with the inter-ring redundant backup port disconnects all the intra-ring ports. For a ring network without configured inter-ring redundancy backup ports, if all intra-ring ports of a certain node in the ring network are disconnected, the node is isolated from the network. This situation can have a serious impact on industrial production for industrial networks. For example, in a redundant backup network composed of the first ring network 11 and the second ring network 12, each node in the first ring network 11 is configured with an inter-ring redundant backup port, and if all intra-ring ports of a certain node in the first ring network 11 are disconnected, an isolated node in the first ring network 11 may perform switching of the redundant backup port, that is, the inter-ring redundant backup port of the isolated node in the first ring network 11 may be switched from a blocking state to a forwarding state, thereby implementing switching of the backup link. For example, when the port 152 and the port 154 of the third node 112 in the first ring network 11 both fail to cause the isolated connection of the third node 112, because the third node 112 is configured with the second inter-ring redundant backup port 142, when the second inter-ring redundant backup port 142 detects that both ring ports of the third node 112 are disconnected, the second inter-ring redundant backup port 142 is switched from a blocking state to a forwarding state, so that the link of the second backup link 132 is switched to a connection (link) state, thereby implementing the access of the third node 112 to the first ring network 11 through the backup link switching.
However, if the two intra-ring ports of a certain node in the second ring network 12 are isolated due to disconnection faults, and because each node in the second ring network 12 is not configured with an inter-ring redundant backup port, the node disconnected from the second ring network 12 cannot be connected to other nodes in the network. For example, when the fourth node 122 is isolated due to the failure of both the port 156 and the port 157 of the fourth node 122 in the second ring network 12, the fourth node 122 cannot access the network because no inter-ring redundancy backup port is configured for each node in the second ring network 12.
When a plurality of interconnected nodes in the first ring network 11 are disconnected from other nodes within the ring, for example, the connection between the first node 111 and the third node 112 fails, and the connection between the fifth node 113 and the first node 111 also fails, then the third node 112 and the fifth node 113 will ring independently, isolated from the network. The nodes in the first ring network 11 can still perform the switching of the inter-ring redundant backup ports, and as long as the second backup link 132 is changed to the connection state, the third node 112 and the fifth node 113 can access the network through the nodes in the second ring network 12. If a plurality of interconnected nodes in the second ring network 12 are disconnected from other nodes in the ring, for example, the connection between the second node 121 and the fourth node 122 fails, and the connection between the sixth node 123 and the second node 121 also fails, because each node in the second ring network 12 is not configured with an inter-ring redundant backup port, the node disconnected from the second ring network 12 cannot be connected to other nodes in the network.
In order to solve the above problem, embodiments of the present application provide a link switching method and a link redundancy backup network, which are used to solve the problem that a node cannot access a network when a node in a ring network that is not configured with an inter-ring redundancy backup port breaks an intra-ring network port in the link redundancy backup network.
The link switching method provided by the embodiment of the application is applied to a redundant backup network comprising at least two ring networks, wherein each ring network comprises at least two nodes. Taking the redundant backup network shown in fig. 1 as an example, the redundant backup network includes a first ring network 11 and a second ring network 12, where the first ring network 11 includes three nodes, i.e., a first node 111, a third node 112, and a fifth node 113, and the second ring network 12 includes four nodes, i.e., a second node 121, a fourth node 122, a sixth node 123, and an eighth node 124. The first node 111 and the third node 112 in the first ring network 11 are connected to the nodes in the second ring network 12 through inter-ring backup links, respectively. The ports of the nodes in the first ring network 11 and the nodes in the second ring network 12 connected through the inter-ring backup links are inter-ring redundancy backup ports, wherein the inter-ring redundancy backup port 141 of the first node 111 in the first ring network 11 is in a forwarding state, and the inter-ring redundancy backup port 142 in the first ring network 11 is in a blocking state, that is, only one inter-ring redundancy backup port in the first ring network 11 is in a forwarding state, and the remaining inter-ring redundancy backup ports are in a blocking state. The redundant backup network applied by the link switching method provided by the embodiment of the application is not limited to the redundant backup network shown in fig. 1, as long as the redundant backup network includes more than two ring networks, and the number of nodes in each ring network is two or more than two.
Fig. 2 is a flowchart of a first embodiment of a link switching method according to an embodiment of the present invention, and as shown in fig. 2, the method according to this embodiment includes:
step S201, the node in the first ring network, whose inter-ring redundant backup port is in the blocking state, periodically sends an inter-ring interaction notification message to the second ring network through the inter-ring redundant backup port, respectively.
For the redundant backup network shown in fig. 1, since the first ring network 11 and the second ring network 12 are both ring network structures, if only one ring port located in a ring, i.e., an intra-ring port, of each node in the first ring network 11 and the second ring network 12 fails and is in a disconnected state, the ring ports, i.e., intra-ring ports, in the first ring network 11 and the second ring network 12 may be automatically switched. For example, if the port 151 or the port 152 connected between the first node 111 and the third node 112 is disconnected, the port 153 connected between the first node 111 and the fifth node 113 may be switched.
If the port 151 or 152 connected between the first node 111 and the third node 112 is disconnected and the port 153 or 155 connected between the fifth node 113 and the first node 111 is also disconnected, the third node 112 and the fifth node 113 will be isolated from the other nodes in the network. Since the inter-ring redundancy backup ports are configured at each node in the first ring network 11, when the third node 112 and the fifth node 113 detect other nodes isolated from the network, the second inter-ring redundancy backup port 142 that is originally in the blocking state may be triggered to be in the forwarding state, and then the third node 112 and the fifth node 113 may be connected to the second ring network 12 through the second inter-ring redundancy backup port 142 to implement data forwarding, so that the third node 112 and the fifth node 113 may be re-accessed to the network. As shown in fig. 3, fig. 3 is a schematic diagram of performing inter-ring redundancy backup port switching for a node configured with an inter-ring redundancy backup port.
However, since each node in the second ring network 12 is not configured with a redundant backup port, if the situation occurs as described above in the third node 112 and the fifth node 114, the inter-ring redundant backup port cannot be switched, and the network cannot be accessed again. For example, if the port 156 or 158 connected between the second node 121 and the fourth node 122 is disconnected and the port 159 or 150 connected between the sixth node 123 and the eighth node 124 is also disconnected, the fourth node 122 and the sixth node 123 will stand alone from the other nodes in the network and cannot re-access the network.
Therefore, in this embodiment, a link switching method is provided, in which an additional packet is configured for each node in a ring network configured with an inter-ring redundancy backup port, and this is referred to as an inter-ring interaction notification packet. The port in the blocking state can send control messages, but cannot send service messages. Each node in the first ring network 11, whose inter-ring redundant backup port is in a blocking state, periodically sends an inter-ring interaction notification message to the second ring network 12 through the inter-ring redundant backup port, where the purpose of the inter-ring interaction notification message is to perform inter-ring backup link state interaction between the ring networks in which the inter-ring backup links are established. The inter-ring interaction notification message is a control message, and the inter-ring redundancy backup port in the blocking state can send the control message. The ring redundancy backup port in the connection state can still access the network through the ring redundancy backup port even if the node where the port is located is disconnected in the local ring network because the forwarding of the service message can be carried out. The inter-ring interaction notification message includes, but is not limited to, at least one of a version number, a message type, a packet sending port identifier, a Spanning Tree (STP) state of the packet sending port, and a ring identifier of the packet sending node. The sending period of the inter-ring interaction notification message may be configured according to actual requirements, a timer is configured in each node configured with the inter-ring redundancy backup port in the first ring network 11, and the inter-ring interaction notification message is sent through the inter-ring redundancy backup port configured by the node as long as the timer expires.
Step S202, after each node in the second ring network receives the inter-ring interaction notification message through the inter-ring backup link, the connection state of the ring port of each node in the second ring network is determined.
When each node in the first ring network 11 with the inter-ring redundancy backup port in the blocking state sends an inter-ring interaction notification message through the ring redundancy backup port, the port in the second ring network 12 connected to each node in the first ring network 11 will receive the inter-ring interaction notification message. After receiving the inter-ring interaction notification message, each node in the second ring network 12 determines the connection state of each node at the ring port, i.e., the intra-ring port, in the second ring network 12. The connection state of the ring port of each node in the second ring network 12 refers to the state of the ring port of each node in the second ring network 12 connected inside the second ring network 12, and does not include the state of the port connected to each node in the first ring network 11 through the inter-ring backup link. For example, for the fourth node 122, the state of the port 156 and the port 157 needs to be determined, and for the sixth node 123, the state of the port 150 and the port 160 needs to be determined.
Step S203, when any node in the second ring network determines that one ring port in the second ring network is in a disconnected state, a first inter-ring interaction notification response message is sent to the first ring network through an inter-ring backup link connected with the first ring network.
When all the ring ports of the nodes in the second ring network 12 that receive the inter-ring interaction notification packet are in the connected state, the node may be connected to other nodes in the second ring network 12 through the ring ports in the connected state in the second ring network 12, and may be accessed to the network through the other connected nodes. If any node in the second ring network 12 determines that a port in the second ring network 12 is in a disconnected state after receiving the inter-ring interaction notification message, the ring ports of other nodes connected to the node are also disconnected, so that a plurality of nodes connected to each other form a ring independently, and the network cannot be accessed. For example, if the port 156 of the fourth node 122 is disconnected and the port 150 of the sixth node 123 is also disconnected, the fourth node 122 and the sixth node 123 will be disconnected from other nodes in the second ring network 12, and the second inter-ring backup link 132 is in the blocking state, so the fourth node 122 and the sixth node 123 will ring alone and cannot establish connection with other nodes in the network. The node may send a first inter-ring interaction notification response message to the first ring network 11 via the inter-ring backup link connected to the first ring network 11. For example, if the fourth node 122 in the second ring network 12 determines that any ring port of the fourth node 122 in the second ring network 12 is in the disconnected state after receiving the inter-ring interaction notification message, the fourth node 122 may disconnect multiple nodes from the network because other connected nodes also have disconnected ring ports. The fourth node 122 will send a first inter-ring interaction notification response message to the first ring network 11 through the inter-ring backup link connected to the first ring network 11. The first inter-ring interaction notification response message is used to notify the first ring network 11 that one ring port of the fourth node 122 in the second ring network 12 is in a disconnected state. In this embodiment, the fourth node 122 sends a first inter-ring interaction notification response message to the third node 112 via the second backup link 132. The first inter-ring interaction notification response message includes, but is not limited to, at least one of a version number, a message type, a packet sending port identifier, an STP state of the packet sending port, and a ring identifier where the packet sending node is located. Meanwhile, if the sixth node 123 in the second ring network 12 determines that any ring port of the sixth node 123 in the second ring network 12 is in the disconnected state after receiving the inter-ring interaction notification message, the sixth node 123 sends a first inter-ring interaction notification response message to the first ring network 11 through the inter-ring backup link connected to the first ring network 11.
Step S204, after at least one node in the first ring network receives the first inter-ring interaction notification response message, the node in the first ring network which receives the first inter-ring interaction notification response message selects the inter-ring redundancy backup port to be switched from the inter-ring redundancy backup ports in the blocking state through a preset mechanism, and sets the state of the inter-ring redundancy backup port to be switched to a forwarding state.
When the node in the second ring network 12 sends the first inter-ring interaction notification response message through the inter-ring backup link connected thereto, the node in the first ring network 11 connected thereto through the inter-ring backup link will receive the first inter-ring interaction notification response message. Since the inter-ring interaction notification message is sent by each node in the first ring network that the inter-ring redundancy backup port is in the blocking state, the first inter-ring interaction notification response message is also received by at least one node in the first ring network that the inter-ring redundancy backup port is in the blocking state. Then, the node in the first ring network 11 that receives the first inter-ring interaction notification response packet may know that at least one intra-ring port of the node in the second ring network 12 that sends the first inter-ring interaction notification response packet is in a disconnected state, and a topology structure of the network is also stored in each node in the first ring network 11, and the node in the first ring network that receives the first inter-ring interaction notification response packet may determine whether two or more nodes that are independently looped and disconnected from other nodes exist in the second ring network 12. If the backup link exists, the node in the first ring network can set the state of one inter-ring redundancy backup port in the blocking state as the forwarding state, so that several nodes which form a ring independently access the first ring network 11 through the redundancy backup link corresponding to the inter-ring redundancy backup port after conversion. For example, the fourth node 122 and the sixth node 123 each have at least one in-loop port that is in an off state. Since each node in the first ring network 11 stores the ring network topology structure in the second ring network 12, each node in the first ring network 11 can determine the network topology in the second ring network 12 according to the first inter-ring interaction notification response packet, and determine that the fourth node 122 and the sixth node 123 are disconnected from the second network 12. Since the third node 112 and the fourth node 122 are connected through the second backup link 132, the state of the second inter-ring redundant backup port 142 corresponding to the second backup link 132 can be switched from the blocking state to the forwarding state, so that the second backup link 132 is in the connection state, and then the fourth node 122 and the sixth node 123 can access the first ring network 11 through the second backup link 132.
If other inter-ring redundant backup ports in a blocked state exist between the first ring network 11 and the second ring network 12, for example, the third backup link 133 between the fifth node 113 and the sixth node 123, and the fifth node 113 also has the third inter-ring redundant backup port 143 in a blocked state, then since the third node 112 and the fifth node 113 both receive the first inter-ring interaction notification response packet sent by the fourth node 122 and the sixth node 123, respectively, if the redundant backup port 142 corresponding to the second backup link 132 and the redundant backup port 143 corresponding to the third backup link 133 are both changed to a forwarding state, a closed ring loop may be established between the third node 112, the fourth node 122, the sixth node 123, and the fifth node 113, resulting in the generation of a broadcast storm. Therefore, a selection mechanism of an inter-ring redundancy backup port needs to be preset in a node in the first ring network 11 that receives the first inter-ring interaction notification response packet, and one to-be-switched inter-ring redundancy backup port is selected from a plurality of inter-ring redundancy backup ports in a blocking state connected to the second ring network 12 in the first ring network 11, and the state of the to-be-switched inter-ring redundancy backup port is set to be a forwarding state. The selection of the redundancy backup ports between the rings to be switched can be randomly selected, or can be selected according to the parameters of the redundancy backup ports between the rings according to a certain mechanism. When the inter-ring redundancy backup port to be switched is set to be in a forwarding state, the node in the first ring network 11 can forward data to the second ring network 12 through the switched redundancy backup port, that is, the connection with the first ring network 11 is realized through the switched redundancy backup port, so that the problem that the network cannot be connected when the node without the inter-ring redundancy backup port is disconnected at the intra-ring port is avoided. Since the intra-ring ports of the fourth node 122 and the sixth node 123 in the second ring network 12 are both in the off state, although the states of the first inter-ring redundant backup port 141 and the second inter-ring redundant backup port 142 are both set to the forwarding state, the problem of broadcast storm in the entire network is not caused. As shown in fig. 4, fig. 4 is a link switching diagram of a link switching method according to an embodiment of the present invention.
Specifically, the fourth node 122 needs to include corresponding information in the first inter-ring interaction notification response message sent to the first ring network 11, so that the third node 112 receiving the first inter-ring interaction notification response message learns the information that one intra-ring port of the fourth node 122 is disconnected. The STP state in the first inter-ring interaction notification response message may be set to a forwarding state. In this way, when the third node 112 receives the first inter-ring interaction notification response packet through the second inter-ring redundancy backup port 142, the first inter-ring interaction notification response packet is analyzed, and it can be determined that the STP state in the first inter-ring interaction notification response packet is the forwarding state, that is, it is known that one intra-ring port of the fourth node 122 is disconnected. Meanwhile, the first inter-ring interaction notification response message sent by the sixth node 123 to the first ring network 11 also needs to include corresponding information, so that the fifth node 113 that receives the first inter-ring interaction notification response message learns the information that one intra-ring port of the sixth node 123 is disconnected. In this way, when the fifth node 113 receives the first inter-ring interaction notification response packet through the third inter-ring redundant backup port 143, the first inter-ring interaction notification response packet is analyzed, and it can be determined that the STP state in the first inter-ring interaction notification response packet is the forwarding state, that is, it is known that one intra-ring port of the sixth node 123 is disconnected. Then, the node in the first ring network that receives the first inter-ring interaction notification response packet also needs to determine whether the second inter-ring redundant backup port 142 and the third inter-ring redundant backup port 143 are in the blocking state, and if the second inter-ring redundant backup port 142 or the third inter-ring redundant backup port 143 is already set to the forwarding state, the fourth node 122 and the sixth node 123 may already be connected to the first ring network 11 through the second inter-ring redundant backup port 142 or the third inter-ring redundant backup port 143, that is, there is no need to re-set the inter-ring redundant backup port. If the second inter-ring redundant backup port 142 and the third inter-ring redundant backup port 143 are both in a blocking state, in order to enable the fourth node 122 and the sixth node 123 to access the first ring network 11, it is necessary to select between the second inter-ring redundant backup port 142 and the third inter-ring redundant backup port 143, determine a port as an inter-ring redundant backup port to be switched, and set the state thereof as a forwarding state.
The link switching method provided by this embodiment is applied to a redundant backup network including at least two ring networks, and includes that, first, each node in a first ring network, whose inter-ring redundant backup port is in a blocking state, periodically sends an inter-ring interaction notification message to a second ring network through the redundant backup port, when each node in the second ring network receives the inter-ring interaction notification message through the inter-ring backup link, determines a ring port connection state of each node in the second ring network, and then when any node in the second ring network determines that one ring port in the second ring network is in a disconnection state, sends a first inter-ring interaction notification response message to the first ring network through the inter-ring backup link connected to the first ring network, so that when at least one node in the first ring network receives the first inter-ring interaction notification response message, a node in the first ring network, which receives the first inter-ring interaction notification response message, passes through a preset mechanism, the inter-ring redundancy backup port to be switched is selected from the inter-ring redundancy backup ports in the blocking state, and the state of the inter-ring redundancy backup port to be switched is set to be the forwarding state, so that a plurality of nodes in a second ring network which is not configured with the inter-ring redundancy backup port can still be connected to the network when the nodes are disconnected in the second ring network, and the problem that the nodes in the ring network are disconnected from the network due to the failure of the ring ports is avoided.
Fig. 5 is a flowchart of a second embodiment of a link switching method according to the embodiment of the present invention, and as shown in fig. 3, the method according to the embodiment includes:
step S501, each node of the inter-ring redundancy backup port in the first ring network in the blocking state periodically sends an inter-ring interaction notification message to the second ring network through the redundancy backup port.
Step S502, after each node in the second ring network receives the inter-ring interaction notification message through the inter-ring backup link, the connection state of the ring port of each node in the second ring network is determined.
Step S503, when any node in the second ring network determines that a ring port in the second ring network is in a disconnected state, a first inter-ring interaction notification response message is sent to the first ring network through an inter-ring backup link connected with the first ring network.
Step S504, after at least one node in the first ring network receives the first inter-ring interaction notification response message, the node in the first ring network which receives the first inter-ring interaction notification response message selects the inter-ring redundancy backup port to be switched from the inter-ring redundancy backup ports in the blocking state through a preset mechanism, and sets the state of the inter-ring redundancy backup port to be switched to a forwarding state.
Step S501 to step S504 are the same as step S201 to step S204, and are not described herein again.
Step S505, when the node in the second ring network that sends the first inter-ring interaction notification response message to the first ring network determines that all ring ports in the second ring network are in the connection state, sending the second inter-ring interaction notification response message to the first ring network through the inter-ring backup link connected to the first ring network, where an STP state in the second inter-ring interaction notification response message is a blocking state.
When a node in the second ring network 12 that sends a first inter-ring interaction notification response packet to the first ring network 11 accesses the network through a redundant backup link that is newly switched to a connection state, it is necessary to detect the ring port state of the node itself, because if the ring ports of the node are all in the connection state, the node must access the second ring network 12 through the ring ports, and there are more than two redundant backup links in the connection state in the entire network, a broadcast storm will occur in the network. For example, if the fourth node 122 is restored at both ring ports in the second ring network 12, and the first inter-ring redundant backup port 141 and the second inter-ring redundant backup port 142 are both in the forwarding state, i.e. the first backup link 131 and the second backup link 132 are both in the connection state, then in the first ring network 11 and the second ring network 12, the first node 111, the second node 121, the fourth node 122 and the third node 112 will form a closed ring connection to generate a loop, which will cause a broadcast storm to occur in the network. In order to avoid the problem, the node in the second ring network 12 that sends the first inter-ring interaction notification response packet to the first ring network 11 needs to continuously detect the ring port state of the node, and when detecting that all the ring ports of the node in the ring ports of the second ring network 12 are in the connected state, the node may be connected to other nodes in the second ring network 12 through the ring ports in the second ring network 12, that is, may be connected to the second ring network 12. At this time, it is determined that the node in which all the ring ports are in the connection state needs to send the second inter-ring interaction notification response message to the first ring network 11 through the inter-ring backup link connected to the first ring network 11. The fourth node 122 or the sixth node 123 is included. The second inter-ring interaction informs the STP state in the response message of the blocking state, namely the backup link needs to be blocked, thereby preventing the occurrence of broadcast storm. The second inter-ring interaction notification response message comprises at least one of a version number, a message type, a packet sending port identifier, an STP (spanning Tree protocol) state of the packet sending port and a ring identifier of the packet sending node.
Step S306, after the node in the first ring network receives the second inter-ring interaction notification response message through the inter-ring redundant backup port, the node analyzes the second inter-ring interaction notification response message, determines that the STP state in the second inter-ring interaction notification response message is a blocking state, and sets the state of the inter-ring redundant backup port in a forwarding state as the blocking state if the inter-ring redundant backup port is in the forwarding state.
After receiving the second inter-ring interaction notification response message through the inter-ring redundant backup port, the node in the first ring network analyzes the second inter-ring interaction notification response message, determines that the STP state in the second inter-ring interaction notification response message is a blocking state and the state of the inter-ring redundant backup port is a forwarding state, can determine that the state of the inter-ring redundant backup port is at the ring inner end of the opposite end node of the second ring network, and is restored to the forwarding state from disconnection, if the inter-ring redundant backup link is still kept in the connection state, the ring network appears in the network, thereby causing a network storm, and therefore, the state of the inter-ring redundant backup port is set to be the blocking state from the forwarding state.
When the node in the first ring network 11 that sets the inter-ring redundant backup port in the blocking state to the forwarding state receives the second inter-ring interaction notification response packet through the inter-ring redundant backup port, it means that the node that was disconnected before in the second ring network 12 has been reconnected to the second ring network 12, and if more than two inter-ring redundant backup links are still maintained in the connection state, a network storm may occur in the network. Therefore, when the node in the first ring network 11 that sets the state of the inter-ring redundant backup port in the blocking state as the forwarding state receives the second inter-ring interaction notification response message through the inter-ring redundant backup port, the second inter-ring interaction notification response message is analyzed, the STP state in the second inter-ring interaction notification response message is determined to be the blocking state, and the inter-ring redundant backup port of the node is in the forwarding state, and the state of the inter-ring redundant backup port in the forwarding state is set as the blocking state. For example, in step S504, if the third node 112 switches the second inter-ring redundancy backup port from the blocking state to the forwarding state, when the third node 112 receives the second inter-ring interaction notification response message through the second inter-ring redundancy backup port 142, the third node 112 determines that the STP state in the second inter-ring interaction notification response message is the blocking state by analyzing the second inter-ring interaction notification response message, and then knows that all ring ports of the fourth node 122 or the sixth node 123 in the second ring network 12 have been restored to be connected, so that the fourth node 122 and the sixth node 123 may access the second ring network 12. In order to avoid the broadcast storm, the third node 112 needs to set the second redundant backup port 142 to be in the blocking state, and then there is only one backup link in the connection state between the first ring network 11 and the second ring network 12, so as to avoid the broadcast storm. I.e. the state in the network is changed from the state shown in fig. 4 to the state shown in fig. 1.
Further, in the embodiment shown in fig. 2 or fig. 5, if the first ring network 11 has more than two inter-ring redundancy backup ports in a blocking state, after each node in the first ring network 11 receives the first inter-ring interaction notification response packet, each node in the first ring network 11 may select, according to information such as link quality, link state, IP address, and MAC address of an inter-ring backup link connected between each node in the first ring network 11 and each node in the second ring network 12, a redundancy backup port corresponding to the inter-ring backup link with the optimal link quality as the inter-ring redundancy backup port to be switched, and set the state of the inter-ring redundancy backup port to be switched as a forwarding state. The inter-ring backup link with the optimal link quality is set to be in a forwarding state, so that the quality of the inter-ring backup link in the forwarding state between the first ring network 11 and the second ring network 12 is higher, and the connection quality of the first ring network 11 and the second ring network 12 is ensured.
Fig. 6 is a schematic structural diagram of a first embodiment of a link redundancy backup network according to an embodiment of the present invention, and as shown in fig. 6, the link redundancy backup network according to this embodiment includes:
the first ring network 61 comprises a first node 611, a third node 612 and a fifth node 613, and the second ring network 62 comprises a second node 621, a fourth node 622, a sixth node 623 and an eighth node 624. Each node in the first ring network 61 is connected to each node in the second ring network 62 through an inter-ring backup link, and a port where each node in the first ring network 61 is connected to each node in the second ring network 62 through an inter-ring backup link is an inter-ring redundant backup port, where the redundant backup port 631 of the first node 611 in the first ring network 61 is in a forwarding state, and the remaining redundant backup ports in the first ring network 61, the redundant backup port 632, and the redundant backup port 633 are in a blocking state. In this embodiment, two ring networks are taken as an example, the first ring network 11 includes three nodes, and the second ring network 12 includes four nodes, but the link redundancy backup network provided in the embodiment of the present application is not taken as an example, as long as the link redundancy backup network includes at least two ring networks, and each ring network includes at least three nodes.
Each node in the first ring network 61 is configured to periodically send an inter-ring interaction notification message to the second ring network 62 through the redundant backup port when the inter-ring redundant backup port is in a blocking state.
Each node in the second ring network 62 is configured to determine a ring port connection state of each node in the second ring network 62 after receiving the inter-ring interaction notification packet through the inter-ring backup link.
The node in the second ring network 62 is further configured to send a first inter-ring interaction notification response message to the first ring network through the inter-ring backup link connected to the first ring network when it is determined that one ring port in the second ring network is in a disconnected state.
The node in the first ring network 61 is further configured to select, through a preset mechanism, an inter-ring redundancy backup port to be switched from the inter-ring redundancy backup ports in the blocking state after receiving the first inter-ring interaction notification response packet and the second inter-ring interaction notification response packet, and set the state of the inter-ring redundancy backup port to be switched to the forwarding state.
The link redundancy backup network provided in this embodiment is used to implement the link redundancy backup method in the embodiment shown in fig. 2, and the implementation principle and technical effect are similar, which are not described herein again.
Further, in the embodiment shown in fig. 6, each node in the first ring network 61 is specifically configured to, after receiving the first inter-ring interaction notification response message, parse the first inter-ring interaction notification response message, determine that an STP state in the first inter-ring interaction notification response message is a forwarding state, select, through a preset mechanism, an inter-ring redundancy backup port to be switched from among inter-ring redundancy backup ports in a blocking state, and set the state of the inter-ring redundancy backup port to be switched as a forwarding state.
Further, in the embodiment shown in fig. 6, the node in the first ring network 11 is specifically configured to, after receiving the first inter-ring interaction notification response packet, select, according to the link quality of the inter-ring backup link between each node in the first ring network 11 and each node in the second ring network 12, an inter-ring redundancy backup port corresponding to the inter-ring backup link with the optimal link quality as the inter-ring redundancy backup port to be switched, and set the state of the inter-ring redundancy backup port to be switched as the forwarding state.
Further, in the embodiment shown in fig. 6, the node in the second ring network 12 is further configured to, after sending the first inter-ring interaction notification response message to the first ring network 11, send a second inter-ring interaction notification response message to the first ring network 11 through the inter-ring backup link connected to the first ring network 11 when it is determined that all ring ports in the second ring network 12 are in the connected state, where an STP state in the second inter-ring interaction notification response message is a blocking state; the node in the first ring network 11 is further configured to, after receiving the second inter-ring interaction notification response message through the inter-ring redundant backup port, analyze the second inter-ring interaction notification response message, determine that an STP state in the second inter-ring interaction notification response message is a blocking state, and set the state of the inter-ring redundant backup port in a forwarding state as the blocking state if the inter-ring redundant backup port is in the forwarding state.
Further, in the embodiment shown in fig. 6, the inter-ring interaction notification message, the first inter-ring interaction notification response message, and the second inter-ring interaction notification response message include at least one of a version number, a message type, a packet sending port identifier, an STP state of the packet sending port, and a ring identifier where the packet sending node is located.
Embodiments of the present application also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a method of link switching, the method comprising:
each node of an inter-ring redundancy backup port in the first ring network in a blocking state periodically sends an inter-ring interaction notification message to the second ring network through the redundancy backup port respectively;
after each node in the second ring network receives the inter-ring interaction notification message through the inter-ring backup link, determining the ring port connection state of each node in the second ring network;
when any node in the second ring network determines that one ring port in the second ring network is in a disconnected state, sending a first inter-ring interaction notification response message to the first ring network through an inter-ring backup link connected with the first ring network;
when at least one node in the first ring network receives a first inter-ring interaction notification response message, the node in the first ring network which receives the first inter-ring interaction notification response message selects an inter-ring redundancy backup port to be switched from the inter-ring redundancy backup ports in the blocking state through a preset mechanism, and sets the state of the inter-ring redundancy backup port to be switched to a forwarding state.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A link switching method is characterized in that the link switching method is applied to a redundancy backup network comprising at least two ring networks, each ring network comprises at least three nodes, the at least two ring networks comprise a first ring network and a second ring network, each node in the first ring network is connected with each node in the second ring network through an inter-ring backup link, a port, which is connected with a node in the second ring network through an inter-ring backup link, of each node in the first ring network is an inter-ring redundancy backup port, wherein the inter-ring redundancy backup port of one node in the first ring network is in a forwarding state, and the rest of the inter-ring redundancy backup ports in the first ring network are in a blocking state, and the method comprises the following steps:
each node of the inter-ring redundancy backup port in the first ring network in a blocking state periodically sends an inter-ring interaction notification message to the second ring network through the inter-ring redundancy backup port respectively;
after each node in the second ring network receives the inter-ring interaction notification message through an inter-ring backup link, determining the ring port connection state of each node in the second ring network;
when any node in the second ring network determines that a ring port in the second ring network is in a disconnected state, sending a first inter-ring interaction notification response message to the first ring network through an inter-ring backup link connected with the first ring network;
when at least one node in the first ring network receives the first inter-ring interaction notification response message, the node in the first ring network, which receives the first inter-ring interaction notification response message, selects a to-be-switched inter-ring redundancy backup port from inter-ring redundancy backup ports in a blocking state through a preset mechanism, and sets the state of the to-be-switched inter-ring redundancy backup port to a forwarding state; after the node in the second ring network sends the first inter-ring interaction notification response message through the inter-ring backup link connected with the node in the second ring network, the node in the first ring network connected with the node in the second ring network through the inter-ring backup link receives the first inter-ring interaction notification response message.
2. The method according to claim 1, wherein after at least one node in the first ring network receives the first inter-ring interaction notification response packet, the node in the first ring network that receives the first inter-ring interaction notification response packet selects, through a preset mechanism, an inter-ring redundancy backup port to be switched from inter-ring redundancy backup ports that are in a blocked state, and sets the state of the inter-ring redundancy backup port to be switched to a forwarding state, including:
when at least one node in the first ring network receives the first inter-ring interaction notification response message, analyzing the first inter-ring interaction notification response message, and determining that the spanning tree STP state in the first inter-ring interaction notification response message is a forwarding state, the node in the first ring network receiving the first inter-ring interaction notification response message selects an inter-ring redundancy backup port to be switched from the inter-ring redundancy backup ports in a blocking state through a preset mechanism, and sets the state of the inter-ring redundancy backup port to be switched as the forwarding state.
3. The method according to claim 1 or 2, wherein after at least one node in the first ring network receives the first inter-ring interaction notification response packet, the node in the first ring network that receives the first inter-ring interaction notification response packet selects, through a preset mechanism, an inter-ring redundancy backup port to be switched from among inter-ring redundancy backup ports in a blocked state, and sets the state of the inter-ring redundancy backup port to be switched to a forwarding state, including:
when at least one node in the first ring network receives the first inter-ring interaction notification response message, the node in the first ring network which receives the first inter-ring interaction notification response message selects an inter-ring redundancy backup port corresponding to the inter-ring backup link with the optimal link quality as the inter-ring redundancy backup port to be switched according to the link quality of the inter-ring backup link which is connected between each node in the first ring network and each node in the second ring network, and sets the state of the inter-ring redundancy backup port to be switched as a forwarding state.
4. The method according to claim 1 or 2, wherein after at least one node in the first ring network receives the first inter-ring interaction notification response packet, the node in the first ring network that receives the first inter-ring interaction notification response packet selects, through a preset mechanism, an inter-ring redundancy backup port to be switched from among inter-ring redundancy backup ports in a blocked state, and sets the state of the inter-ring redundancy backup port to be switched to a forwarding state, the method further comprising:
when a node in the second ring network, which sends a first inter-ring interaction notification response message to the first ring network, determines that all ring ports in the second ring network are in a connection state, sending a second inter-ring interaction notification response message to the first ring network through an inter-ring backup link connected with the first ring network, wherein the STP state in the second inter-ring interaction notification response message is a blocking state;
after receiving the second inter-ring interaction notification response message through the inter-ring redundant backup port, the node in the first ring network analyzes the second inter-ring interaction notification response message, determines that the STP state in the second inter-ring interaction notification response message is a blocking state, and sets the state of the inter-ring redundant backup port in a forwarding state as the blocking state if the inter-ring redundant backup port is in the forwarding state.
5. The method according to claim 1 or 2, wherein the inter-ring interaction notification packet, the first inter-ring interaction notification response packet, and the second inter-ring interaction notification response packet include at least one of a version number, a packet type, a packet sending port identifier, an STP state of a packet sending port, and a ring identifier of a packet sending node.
6. A link redundancy backup network is characterized in that the link redundancy backup network comprises at least two ring networks, each ring network comprises at least three nodes, the at least two ring networks comprise a first ring network and a second ring network, each node in the first ring network is connected with each node in the second ring network through an inter-ring backup link, and a port where each node in the first ring network is connected with a node in the second ring network through an inter-ring backup link is an inter-ring redundancy backup port, wherein the inter-ring redundancy backup port of one node in the first ring network is in a forwarding state, and the rest of the inter-ring redundancy backup ports in the first ring network are in a blocking state;
the nodes in the first ring network are used for periodically sending ring interaction notification messages to the second ring network through the redundancy backup ports respectively when the ring redundancy backup ports are in a blocking state;
the nodes in the second ring network are used for determining the connection state of the ring ports of the nodes in the second ring network after receiving the inter-ring interaction notification message through the inter-ring backup link;
the node in the second ring network is further configured to send a first inter-ring interaction notification response message to the first ring network through an inter-ring backup link connected to the first ring network when it is determined that one ring port in the second ring network is in a disconnected state;
the node in the first ring network is further configured to select an inter-ring redundancy backup port to be switched from the inter-ring redundancy backup ports in a blocking state through a preset mechanism after receiving the first inter-ring interaction notification response message, and set the state of the inter-ring redundancy backup port to be switched to a forwarding state; after the node in the second ring network sends the first inter-ring interaction notification response message through the inter-ring backup link connected with the node in the second ring network, the node in the first ring network connected with the node in the second ring network through the inter-ring backup link receives the first inter-ring interaction notification response message.
7. The link redundancy backup network according to claim 6, wherein the node in the first ring network is specifically configured to, after receiving the first inter-ring interaction notification response packet, parse the first inter-ring interaction notification response packet, determine that a spanning tree STP state in the first inter-ring interaction notification response packet is a forwarding state, select, through a preset mechanism, an inter-ring redundancy backup port to be switched from the inter-ring redundancy backup ports in a blocking state, and set the state of the inter-ring redundancy backup port to be switched as the forwarding state.
8. The link redundancy backup network according to claim 6 or 7, wherein the node in the first ring network is specifically configured to, after receiving the first inter-ring interaction notification response packet, select, according to the link quality of the inter-ring backup link connected between each node in the first ring network and each node in the second ring network, an inter-ring redundancy backup port corresponding to the inter-ring backup link with the best link quality as the inter-ring redundancy backup port to be switched, and set the state of the inter-ring redundancy backup port to be switched as the forwarding state.
9. The link redundancy backup network according to claim 6 or 7, wherein the node in the second ring network is further configured to, after sending the first inter-ring interaction notification response message to the first ring network, send a second inter-ring interaction notification response message to the first ring network through the inter-ring backup link connected to the first ring network when it is determined that all ring ports in the second ring network are in the connected state, where an STP state in the second inter-ring interaction notification response message is a blocking state;
the node in the first ring network is further configured to, after receiving the second inter-ring interaction notification response message through the inter-ring redundant backup port, analyze the second inter-ring interaction notification response message, determine that an STP state in the second inter-ring interaction notification response message is a blocking state, and set the state of the inter-ring redundant backup port in a forwarding state as the blocking state if the inter-ring redundant backup port is a forwarding state.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a link switching method according to any one of claims 1 to 5.
CN201811644041.9A 2018-12-29 2018-12-29 Link switching method, link redundancy backup network and computer readable storage medium Active CN109525445B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811644041.9A CN109525445B (en) 2018-12-29 2018-12-29 Link switching method, link redundancy backup network and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811644041.9A CN109525445B (en) 2018-12-29 2018-12-29 Link switching method, link redundancy backup network and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN109525445A CN109525445A (en) 2019-03-26
CN109525445B true CN109525445B (en) 2022-03-08

Family

ID=65797675

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811644041.9A Active CN109525445B (en) 2018-12-29 2018-12-29 Link switching method, link redundancy backup network and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109525445B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021094803A1 (en) * 2019-11-11 2021-05-20 Siemens Canada Limited A network device for providing redundancy in an industrial network
CN110838994B (en) * 2019-11-14 2021-09-28 天津津航计算技术研究所 Link state monitoring method of redundant Ethernet based on broadcast protocol
CN111130943B (en) * 2019-12-27 2021-12-21 深圳市丰润达科技有限公司 Method for realizing fast ring network switching, switch and computer readable storage medium
CN111726287B (en) * 2020-07-13 2022-01-25 中国联合网络通信集团有限公司 Ring network protection method and device
CN114070662A (en) * 2020-07-31 2022-02-18 上海国际货币经纪有限责任公司 Message bus system
CN112737938B (en) * 2020-11-30 2022-09-27 北京东土军悦科技有限公司 DRP switching method, device, equipment and medium
CN113904975B (en) * 2021-09-27 2023-03-28 北京东土科技股份有限公司 Method, equipment and storage medium for realizing dual-homing link
CN113824796B (en) * 2021-10-22 2023-06-30 杭州宏杉科技股份有限公司 Token passing method and device
CN117527537A (en) * 2023-11-08 2024-02-06 南京能可瑞科技有限公司 Communication method of split charging pile

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101197745A (en) * 2007-12-21 2008-06-11 深圳市三旺通信技术有限公司 Looped network redundancy Ethernet module and method for implementing looped network redundant data transmission
CN101262402A (en) * 2007-11-08 2008-09-10 北京东土科技股份有限公司 A method for realizing redundant backup between loop networks
CN101771580A (en) * 2009-01-07 2010-07-07 四零四科技股份有限公司 Processing method for redundancy checking of ring network
CN102821009A (en) * 2012-08-08 2012-12-12 中兴通讯股份有限公司 Method for monitoring ring network on basis of link layer discovery protocol and device
CN103095540A (en) * 2013-01-18 2013-05-08 武汉迈威光电技术有限公司 Industrial Ethernet data distribution and link redundancy design
CN104135417A (en) * 2014-08-27 2014-11-05 杭州立地信息技术有限公司 Quick recovery method for ethernet ring network link interruption and corresponding ethernet ring network
CN106789264A (en) * 2016-12-26 2017-05-31 北京东土军悦科技有限公司 The method and apparatus that a kind of link aggregation group passage is switched fast
CN106992931A (en) * 2017-04-18 2017-07-28 深圳市立全鼎盛科技有限公司 Interchanger redundancy backup method and dual homed loop system based on dual homed ring

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5267191B2 (en) * 2009-02-18 2013-08-21 富士通株式会社 Optical ring network system and optical transmission device
US20170289014A1 (en) * 2016-04-01 2017-10-05 Moxa Inc. Redundany system of routing paths and method thereof

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101262402A (en) * 2007-11-08 2008-09-10 北京东土科技股份有限公司 A method for realizing redundant backup between loop networks
CN101197745A (en) * 2007-12-21 2008-06-11 深圳市三旺通信技术有限公司 Looped network redundancy Ethernet module and method for implementing looped network redundant data transmission
CN101771580A (en) * 2009-01-07 2010-07-07 四零四科技股份有限公司 Processing method for redundancy checking of ring network
CN102821009A (en) * 2012-08-08 2012-12-12 中兴通讯股份有限公司 Method for monitoring ring network on basis of link layer discovery protocol and device
CN103095540A (en) * 2013-01-18 2013-05-08 武汉迈威光电技术有限公司 Industrial Ethernet data distribution and link redundancy design
CN104135417A (en) * 2014-08-27 2014-11-05 杭州立地信息技术有限公司 Quick recovery method for ethernet ring network link interruption and corresponding ethernet ring network
CN106789264A (en) * 2016-12-26 2017-05-31 北京东土军悦科技有限公司 The method and apparatus that a kind of link aggregation group passage is switched fast
CN106992931A (en) * 2017-04-18 2017-07-28 深圳市立全鼎盛科技有限公司 Interchanger redundancy backup method and dual homed loop system based on dual homed ring

Also Published As

Publication number Publication date
CN109525445A (en) 2019-03-26

Similar Documents

Publication Publication Date Title
CN109525445B (en) Link switching method, link redundancy backup network and computer readable storage medium
CN109462533B (en) Link switching method, link redundancy backup network and computer readable storage medium
CN108270669B (en) Service recovery device, main controller, system and method of SDN network
US9237092B2 (en) Method, apparatus, and system for updating ring network topology information
US8014300B2 (en) Resource state monitoring method, device and communication network
JP5913635B2 (en) Redundant network connection
CN101652963B (en) Method for reconfiguring a communications network
CN104168193A (en) Virtual router redundancy protocol fault detection method and router equipment
CN101854283B (en) Communication method and equipment of RPR (Resilient Packet Ring) looped network
JP2006229967A (en) High-speed multicast path switching
EP3029883B1 (en) Network protection method and apparatus, next-ring node, and system
US10721094B2 (en) Ethernet ring protection switching method and node
CN103607293A (en) Flow protection method and equipment thereof
US8218433B2 (en) Monitoring connectivity in ring networks
CN112995002B (en) Switch ring network design method, switch and storage medium
US9246796B2 (en) Transmitting and forwarding data
EP3573298B1 (en) Multi-node device and method for micro server built-in switch uplink port backup
CN107547330B (en) Method and node equipment for transmitting service data
CN113938421B (en) Force-up function-based anti-loop mechanism implementation method, equipment and medium
CN113595828B (en) Software defined network topology detection method and system
CN108259289B (en) Loop network abnormity protection method and device
CN110235414B (en) Microwave node for ERP network
JP4559497B2 (en) Function distributed packet transfer system and control method thereof
CN113411254A (en) Link processing method and device
CN115643202A (en) Link selection control protocol switching method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant