WO2014079088A1 - Method and node for implementing redundancy on basis of chain network - Google Patents

Method and node for implementing redundancy on basis of chain network Download PDF

Info

Publication number
WO2014079088A1
WO2014079088A1 PCT/CN2012/085564 CN2012085564W WO2014079088A1 WO 2014079088 A1 WO2014079088 A1 WO 2014079088A1 CN 2012085564 W CN2012085564 W CN 2012085564W WO 2014079088 A1 WO2014079088 A1 WO 2014079088A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
chain network
network
master node
link
Prior art date
Application number
PCT/CN2012/085564
Other languages
French (fr)
Chinese (zh)
Inventor
江启运
马化一
Original Assignee
北京东土科技股份有限公司
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 北京东土科技股份有限公司 filed Critical 北京东土科技股份有限公司
Publication of WO2014079088A1 publication Critical patent/WO2014079088A1/en

Links

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/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings

Definitions

  • determining the on/off state of the chain network further includes:
  • the primary node of the chain network actively detects the port status included by itself;
  • the re-determining the master node of the chain network includes: the master node in the chain network according to the notification message sent by the other master node, from the current all In the master node, the primary node of the chain network is re-elected;
  • a node that is not elected as the master node sets the port with its own blocked state to the forwarding state.
  • the master node election module elects a main node port setting module of the chain network according to the received notification message sent by other nodes, and is used to determine one of the two ports included in the link node after determining that it is the master node.
  • Set to block The plugging state the other is set to the forwarding state, and the notification message is periodically sent to the chain network through the two ports, where the edge node connected to the external network in the chain network receives the master of the chain network
  • the edge node is configured to limit the chain network management packet running in the chain network to the local chain network, where the network management message includes a notification. Message and response message;
  • the master node election module is further configured to: determine that it is a new master node;
  • the port setting module is further configured to: after receiving the newly determined notification message sent by the master node, according to the interrupt priority level carried in the notification message, the port having the blocked state Set to forwarding state.
  • FIG. 2 is a schematic structural diagram of a first chain network according to an embodiment of the present invention.
  • FIG. 3 is a schematic structural diagram of an interruption link of a first chain network according to an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of a node of a chain network according to an embodiment of the present invention.
  • a node for connecting to an external network is defined as an edge node, wherein a port connected to the external network in the edge node is defined as an external port, and the edge node is used to connect with the chain network.
  • Port is defined as an internal port;
  • the external port of the edge node can receive and send the clear table, and the clearing table is used to clear the MAC address table saved by each node after the network topology change.
  • Step 13 Each node of the chain network determines the on/off state of the chain network according to whether the network management packet of the chain network is received, and redetermines the link when determining the link interruption of the chain network.
  • the primary node of the network The primary node of the network.
  • step 11 according to the notification sent by each node in the chain network, the master node is elected, which specifically includes:
  • Each node compares the notification message sent by other nodes in the chain network with the link state information carried by the notification message sent by itself, so as to elect the master node of the chain network.
  • the link state information includes one or a combination of a link shield quantity, a MAC address, and a priority.
  • the link shield can be obtained by detecting the Bidirectional Forwarding Detection (BFD) sent between the nodes.
  • BFD Bidirectional Forwarding Detection
  • the chain network structure shown in FIG. 2 includes nodes 1 to 4, and each node is connected by a link.
  • Node 1 and node 4 in the chain network in FIG. 2 are respectively connected to an external network. It is determined that node 1 and node 4 are edge nodes of the chain network, and ports connected by node 1 and node 4 to the external network are external ports, which are used to limit the chain network management messages running in the chain network to the local
  • the port connected to the node 2 and the node 3 is an internal port; the port included in the node 2 and the node 3 in FIG. 2 is an internal port;
  • nodes 1 to 4 in the chain network default to themselves as the master node, and nodes 1 to 4 all send notification messages to the chain network through their internal ports; each node reports according to the received notification.
  • the link state information of the text and the link state information of the notification message sent by itself elect the master node of the chain network. If the elected master node is node 3, the port of node 3 is set to the blocking state. For example, the port connected to node 2 in node 3 is set to the blocking state, the port connected to node 4 is still in the forwarding state, and the internal ports of other nodes are still in the forwarding state.
  • determining the on/off state of the chain network in step 13 includes the following two methods:
  • the internal port of the master node determines that the chain network is closed when receiving the response message; otherwise, any internal port of the master node cannot When the response is received, the chain network is determined to be in an off state;
  • the elected master node is a node other than the edge node in the chain network, when both internal ports in the master node receive the response, the chain network is determined to be closed; otherwise , conclude that the chain network is disconnected.
  • node 1 ie, edge node
  • the internal port connected to node 2 in node 1 receives the response sent by node 4.
  • it is determined that the chain network is in a closed state; otherwise, when the internal port connected to the node 2 in the node 1 cannot receive the response sent by the node 4, it is determined that the chain network is in an off state;
  • the support node 2 (ie, the non-edge node) is the master node, and when the two internal ports connected to the node 1 and the node 3 in the node 2 receive the response message sent by the node 4, it is determined that the chain network is Closed state; otherwise, any internal port in node 2 that is connected to node 1 or node 3 in the chain network cannot receive the response sent by node 4. At this time, it is determined that the chain network is in an off state.
  • Manner 2 In the case of a node other than the elected master node in the chain network, the node determines that it cannot receive the notification message sent by the master node, or cannot receive the response message sent by the edge node. , determining that the link of the link is interrupted, and determining that the chain network is disconnected;
  • the link that has been interrupted includes: a link in the chain network where communication is interrupted, or a link in the chain network that is connected to a port where communication is interrupted.
  • the node determines that its own link is interrupted when it determines that it cannot receive the notification message sent by the master node;
  • the node determines that it cannot receive the notification message sent by the master node, or cannot receive the response message of the edge node itself. Determine that your link is down.
  • the primary node is node 3, and for node 1 (ie, an edge node), if the internal port connected to node 2 in node 1 cannot receive the node 3, when the notification message is sent, the node 1 determines that the link of the link is interrupted, and further determines that the chain network is in an off state;
  • node 1 ie, an edge node
  • node 2 ie, non-edge node
  • the node 2 determines that the link of its own is interrupted, and further determines that the chain network is in the off state.
  • the re-determining the master node of the chain network in step 13 specifically includes the following steps:
  • a node in the chain network connected to both ends of the interrupt link determines itself as a new master node
  • Each newly determined master node sets its own port connected to the interrupt link to a blocking state, and sends a notification through its own two ports;
  • the original master node of the chain network After receiving the notification sent by the newly determined master node, the original master node of the chain network sets the port with its blocking state to the forwarding state according to the priority carried in the notification message, thereby realizing Redundant fast switching improves the reliability of the chain network.
  • the interrupt link referred to in the embodiment of the present invention is: a link in which a communication interruption occurs in the chain network, or a link in the chain network that is connected to a port in which a communication interruption occurs.
  • the primary node of the chain network is node 3, when node 1 and node 2 determine the link between node 1 and node 2 according to the above manner 2 or
  • nodes 1 and 2 convert themselves to the new master node, and node 1 connects itself to the end of the interrupt link.
  • the port is switched from the forwarding state to the blocking state, and the port 2 connects the port that is connected to the interrupting link to the blocking state by the forwarding state; and, the node 1 and the node 2 pass through the respective internal ports to the chain network.
  • the other node sends a notification packet, and the link state information of the notification packet further includes an interrupt priority.
  • the structure of the chain network is as shown in FIG. 4, including nodes 1 to 5, where node 1 and node 5 are edge nodes, assuming that the primary node elected in the initial state is node 4, each The node determines the on/off state of the chain network by receiving the network management message. At this time, if there is an interruption link between the node 2 and the node 3, then:
  • the node 3 Since the node 3 can receive the notification message sent by the node 4, but cannot receive the response message sent by the edge node 1, the node 3 determines that the link between itself and the node 2 is interrupted, and at the same time The self-determined as the new master node, the state of the port connected to the node 2 is set to the blocking state, and the notification packet is sent through the two ports included in the notification packet (the notification packet carries the interrupt priority level);
  • the node 2 Since the node 2 cannot receive the notification message sent by the node 4, and cannot receive the response message sent by the node 1, the node 2 determines that the link between itself and the node 1 and the node 3 is An interrupt occurs, and the user is determined to be the new master node. The status of the port connected to the node 1 and the node 3 is set to be blocked, and the notification packet is sent through the two ports. Interrupt priority),
  • node 1 Since node 1 cannot receive the notification message sent by node 4, node 1 determines that the link between itself and node 2 is interrupted, and at the same time determines itself as the new master node, and connects the port to node 2. The status is set to the blocking state, and the notification packet is sent through the internal port included in the notification packet (the notification packet carries the interrupt priority level); the processing procedures of the node 1, the node 2, and the node 3 are not sequential;
  • the node 2 determines that the link communication between itself and the node 1 is normal, and converts the state of the port connected to the node 1 from the blocked state to the forwarding state; However, since the node 2 does not receive the notification message sent by the node 3, the node 2 still considers that the link between itself and the node 3 is interrupted, and maintains the blocking state of the port connected to the node 3 itself;
  • the node 4 determines that the notification message includes an interrupt priority. Because the interrupt priority level is the highest, the node 4 converts itself. As a non-primary node, That is, the node 4 sets the port with the blocking state included in the node 4 as the forwarding state. As shown in FIG. 5, in the case of a chain network interruption, the chain network includes two master nodes, namely, node 2 and node 3. , thus achieving redundant fast switching.
  • the newly determined master node determines whether the interrupt link resumes communication according to the following manner:
  • the master node In the mode A, the master node actively detects the state of the port included in the master node to determine whether the interrupted link resumes communication. Specifically, after detecting that the port connected to the interrupt link resumes communication, the master node determines the interrupted link. Resume communication.
  • Method B The primary node determines whether the interrupted link resumes communication according to whether a notification message sent by another primary node is received.
  • re-determining the main node of the chain network specifically includes the following steps:
  • the port with the blocked state in the node that is not elected as the master node in the original primary node is set to the forwarding state.
  • nodes 1 and 2 are still the master node, and node 1 and node 2 are the master nodes.
  • the notification message is sent to the other nodes in the chain network through the internal port.
  • the node 1 and the node 2 re-elect the link according to the received notification message and the link state information carried in the notification message sent by the node.
  • the master node of the network assuming that the re-elected master node is node 2, node 1 sets the current state of the port with its blocked state to the forwarding state, as shown in FIG. 6.
  • the process of re-electing the primary node of the chain network is similar to the process of electing the primary node in the initial state. The difference is that after the link resumes communication, one node is re-elected from the current two primary nodes.
  • the main section of the chain network In the embodiment of the present invention, after the interrupted link of the chain network resumes communication, one of the two current master nodes is re-determined as the master node, and the node that is not re-determined as the master node is re-determined.
  • the conversion to a non-primary node that is, the current state of the port with the blocked state in the node is converted to the forwarding state), thereby improving the repair speed of the chain network and improving the reliability of the chain network.
  • the above method processing flow can be implemented by a software program, which can be stored in a storage medium shield, and when the stored software program is called, the above method steps are performed.
  • a node of a chain network is also provided in the embodiment of the present invention. Since the principle of solving the problem of the node is similar to the above-mentioned redundancy implementation method based on the chain network, the implementation of the node can be referred to the method. Implementation, repetition will not be repeated.
  • the primary node election module 71 elects the primary node of the chain network;
  • the port setting module 72 is configured to: after determining that the master node is the master node, set one of the two ports included in the port to be in a blocking state, and set the other one to a forwarding state, and periodically send the two ports to the local chain network.
  • the notification message where the edge node of the chain network returns a response message after receiving the notification message, and the edge node is used to restrict the chain network management message running in the chain network to be forwarded in the chain network.
  • the network management message includes a notification message and a response message;
  • the network status determining module 73 is configured to determine, according to whether the network management packet of the chain network is received, determine the on/off state of the chain network, and trigger the master node election module 71 when determining that the link network is interrupted by the link network. Re-determine the primary node of the chained network.
  • the network state determining module 73 is further configured to:
  • the master node election module 71 is further configured to: determine that it is a new master node;
  • the master node election module 71 is further configured to: according to the notifications sent by other master nodes, from all current master nodes Re-electing the primary node of the chain network;
  • the port setting module 72 is further configured to: when it is not elected as the master node, the port that has its own blocking state Set to forwarding state.
  • the external network in the embodiment of the present invention may be a ring network or another chain network. As shown in FIG. 8, FIG. 8 shows a case where the external network is a ring network.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Abstract

