CN111585860B - Method, device, storage medium and equipment for loop network convergence - Google Patents

Method, device, storage medium and equipment for loop network convergence Download PDF

Info

Publication number
CN111585860B
CN111585860B CN202010348521.1A CN202010348521A CN111585860B CN 111585860 B CN111585860 B CN 111585860B CN 202010348521 A CN202010348521 A CN 202010348521A CN 111585860 B CN111585860 B CN 111585860B
Authority
CN
China
Prior art keywords
port
ring
forwarding
node
message
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
CN202010348521.1A
Other languages
Chinese (zh)
Other versions
CN111585860A (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.)
Hangzhou DPTech Technologies Co Ltd
Original Assignee
Hangzhou DPTech Technologies 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 Hangzhou DPTech Technologies Co Ltd filed Critical Hangzhou DPTech Technologies Co Ltd
Priority to CN202010348521.1A priority Critical patent/CN111585860B/en
Publication of CN111585860A publication Critical patent/CN111585860A/en
Application granted granted Critical
Publication of CN111585860B publication Critical patent/CN111585860B/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
    • 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
    • H04L12/437Ring fault isolation or reconfiguration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/10Mapping addresses of different types
    • H04L61/103Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)

Abstract

In the method, each node on a ring detects the state of each port, and once the state of the port is changed, the node on the ring reports an event in a form of sending a first interrupt, wherein the interrupt priority of the first interrupt is highest, so that after the control plane of the node is reported, the node can perform corresponding processing with the highest priority, thereby ensuring the timeliness of event processing and accelerating the convergence speed of the ring network.

Description

