Disclosure of Invention
In view of the above, the embodiment of the invention provides a method and a system for redundancy backup of a ring network, which are used for solving the problem that the existing backbone network connected by adopting a convergent link mode is difficult to realize redundancy backup.
In a first aspect of the embodiment of the present invention, there is provided a ring network redundancy backup method, including:
configuring group ring ports for newly-added network equipment and basic backbone network equipment respectively, wherein the newly-added network equipment is connected through the group ring ports, and the head and the tail of the newly-added network equipment are connected to the group ring ports of the basic backbone network equipment to form a ring network structure;
the method comprises the steps that a ring network message is sent at regular time by a ring group port of basic backbone network equipment, the ring network message is waited to be received, and the ring group port of newly added network equipment forwards the ring network message;
after the ring network message is received by the ring network port of the basic backbone network equipment, judging the priority of the ring network port by analyzing the ring network message, and selecting the master port and the slave port;
blocking the slave port with low priority and continuously waiting for the ring network message sent by the master port;
when the newly-added network equipment fails, the group ring port of the basic backbone network equipment enters a forwarding state, and when the newly-added network equipment fails and recovers, the group ring port of the basic backbone network equipment enters a blocking state again.
In a second aspect of the embodiment of the present invention, a ring network redundancy backup system is provided, which at least includes a newly-added network device, a basic backbone network device, and a ring port of the newly-added network device and a ring port of the basic backbone network device;
the newly added network devices are connected through a group ring port, and the head and the tail of the newly added network devices are connected to the group ring port of the basic backbone network device to form a ring network structure;
the group ring port of the basic backbone network equipment is used for sending the ring network message at regular time and waiting for receiving the ring network message, and the group ring port of the newly added network equipment is used for forwarding the ring network message;
after the ring network message is received by the ring network port of the basic backbone network equipment, judging the priority of the ring network port by analyzing the ring network message, selecting a master port and a slave port, blocking the slave port with low priority, and continuously waiting for the ring network message sent by the master port;
when the newly-added network equipment fails, the group ring port of the basic backbone network equipment enters a forwarding state, and when the newly-added network equipment fails and recovers, the group ring port of the basic backbone network equipment enters a blocking state again.
In the embodiment of the invention, the method and the device are not only suitable for backbone networks connected by the convergence links, so that newly added network equipment can be accessed in a ring network redundancy mode, but also can be arbitrarily replaced and inserted into any ring, configuration is not required to be modified, and maintenance is simple. Meanwhile, the method is applicable to complex network topological structures, and the self-healing time can reach millisecond level for network faults.
Detailed Description
In order to make the objects, features and advantages of the present invention more comprehensible, the technical solutions in the embodiments of the present invention are described in detail below with reference to the accompanying drawings, and it is apparent that the embodiments described below are only some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be understood that the term "comprising" and other similar meaning in the description of the invention or the claims and the above-mentioned figures is intended to cover a non-exclusive inclusion, such as a process, method or system, apparatus comprising a series of steps or elements, without limitation to the listed steps or elements. Furthermore, "first" and "second" are used to distinguish between different objects and are not used to describe a particular order.
Referring to fig. 1, a flow chart of a redundancy backup method for a ring network according to an embodiment of the present invention includes:
s101, configuring ring ports for newly-added network equipment and basic backbone network equipment respectively, wherein the newly-added network equipment is connected through the ring ports, and the head and the tail of the newly-added network equipment are connected to the ring ports of the basic backbone network equipment to form a ring network structure;
the newly added network equipment is network equipment added on a backbone network and is used for realizing network communication and realizing redundancy backup of the backbone network. The basic backbone network equipment is network equipment for connecting a plurality of areas or regions, and at least one backbone network equipment is connected with other backbone networks in each backbone network. The group ring port is a port for constructing a ring network, and can be used for sending, forwarding or receiving the message.
The newly added network devices are connected by using a group ring port, and then the head and the tail are respectively connected to the group ring port of the backbone device to form a ring network structure with the backbone network.
S102, the ring network message is sent at regular time by the ring port of the basic backbone network equipment, the ring network message is waited to be received, and the ring network message is forwarded by the ring port of the newly added network equipment;
the ring network message is used for detecting the communication state between network devices and judging whether the backbone network device and the newly-added network device are in a ring network state or not.
The group ring port of the backbone network device can be used for sending ring network messages at regular time and receiving returned ring network messages. The group ring port of the newly added network device is used for forwarding the ring network message.
The ring network message at least carries the MAC address, ring network state and sending port number of the sending equipment.
S103, after the ring network message is received by the ring port of the basic backbone network equipment, judging the priority of the ring port by analyzing the ring network message, and electing a master port and a slave port;
after receiving the ring network message, the ring network port of the basic backbone network equipment analyzes the ring network message, judges the priority of the ring network port connected with the backbone network, and takes the port with high priority as a master port and takes the port with low priority as a slave port. The priority of the group ring port can be determined according to the MAC address and the port number transferred to the ring network message.
Specifically, when the ring packet is received by the ring port of the basic backbone network device, the connection between the newly added network device and the basic backbone network device is determined to be in a ring network state, and the ring packet is analyzed.
It should be understood that the master-slave port is a group ring port where the newly added network device is connected to the backbone network.
S104, blocking the slave port with low priority and continuously waiting for the ring network message sent by the master port;
when the group ring port of the basic backbone network equipment is the main port, the timer of the backbone network equipment is closed, and the ring network message is continuously sent.
The timer is used for judging whether the message reception is overtime. After the backbone network equipment sends out the ring network message, the receiving time of the ring network message needs to be accumulated to verify whether the message is overtime, and if so, the corresponding exception handling is needed.
And when the group ring port of the backbone network equipment is a slave port, the port is converted into a blocking state and is used as a backup link, and the ring network message sent by the main port is continuously waited.
S105, when the newly-added network equipment fails, the group ring port of the basic backbone network equipment enters a forwarding state, and when the newly-added network equipment fails and recovers, the group ring port of the basic backbone network equipment enters a blocking state again.
Optionally, when the newly added network device is failed and recovered, the ring ports of the basic backbone network device are reelected according to the received ring network message, and the master and slave ports are selected.
Illustratively, as shown in fig. 2, the underlying backbone network device is defined as a trunk node, connected by an aggregation link, which does not participate in the group ring. The devices of the newly added network are defined as branch nodes which are connected to the basic backbone network end to end in a chained structure.
In one embodiment, after the Trunk node group ring ports are connected, waiting for receiving the ring network message and sending the ring network message of the Trunk node group ring ports at regular time; the Branch node forwards the received ring network message; the Trunk node group ring port receives the ring network message, judges the ring network message to be in a ring state, analyzes the ring network message and elects the master port and the slave port.
When the group ring port is the main port, entering a ring state, closing a timer and continuously sending a ring network detection message; when the group ring port is the slave port, the port is changed into a blocking state, and the ring network message sent by the master port is continuously waited.
In the loop state, when the Branch node link fails, the slave port is switched to a forwarding state, and a backup link is started. And after the fault is recovered, the Trunk node combined port re-performs master-slave port election according to the received ring network message, judges the master-slave port and converts the port to a message sending state or a blocking state.
It should be understood that in fig. 2, the ring structures shown in the figure may be formed between the added network device and the basic backbone network device, and in practice, the ring network structures are independent from each other. In any ring network, the ring network message starts from one group of ring ports of the basic backbone network equipment, ends from the other group of ring ports of the basic backbone network equipment, and the election of the master port and the slave port is also carried out from the two group of ring ports according to the ring network message. For a ring network, the master-slave port may be on one port on two base backbone network devices or on two ports on one base backbone network.
In this embodiment, based on the loop access of the newly added network device, a ring network packet is sent through the backbone network, and the master port and the slave port are elected according to the received packet, so that when the network fails, forwarding is performed through the backbone network port, and reliable communication from the newly added network to the backbone network is ensured. The method is suitable for backbone networks connected by the convergence links, so that newly-added network equipment can be accessed in a ring network redundancy mode, the newly-added network equipment can be arbitrarily replaced and inserted into any ring, configuration is not required to be modified, maintenance is simple, and the self-healing time can reach millisecond level for complex network topological structures.
It should be understood that the sequence number of each step in the above embodiment does not mean the sequence of execution, and the execution sequence of each process should be determined by its function and internal logic, and should not be construed as limiting the implementation process of the embodiment of the present invention.
Fig. 3 is a schematic structural diagram of a redundancy backup system of a ring network according to an embodiment of the present invention, where the system at least includes an added network device 310, a basic backbone network device 330, a ring port 320 of the added network device, and a ring port 340 of the basic backbone network device;
the newly added network devices are connected through a group ring port, and the head and the tail of the newly added network devices are connected to the group ring port of the basic backbone network device to form a ring network structure;
the group ring port of the basic backbone network equipment is used for sending the ring network message at regular time and waiting for receiving the ring network message, and the group ring port of the newly added network equipment is used for forwarding the ring network message;
after the ring network message is received by the ring network port of the basic backbone network equipment, judging the priority of the ring network port by analyzing the ring network message, selecting a master port and a slave port, blocking the slave port with low priority, and continuously waiting for the ring network message sent by the master port;
when the newly-added network equipment fails, the group ring port of the basic backbone network equipment enters a forwarding state, and when the newly-added network equipment fails and recovers, the group ring port of the basic backbone network equipment enters a blocking state again.
The ring network message at least carries the MAC address, ring network state and sending port number of the sending equipment.
And when the ring network message is received by the group ring port of the basic backbone network equipment, judging that the connection between the newly added network equipment and the basic backbone network equipment is in a ring network state, and analyzing the ring network message.
Optionally, when the group ring port of the basic backbone network device is the main port, the timer of the backbone network device is closed, and the ring network message is continuously sent.
Optionally, when the newly added network device is failed and recovered, the ring ports of the basic backbone network device are reelected according to the received ring network message, and the master and slave ports are selected.
It should be understood that, in general, the ring network protocol operates in the network device, the ring port is generated by configuration, the ring network algorithm determines that the ring network packet is to be sent, forwarded, and received from the ring port, and after the ring port receives the packet, the ring port needs to be parsed by the corresponding network device, and determines the state change of the ring port through the ring network algorithm.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.