Disclosed are a method and a node for implementing redundancy on the basis of a chain network, so as to solve the problem that the existing redundancy switching mode needs a large amount of network device overhead and long link switching time. The method in the embodiments of the present invention comprises: each node of a chain network selecting a main node of the chain network according to a received notification packet sent by another node; the selected main node setting one of two ports comprised by the selected main node to a blocking state, and setting the other port to a forwarding state, and periodically sending the notification packet by using the two ports, and an edge node returning a response packet after the edge node receives the notification packet; and each node determining ON and OFF states of the chain network on the basis that whether a network management packet of the chain network is received, and when each node determines that link interruption occurs on the chain network, again determining the main node of the chain network. By using the technical solutions of the present invention, rapid switching of the redundancy can be implemented, the repairing speed can be improved, and the reliability of the network can be improved.

Description

基于链状网络的冗余实现方法及节点 本申请要求在 2012年 11月 23 日提交中国专利局、 申请号为 201210485016.7、发明名 称为"基于链状网络的冗余实现方法及节点"的中国专利申请的优先权, 其全部内容通过引 用结合在本申请中。 技术领域  Redundant implementation method and node based on chain network This application claims to be submitted to the Chinese Patent Office on November 23, 2012, the application number is 201210485016.7, and the invention is entitled "Redundant Implementation Method and Node Based on Chain Network" Priority of the application, the entire contents of which are incorporated herein by reference. Technical field
本发明涉及网络通讯技术领域, 尤其涉及基于链状网络的冗余实现方法及节点。 背景技术  The present invention relates to the field of network communication technologies, and in particular, to a redundancy implementation method and a node based on a chain network. Background technique
多个环形网络的数据和协议 ·ί艮文进行交互时, 需要考虑以下两个方面: 一是确保 4艮文 在环形网络间传输时不出现网络风暴, 因为网络风暴的出现将会阻塞网络通信, 并耗尽网 络带宽资源; 二是 4艮文在环形网络间传输时实现链路备份。  When interacting with the data and protocols of multiple ring networks, you need to consider the following two aspects: First, ensure that there is no network storm when the four files are transmitted between the ring networks, because the occurrence of network storms will block network communication. And exhaust the network bandwidth resources; Second, the link is backed up when transmitting between the ring networks.
目前, 常釆用的冗余实现方案为: 多个环形网络分别连接两个网络设备, 正常工作状 态下, 各个环形网络之间通过其中的一个网络设备(以下称为第一网络设备)进行数据和 协议报文的交互, 而另一个网络设备作为备用设备(以下称为第二网络设备), 进行冗余 备份; 当某个环形网络与第一网络设备之间的通讯发生中断时, 该环形网络将通过第二网 络设备与其他环形网络进行数据和协议 4艮文的交互, 从而实现环形网络间的冗余备份。  At present, the redundant implementation scheme is: Multiple ring networks are connected to two network devices respectively. Under normal working conditions, data is transmitted between each ring network through one of the network devices (hereinafter referred to as the first network device). The interaction with the protocol packet, and the other network device acts as a backup device (hereinafter referred to as the second network device) for redundancy backup; when the communication between the ring network and the first network device is interrupted, the ring The network will exchange data and protocol with other ring networks through the second network device, thereby implementing redundant backup between the ring networks.
但是, 这种环形网络间的冗余实现方式至少需要两个网络设备, 在环形网络的数量不 断增加的情况下, 将需要更多的网络设备来支持这种冗余实现; 同时, 在多个环形网络间 发生网络倒换时, 由于需要倒换的网络设备至少需要改变一对端口的状态, 即从导通状态 变换为阻塞状态 (或从阻塞状态变换为导通状态), 因此, 链路倒换时间较长; 可见, 上 述冗余实现方式需要大量的网络设备开销和较长的链路倒换时间。  However, the redundancy implementation between such ring networks requires at least two network devices. In the case of an increasing number of ring networks, more network devices will be needed to support such redundancy implementations; When a network switchover occurs between ring networks, the network device that needs to be switched needs to change the state of a pair of ports, that is, from the on state to the blocked state (or from the blocked state to the conductive state). Therefore, the link switching time Longer; It can be seen that the above redundant implementation requires a large amount of network equipment overhead and a long link switching time.
综上所述, 现有的冗余实现方式需要大量的网络设备开销, 且需要较长的链路倒换时 间。 发明内容  In summary, the existing redundancy implementation requires a large amount of network equipment overhead and requires a long link switching time. Summary of the invention
本发明的目的是针对以上现有技术中的冗余倒换方式需要大量的网络设备开销, 且需 要较长的链路倒换时间的问题, 提出了基于链状网络的冗余实现方法和装置。  The object of the present invention is to solve the problem that the redundancy switching mode in the prior art requires a large amount of network equipment overhead and requires a long link switching time, and proposes a redundancy implementation method and apparatus based on a chain network.
为实现本发明的目的, 釆用了以下技术方案:  To achieve the objectives of the present invention, the following technical solutions are employed:
本发明实施例提供的基于链状网络的冗余实现方法, 所述链状网络包括边数个节点,, 其中, 所述链状网络中与外部网络连接的节点为边缘节点, 所述边缘节点用于将在链状网 络运行的网络管理 ·ί艮文限制在本链状网络中转发, 所述网络管理 ·ί艮文包括通知 ·ί艮文和应答 •ί艮文, 所述方法包括: The method for implementing the redundancy of the chain network according to the embodiment of the present invention, the chain network includes a plurality of nodes, wherein the node connected to the external network in the chain network is an edge node, and the edge node It is used to restrict network management running in a chain network to be forwarded in the chain network, and the network management includes a notification, a message, and a response. • 艮 艮, the method includes:
所述链状网络的各节点根据接收到的其他节点发送的通知报文, 选举出本链状网络的 主节点;  Each node of the chain network elects a primary node of the chain network according to the received notification message sent by other nodes;
选举出的主节点将自身包含的两个端口中的一个设为阻塞状态, 另一个设为转发状 态, 并通过该两个端口周期性向本链状网络发送通知报文, 其中, 所述链状网络的边缘节 点在接收到所述通知报文后返回应答报文;  The elected master node sets one of the two ports included in the switch to the blocking state, and the other is configured to send the notification message to the local chain network periodically through the two ports, where the chain is The edge node of the network returns a response message after receiving the notification message;
所述链状网络的各节点根据是否接收到本链状网络的网络管理报文, 判断所述链状网 络的通断状态, 并在确定本链状网络发生链路中断时, 重新确定本链状网络的主节点。  Each node of the chain network determines the on/off state of the chain network according to whether the network management packet of the chain network is received, and redetermines the link when determining that the link network is interrupted in the chain network. The primary node of the network.
优选的, 若为主节点, 判断所述链状网络的通断状态进一步包括:  Preferably, if the node is the master node, determining the on/off state of the chain network further includes:
所述链状网络的主节点在确定自身的所有内部端口都接收到所述边缘节点发送的应 答 ·ί艮文后, 确定本链状网络为闭合状态; 否则, 确定本链状网络为断开状态; 其中, 所述 内部端口为节点包含的能够接收和转发本链状网络的网络管理报文的端口;  The master node of the chain network determines that the local chain network is in a closed state after determining that all internal ports of its own network receive the response message sent by the edge node; otherwise, determining that the chain network is disconnected a state, wherein the internal port is a port that is included in the node and is capable of receiving and forwarding network management packets of the local chain network;
若为所述链状网络中除所述主节点之外的节点, 判断所述链状网络的通断状态进一步 包括:  If the node in the chain network is other than the master node, determining the on/off state of the chain network further includes:
该节点在确定自身不能接收到所述主节点发送的通知报文, 或不能接收到所述边缘节 点发送的应答报文时, 确定自身的链路发生中断。  The node determines that its own link is interrupted when it determines that it cannot receive the notification message sent by the primary node, or cannot receive the response message sent by the edge node.
优选的, 所述方法还包括:  Preferably, the method further includes:
所述链状网络的主节点主动检测自身包含的端口状态;  The primary node of the chain network actively detects the port status included by itself;
在检测到自身包含的某一端口发生中断时, 确定本链状网络为断开状态。  When it is detected that an interrupt is included in a port included in the port, it is determined that the chain network is in an off state.
优选的, 若本链状网络出现中断链路, 所述重新确定本链状网络的主节点包括: 所述链状网络中与所述中断链路两端连接的节点确定自身为新的主节点;  Preferably, if the link network has an interrupted link, the re-determining the primary node of the link network includes: the node connected to the two ends of the interrupt link in the chain network determines that it is a new primary node. ;
每个新确定的主节点将自身与所述中断链路连接的端口设为阻塞状态, 并通过自身的 两个端口发送通知 4艮文;  Each newly determined master node sets its own port connected to the interrupt link to a blocking state, and sends a notification through its own two ports;
所述链状网络的原主节点在接收到新确定的主节点发送的通知 ·ί艮文后, 根据该通知 ·ί艮 文中携带的中断优先级, 将自身具有阻塞状态的端口设为转发状态。  After receiving the notification sent by the newly determined master node, the original master node of the chain network sets the port with its blocked state to the forwarding state according to the interrupt priority level carried in the notification.
优选的,若本链状网络的中断链路恢复通讯,所述重新确定本链状网络的主节点包括: 所述链状网络中的主节点根据其他主节点发送的通知报文, 从当前所有主节点中, 重 新选举出本链状网络的主节点;  Preferably, if the interrupt link of the chain network resumes communication, the re-determining the master node of the chain network includes: the master node in the chain network according to the notification message sent by the other master node, from the current all In the master node, the primary node of the chain network is re-elected;
未被选举为主节点的节点将自身具有阻塞状态的端口设为转发状态。  A node that is not elected as the master node sets the port with its own blocked state to the forwarding state.
本发明实施例提供的链状网络的节点, 该节点包括:  A node of a chain network provided by an embodiment of the present invention, the node includes:
主节点选举模块, 根据接收到的其他节点发送的通知报文, 选举出本链状网络的主节 端口设置模块, 用于在确定自身为主节点后, 将自身包含的两个端口中的一个设为阻 塞状态, 另一个设为转发状态, 并通过该两个端口周期性向本链状网络发送通知报文, 其 中, 本链状网络中与外部网络连接的边缘节点在接收到本链状网络的主节点发送的通知 ·ί艮 文后返回应答报文, 所述边缘节点用于将在链状网络运行的链状网络管理报文限制在本链 状网络中转发, 所述网络管理报文包括通知报文和应答报文; The master node election module elects a main node port setting module of the chain network according to the received notification message sent by other nodes, and is used to determine one of the two ports included in the link node after determining that it is the master node. Set to block The plugging state, the other is set to the forwarding state, and the notification message is periodically sent to the chain network through the two ports, where the edge node connected to the external network in the chain network receives the master of the chain network After the notification sent by the node returns a response message, the edge node is configured to limit the chain network management packet running in the chain network to the local chain network, where the network management message includes a notification. Message and response message;
网络状态判断模块, 用于根据是否接收到本链状网络的网络管理报文, 判断所述链状 网络的通断状态, 并在确定本链状网络发生链路中断时, 触发所述主节点选举模块重新确 定本链状网络的主节点。  a network status determining module, configured to determine, according to whether a network management packet of the chain network is received, determine an on/off state of the chain network, and trigger the master node when determining that a link interruption occurs in the chain network The election module re-determines the primary node of the chain network.
优选的, 若该节点为主节点, 所述网络状态判断模块具体用于:  Preferably, if the node is a master node, the network state determining module is specifically configured to:
在确定自身的所有内部端口都接收到所述边缘节点发送的应答报文后, 确定本链状网 络为闭合状态; 否则, 确定本链状网络为断开状态; 其中, 所述内部端口为节点包含的能 够接收和转发本链状网络的网络管理报文的端口;  After determining that all the internal ports of the user receive the response message sent by the edge node, determine that the local chain network is in a closed state; otherwise, determine that the local chain network is in an open state; wherein the internal port is a node a port that can receive and forward network management messages of the chain network;
若该节点为本链状网络中除所述主节点之外的节点, 所述网络状态判断模块具体用 于:  If the node is a node other than the primary node in the chain network, the network state determining module is specifically configured to:
在确定自身在确定自身不能接收到所述主节点发送的通知 ·ί艮文, 或不能接收到所述边 缘节点发送的应答报文时, 确定自身的链路发生中断。  When it is determined that it is unable to receive the notification sent by the master node, or cannot receive the response message sent by the edge node, it determines that its own link is interrupted.
优选的, 若该节点为主节点, 所述网络状态判断模块还用于:  Preferably, if the node is a master node, the network state determining module is further configured to:
主动检测自身包含的端口状态; 在检测到自身包含的某一端口发生中断时, 确定本链 状网络为断开状态。  Proactively detect the status of the port it contains; When it detects that an interrupt is included in a port it contains, it determines that the link network is disconnected.
优选的, 若本链状网络出现中断链路;  Preferably, if the chain network has an interruption link;
若该节点为与所述中断链路连接的节点, 所述主节点选举模块还用于: 确定自身为新 的主节点; 及  If the node is a node connected to the interrupt link, the master node election module is further configured to: determine that it is a new master node; and
所述端口设置模块还用于: 将自身与所述中断链路连接的端口设为阻塞状态, 并通过 自身的两个端口发送通知 4艮文;  The port setting module is further configured to: set a port that is connected to the interrupt link to a blocking state, and send a notification by using two ports of the second port;
若该节点为原主节点, 所述端口设置模块还用于: 在接收到新确定的主节点发送的通 知报文后, 根据该通知报文中携带的中断优先级, 将自身具有阻塞状态的端口设为转发状 态。  If the node is the original master node, the port setting module is further configured to: after receiving the newly determined notification message sent by the master node, according to the interrupt priority level carried in the notification message, the port having the blocked state Set to forwarding state.
优选的, 若本链状网络的中断链路恢复通讯, 且该节点为某个当前主节点; 所述主节点选举模块还用于:根据其他主节点发送的通知 ·ί艮文,从当前所有主节点中, 重新选举出本链状网络的主节点;  Preferably, if the interrupt link of the chain network resumes communication, and the node is a current master node, the master node election module is further configured to: according to the notification sent by the other master node, from the current In the master node, the primary node of the chain network is re-elected;
所述端口设置模块还用于: 在自身未被选举为主节点时, 将自身具有阻塞状态的端口 设为转发状态。  The port setting module is further configured to: when the host is not elected as the master node, set the port with its blocked state to the forwarding state.
本发明提出的基于链状网络的冗余实现方法, 能够实现冗余的快速倒换, 提高网络的 修复速度, 提高网络的可靠性, 尤其是当选举出的主节点不在边缘节点的位置上时, 由于 链状网络中的其它节点从其连接的其它网络中的业务 ·ί艮文数据流可以从非主节点的端口 分流, 而不是仅仅从主节点的端口传输该业务报文数据流, 优化了整个链状网络的带宽资 源, 同时也减少业务 ·ί艮文在链状网络中传输的时间。 The method for implementing redundancy based on a chain network proposed by the present invention can implement redundant fast switching, improve network repair speed, and improve network reliability, especially when the elected primary node is not at the edge node position. Due to The other nodes in the chain network can be offloaded from the ports of the non-primary nodes from the traffic in the other networks to which they are connected, instead of merely transmitting the traffic data stream from the port of the master node, optimizing the entire The bandwidth resources of the chain network also reduce the time that the service is transmitted in the chain network.
本发明的其它特征和优点将在随后的说明书中阐述, 并且, 部分地从说明书中变得显 而易见, 或者通过实施本发明而了解。 本发明的目的和其他优点可通过在所写的说明书、 权利要求书、 以及附图中所特别指出的结构来实现和获得。  Other features and advantages of the invention will be set forth in the description which follows, and The objectives and other advantages of the invention will be realized and attained by the <RTI
下面通过附图和具体实施方式, 对本发明的技术方案做进一步的详细描述。 附图说明  The technical solutions of the present invention are further described in detail below through the accompanying drawings and specific embodiments. DRAWINGS
附图用来提供对本发明的进一步理解, 并且构成说明书的一部分, 与本发明的具体实 施方式一起用于解释本发明, 并不构成对本发明的限制。 在附图中:  The drawings are intended to provide a further understanding of the invention, and are intended to be a part of the description of the invention. In the drawing:
图 1为本发明实施例基于链状网络的冗余实现方法流程图;  1 is a flowchart of a method for implementing redundancy based on a chain network according to an embodiment of the present invention;
图 2为本发明实施例第一种链状网络的结构示意图;  2 is a schematic structural diagram of a first chain network according to an embodiment of the present invention;
图 3为本发明实施例第一种链状网络出现中断链路的结构示意图;  FIG. 3 is a schematic structural diagram of an interruption link of a first chain network according to an embodiment of the present invention; FIG.
图 4为本发明实施例第二种链状网络的结构示意图;  4 is a schematic structural diagram of a second chain network according to an embodiment of the present invention;
图 5为本发明实施例第二种链状网络出现中断链路的结构示意图;  FIG. 5 is a schematic structural diagram of an interruption link of a second chain network according to an embodiment of the present invention; FIG.
图 6为本发明实施例第一种链状网络的中断链路恢复通讯的结构示意图;  6 is a schematic structural diagram of an interrupt link recovery communication of a first chain network according to an embodiment of the present invention;
图 7为本发明实施例链状网络的节点的结构示意图;  7 is a schematic structural diagram of a node of a chain network according to an embodiment of the present invention;
图 8为本发明实施例中外部网络为环网网络的链状链路结构示意图。 具体实施方式  FIG. 8 is a schematic structural diagram of a chain link in which an external network is a ring network according to an embodiment of the present invention. detailed description
以下结合附图对本发明的优选实施方式进行说明, 应当理解, 此处所描述的优选实施 方式仅用于说明和解释本发明, 并不用于限定本发明。  The preferred embodiments of the present invention are described in conjunction with the accompanying drawings, and the preferred embodiments of the present invention are intended to illustrate and explain the invention.
本发明实施例的链状网络可以为现有拓朴网络结构 (如环形网络) 中的某一网络段, 即将该拓朴网络结构中部分连续的节点组成的网络段作为本发明实施例所说的链状网络, 以实现本拓朴网络结构的冗余备份, 或在多个环形网络相交或相切时, 将各环形网络的某 个网络段作为本发明实施例所说的链状网络, 以在某个网络出现中断时, 实现冗余备份。  The chain network of the embodiment of the present invention may be a network segment in an existing topology network structure (such as a ring network), that is, a network segment composed of a part of consecutive nodes in the topology network structure is used as an embodiment of the present invention. a chain network to implement redundant backup of the topology network structure, or when a plurality of ring networks intersect or are tangent, a certain network segment of each ring network is used as the chain network according to the embodiment of the present invention. To achieve redundant backups when there is an interruption in a network.
本发明实施例的链状网络的结构包括数个节点, 每个节点至少包括两个端口, 各个节 点之间通过链路连接, 这里的链路一般是实际的物理链路, 也可以是虚拟链路;  The structure of the chain network of the embodiment of the present invention includes a plurality of nodes, each node includes at least two ports, and each node is connected by a link, where the link is generally an actual physical link or a virtual link. Road
本发明实施例的链状网络中, 用于与外部网络连接的节点定义为边缘节点, 其中, 边 缘节点中与外部网络连接的端口定义为外接端口, 边缘节点中用于与本链状网络连接的端 口定义为内部端口;  In the chain network of the embodiment of the present invention, a node for connecting to an external network is defined as an edge node, wherein a port connected to the external network in the edge node is defined as an external port, and the edge node is used to connect with the chain network. Port is defined as an internal port;
具体的, 边缘节点的外接端口不转发本链状网络的网络管理报文, 以将链状网络运行 的链状网络管理 ·ί艮文限制在本链状网络中接收和转发; 其中, 网络管理 ·ί艮文至少包括基于 本链状网络的通知报文(Announce报文)和应答报文( Hello报文); Specifically, the external port of the edge node does not forward the network management packet of the chain network to run the chain network. The chain network management · 艮 限制 限制 限制 限制 接收 接收 接收 接收 ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; Message);
优选的, 边缘节点的外接端口可以接收和发送清表 ·ί艮文, 该清表 ·ί艮文用于清理网络拓 朴改变后的各个节点保存的 MAC地址表。  Preferably, the external port of the edge node can receive and send the clear table, and the clearing table is used to clear the MAC address table saved by each node after the network topology change.
本链状网络中除边缘节点外的其他节点包含的端口均为内部端口, 链状网络的各节点 的内部端口能够接收和发送本链状网络的网络管理报文, 也可以接收和转发本链状网络及 外部网络的清表报文( TopoChange报文), 本发明实施例中不对内部端口接收和转发的报 文类型进行限制。  All the nodes in the chain network except the edge node are internal ports. The internal ports of each node of the chain network can receive and send network management packets of the chain network, and can also receive and forward the link. In the embodiment of the present invention, the type of the packet received and forwarded by the internal port is not restricted in the clear network packet (TopoChange packet) of the external network.
在初始状态下, 链状网络的各节点所包含的端口的状态均为转发(Forwarding )状态。 本发明实施例基于链状网络的冗余实现方法, 如图 1所示, 该方法包括以下步骤: 步骤 11、 链状网络的各节点根据接收到的其他节点发送的通知报文, 选举出本链状网 络的主节点;  In the initial state, the states of the ports included in each node of the chain network are in the Forwarding state. The embodiment of the present invention is based on a redundancy implementation method of a chain network. As shown in FIG. 1 , the method includes the following steps: Step 11. Each node of the chain network elects a packet according to the received notification message sent by other nodes. The primary node of the chain network;
步骤 12、 选举出的主节点将自身包含的两个端口中的一个设为阻塞(Blocked )状态, 另一个设为转发状态, 并通过该两个端口周期性地向本链状网络发送通知报文, 其中, 链 状网络的边缘节点在接收到通知报文后返回应答报文;  Step 12: The elected primary node sets one of the two ports included in its own as a blocked state, and the other is set to a forwarding state, and periodically sends a notification to the chain network through the two ports. The edge node of the chain network returns a response message after receiving the notification message;
需要说明的是, 选举出的主节点中具有阻塞状态的端口用于阻塞外部网络发送的报 文, 从而避免 ·ί艮文在该链状网络与外部网络之间转发时形成网络风暴。  It should be noted that the blocked port in the master node is used to block the packets sent by the external network, so as to avoid network storms when forwarding between the chain network and the external network.
步骤 13、链状网络的各节点根据是否接收到本链状网络的网络管理报文, 判断链状网 络的通断状态, 并在确定本链状网络发生链路中断时, 重新确定本链状网络的主节点。  Step 13: Each node of the chain network determines the on/off state of the chain network according to whether the network management packet of the chain network is received, and redetermines the link when determining the link interruption of the chain network. The primary node of the network.
在实施中, 步骤 11中,根据本链状网络中各节点发送的通知 ·ί艮文选举出主节点, 具体 包括:  In the implementation, in step 11, according to the notification sent by each node in the chain network, the master node is elected, which specifically includes:
每个节点将本链状网络中的其他节点发送的通知报文及自身发送的通知报文携带的 链路状态信息进行比较, 以选举出本链状网络的主节点。  Each node compares the notification message sent by other nodes in the chain network with the link state information carried by the notification message sent by itself, so as to elect the master node of the chain network.
其中, 链路状态信息包括链路盾量、 MAC地址及优先级中的一种或组合;  The link state information includes one or a combination of a link shield quantity, a MAC address, and a priority.
需要说明的是, 本链状网络中的节点在将多个链路状态信息进行比较时, 所釆用的标 准可根据需要制定, 例如, 首先比较每个链路状态信息中包含的链路盾量, 选择最优的链 路盾量对应的节点作为主节点 (也可以选择最差的链路盾量对应的节点作为主节点, 还可 以选择指定的链路盾量对应的节点为主节点等); 若每个链路状态信息中包含的链路盾量 相同时, 再比较每个链路状态信息中包含的 MAC地址, 选择指定的 MAC地址对应的节 点为主节点(也可以选择最大的 MAC地址对应的节点为主节点, 还可以选择最 、的 MAC 地址对应的节点为主节点等);  It should be noted that when a node in the chain network compares multiple link state information, the adopted standard can be determined according to requirements. For example, first compare the link shield included in each link state information. Quantity, select the node corresponding to the optimal link shield quantity as the master node (you can also select the node corresponding to the worst link shield quantity as the master node, and also select the node corresponding to the specified link shield quantity as the master node, etc. If the link shields included in each link state information are the same, compare the MAC addresses contained in each link state information, and select the node corresponding to the specified MAC address as the master node (you can also select the largest one) The node corresponding to the MAC address is the master node, and the node corresponding to the most MAC address can also be selected as the master node, etc.);
其中, 链路盾量可以通过对节点之间发送的双向转发检测 ( BFD , Bidirectional Forwarding Detection ) 艮文进行检测而获得。 需要说明的是, 本发明实施例中只有主节点能够发送通知 ·ί艮文, 因此, 初始状态下, 链状网络的每个节点都默认自身为主节点, 并通过自身包含的两个端口发送通知报文。 The link shield can be obtained by detecting the Bidirectional Forwarding Detection (BFD) sent between the nodes. It should be noted that, in the embodiment of the present invention, only the master node can send the notification message. Therefore, in the initial state, each node of the chain network defaults to itself as the master node, and sends the two ports through the two ports. Notification message.
举例说明, 如图 2所示的链状网络结构, 其包括节点 1〜节点 4, 各个节点之间通过链 路连接, 图 2中的链状网络中的节点 1和节点 4分别与外部网络连接, 确定节点 1和节点 4为本链状网络的边缘节点, 节点 1和节点 4与外部网络连接的端口为外接端口, 其用于 将在链状网络运行的链状网络管理报文限制在本链状网络中接收和转发; 而节点 1和节点 4分别与节点 2和节点 3连接的端口为内部端口; 图 2中的节点 2与节点 3所包含的端口 为内部端口;  For example, the chain network structure shown in FIG. 2 includes nodes 1 to 4, and each node is connected by a link. Node 1 and node 4 in the chain network in FIG. 2 are respectively connected to an external network. It is determined that node 1 and node 4 are edge nodes of the chain network, and ports connected by node 1 and node 4 to the external network are external ports, which are used to limit the chain network management messages running in the chain network to the local The port connected to the node 2 and the node 3 is an internal port; the port included in the node 2 and the node 3 in FIG. 2 is an internal port;
初始状态时, 链状网络中的节点 1〜节点 4都默认自身为主节点, 则节点 1〜节点 4均 通过其内部端口向链状网络发送通知报文; 每个节点根据接收到的通知报文的链路状态信 息以及自身发送的通知报文的链路状态信息选举出本链状网络的主节点, 假设选举出的主 节点为节点 3 , 则将节点 3的一个端口设为阻塞状态, 例如, 将节点 3中与节点 2连接的 端口设为阻塞状态, 与节点 4连接的端口仍为转发状态, 其他节点的内部端口仍均为转发 状态。  In the initial state, nodes 1 to 4 in the chain network default to themselves as the master node, and nodes 1 to 4 all send notification messages to the chain network through their internal ports; each node reports according to the received notification. The link state information of the text and the link state information of the notification message sent by itself elect the master node of the chain network. If the elected master node is node 3, the port of node 3 is set to the blocking state. For example, the port connected to node 2 in node 3 is set to the blocking state, the port connected to node 4 is still in the forwarding state, and the internal ports of other nodes are still in the forwarding state.
需要说明的是, 图 2所示的链状网络的结构只是说明性的, 对于本领域的技术人员来 说, 本发明的实施例的链状网络的结构不应限于图 2举例的结构示意图。  It should be noted that the structure of the chain network shown in FIG. 2 is merely illustrative. For those skilled in the art, the structure of the chain network of the embodiment of the present invention should not be limited to the structure diagram illustrated in FIG. 2.
进一步, 根据节点类型的不同, 步骤 13 中判断链状网络的通断状态包括以下两种方 式:  Further, according to the type of the node, determining the on/off state of the chain network in step 13 includes the following two methods:
方式一、 若为选举出的主节点, 该主节点在确定自身的所有内部端口都接收到边缘节 点发送的应答 ·ί艮文后, 确定本链状网络为闭合状态; 否则, 确定本链状网络为断开状态。  Manner 1: If the master node is elected, the master node determines that the chain network is closed after all the internal ports of the own node have received the response sent by the edge node; otherwise, the chain is determined. The network is disconnected.
具体的, 若选举出的主节点为边缘节点, 则该主节点的内部端口接收到应答 ·ί艮文时, 断定该链状网络为闭合状态; 否则, 即该主节点的任一内部端口不能收到应答 ·ί艮文时, 断 定该链状网络为断开状态;  Specifically, if the elected master node is an edge node, the internal port of the master node determines that the chain network is closed when receiving the response message; otherwise, any internal port of the master node cannot When the response is received, the chain network is determined to be in an off state;
若选举出的主节点为本链状网络中除边缘节点之外的节点, 则该主节点中的两个内部 端口都接收到应答 ·ί艮文时, 断定该链状网络为闭合状态; 否则, 断定该链状网络为断开状 态。  If the elected master node is a node other than the edge node in the chain network, when both internal ports in the master node receive the response, the chain network is determined to be closed; otherwise , conclude that the chain network is disconnected.
举例说明, 仍以图 2所示链状网络的结构为例, 假设节点 1 (即边缘节点)为主节点, 则在节点 1中与节点 2连接的内部端口接收到节点 4发送的应答 ·ί艮文时, 判定该链状网络 为闭合状态; 否则, 即节点 1中与节点 2连接的内部端口不能接收到节点 4发送的应答 4艮 文时, 判定该链状网络为断开状态;  For example, still taking the structure of the chain network shown in FIG. 2 as an example, if node 1 (ie, edge node) is the master node, the internal port connected to node 2 in node 1 receives the response sent by node 4. In the case of the text, it is determined that the chain network is in a closed state; otherwise, when the internal port connected to the node 2 in the node 1 cannot receive the response sent by the node 4, it is determined that the chain network is in an off state;
支设节点 2 (即非边缘节点) 为主节点, 在节点 2中与节点 1和节点 3连接的两个内 部端口都接收到节点 4发送的应答 ·ί艮文时, 判定该链状网络为闭合状态; 否则, 即节点 2 中与链状网络中与节点 1或节点 3连接的任一内部端口不能接收到节点 4发送的应答 ·ί艮文 时, 判定该链状网络为断开状态。 The support node 2 (ie, the non-edge node) is the master node, and when the two internal ports connected to the node 1 and the node 3 in the node 2 receive the response message sent by the node 4, it is determined that the chain network is Closed state; otherwise, any internal port in node 2 that is connected to node 1 or node 3 in the chain network cannot receive the response sent by node 4. At this time, it is determined that the chain network is in an off state.
方式二、 若为链状网络中除选举出的主节点之外的节点, 该节点在确定自身不能接收 到主节点发送的通知报文, 或不能接收到所述边缘节点发送的应答报文时, 确定自身的链 路发生中断, 进而确定链状网络为断开状态;  Manner 2: In the case of a node other than the elected master node in the chain network, the node determines that it cannot receive the notification message sent by the master node, or cannot receive the response message sent by the edge node. , determining that the link of the link is interrupted, and determining that the chain network is disconnected;
其中, 发生中断的链路包括: 本链状网络中出现通讯中断的链路, 或本链状网络中与 出现通讯中断的端口连接的链路。  The link that has been interrupted includes: a link in the chain network where communication is interrupted, or a link in the chain network that is connected to a port where communication is interrupted.
具体的, 若该节点为边缘节点, 则该节点在确定自身不能接收到主节点发送的通知报 文时, 确定自身的链路发生中断;  Specifically, if the node is an edge node, the node determines that its own link is interrupted when it determines that it cannot receive the notification message sent by the master node;
若该节点为本链状网络中除边缘节点及主节点之外的节点, 则该节点在确定自身不能 接收到主节点发送的通知报文, 或自身不能接收到边缘节点的应答报文时, 确定自身的链 路发生中断。  If the node is a node other than the edge node and the master node in the chain network, the node determines that it cannot receive the notification message sent by the master node, or cannot receive the response message of the edge node itself. Determine that your link is down.
举例说明, 仍以图 2所示链状网络的结构为例, 假设主节点为节点 3 , 对于节点 1 (即 边缘节点)来说, 若节点 1中与节点 2连接的内部端口不能接收到节点 3发送的通知报文 时, 节点 1判定自身的链路发生中断, 进而判定该链状网络为断开状态;  For example, still take the structure of the chain network shown in FIG. 2 as an example, assuming that the primary node is node 3, and for node 1 (ie, an edge node), if the internal port connected to node 2 in node 1 cannot receive the node 3, when the notification message is sent, the node 1 determines that the link of the link is interrupted, and further determines that the chain network is in an off state;
对于节点 2 (即非边缘节点) 来说, 若节点 2中与节点 1连接的内部端口不能接收到 节点 1发送的应答报文,或与节点 3连接的内部端口不能接收到节点 3发送的通知报文时, 节点 2判定自身的链路发生中断, 进而判定该链状网络为断开状态。  For node 2 (ie, non-edge node), if the internal port connected to node 1 in node 2 cannot receive the response message sent by node 1, or the internal port connected to node 3 cannot receive the notification sent by node 3. At the time of the message, the node 2 determines that the link of its own is interrupted, and further determines that the chain network is in the off state.
优选的, 本发明实施例的方法还包括:  Preferably, the method of the embodiment of the present invention further includes:
链状网络的主节点主动检测自身包含的端口状态;  The master node of the chain network actively detects the state of the port it contains;
在检测到自身包含的某一端口发生中断时, 确定本链状网络为断开状态。  When it is detected that an interrupt is included in a port included in the port, it is determined that the chain network is in an off state.
进一步, 若本链状网络出现中断链路, 步骤 13 中重新确定本链状网络的主节点具体 包括以下步骤:  Further, if the link network has an interrupted link, the re-determining the master node of the chain network in step 13 specifically includes the following steps:
链状网络中与该中断链路两端连接的节点确定自身为新的主节点;  A node in the chain network connected to both ends of the interrupt link determines itself as a new master node;
每个新确定的主节点将自身与该中断链路连接的端口设为阻塞状态, 并通过自身的两 个端口发送通知 4艮文;  Each newly determined master node sets its own port connected to the interrupt link to a blocking state, and sends a notification through its own two ports;
链状网络的原主节点在接收到新确定的主节点发送的通知 ·ί艮文后, 根据该通知 ·ί艮文中 携带的优先级, 将自身具有阻塞状态的端口设为转发状态, 从而实现了冗余的快速倒换, 提高了链状网络的可靠性。  After receiving the notification sent by the newly determined master node, the original master node of the chain network sets the port with its blocking state to the forwarding state according to the priority carried in the notification message, thereby realizing Redundant fast switching improves the reliability of the chain network.
本发明实施例所指的中断链路为: 本链状网络中出现通讯中断的链路, 或本链状网络 中与出现通讯中断的端口连接的链路。  The interrupt link referred to in the embodiment of the present invention is: a link in which a communication interruption occurs in the chain network, or a link in the chain network that is connected to a port in which a communication interruption occurs.
举例说明, 仍以图 2所示的链状网络结构为例, 假设链状网络的主节点为节点 3 , 当 节点 1和节点 2根据上述方式二确定节点 1与节点 2之间的链路或端口出现通讯中断时, 如图 3所示, 节点 1和 2将自身转换为新的主节点, 节点 1将自身与该中断链路连接的端 口由转发状态转换为阻塞状态, 且节点 2将自身与该中断链路连接的端口也由转发状态转 换为阻塞状态; 并且, 节点 1和节点 2通过各自包含的内部端口向链状网络中的其它节点 发送通知报文, 该通知报文的链路状态信息还包含中断优先级; For example, still taking the chain network structure shown in FIG. 2 as an example, assuming that the primary node of the chain network is node 3, when node 1 and node 2 determine the link between node 1 and node 2 according to the above manner 2 or When the communication interruption occurs in the port, as shown in Figure 3, nodes 1 and 2 convert themselves to the new master node, and node 1 connects itself to the end of the interrupt link. The port is switched from the forwarding state to the blocking state, and the port 2 connects the port that is connected to the interrupting link to the blocking state by the forwarding state; and, the node 1 and the node 2 pass through the respective internal ports to the chain network. The other node sends a notification packet, and the link state information of the notification packet further includes an interrupt priority.
相应的, 原主节点 (即节点 3 )在接收到该新确定的主节点 (即节点 2 )发送的通知 报文后, 确定该通知报文包含中断优先级, 由于中断优先级的级别最高, 则节点 3将自身 转换为非主节点, 即节点 3将自身包含的具有阻塞状态的端口设为转发状态,如图 3所示; 在链状网络发生中断情况下, 该链状网络中同时包括两个主节点, 即节点 1和节点 2, 从 而实现了冗余的快速倒换。  Correspondingly, after receiving the notification message sent by the newly determined primary node (ie, node 2), the original primary node (ie, node 3) determines that the notification message includes an interrupt priority, and because the interrupt priority level is the highest, Node 3 converts itself to a non-primary node, that is, node 3 sets its own blocked port to be in the forwarding state, as shown in Figure 3; in the case of a chain network interruption, the chain network includes both The master nodes, node 1 and node 2, implement redundant fast switching.
再举一个例子进行说明, 链状网络的结构如图 4所示, 包括节点 1〜节点 5 , 其中, 节 点 1与节点 5为边缘节点, 假设初始状态下选举出的主节点为节点 4, 各节点通过是否接 收到网络管理 4艮文, 确定链状网络的通断状态, 此时, 若节点 2与节点 3之间出现中断链 路, 则:  As another example, the structure of the chain network is as shown in FIG. 4, including nodes 1 to 5, where node 1 and node 5 are edge nodes, assuming that the primary node elected in the initial state is node 4, each The node determines the on/off state of the chain network by receiving the network management message. At this time, if there is an interruption link between the node 2 and the node 3, then:
1、 由于节点 3能够接收到节点 4发送的通知报文, 但不能接收到边缘节点 1发送的 应答 ·ί艮文, 因此, 节点 3确定自身与节点 2之间的链路发生中断, 同时将自身确定为新的 主节点, 将与节点 2连接的端口的状态设为阻塞状态, 并通过自身包含的两个端口发送通 知报文(该通知报文中携带中断优先级);  1. Since the node 3 can receive the notification message sent by the node 4, but cannot receive the response message sent by the edge node 1, the node 3 determines that the link between itself and the node 2 is interrupted, and at the same time The self-determined as the new master node, the state of the port connected to the node 2 is set to the blocking state, and the notification packet is sent through the two ports included in the notification packet (the notification packet carries the interrupt priority level);
2、 由于节点 2也不能接收到节点 4发送的通知报文, 且也不能接收到节点 1发送的 应答 ·ί艮文, 因此, 节点 2确定自身与节点 1及节点 3之间的链路均发生中断, 同时将自身 确定为新的主节点, 将与节点 1及节点 3连接的端口的状态均设为阻塞状态, 并通过自身 包含的两个端口发送通知报文(该通知报文中携带中断优先级),  2. Since the node 2 cannot receive the notification message sent by the node 4, and cannot receive the response message sent by the node 1, the node 2 determines that the link between itself and the node 1 and the node 3 is An interrupt occurs, and the user is determined to be the new master node. The status of the port connected to the node 1 and the node 3 is set to be blocked, and the notification packet is sent through the two ports. Interrupt priority),
3、 由于节点 1 不能接收到节点 4发送的通知报文, 因此, 节点 1确定自身与节点 2 之间的链路发生中断, 同时将自身确定为新的主节点, 将与节点 2连接的端口的状态设为 阻塞状态, 并通过自身包含的内部端口发送通知报文(该通知报文中携带中断优先级); 上述节点 1、 节点 2及节点 3的处理过程没有先后顺序;  3. Since node 1 cannot receive the notification message sent by node 4, node 1 determines that the link between itself and node 2 is interrupted, and at the same time determines itself as the new master node, and connects the port to node 2. The status is set to the blocking state, and the notification packet is sent through the internal port included in the notification packet (the notification packet carries the interrupt priority level); the processing procedures of the node 1, the node 2, and the node 3 are not sequential;
相应的, 节点 1在接收到节点 2发送的通知 4艮文后, 确定自身与节点 2之间的链路通 讯正常, 同时将自身确定为非主节点, 将自身与节点 2连接的端口的状态由阻塞状态转换 为转发状态;  Correspondingly, after receiving the notification 4 sent by the node 2, the node 1 determines that the link communication between itself and the node 2 is normal, and at the same time determines itself as a non-master node, and the state of the port connected to the node 2 itself. Transition from blocking state to forwarding state;
相应的, 节点 2在接收到节点 1发送的通知 4艮文后, 确定自身与节点 1之间的链路通 讯正常, 同时将自身与节点 1连接的端口的状态由阻塞状态转换为转发状态; 但由于节点 2未接收到节点 3发送的通知报文, 因此, 节点 2仍认为自身与节点 3之间的链路发生中 断, 并保持自身与节点 3连接的端口的阻塞状态;  Correspondingly, after receiving the notification message sent by the node 1, the node 2 determines that the link communication between itself and the node 1 is normal, and converts the state of the port connected to the node 1 from the blocked state to the forwarding state; However, since the node 2 does not receive the notification message sent by the node 3, the node 2 still considers that the link between itself and the node 3 is interrupted, and maintains the blocking state of the port connected to the node 3 itself;
相应的, 节点 4在接收到该新确定的主节点 (即节点 3 )发送的通知报文后, 确定该 通知报文包含中断优先级, 由于中断优先级的级别最高,则节点 4将自身转换为非主节点, 即节点 4将自身包含的具有阻塞状态的端口设为转发状态, 如图 5所示, 在链状网络发生 中断情况下, 该链状网络中同时包括两个主节点, 即节点 2和节点 3 , 从而实现了冗余的 快速倒换。 Correspondingly, after receiving the notification message sent by the newly determined master node (ie, node 3), the node 4 determines that the notification message includes an interrupt priority. Because the interrupt priority level is the highest, the node 4 converts itself. As a non-primary node, That is, the node 4 sets the port with the blocking state included in the node 4 as the forwarding state. As shown in FIG. 5, in the case of a chain network interruption, the chain network includes two master nodes, namely, node 2 and node 3. , thus achieving redundant fast switching.
进一步, 链状网络在出现中断链路后, 新确定的主节点 (即与中断链路连接的节点) 根据以下方式确定该中断链路是否恢复通讯:  Further, after the chain link occurs, the newly determined master node (ie, the node connected to the interrupt link) determines whether the interrupt link resumes communication according to the following manner:
方式 A、 主节点主动检测自身包含的端口状态, 以确定该中断链路是否恢复通讯; 具体的, 该主节点在检测到自身与该中断链路连接的端口恢复通讯后, 确定该中断链 路恢复通讯。  In the mode A, the master node actively detects the state of the port included in the master node to determine whether the interrupted link resumes communication. Specifically, after detecting that the port connected to the interrupt link resumes communication, the master node determines the interrupted link. Resume communication.
方式 B、 主节点根据是否接收到另一主节点发送的通知报文, 以确定该中断链路是否 恢复通讯;  Method B: The primary node determines whether the interrupted link resumes communication according to whether a notification message sent by another primary node is received.
具体的,该主节点在接收到另一主节点发送的通知 ·ί艮文后,确定该中断链路恢复通讯。 进一步, 步骤 13 中, 若链状网络的中断链路恢复通讯, 重新确定本链状网络的主节 点具体包括以下步骤:  Specifically, after receiving the notification sent by another master node, the master node determines that the interrupt link resumes communication. Further, in step 13, if the interrupted link of the chain network resumes communication, re-determining the main node of the chain network specifically includes the following steps:
根据当前每个主节点发送的通知报文, 从与该中断链路连接的两个主节点中, 重新选 举出本链状网络的主节点; 及  Reselecting the master node of the chain network from the two master nodes connected to the interrupt link according to the notification message sent by each master node; and
将原主节点中未被选举为主节点的节点中的具有阻塞状态的端口设为转发状态。  The port with the blocked state in the node that is not elected as the master node in the original primary node is set to the forwarding state.
仍以图 3所示的中断链路为例, 当节点 1和节点 2之间的链路或端口恢复通讯时, 此 时节点 1和 2仍为主节点, 作为主节点的节点 1和节点 2通过其内部端口向链状网络中的 其它节点发送通知报文, 节点 1和节点 2分别根据接收到的通知报文及自身发送的通知报 文中携带的链路状态信息, 重新选举出本链状网络的主节点, 假设重新选举出的主节点为 节点 2 , 则节点 1将其具有阻塞状态的端口的当前状态设为转发状态, 如图 6所示。 其中, 重新选举链状网络的主节点的过程与上述初始状态下选举其主节点的过程相似, 不同的地 方是, 链路恢复通讯后, 从当前的两个主节点中, 重新选举一个节点作为链状网络的主节 本发明实施例中, 在链状网络的中断链路在恢复通讯后, 从当前的两个主节点中重新 确定一个作为主节点, 将未被重新确定为主节点的节点转换为非主节点 (即将该节点中具 有阻塞状态的端口的当前状态转换为转发状态), 从而提高了链状网络的修复速度, 提高 了链状网络的可靠性。  Still taking the interrupt link shown in Figure 3 as an example, when the link or port between node 1 and node 2 resumes communication, nodes 1 and 2 are still the master node, and node 1 and node 2 are the master nodes. The notification message is sent to the other nodes in the chain network through the internal port. The node 1 and the node 2 re-elect the link according to the received notification message and the link state information carried in the notification message sent by the node. As the master node of the network, assuming that the re-elected master node is node 2, node 1 sets the current state of the port with its blocked state to the forwarding state, as shown in FIG. 6. The process of re-electing the primary node of the chain network is similar to the process of electing the primary node in the initial state. The difference is that after the link resumes communication, one node is re-elected from the current two primary nodes. The main section of the chain network In the embodiment of the present invention, after the interrupted link of the chain network resumes communication, one of the two current master nodes is re-determined as the master node, and the node that is not re-determined as the master node is re-determined. The conversion to a non-primary node (that is, the current state of the port with the blocked state in the node is converted to the forwarding state), thereby improving the repair speed of the chain network and improving the reliability of the chain network.
上述方法处理流程可以用软件程序实现, 该软件程序可以存储在存储介盾中, 当存储 的软件程序被调用时, 执行上述方法步骤。  The above method processing flow can be implemented by a software program, which can be stored in a storage medium shield, and when the stored software program is called, the above method steps are performed.
基于同一发明构思, 本发明实施例中还提供了一种链状网络的节点, 由于该节点解决 问题的原理与上述基于链状网络的冗余实现方法相似, 因此该节点的实施可以参见方法的 实施, 重复之处不再赘述。 本发明实施例提供的链状网络的节点, 如图 7所示, 该节点包括: Based on the same inventive concept, a node of a chain network is also provided in the embodiment of the present invention. Since the principle of solving the problem of the node is similar to the above-mentioned redundancy implementation method based on the chain network, the implementation of the node can be referred to the method. Implementation, repetition will not be repeated. A node of a chain network provided by an embodiment of the present invention, as shown in FIG. 7, the node includes:
主节点选举模块 71 , 根据接收到的其他节点发送的通知报文, 选举出本链状网络的主 节点;  The primary node election module 71, according to the received notification message sent by other nodes, elects the primary node of the chain network;
端口设置模块 72, 用于在确定自身为主节点后, 将自身包含的两个端口中的一个设为 阻塞状态, 另一个设为转发状态, 并通过该两个端口周期性向本链状网络发送通知报文, 其中, 链状网络的边缘节点在接收到通知报文后返回应答报文, 边缘节点用于将在链状网 络运行的链状网络管理报文限制在本链状网络中转发, 网络管理报文包括通知报文和应答 报文;  The port setting module 72 is configured to: after determining that the master node is the master node, set one of the two ports included in the port to be in a blocking state, and set the other one to a forwarding state, and periodically send the two ports to the local chain network. The notification message, where the edge node of the chain network returns a response message after receiving the notification message, and the edge node is used to restrict the chain network management message running in the chain network to be forwarded in the chain network. The network management message includes a notification message and a response message;
网络状态判断模块 73 , 用于根据是否接收到本链状网络的网络管理报文, 判断链状网 络的通断状态, 并在确定本链状网络发生链路中断时, 触发主节点选举模块 71 重新确定 本链状网络的主节点。  The network status determining module 73 is configured to determine, according to whether the network management packet of the chain network is received, determine the on/off state of the chain network, and trigger the master node election module 71 when determining that the link network is interrupted by the link network. Re-determine the primary node of the chained network.
进一步, 若该节点为主节点, 网络状态判断模块 73具体用于:  Further, if the node is a master node, the network state determining module 73 is specifically configured to:
在确定自身的所有内部端口都接收到边缘节点发送的应答报文后, 确定本链状网络为 闭合状态; 否则, 确定本链状网络为断开状态; 其中, 内部端口为节点包含的能够接收和 转发本链状网络的网络管理 ·ί艮文的端口;  After determining that all internal ports of the user receive the response message sent by the edge node, determine that the chain network is in a closed state; otherwise, determine that the chain network is in a disconnected state; wherein, the internal port is capable of receiving the node And forwarding the port of the network management of the chain network.
若该节点为本链状网络中除主节点之外的节点, 网络状态判断模块 73具体用于: 在确定自身在确定自身不能接收到主节点发送的通知报文, 或不能接收到边缘节点发 送的应答报文时, 确定自身的链路发生中断。  If the node is a node other than the master node in the chain network, the network state determining module 73 is specifically configured to: determine that the user cannot receive the notification message sent by the master node, or cannot receive the edge node to send When replying to a message, it is determined that its own link is interrupted.
进一步, 若该节点为主节点, 网络状态判断模块 73还用于:  Further, if the node is a master node, the network state determining module 73 is further configured to:
主动检测自身包含的端口状态; 在检测到自身包含的某一端口发生中断时, 确定本链 状网络为断开状态。  Proactively detect the status of the port it contains; When it detects that an interrupt is included in a port it contains, it determines that the link network is disconnected.
进一步, 若本链状网络出现中断链路;  Further, if the chain network has an interruption link;
若该节点为与中断链路连接的节点, 主节点选举模块 71 还用于: 确定自身为新的主 节点; 及  If the node is a node connected to the interrupt link, the master node election module 71 is further configured to: determine that it is a new master node;
端口设置模块 72还用于: 将自身与中断链路连接的端口设为阻塞状态, 并通过自身 的两个端口发送通知 4艮文;  The port setting module 72 is further configured to: set a port connected to the interrupt link to be blocked, and send a notification through two ports of the port;
若该节点为原主节点, 端口设置模块 72还用于: 在接收到新确定的主节点发送的通 知报文后, 根据该通知报文中携带的中断优先级, 将自身具有阻塞状态的端口设为转发状 态。  If the node is the original master node, the port setting module 72 is further configured to: after receiving the newly determined notification message sent by the master node, set the port with the blocking state according to the interrupt priority carried in the notification message. For forwarding status.
进一步, 若本链状网络的中断链路恢复通讯, 且该节点为某个当前主节点; 主节点选举模块 71还用于: 根据其他主节点发送的通知 ·ί艮文, 从当前所有主节点中, 重新选举出本链状网络的主节点;  Further, if the interrupt link of the chain network resumes communication, and the node is a current master node, the master node election module 71 is further configured to: according to the notifications sent by other master nodes, from all current master nodes Re-electing the primary node of the chain network;
端口设置模块 72还用于: 在自身未被选举为主节点时, 将自身具有阻塞状态的端口 设为转发状态。 The port setting module 72 is further configured to: when it is not elected as the master node, the port that has its own blocking state Set to forwarding state.
需要说明的是, 本发明实施例的外部网络可以是环形网络, 也可以是另外的一个链状 网络, 如图 8所示, 图 8给出了外部网络为环形网络的情形。  It should be noted that the external network in the embodiment of the present invention may be a ring network or another chain network. As shown in FIG. 8, FIG. 8 shows a case where the external network is a ring network.
本领域的技术人员应明白, 本申请的实施例可提供为方法、 装置 (设备)、 或计算机 程序产品。 因此, 本申请可釆用完全硬件实施例、 完全软件实施例、 或结合软件和硬件方 面的实施例的形式。 而且, 本申请可釆用在一个或多个其中包含有计算机可用程序代码的 计算机可用存储介盾 (包括但不限于磁盘存储器、 CD-ROM、 光学存储器等)上实施的计 算机程序产品的形式。  Those skilled in the art will appreciate that embodiments of the present application can be provided as a method, apparatus (device), or computer program product. Thus, the application can be in the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the application can be in the form of a computer program product embodied on one or more computer-usable storage modules (including but not limited to disk storage, CD-ROM, optical storage, etc.) in which computer usable program code is embodied.
本申请是参照根据本申请实施例的方法、 装置(设备 )和计算机程序产品的流程图和 /或方框图来描述的。 应理解可由计算机程序指令实现流程图和 /或方框图中的每一流程和 / 或方框、 以及流程图和 /或方框图中的流程和 /或方框的结合。 可提供这些计算机程序指令 到通用计算机、 专用计算机、 嵌入式处理机或其他可编程数据处理设备的处理器以产生一 个机器, 使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在 流程图一个流程或多个流程和 /或方框图一个方框或多个方框中指定的功能的装置。  The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus, and computer program products according to embodiments of the present application. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing the functions specified in one or more of the flow or in a block or blocks of the flow chart.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方 式工作的计算机可读存储器中, 使得存储在该计算机可读存储器中的指令产生包括指令装 置的制造品,该指令装置实现在流程图一个流程或多个流程和 /或方框图一个方框或多个方 框中指定的功能。  The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上, 使得在计算机 或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理, 从而在计算机或其他 可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和 /或方框图一个方 框或多个方框中指定的功能的步骤。  These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. The instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
最后应说明的是: 以上所述仅为本发明的优选实施方式而已, 并不用于限制本发明, 尽管参照前述实施方式对本发明进行了详细的说明, 对于本领域的技术人员来说, 其依然 可以对前述各实施方式所记载的技术方案进行修改, 或者对其中部分技术特征进行等同替 换。 凡在本发明的精神和原则之内, 所作的任何修改、 等同替换、 改进等, 均应包含在本 发明的保护范围之内。  It should be noted that the above description is only a preferred embodiment of the present invention, and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art Modifications may be made to the technical solutions described in the foregoing embodiments, or some of the technical features may be equivalently replaced. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.