Method, device, storage medium and equipment for loop network convergence
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method, an apparatus, a storage medium, and a device for loop convergence.
Background
The reliability of the network is very important in data transmission, and a redundant link is generally configured in a switching network, so that when one link fails, the link can be switched to a backup link in time, the normal operation of a service is ensured, and the reliability of data transmission is improved. But also introduces a new problem, when there are multiple reachable links between any two switches, a loop is formed. For example, there are three switches in a switching network, SW1, SW2, and SW3, wherein host a is connected to SW 1. According to the forwarding principle of the switch, the host a sends a unicast frame outwards, and assuming that the destination MAC address of the unicast frame does not exist temporarily in the MAC address tables of all switches in the network, SW1 forwards the unicast frame to SW2 and SW3 after receiving the unicast frame, and SW2 and SW3 forward the unicast frame to all ports except the port receiving the unicast frame after receiving the unicast frame, so that SW1 receives the unicast frame again, which results in that the same traffic is continuously transmitted in the network, i.e. broadcast storm. In addition, the MAC address table entry is also unstable, which causes the performance of the switch to drop rapidly, even causes service interruption, and the consequences are serious.
Disclosure of Invention
To overcome the problems in the related art, the present specification provides a method, an apparatus, a storage medium, and a device for loop convergence.
According to a first aspect of embodiments of the present specification, a method for convergence of a ring network is provided, where the ring network includes a plurality of switches, one of the switches is designated as a control node, and the other switches are designated as forwarding nodes, each switch is connected to two adjacent switches through two respective ring ports, and the two ring ports of the control node are a master port and a slave port, respectively, where the method includes:
the switch monitors whether the ring port has an event of state change;
when an event of the change of the ring port state is monitored, the switch reports the event to a control plane of the switch by sending a first interrupt, so that the switch processes the event; the first interrupt has a highest interrupt priority.
In some examples, the event of the state change includes any one of: and the main port of the control node fails, the ring port of the forwarding node fails, and the ring port of the forwarding node is recovered to be normal from the failure.
In some examples, when the event of the state change is a failure of the primary port of the control node, the processing of the event includes:
the control node releases the blockage of the slave port, updates the MAC address table and the ARP cache table of the control node, and sends a first message from the slave port, wherein the first message is used for informing the forwarding node of updating the MAC address forwarding table and the ARP cache table.
In some examples, when the event of the state change is that a ring port of the forwarding node fails, the processing procedure of the event includes:
the forwarding node sends second messages from other normal ring ports, the second messages are used for informing the control node of the information that the link faults exist on the ring, so that the control node releases the blockage of the slave port after receiving the second messages, updates the MAC address forwarding table and the ARP cache table of the control node, and sends first messages from the master port and the slave port, and the first messages are used for informing the forwarding node of updating the MAC address forwarding table and the ARP cache table.
In some examples, when the event of the state change includes that the ring port of the forwarding node is recovered from a failure to be normal, the processing procedure of the event includes:
The forwarding node sends third messages from other normal ring ports, the third messages are used for notifying the control node of messages of link recovery on the ring, so that the control node blocks the slave port after receiving the third messages, updates the MAC address forwarding table and the ARP cache table of the control node, and sends first messages from the master port and the slave port, and the first messages are used for notifying the forwarding node of updating the MAC address forwarding table and the ARP cache table.
In some examples, the method further comprises:
the control node periodically sends a fourth message from the master port to the slave port, and the fourth message is transmitted on the ring through each forwarding node and is used for detecting the ring network state;
when the control node receives a fourth message from the slave port within the preset time, the control node blocks the slave port;
and when the control node does not receive the fourth message from the slave port within the preset time, the control node releases the blockage of the slave port, updates the MAC address forwarding table and the ARP cache table per se, and sends a first message from the master port and the slave port, wherein the first message is used for informing the forwarding node to update the MAC address forwarding table and the ARP cache table.
In some examples, the method further comprises:
when each exchanger processes protocol messages, the protocol messages are copied to a control plane of the exchanger and are transmitted through a high-speed forwarding mechanism of a data plane of the exchanger; wherein the protocol packet includes any one of: the first message, the second message, the third message and the fourth message.
According to a second aspect of the embodiments of the present specification, there is provided a device for convergence of a ring network, the ring network including a plurality of switches, one of the switches being designated as a control node, and the remaining switches being designated as forwarding nodes, each switch being connected to two adjacent switches through two respective ring ports, the two ring ports of the control node being a master port and a slave port, the device being applied to the switches, including:
the monitoring module is used for monitoring whether the ring port has an event of state change;
the processing module is used for reporting the event to a control plane by sending a first interrupt when monitoring the event of the change of the ring port state, so that the switch processes the event; the first interrupt has a highest interrupt priority.
According to a third aspect of embodiments of the present specification, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs any one of the methods of the embodiments of the specification.
According to a fourth aspect of embodiments herein, there is provided a computer apparatus comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements any of the methods in the embodiments herein when executing the program.
The technical scheme provided by the embodiment of the specification can have the following beneficial effects:
in the method, each node on a ring detects the state of each port, and once the state of the port is changed, the node on the ring reports an event in a form of sending a first interrupt, wherein the interrupt priority of the first interrupt is highest, so that after the control plane of the node is reported, the node can perform corresponding processing with the highest priority, thereby ensuring the timeliness of event processing and accelerating the convergence speed of the ring network.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the specification.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present specification and together with the description, serve to explain the principles of the specification.
FIG. 1 is a flow chart illustrating a method of ring convergence in accordance with an exemplary embodiment of the present description;
FIG. 2 is a schematic diagram of a ring network topology shown in accordance with an exemplary embodiment of the present description;
fig. 3 is a hardware structure diagram of a computer device where a ring network convergence apparatus is located according to an embodiment of the present disclosure;
fig. 4 is a block diagram illustrating an apparatus for ring convergence in accordance with an exemplary embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present specification. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the specification, as detailed in the appended claims.
The terminology used in the description herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the description. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information, without departing from the scope of the present specification. The word "if," as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination," depending on the context.
Reliable transmission links are the basis of the security of the whole network, and in a network environment formed by a plurality of switches, redundant links are usually used to improve the robustness and stability of the network. However, redundant links also cause loops in the network, and the loops between switches easily cause problems such as broadcast storms, multi-frame duplication, and instability of address tables. To solve the above problem, the STP Protocol (Spanning Tree Protocol) is usually adopted to prevent loops generated by redundant links of the switches, when at least two links exist in any switch, the STP Protocol only reserves one link according to an algorithm, and cuts off the rest links, thereby ensuring that only one single active link exists between any two switches.
When the network Topology changes, for example, a port fails, the STP Protocol works by sending a TCN BPDU (Topology Change Notification, Topology Change Notification; Bridge Protocol Data Unit) message from the root port to the upstream switch, the upstream switch sends the TCN BPDU message to the downstream switch after receiving the TCN BPDU message, and the downstream switch stops sending the TCN BPDU message, so that the TCN BPDU message is continuously transmitted until the TCN BPDU message is transmitted to the root switch, then the root switch modifies the MAC address lifetime, and notifies other switches, and after the aging time is reached, the Topology completes convergence. Convergence here refers to the process from the failure of a link to the restoration of the network topology to stability. It can be seen that the convergence time of the STP protocol is affected by the network topology, and is suitable for a structure with a smaller topology, and the topology change is judged by depending on a timer waiting mode, so that the convergence speed is slow. Typically, the STP protocol takes at least 30 seconds to complete convergence, which is not satisfactory for traffic requiring timely response and may even cause significant losses. Compared with the STP Protocol, the improved RSTP Protocol (Rapid Spanning Tree Protocol) and MSTP (Multiple Spanning Tree Protocol) greatly improve the convergence time, and the two protocols can make the fastest convergence time approach 50 milliseconds at present. However, with the rapid development of industrial ethernet technology, services also put higher demands on the convergence speed of the ring network.
The following provides a detailed description of examples of the present specification.
As shown in fig. 1, fig. 1 is a flowchart illustrating a method for convergence of a ring network according to an exemplary embodiment. The ring network comprises a plurality of switches, wherein one switch is designated as a control node, the other switches are designated as forwarding nodes, each switch is connected with two adjacent switches through two ring ports, and the two ring ports of the control node are respectively a master port and a slave port.
The ring network, also called an ethernet ring network, is a ring topology composed of a group of ethernet nodes, a ring port of each node is connected with other two nodes, and all the nodes can directly or indirectly communicate with each other. Switches are typically employed to build this ring topology. When the industrial-level ring network is deployed, the industrial-level ring network switch is adopted, compared with a common switch, the service life of the industrial-level ring network switch is longer, and more voltage types can be used, so that the industrial-level ring network switch is more suitable for complex industrial environments. The switches are physically connected into a ring, and can be connected into at least one ring according to different networking modes. Each ring comprises a control node and a plurality of forwarding nodes. The two ring ports of the forwarding node are functionally indistinguishable, whereas the two ring ports of the control node are functionally distinguishable and are therefore a master port and a slave port, respectively.
When the switches are connected into two or more rings, the network topology may include a main ring and at least one sub-ring, but logically, the sub-ring exists as an independent ring, and the main ring may be regarded as a forwarding node of the sub-ring to process, so that the embodiment of the present specification is applied to the network topology by the same mechanism as that applied to the single ring networking.
The method comprises the following steps: step 101, the switch monitors whether a state change event exists in each ring port;
the method of the embodiment of the present specification is applied to a switch on a ring. The switches on the ring include a control node and a forwarding node, and in some examples, the event of the state change mentioned in this step may include any one of the following: the main port of the control node is failed, the ring port of the forwarding node is failed, and the ring port of the forwarding node is recovered to be normal from the failure. Here, the failure of a ring port may be caused by a problem in the physical layer or a problem in the data link, which is not limited in this specification. However, no matter the ring port fails or the failure is recovered to normal, the network topology will change, and at this time, corresponding processing is required to complete network convergence.
102, when an event of a ring port state change is monitored, reporting the event to a control plane of the switch by sending a first interrupt, so that the switch processes the event; the first interrupt has a highest interrupt priority.
When a node monitors an event of the change of the ring port state, the node reports the event to a control plane by sending a first interrupt. Since the first interrupt has the highest interrupt priority, after reporting the control plane, the control plane will respond to the first interrupt with the highest priority for processing. Different from waiting for processing by depending on a timer in the related art, the method in the embodiment of the present description reports an event to a control plane of a node in an interrupt manner, and the node can rapidly process the event, that is, the method in the embodiment of the present description shortens the time consumed in the process of changing from a port state to a switch response processing, ensures the timeliness of event processing, and accelerates the convergence speed of a ring network.
When the method of the embodiment of the present specification is applied to a control node, the event of the state change may include a failure of a primary port of the control node. When the master port is monitored to have a fault, the processing procedure of the control node comprises the following steps: and releasing the blocking of the slave port, and sending a first message from the slave port, wherein the first message is used for informing the forwarding node to update the MAC address forwarding table and the ARP cache table. It will be appreciated that the secondary port of the control node is blocked when the link is normal to prevent looping. However, when the master port fails, the control node immediately releases the blocking of the slave port, and the connectivity of the link can be ensured. And because the link has changed at this moment, the corresponding relation of the port of MAC address and switchboard of the host computer has also changed, if wait for the aging time to reach and refresh the table entry again and will make the convergence time longer, because the table entry that does not refresh can not be normal according to the at the same time transmit the data, can also cause other problems, therefore, the control node updates own MAC address forwarding table and ARP cache table, and send the first message, notify all forwarding nodes on the ring to update MAC address forwarding table and ARP cache table.
It can be understood that the switches communicate through MAC addresses, the MAC address forwarding table records the correspondence between the MAC address of the host and the switch port, and the ARP cache table records the correspondence between the IP address of the host and the MAC address. Updating the MAC address table and the ARP cache table by the switch may refer to clearing the original table entry, and relearning the MAC address forwarding table and the ARP cache table.
The process of learning the MAC address forwarding table by the switch may include: when a data frame is received by the switch, the source MAC address of the frame is checked firstly, whether the MAC address exists in an MAC address forwarding table maintained by the switch is judged, and if not, the MAC address and a receiving port form a corresponding relation and are recorded into the MAC address forwarding table; if yes, checking the destination MAC address, then searching whether a matching item exists in the table, if yes, forwarding according to the port number in the table item, and if not, forwarding to all other ports except the receiving port.
The process of the switch learning the ARP cache table may include: when the host A wants to communicate with the host B, the host A firstly checks an ARP cache table of the host A and checks whether a corresponding relation between an IP address and an MAC address of the host B exists or not, if so, the MAC address of the host B is taken as a target MAC address to be encapsulated into a data frame, if not, an ARP request message is sent, the requested target IP address is the IP address of the host B, the target MAC address is a broadcast frame of the MAC address, and the source IP address and the MAC address are the IP address and the MAC address of the host A; when the switch receives the data frame, if the data frame is detected to be a broadcast frame, the switch sends the data frame out from all the other ports except the receiving port, after the host B receives the data frame, the switch checks whether the target IP address is self-owned, records the corresponding relation between the IP address of the host A and the MAC address into the ARP cache table of the switch, and simultaneously sends an ARP response which comprises the MAC address of the switch, and after the host A receives the ARP response, records the corresponding relation between the IP address of the host B and the MAC address in the ARP cache table of the switch. In this process, the switch can learn the correspondence between the IP addresses and the MAC addresses of the host a and the host B, and record the correspondence in the ARP cache table of the switch.
When the method of the embodiment of the present specification is applied to a forwarding node, the event of the state change may include that a ring port of the forwarding node fails, or the ring port is recovered from the failure. When the ring port is monitored to have a fault, the processing procedure of the forwarding node comprises the following steps: and sending second messages from other normal ring ports, wherein the second messages are used for informing the control node of the information of the link fault on the ring, so that the control node releases the blockage of the slave port after receiving the second messages, updates the MAC address forwarding table of the control node, and sends first messages from the master port and the slave port, and the first messages are used for informing the forwarding node of updating the MAC address forwarding table and the ARP cache table. That is, the forwarding node sends the second packet to the control node through other normal ring ports, and since the failure of the ring port of the forwarding node also causes the physical loop to disappear, the control node also releases the blocking of the slave port to ensure the connectivity of the link, refreshes the MAC address forwarding table and the ARP cache table of the control node, and sends the first packet to notify all the forwarding nodes on the ring to update the MAC address forwarding table and the ARP cache table, thereby avoiding the packet orientation error. Different, because the ring port of the forwarding node is failed, the control node at this time is the first message sent from the primary port and the secondary port, so as to ensure that all the forwarding nodes can receive the first message.
When the forwarding node monitors that the ring port is recovered from the failure, the processing procedure includes: and sending third messages from other normal ring ports, wherein the third messages are used for informing the control node of the information of link recovery on the ring, so that the control node blocks the slave port after receiving the third messages, updates the MAC address forwarding table and the ARP cache table of the control node, and sends first messages from the master port and the slave port, and the first messages are used for informing the forwarding node of updating the MAC address forwarding table and the ARP cache table. It can be understood that when the ring port of the forwarding node returns to normal, the original disappeared physical ring also returns, so the control node needs to block the slave port to prevent the formation of the data ring. Meanwhile, since the link is also changed, each node still needs to update its MAC address forwarding table and ARP cache table.
Embodiments of the present specification further provide a health monitoring mechanism, which in some examples further includes: the control node periodically sends a fourth message from the master port to the slave port, and the fourth message is transmitted on the ring through each forwarding node and is used for detecting the ring network state; when the control node receives a fourth message from the slave port within the preset time, the control node blocks the slave port; and when the control node does not receive the fourth message from the slave port within the preset time, the control node releases the blockage of the slave port, updates the MAC address forwarding table and the ARP cache table per se, and sends a first message from the master port and the slave port, wherein the first message is used for informing the forwarding node to update the MAC address forwarding table and the ARP cache table.
The mechanism monitors the integrity of the ring network state by means of a control node, when the control node does not receive a fourth message from a slave port within a preset time, which indicates that a link on the ring fails, the control node can update an MAC address forwarding table and an ARP cache table by releasing the blockage of the slave port and notifying all forwarding nodes on the ring to update the MAC address forwarding table and the ARP cache table, so that the connectivity and the timeliness of processing after the ring network is abnormal are ensured, and the convergence speed is improved to a certain extent.
As can be seen from the foregoing processing procedure of each switch, it relates to the forwarding processing of protocol packets. The embodiments of the present specification also improve upon this process. In some examples, further comprising: when each exchanger processes protocol messages, the protocol messages are copied to a control plane of the exchanger and are transmitted through a high-speed forwarding mechanism of a data plane of the exchanger; wherein the protocol packet includes any one of: the first message, the second message, the third message and the fourth message. That is, when a certain node needs to process a certain type of protocol packet, a copy of the protocol packet is copied to the control plane, and meanwhile, the protocol packet is transmitted to other related ring nodes for processing through a high-speed forwarding mechanism of the data plane. Different from the method of the STP protocol, which needs to modify a protocol packet, the method of the embodiment of the present specification implements transparent transmission between nodes when forwarding the protocol packet, thereby improving the convergence speed.
The aforementioned control plane and data plane belong to the components of the switch itself. It can be understood that the switch usually adopts a structure model in which a data plane, a control plane and a management plane are separated from each other, so that management and control are not influenced by a large amount of data processing, the control plane does not influence the management plane under complex routing and environment conditions, and the safety and stability of the system are highly ensured. The basic concept of these three planes is as follows:
a data plane: the basic task of the switch is to process and forward various types of data on different ports of the switch, and various specific data processing and forwarding processes such as L2/L3/ACL/QOS/multicast/safety protection belong to the task category of the data plane of the switch;
a control plane: the control plane of the switch is used for controlling and managing the operation of all network protocols and provides various network information and forwarding query table items which are necessary before the data plane data is processed and forwarded;
a management plane: the management plane of the switch is used for providing network management personnel with a TELNET mode, a WEB mode, an SSH mode, an SNMP mode, an RMON mode and the like for managing the equipment, and supporting, understanding and executing setting commands of the management personnel for various network protocols of the network equipment.
Functionally, the control plane establishes a local data set for establishing a Forwarding table entry, where the data set of the storage network topology is referred to as a Routing Information Base (RIB), and the Forwarding table entry is generally referred to as a Forwarding Information Base (FIB) for directing data traffic Forwarding between an ingress port and an egress port of a device. And the data plane performs high-speed forwarding of data based on these forwarding table entries. This is the high-speed forwarding mechanism for the data plane.
Of course, in some examples, the aforementioned control plane may also be understood as a processor of a switch, and the data plane may be understood as associated hardware on the switch for forwarding data, such as a cable, fiber optic, or wireless medium.
The method in the embodiment of the present specification, through the processing mechanism, enables the ring network to have the characteristics of short convergence time and independence of ring network convergence speed and node number. After a large amount of test data is obtained, when the method of the embodiment of the specification is applied, the convergence speed can reach the convergence time of no more than 20 milliseconds, so that the method is beneficial to providing more efficient and reliable data transmission service for industrial environment.
For convenience of understanding, the method of the present specification is described below with reference to an application example.
Referring to fig. 2, fig. 2 is a schematic diagram of a topology of a Ring network shown in the present specification according to an exemplary embodiment, and the devices involved in fig. 2 include four switches, SW1, SW2, SW3, and SW4, and the four switches constitute a physical Ring, which is denoted as Ring1 in the figure. Wherein, SW1 is a control node, the rest are forwarding nodes, and ring ports 1 and Port2 of SW1 are master ports and slave ports, respectively. For convenience of explanation, the MAC address tables and ARP cache tables of SW1, SW2, SW3, and SW4 are referred to as table a, table B, table C, and table D, respectively, in turn. The method of the embodiment of the present specification is applied to each switch.
When applied to the control node, the process flow of SW1 is:
s201, SW1 monitor whether there are events of state change in Port1 and Port 2;
s202, when an event that Port1 fails is monitored, the SW1 reports the event to the control plane of the SW1 by sending a first interrupt, wherein the interrupt priority of the first interrupt is highest;
s203, SW1, in response to the first interrupt, unblocks Port2, updates Table A, and sends a first message from Port2 informing SW2, SW3, and SW4 to update Table B, Table C, and Table D, respectively.
When applied to a forwarding node, taking SW2 as an example, the processing flow of SW2 is divided into processing flows S211 to 214 of ring port failure and processing flows S215 to S218 of ring port recovery from failure:
s211, SW2 monitors whether the ring port1 and the ring port2 have the event of state change;
s212, when an event of the ring port1 failure is monitored, the SW2 reports the event to the control plane of the SW2 by sending a first interrupt, wherein the interrupt priority of the first interrupt is highest;
s213, SW2 respond to the first interrupt, send a second packet from the normal ring Port2, where the second packet is used to notify the SW1 of a message that there is a link failure on the ring, so that after the SW1 receives the second packet, the block of Port2 is released, the table a is updated, and send a first packet from Port1 and Port2, where the first packet is used to notify SW2, SW3, and SW4 to update the table B, table C, and table D correspondingly;
s214, when the first message is received, SW2 updates the table B;
s215, SW2 continues to monitor whether the ring port1 and the ring port2 have the event of the state change;
s216, when an event that the ring port1 is recovered from the fault to be normal is monitored, the SW2 reports the event to the control plane of the SW2 by sending a first interrupt, wherein the interrupt priority of the first interrupt is highest;
S217 and SW2 respond to the first interrupt, send a third packet from the normal ring Port2, where the third packet is used to notify the SW1 of a message that there is a link restoration on the ring, so that after the SW1 receives the third packet, it blocks the Port2 and updates the table a, and send a first packet from the Port1 and the Port2, where the first packet is used to notify the SW2, SW3, and SW4 to update the table B, the table C, and the table D correspondingly;
s218, upon receiving the first message, SW2 updates table B.
Through the processing process, the timeliness of event processing is ensured, and the convergence speed of the ring network is accelerated.
When the method of the embodiment of the present specification is applied to a control node, the method further includes a health monitoring mechanism: the SW1 periodically sends a fourth packet from the Port1 to the Port2, and the fourth packet is propagated on the ring through SW2, SW3 and SW4 in sequence for detecting the ring network state; when SW1 receives the fourth packet from Port2 within a preset time, SW1 blocks Port 2; when SW1 does not receive the fourth packet from Port2 within the preset time, SW1 unblocks Port2 and sends the first packet from Port1 and Port2, where the first packet is used to notify SW2, SW3 and SW4 to update Table B, Table C and Table D correspondingly. Therefore, the connectivity and the processing timeliness of the abnormal looped network are guaranteed, and the convergence speed is improved to a certain extent.
The method of the embodiment of the present description further includes a protocol packet fast transfer mechanism: when processing the first message, the second message, the third message or the fourth message, each node can copy the message to the control plane and transmit the message to the related ring node through the high-speed forwarding mechanism of the data plane. Therefore, the convergence speed is improved by transmitting the protocol message between each node.
The ring network of the embodiment of the specification has high convergence rate, realizes load sharing and provides more efficient and reliable data transmission service.
Corresponding to the embodiment of the foregoing method, the present specification further provides an embodiment of a ring network convergence device and a terminal applied thereto.
The embodiments of the ring network convergence apparatus described in this specification can be applied to a computer device, such as a server or a terminal device. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. The software implementation is taken as an example, and as a logical device, the device is formed by reading corresponding computer program instructions in the nonvolatile memory into the memory for operation through the processor in which the file processing is located. From a hardware aspect, as shown in fig. 3, which is a hardware structure diagram of a computer device in which a ring network convergence apparatus is located in the embodiment of this specification, except for the processor 510, the memory 530, the network interface 520, and the nonvolatile memory 540 shown in fig. 3, a server or an electronic device in which the apparatus 531 is located in the embodiment may also include other hardware according to an actual function of the computer device, and details of this are not described again.
Accordingly, the embodiments of the present specification also provide a computer storage medium, in which a program is stored, and the program, when executed by a processor, implements the method in any of the above embodiments.
Embodiments of the present description may take the form of a computer program product embodied on one or more storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having program code embodied therein. Computer-usable storage media include permanent and non-permanent, removable and non-removable media, and information storage may be implemented by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of the storage medium of the computer include, but are not limited to: phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technologies, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic tape storage or other magnetic storage devices, or any other non-transmission medium, may be used to store information that may be accessed by a computing device.
As shown in fig. 4, fig. 4 is a block diagram of an apparatus for convergence of a ring network shown in this specification according to an exemplary embodiment, where the ring network includes a plurality of switches, one of the switches is designated as a control node, and the remaining switches are designated as forwarding nodes, each switch is connected to two adjacent switches through two respective ring ports, and two ring ports of the control node are a master port and a slave port, respectively, where the apparatus is applied to a switch, and includes:
a monitoring module 41, configured to monitor whether a ring port has an event of state change;
a processing module 42, configured to report an event of a change of a ring port state to a control plane by sending a first interrupt when the event is monitored, so that the switch processes the event; the first interrupt has a highest interrupt priority.
The implementation process of the functions and actions of each module in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, wherein the modules described as separate parts may or may not be physically separate, and the parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution in the specification. One of ordinary skill in the art can understand and implement it without inventive effort.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
Other embodiments of the present description will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This specification is intended to cover any variations, uses, or adaptations of the specification following, in general, the principles of the specification and including such departures from the present disclosure as come within known or customary practice within the art to which the specification pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the specification being indicated by the following claims.
It will be understood that the present description is not limited to the precise arrangements described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present description is limited only by the appended claims.
The above description is only a preferred embodiment of the present disclosure, and should not be taken as limiting the present disclosure, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.

Claims (9)

1. A method for convergence in a ring network, the ring network comprising a plurality of switches, wherein one of the switches is designated as a control node, and the remaining switches are designated as forwarding nodes, each switch is connected to two adjacent switches through two ring ports, and the two ring ports of the control node are a master port and a slave port, respectively, the method comprising:
the switch monitors whether the ring port has an event of state change;
when an event of the change of the ring port state is monitored, the switch reports the event to a control plane of the switch by sending a first interrupt, so that the switch processes the event; the first interrupt has the highest interrupt priority;
the method further comprises the following steps:
the control node periodically sends a fourth message from the master port to the slave port, and the fourth message is transmitted on the ring through each forwarding node and is used for detecting the ring network state;
When the control node receives a fourth message from the slave port within the preset time, the control node blocks the slave port;
and when the control node does not receive the fourth message from the slave port within the preset time, the control node releases the blockage of the slave port, updates the MAC address forwarding table and the ARP cache table per se, and sends a first message from the master port and the slave port, wherein the first message is used for informing the forwarding node to update the MAC address forwarding table and the ARP cache table.
2. The method of claim 1, wherein the event of the state change comprises any one of: and the main port of the control node fails, the ring port of the forwarding node fails, and the ring port of the forwarding node is recovered to be normal from the failure.
3. The method according to claim 2, wherein when the event of the state change is a failure of a primary port of the control node, the processing procedure of the event comprises:
the control node releases the blockage of the slave port, updates the MAC address table and the ARP cache table of the control node, and sends a first message from the slave port, wherein the first message is used for informing the forwarding node of updating the MAC address forwarding table and the ARP cache table.
4. The method according to claim 2, wherein when the event of the state change is a failure of a ring port of the forwarding node, the processing procedure of the event comprises:
the forwarding node sends second messages from other normal ring ports, the second messages are used for informing the control node of the information that the link faults exist on the ring, so that the control node releases the blockage of the slave port after receiving the second messages, updates the MAC address forwarding table and the ARP cache table of the control node, and sends first messages from the master port and the slave port, and the first messages are used for informing the forwarding node of updating the MAC address forwarding table and the ARP cache table.
5. The method according to claim 2, wherein when the event of the state change includes that the ring port of the forwarding node is recovered from the failure to be normal, the processing procedure of the event includes:
the forwarding node sends third messages from other normal ring ports, the third messages are used for notifying the control node of messages of link recovery on the ring, so that the control node blocks the slave port after receiving the third messages, updates the MAC address forwarding table and the ARP cache table of the control node, and sends first messages from the master port and the slave port, and the first messages are used for notifying the forwarding node of updating the MAC address forwarding table and the ARP cache table.
6. The method according to any one of claims 1-5, further comprising:
when each exchanger processes protocol messages, the protocol messages are copied to a control plane of the exchanger and are transmitted through a high-speed forwarding mechanism of a data plane of the exchanger; wherein the protocol packet includes any one of: the first message, the second message, the third message and the fourth message.
7. A device for convergence of a ring network, the ring network comprising a plurality of switches, one of which is designated as a control node and the remaining switches are designated as forwarding nodes, each switch being connected to two adjacent switches through two respective ring ports, the two ring ports of the control node being a master port and a slave port, respectively, the device being applied to switches comprising:
the monitoring module is used for monitoring whether the ring port has an event of state change;
the processing module is used for reporting the event to a control plane by sending a first interrupt when monitoring the event of the change of the ring port state, so that the switch processes the event; the first interrupt has the highest interrupt priority;
If the apparatus is applied to a control node, the apparatus further comprises:
a sending module, configured to periodically send a fourth packet from the master port to the slave port, where the fourth packet is propagated on the ring through each forwarding node, and is used to detect a ring network state;
the blocking module is used for blocking the slave port when receiving the fourth message from the slave port within the preset time;
and the updating module is used for releasing the blockage of the slave port when the fourth message is not received from the slave port within the preset time, updating the MAC address forwarding table and the ARP cache table per se, and sending a first message from the master port and the slave port, wherein the first message is used for informing the forwarding node to update the MAC address forwarding table and the ARP cache table.
8. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program implements the method of any of claims 1 to 6.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method of any one of claims 1 to 6.
CN202010348521.1A 2020-04-28 2020-04-28 Method, device, storage medium and equipment for loop network convergence Active CN111585860B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010348521.1A CN111585860B (en) 2020-04-28 2020-04-28 Method, device, storage medium and equipment for loop network convergence

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010348521.1A CN111585860B (en) 2020-04-28 2020-04-28 Method, device, storage medium and equipment for loop network convergence