Claims

权 利 要 求 Rights request
1、 基于链状网络的冗余实现方法, 其特征在于, 所述链状网络包括数个节点, 其中, 所述链状网络中与外部网络连接的节点为边缘节点, 所述边缘节点用于将在链状网络运行 的网络管理报文限制在本链状网络中转发, 所述网络管理报文包括通知报文和应答报文, 所述方法包括: 1. A redundancy implementation method based on a chain network, characterized in that the chain network includes several nodes, wherein the nodes connected to the external network in the chain network are edge nodes, and the edge nodes are used for Restrict network management messages running in the chain network to be forwarded in this chain network. The network management messages include notification messages and response messages. The method includes:
所述链状网络的各节点根据接收到的其他节点发送的通知报文, 选举出本链状网络的 主节点; Each node of the chain network elects the master node of the chain network based on the received notification messages sent by other nodes;
选举出的主节点将自身包含的两个端口中的一个设为阻塞状态, 另一个设为转发状 态, 并通过该两个端口周期性向本链状网络发送通知报文, 其中, 所述链状网络的边缘节 点在接收到所述通知报文后返回应答报文; The elected master node sets one of the two ports it contains to the blocking state and the other to the forwarding state, and periodically sends notification messages to the chain network through the two ports, wherein, the chain network The edge node of the network returns a response message after receiving the notification message;
所述链状网络的各节点根据是否接收到本链状网络的网络管理报文, 判断所述链状网 络的通断状态, 并在确定本链状网络发生链路中断时, 重新确定本链状网络的主节点。 Each node of the chain network determines the on-off status of the chain network based on whether it receives the network management message of the chain network, and when it is determined that a link interruption occurs in the chain network, re-determine the link of the chain network. The master node of the network.
2、 根据权利要求 1 所述的基于链状网络冗余实现方法, 其特征在于, 若为主节点, 判断所述链状网络的通断状态进一步包括: 2. The method for implementing redundancy based on a chain network according to claim 1, characterized in that, if it is a master node, determining the on-off status of the chain network further includes:
所述链状网络的主节点在确定自身的所有内部端口都接收到所述边缘节点发送的应 答 ·ί艮文后, 确定本链状网络为闭合状态; 否则, 确定本链状网络为断开状态; 其中, 所述 内部端口为节点包含的能够接收和转发本链状网络的网络管理报文的端口; After the master node of the chain network determines that all its internal ports have received the response message sent by the edge node, it determines that the chain network is in a closed state; otherwise, it determines that the chain network is disconnected. Status; wherein, the internal port is a port included in the node that is capable of receiving and forwarding network management messages of this chain network;
若为所述链状网络中除所述主节点之外的节点, 判断所述链状网络的通断状态进一步 包括: If it is a node other than the master node in the chain network, determining the on-off status of the chain network further includes:
该节点在确定自身不能接收到所述主节点发送的通知报文, 或不能接收到所述边缘节 点发送的应答报文时, 确定自身的链路发生中断。 When the node determines that it cannot receive the notification message sent by the master node, or cannot receive the response message sent by the edge node, it determines that its own link is interrupted.
3、 根据权利要求 1 所述的基于链状网络冗余实现方法, 其特征在于, 所述方法还包 括: 3. The method for implementing chain network redundancy according to claim 1, characterized in that the method further includes:
所述链状网络的主节点主动检测自身包含的端口状态; The master node of the chain network actively detects the status of the ports it contains;
在检测到自身包含的某一端口发生中断时, 确定本链状网络为断开状态。 When an interruption is detected on one of its own ports, the chain network is determined to be in a disconnected state.
4、 根据权利要求 1或 2或 3所述的基于链状网络冗余实现方法, 其特征在于, 若本 链状网络出现中断链路 , 所述重新确定本链状网络的主节点包括: 4. The method for implementing redundancy based on a chain network according to claim 1 or 2 or 3, characterized in that, if a link is interrupted in the chain network, the redetermination of the master node of the chain network includes:
所述链状网络中与所述中断链路两端连接的节点确定自身为新的主节点; The nodes connected to both ends of the interrupted link in the chain network determine themselves as the new master node;
每个新确定的主节点将自身与所述中断链路连接的端口设为阻塞状态, 并通过自身的 两个端口发送通知 4艮文; Each newly determined master node sets the port connected to the interrupted link to a blocking state, and sends a notification message through its two ports;
所述链状网络的原主节点在接收到新确定的主节点发送的通知 ·ί艮文后, 根据该通知 4艮 文中携带的中断优先级, 将自身具有阻塞状态的端口设为转发状态。 After receiving the notification message sent by the newly determined master node, the original master node of the chain network sets the port in the blocking state to the forwarding state according to the interrupt priority carried in the notification message.
5、 根据权利要求 4 所述的基于链状网络冗余实现方法, 其特征在于, 若本链状网络 的中断链路恢复通讯, 所述重新确定本链状网络的主节点包括: 5. The method for implementing redundancy based on a chain network according to claim 4, characterized in that if the chain network The interrupted link resumes communication, and the redetermination of the master node of this chain network includes:
所述链状网络中的主节点根据其他主节点发送的通知报文, 从当前所有主节点中, 重 新选举出本链状网络的主节点; The master node in the chain network re-elects the master node of this chain network from all current master nodes according to the notification messages sent by other master nodes;
未被选举为主节点的节点将自身具有阻塞状态的端口设为转发状态。 A node that is not elected as a master node sets its own port in the blocking state to the forwarding state.
6、 一种链状网络的节点, 其特征在于: 该节点包括: 6. A node in a chain network, characterized by: The node includes:
主节点选举模块, 根据接收到的其他节点发送的通知报文, 选举出本链状网络的主节 端口设置模块, 用于在确定自身为主节点后, 将自身包含的两个端口中的一个设为阻 塞状态, 另一个设为转发状态, 并通过该两个端口周期性向本链状网络发送通知报文, 其 中, 本链状网络中与外部网络连接的边缘节点在接收到本链状网络的主节点发送的通知 4艮 文后返回应答报文, 所述边缘节点用于将在链状网络运行的链状网络管理报文限制在本链 状网络中转发, 所述网络管理报文包括通知报文和应答报文; The master node election module elects the master node port setting module of this chain network based on the received notification messages sent by other nodes. It is used to set one of the two ports it contains after determining itself as the master node. Set to the blocking state, and the other to the forwarding state, and periodically send notification messages to this chain network through these two ports. Among them, the edge nodes in this chain network connected to the external network receive notification messages from this chain network. After the notification message sent by the master node returns a response message, the edge node is used to limit the chain network management message running in the chain network to forwarding in this chain network, and the network management message includes Notification messages and response messages;
网络状态判断模块, 用于根据是否接收到本链状网络的网络管理报文, 判断所述链状 网络的通断状态, 并在确定本链状网络发生链路中断时, 触发所述主节点选举模块重新确 定本链状网络的主节点。 The network status judgment module is used to determine the on-off status of the chain network based on whether the network management message of the chain network is received, and when it is determined that a link interruption occurs in the chain network, trigger the master node The election module re-determines the master node of this chain network.
7、 根据权利要求 6 所述的节点, 其特征在于, 若该节点为主节点, 所述网络状态判 断模块具体用于: 7. The node according to claim 6, characterized in that, if the node is a master node, the network status judgment module is specifically used to:
在确定自身的所有内部端口都接收到所述边缘节点发送的应答报文后, 确定本链状网 络为闭合状态; 否则, 确定本链状网络为断开状态; 其中, 所述内部端口为节点包含的能 够接收和转发本链状网络的网络管理报文的端口; After determining that all its internal ports have received the response message sent by the edge node, it is determined that the chain network is in a closed state; otherwise, it is determined that the chain network is in a disconnected state; wherein, the internal port is a node Contains ports capable of receiving and forwarding network management messages of this chain network;
若该节点为本链状网络中除所述主节点之外的节点, 所述网络状态判断模块具体用 于: If the node is a node other than the master node in this chain network, the network status judgment module is specifically used to:
在确定自身在确定自身不能接收到所述主节点发送的通知 ·ί艮文, 或不能接收到所述边 缘节点发送的应答报文时, 确定自身的链路发生中断。 When it determines that it cannot receive the notification message sent by the master node, or cannot receive the response message sent by the edge node, it determines that its own link is interrupted.
8、 根据权利要求 6 所述的节点, 其特征在于, 若该节点为主节点, 所述网络状态判 断模块还用于: 8. The node according to claim 6, characterized in that, if the node is a master node, the network status judgment module is also used to:
主动检测自身包含的端口状态; 在检测到自身包含的某一端口发生中断时, 确定本链 状网络为断开状态。 Actively detect the status of the ports it contains; when it detects an interruption on a port it contains, it determines that the chain network is disconnected.
9、 根据权利要求 6或 7或 8所述的节点, 其特征在于, 若本链状网络出现中断链路; 若该节点为与所述中断链路连接的节点, 所述主节点选举模块还用于: 确定自身为新 的主节点; 及 9. The node according to claim 6 or 7 or 8, characterized in that if an interrupted link occurs in the chain network; if the node is a node connected to the interrupted link, the master node election module also Used to: identify itself as the new master node; and
所述端口设置模块还用于: 将自身与所述中断链路连接的端口设为阻塞状态, 并通过 自身的两个端口发送通知 4艮文; 若该节点为原主节点, 所述端口设置模块还用于: 在接收到新确定的主节点发送的通 知报文后, 根据该通知报文中携带的中断优先级, 将自身具有阻塞状态的端口设为转发状 态。 The port setting module is also configured to: set the port connected to the interrupted link to a blocking state, and send a notification message through its two ports; If the node is the original master node, the port setting module is also used to: after receiving the notification message sent by the newly determined master node, according to the interrupt priority carried in the notification message, set the port that has the blocked status to Set to forwarding status.
10、 根据权利要求 9所述的节点, 其特征在于, 若本链状网络的中断链路恢复通讯, 且该节点为某个当前主节点; 10. The node according to claim 9, characterized in that if the interrupted link of the chain network resumes communication, and the node is a current master node;
所述主节点选举模块还用于:根据其他主节点发送的通知 ·ί艮文,从当前所有主节点中, 重新选举出本链状网络的主节点; The master node election module is also used to: re-elect the master node of this chain network from all current master nodes according to notification messages sent by other master nodes;
所述端口设置模块还用于: 在自身未被选举为主节点时, 将自身具有阻塞状态的端口 设为转发状态。 The port setting module is also used to: when it is not elected as the master node, set its own port in the blocking state to the forwarding state.
PCT/CN2012/085564 2012-11-23 2012-11-29 Method and node for implementing redundancy on basis of chain network WO2014079088A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210485016.7A CN103001799B (en) 2012-11-23 2012-11-23 Method and node for achieving redundancy on basis of chain network
CN201210485016.7 2012-11-23