Publications (2)

Publication Number Publication Date
CN111585860A CN111585860A (en) 2020-08-25
CN111585860B true CN111585860B (en) 2021-12-24

Family

ID=72124552

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010348521.1A Active CN111585860B (en) 2020-04-28 2020-04-28 Method, device, storage medium and equipment for loop network convergence

Country Status (1)

Country Link
CN (1) CN111585860B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112953805A (en) * 2021-01-22 2021-06-11 北京航天自动控制研究所 Communication method and device of ring topology structure and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1791049A (en) * 2005-12-16 2006-06-21 杭州华为三康技术有限公司 Looped network and its protecting method
CN101075935A (en) * 2007-06-27 2007-11-21 华为技术有限公司 Method, system and apparatus for realizing loop protection
CN101499949A (en) * 2008-02-01 2009-08-05 杭州华三通信技术有限公司 Failure recovery processing method in intersected ring network, node and intersected ring network
CN101645812A (en) * 2009-08-31 2010-02-10 武汉烽火网络有限责任公司 Protection switching method of Ethernet intersecting ring
CN101820376A (en) * 2010-02-04 2010-09-01 深圳市金宏威实业发展有限公司 Method and system for realizing rapid convergence in ring network
CN104158683A (en) * 2014-08-13 2014-11-19 杭州华三通信技术有限公司 Cross-device aggregation group rapid convergence method, and cross-device aggregation group rapid convergence device
CN105871674A (en) * 2015-01-23 2016-08-17 华为技术有限公司 Ring protection link fault protection method, device and system
CN106789521A (en) * 2016-12-29 2017-05-31 瑞斯康达科技发展股份有限公司 A kind of ring network fault reverse method and link point
CN110535715A (en) * 2018-05-25 2019-12-03 北京东土科技股份有限公司 Port status real-time detection method, circuit and interchanger based on Linux

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7660316B2 (en) * 2002-07-02 2010-02-09 Emulex Design & Manufacturing Corporation Methods and apparatus for device access fairness in fibre channel arbitrated loop systems
US20070140133A1 (en) * 2005-12-15 2007-06-21 Bellsouth Intellectual Property Corporation Methods and systems for providing outage notification for private networks

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1791049A (en) * 2005-12-16 2006-06-21 杭州华为三康技术有限公司 Looped network and its protecting method
CN101075935A (en) * 2007-06-27 2007-11-21 华为技术有限公司 Method, system and apparatus for realizing loop protection
CN101499949A (en) * 2008-02-01 2009-08-05 杭州华三通信技术有限公司 Failure recovery processing method in intersected ring network, node and intersected ring network
CN101645812A (en) * 2009-08-31 2010-02-10 武汉烽火网络有限责任公司 Protection switching method of Ethernet intersecting ring
CN101820376A (en) * 2010-02-04 2010-09-01 深圳市金宏威实业发展有限公司 Method and system for realizing rapid convergence in ring network
CN104158683A (en) * 2014-08-13 2014-11-19 杭州华三通信技术有限公司 Cross-device aggregation group rapid convergence method, and cross-device aggregation group rapid convergence device
CN105871674A (en) * 2015-01-23 2016-08-17 华为技术有限公司 Ring protection link fault protection method, device and system
CN106789521A (en) * 2016-12-29 2017-05-31 瑞斯康达科技发展股份有限公司 A kind of ring network fault reverse method and link point
CN110535715A (en) * 2018-05-25 2019-12-03 北京东土科技股份有限公司 Port status real-time detection method, circuit and interchanger based on Linux