Publications (1)

Publication Number Publication Date
WO2014079088A1 true WO2014079088A1 (en) 2014-05-30

Family

ID=47929958

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/085564 WO2014079088A1 (en) 2012-11-23 2012-11-29 Method and node for implementing redundancy on basis of chain network

Country Status (2)

Country Link
CN (1) CN103001799B (en)
WO (1) WO2014079088A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113938420A (en) * 2021-10-26 2022-01-14 新华三信息安全技术有限公司 Loop avoidance method and device for RPR (resilient packet ring) intersecting ring
CN114205263A (en) * 2021-12-08 2022-03-18 中国信息通信研究院 Communication method, system and storage medium for Ether CAT network
CN115189986A (en) * 2022-05-31 2022-10-14 武汉迈威通信股份有限公司 Ring network redundancy backup method and system

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106209552B (en) * 2016-07-15 2019-04-30 浙江宇视科技有限公司 Plug and play network-building method, apparatus and system
US20180059648A1 (en) * 2016-08-31 2018-03-01 Esab Ab Techniques for network charting and configuration in a welding or cutting system
CN106851532A (en) * 2017-01-06 2017-06-13 悦物电子科技(上海)有限公司 Low-power consumption bluetooth equipment room determines the method and system of main equipment
CN107124322B (en) * 2017-07-14 2020-04-14 广州致远电子有限公司 Redundant communication method
CN111371592B (en) * 2020-02-21 2023-09-19 无锡华云数据技术服务有限公司 Node switching method, device, equipment and storage medium
CN115225426A (en) * 2021-04-17 2022-10-21 华为技术有限公司 Method for establishing network, ethernet system and vehicle
CN112995002B (en) * 2021-04-27 2021-08-03 融智通科技(北京)股份有限公司 Switch ring network design method, switch and storage medium
CN113904975B (en) * 2021-09-27 2023-03-28 北京东土科技股份有限公司 Method, equipment and storage medium for realizing dual-homing link
CN114866394A (en) * 2022-04-28 2022-08-05 杭州迪普科技股份有限公司 Method and device for automatically electing blocked port by FRRP ring
CN116436755B (en) * 2023-06-12 2023-08-25 新华三技术有限公司 Network management method and device and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2194676A1 (en) * 2007-09-25 2010-06-09 ZTE Corporation Ethernet ring system, its main node and intialization method
CN101873244A (en) * 2010-06-09 2010-10-27 神州数码网络(北京)有限公司 Automatic multi-loop protection method
CN102158384A (en) * 2011-01-25 2011-08-17 武汉迈威光电技术有限公司 Novel MRing Ethernet ring network protection technology

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100409634C (en) * 2006-01-23 2008-08-06 杭州华三通信技术有限公司 Fast ring network protecting method and system
CN101141333A (en) * 2007-10-12 2008-03-12 中兴通讯股份有限公司 Ethernet system host node slave port fault processing method
CN101252500B (en) * 2008-04-16 2012-08-08 杭州华三通信技术有限公司 Intersect looped network, node and realizing method of random topology intersect looped network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2194676A1 (en) * 2007-09-25 2010-06-09 ZTE Corporation Ethernet ring system, its main node and intialization method
CN101873244A (en) * 2010-06-09 2010-10-27 神州数码网络(北京)有限公司 Automatic multi-loop protection method
CN102158384A (en) * 2011-01-25 2011-08-17 武汉迈威光电技术有限公司 Novel MRing Ethernet ring network protection technology

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
HE, SANBO ET AL.: "Research on Rapid Ethernet Protection Switching Technology", TELECOMMUNICATIONS SCIENCE, 30 April 2012 (2012-04-30) *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113938420A (en) * 2021-10-26 2022-01-14 新华三信息安全技术有限公司 Loop avoidance method and device for RPR (resilient packet ring) intersecting ring
CN114205263A (en) * 2021-12-08 2022-03-18 中国信息通信研究院 Communication method, system and storage medium for Ether CAT network
CN114205263B (en) * 2021-12-08 2023-10-13 中国信息通信研究院 Communication method, system and storage medium for Ether CAT network
CN115189986A (en) * 2022-05-31 2022-10-14 武汉迈威通信股份有限公司 Ring network redundancy backup method and system
CN115189986B (en) * 2022-05-31 2024-02-27 武汉迈威通信股份有限公司 Ring network redundancy backup method and system

Also Published As

Publication number Publication date
CN103001799B (en) 2015-06-24
CN103001799A (en) 2013-03-27

Similar Documents

Publication Publication Date Title
WO2014079088A1 (en) Method and node for implementing redundancy on basis of chain network
US10938710B2 (en) Protection switching method and system, and network device
Song et al. Control path management framework for enhancing software-defined network (SDN) reliability
CN102148677B (en) Method for updating address resolution protocol table entries and core switch
CN107911291B (en) VRRP router switching method, router, VRRP active-standby switch system and storage medium
EP2627039B1 (en) Method and device for switching aggregation links
WO2012167569A1 (en) Method, node and system for link switching in ethernet ring
US9641396B2 (en) Packet processing method and system
JP2002330152A (en) Spanning tree controller and method at the time of trouble/increase
CN101060533B (en) A method, system and device for improving the reliability of VGMP protocol
WO2013113228A1 (en) Method, routing device and system for redundant backup of network device
JP6308534B2 (en) Network protection method, network protection device, off-ring node, and system
CN102255757A (en) Link switching method and device
JP2012529805A (en) Method, apparatus and system for hot standby by two computers
CN102239670B (en) A kind of load sharing method and device
WO2012126412A2 (en) Method, network device and system for ethernet ring protection switching
WO2011017900A1 (en) Segment protection method and system for ethernet tunnel
WO2010121459A1 (en) Method and system for implementing protection and recovery in automatically switching optical network
CN112995002B (en) Switch ring network design method, switch and storage medium
CN103840972B (en) The system and method backed up between packet network link aggregation group
CN102932249B (en) A kind of transmission method of VRRP message and device
CN105516252A (en) TCP (Transmission Control Protocol) connection switching method, apparatus and system
RU2563142C2 (en) Base station system for railway application and method of creating base station network
CN104702498A (en) Method and device for reducing the number of optical connections through coordination protection
WO2014101125A1 (en) Aggregation group link negotiation method, device and system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12888691

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12888691

Country of ref document: EP

Kind code of ref document: A1