Also Published As

Publication number Publication date
CN111585860A (en) 2020-08-25

Similar Documents

Publication Publication Date Title
US6717922B2 (en) Network configuration protocol and method for rapid traffic recovery and loop avoidance in ring topologies
US8204061B1 (en) Virtual port channel switches with distributed control planes
US8441941B2 (en) Automating identification and isolation of loop-free protocol network problems
EP1575221B1 (en) Ethernet automatic protection switching
US7822049B1 (en) System and method for enabling a remote instance of a loop avoidance protocol
JP2006245849A (en) Communication apparatus
US7752338B2 (en) Ring topology discovery
EP2533475A1 (en) Method and system for host route reachability in packet transport network access ring
US9385944B2 (en) Communication system, path switching method and communication device
JP2005130049A (en) Node
US7606240B1 (en) Ethernet automatic protection switching
JP2011517209A (en) Reduction of traffic loss in EAPS system
KR20090050933A (en) Failure recovery method in non revertive mode of ethernet ring netwrok
CN101999224A (en) Redundant Ethernet automatic protection switching access to virtual private lan services
JP2009516463A (en) VPLS remote fault indication
CN107968753B (en) Method and device for modifying media access control address forwarding table
WO2008110085A1 (en) Rpr bridge redundancy protection method, rpr bridge ring device and rpr bridge ring
JP2003258822A (en) Packet ring network and inter-packet ring network connection method used in the same
CN111585860B (en) Method, device, storage medium and equipment for loop network convergence
CN112995002B (en) Switch ring network design method, switch and storage medium
US10489236B2 (en) Method and system for managing a communication network
CN100550812C (en) Improve method, system and the node device of dependability of fast looped network
CN107196832B (en) Rapid ring network protection method
CN102025561A (en) Method and system for refreshing MAC (Medium Access Controller) in Ethernet ring
US11552882B2 (en) Efficient propagation of fault routing notifications

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