The present invention relates to a network system and a method thereof, and more particularly to a system and a method for integrating redundant ring and Rapid Spanning Tree Protocol (RSTP) that increase, in a group manner, a quantity of devices running the RSTP and allow a connection between a redundant ring and a device running the RSTP.
In recent years, with popularity of the Internet, network topologies and network protocols become increasingly complex, or even can hardly be integrated, for example, a redundant ring protocol such as High-availability Seamless Redundancy (HSR) can hardly run concurrently with Rapid Spanning Tree Protocol (RSTP), leading to a failure of a redundancy mechanism of a whole network topology.
Generally, conventional devices running the RSTP can be connected by using any network topology. However, devices such as an intelligent electronic device (IED) or a programmable logic controller (PLC) are generally connected by means of a daisy chain, for example, and when the devices are connected to a switch, the switch also needs to run the RSTP, so as to form a large RSTP network. However, the RSTP has a maximum topology limit, causing that a network architecture is limited in size and cannot be expanded into a large network. In addition, when a network topology requirement changes, the network topology is also limited to being connected to a device running the RSTP, and there is a problem of poor scalability of the network architecture.
In view of the above, some manufactures propose to integrate a device running the RSTP with another ring, for example, Resilient Ethernet Protocol (REP), DT-Ring, S-Ring, MRP-Ring, and the like, so as to enable the redundancy mechanism and the RSTP to run concurrently. However, these manners are still limited to the maximum topology limit of the RSTP, and fail to effectively solve the problem of the poor scalability of the network architecture.
To sum up, it can be know that the problem of poor scalability of the network architecture has been existed in the prior art for a long time. Therefore, it is necessary to provide an improved technical means, so as to solve the problem.
The present invention discloses a system and a method for integrating redundant ring and Rapid Spanning Tree Protocol (RSTP).
First, the present invention discloses a system for integrating redundant ring and RSTP. The system includes: an HSR ring and a network topology. The HSR ring includes ring nodes. Each ring node includes a transmission module, a detection module, and a forwarding module. The transmission module is configured to transmit a Bridge Protocol Data Unit (BPDU) and includes: two first ports and a second port. Each of the two first ports is configured to be connected to one of two first ports of each of two different ring nodes, so as to form an HSR ring. The second port is configured to be connected to a first endpoint device or a second endpoint device running the RSTP, and is allowed to set a mode message and a group ID, where when the mode message is a transparent mode, forwarding the BPDU is allowed. The detection module is configured to detect, when the BPDU is received from the outside, a transmission source of the BPDU and a group to which the BPDU belongs. The forwarding module is configured to embed, when the transmission source is the second port, the group ID of the second port receiving the BPDU into the BPDU as the group to which the BPDU belongs, and forward the BPDU to the two first ports; and configured to compare, when the transmission source is one of the two first ports, the group to which the BPDU belongs with the group ID of the second port, and delete, if a comparison result is consistency, the group to which the BPDU belongs in the BPDU and forward the BPDU to the second port. With regard to the part of the network topology, each network topology includes at least a first endpoint device and a second endpoint device, and the first endpoint device and the second endpoint device of the network topology are separately connected to second ports with the same group ID in different ring nodes, so as to form a corresponding RSTP group.
In addition, the present invention further discloses a system for integrating redundant ring and Rapid Spanning Tree Protocol (RSTP), which is applied to a plurality of ring nodes that form a redundant ring. The system includes: a transmission module, a detection module, and a forwarding module. The transmission module is configured to transmit a Bridge Protocol Data Unit (BPDU) and includes two first ports and at least one second port. Each of the two first ports is configured to be connected to one of two first ports of each of two different ring nodes, so as to form the redundant ring. The second port is configured to be connected to a first endpoint device or a second endpoint device, running the RSTP, of a network topology, and is allowed to set a mode message and a group ID. When the mode message is a transparent mode, forwarding the BPDU is allowed. The first endpoint device and the second endpoint device of the network topology are separately connected to second ports with the same group ID, so as to form a corresponding RSTP group. The detection module is configured to detect, when the BPDU is received from the outside, a transmission source of the BPDU and a group to which the BPDU belongs. The forwarding module is configured to embed, when the transmission source is the second port, the group ID of the second port receiving the BPDU into the BPDU as the group to which the BPDU belongs; is configured to compare the group to which the BPDU belongs with a group ID of another second port, forward, if a comparison result is inconsistency, the BPDU to the first ports, and forward, if a comparison result is consistency, the BPDU to the consistent second port; and is configured to compare, when the transmission source is one the two first ports, the group to which the BPDU belongs with the group ID of the second port, forward, if a comparison result is inconsistency, the BPDU to the other first port, and delete, if a comparison result is consistency, the group to which the BPDU belongs in the BPDU and forward the BPDU to the consistent second port.
Subsequently, the present invention discloses a method for integrating redundant ring and Rapid Spanning Tree Protocol (RSTP), and steps of the method include: providing a High-availability Seamless Redundancy (HSR) ring, where the HSR ring includes a plurality of ring nodes, and each of two first ports of each ring node is connected to one of two first ports of each of two different ring nodes; connecting a second port of each ring node to a first endpoint device or a second endpoint device running the RSTP, and allowing the second port to set a mode message and a group ID, where when the mode message is a transparent mode, the second port allows forwarding of a Bridge Protocol Data Unit (BPDU); providing at least one network topology, where each network topology includes at least a first endpoint device and a second endpoint device, and the first endpoint device and the second endpoint device of the network topology are separately connected to second ports with the same group ID in different ring nodes, so as to form a corresponding RSTP group; detecting, when the ring node receives the BPDU from the outside, a transmission source of the BPDU and a group to which the BPDU belongs; embedding, when the transmission source is the second port, the group ID of the second port receiving the BPDU into the BPDU as the group to which the BPDU belongs by the ring node, and forwarding the BPDU to the two first ports; and comparing, when the transmission source is one of the two first ports, the group to which the BPDU belongs with the group ID of the second port, forwarding, if a comparison result is inconsistency, the BPDU to the other first port, and deleting, if a comparison result is consistency, the group to which the BPDU belongs in the BPDU and forwarding the BPDU to the second port.
In addition, the present invention further discloses a method for method for integrating redundant ring and Rapid Spanning Tree Protocol (RSTP), which is applied to a plurality of ring nodes that form a redundant ring, where each ring node includes two first ports and at least one second port; each of the two first ports is connected to one of two first ports of each of two different ring nodes; the second port is connected to a first endpoint device or a second endpoint device, running the RSTP, of a network topology; the first endpoint device and the second endpoint device of the network topology are separately connected to second ports with the same group ID, so as to form a corresponding RSTP group; and steps of the method include: allowing the second port by the ring node to set a mode message and the group ID, where when the mode message is a transparent mode, the second port allows forwarding of a Bridge Protocol Data Unit (BPDU); detecting, when the ring node receives the BPDU from the outside, a transmission source of the BPDU and a group to which the BPDU belongs; embedding, when the transmission source is the second port, the group ID of the second port receiving the BPDU into the BPDU as the group to which the BPDU belongs by the ring node, and comparing the group to which the BPDU belongs with a group ID of another second port, forwarding, if a comparison result is inconsistency, the BPDU to the first ports, and forwarding, if a comparison result is consistency, the BPDU to the consistent second port; and comparing, when the transmission source is one of the two first ports, the group to which the BPDU belongs with the group ID of the second port by the ring node, forwarding, if a comparison result is inconsistency, the BPDU to the other first port, and deleting, if a comparison result is consistency, the group to which the BPDU belongs in the BPDU and forwarding the BPDU to the consistent second port.
The systems and methods disclosed by the present invention are described as above, and differ from the prior art in that a mode message and a group ID are set for a ring node of a redundant ring, such that in a network environment in which redundant ring and RSTP run concurrently, the ring node allows, according to the group ID when the mode message is a transparent mode, forwarding of a BPDU to a consistent network topology, and each network topology is converged to a steady state RSTP domain.
By means of the foregoing technical means, the present invention can achieve the technical effect of improving the scalability of the network architecture.
Implementation of the present invention is illustrated below in detail with reference to the drawings and embodiments, so as to enable an implementation process, in which the present invention applies the technical means to solve the technical problem and achieve the technical effect, to be fully understood and implemented accordingly.
Before the system and the method for integrating redundant ring and RSTP disclosed by the present invention are described, first, terms defined by the present invention are described. A first port in the present invention refers to a port that is used in forming a redundant ring, and a second port in the present invention refers to a port for connecting a network topology to a switch. In practical implementation, one end of a network topology connected to a redundant ring is called a first endpoint device, and the other end of the network topology connected to the redundant ring is called a second endpoint device; and a second port is a port connected to the first endpoint device or the second endpoint device. In addition, in a transparent mode of the present invention, forwarding a BPDU to a port capable of forwarding is allowed, but a BPDU is not forwarded to a blocking port, and an RSTP is not processed, that is, a second port is in a state of the RSTP being closed. It should be noted that, a device such as the IED or the PLC is preset in a state of the RSTP being opened, but a second port of a ring node (alternatively called a switch) on a redundant ring can form a corresponding RSTP group with the device such as the IED or the PLC in a network topology only when the second port is in a state of the RSTP being closed, so as to prevent all the network topologies from forming a same RSTP group. If the second port opens the RSTP, at this time, the second port is unable to form corresponding RSTP groups for different network topologies, and when the ring node receives bridge protocol data, the ring node forwards the bridge protocol data according to the normal RSTP.
The following further describes the system and method for integrating redundant ring and RSTP of the present invention with reference to drawings. Referring to
With regard to the part of the ring nodes 100, each ring node 100 includes: a transmission module 110, a detection module 120, and a forwarding module 130. The transmission module 110 is configured to transmit a BPDU, and the transmission module 110 includes: two first ports 111 and a second port 112. Each of the two first ports 111 is connected to one of two first ports 111 of each of two different ring nodes 100, so as to form the HSR ring 10. The second port 112 is configured to be connected to the first endpoint device 21 or the second endpoint device 22 running the RSTP, and is allowed to set a mode message and a group ID. When the mode message is a transparent mode, the second port 112 is in a state of the RSTP being closed, and forwarding the BPDU is allowed. When the mode message is not a transparent mode and the second port 112 closes the RSTP, the second port 112 drops the received BPDU. It should be noted that when the mode message is not the transparent mode, if the BPDU is received by one first port 111, the ring node 100 directly forwards the BPDU received from the first port 111 to the other first port 111.
The detection module 120 is configured to detect, when the BPDU is received from the outside, a transmission source of the BPDU and a group to which the BPDU belongs. The outside refers to the outside of the device of the ring node 100. Therefore, both of the HSR ring 10 and the network topology 20 are located at the outside of the ring node 100. In practical implementation, the detection of a transmission source is determined by a particular port that receives the BPDU; the transmission source being the first port 111 represents that the BPDU is from the HSR ring 10; and the transmission source being the second port 112 represents that the BPDU is from the network topology 20. In addition, the detection of a group to which the BPDU belongs is determined by system ID extension, and the system ID extension is of 12 bits and records a group ID. Therefore, the group to which the BPDU belongs can be acquired by reading the group ID. It should be noted that, if the transmission source is the second port 112, at this time, the group ID is not embedded into the BPDU, and therefore, the group to which the BPDU belongs is determined by the group ID of the second port 112.
The forwarding module 130 is configured to embed, when the transmission source is the second port 112, the group ID of the second port 112 receiving the BPDU into the BPDU, where the group with the group ID is the group to which the BPDU belongs, and forward the BPDU to the two first ports 111; and is configured to compare, when the transmission source is one of the two first ports 111, the group to which the BPDU belongs with the group ID of the second port 112, forward, if a comparison result is inconsistency, the BPDU to the other first port 111, and delete, when a comparison result is consistency, the group to which the BPDU belongs in the BPDU and forward the BPDU to the second port 112. The network topologies 20 are grouped according to group IDs. Therefore, even in a case in which the HSR and the RSTP run concurrently, a network breakdown caused by occupation of an overall network by a broadcast packet or a multicast packet can be effectively avoided.
Subsequently, referring to
It should be additionally noted that in step 220, when the mode message is not a transparent mode and the second port 112 closes the RSTP, the BPDU received by the second port 112 may be directly discarded, and the BPDU received by one first port 111 is forwarded to the other first port 111.
Subsequently, referring to
The detection module 320 is configured to detect, when the BPDU is received from the outside, a transmission source of the BPDU and a group to which the BPDU belongs. The detection module 320 here is the same as the detection module 120 shown in
The forwarding module 330 is configured to embed, when the transmission source is the second port 312, the group ID of the second port 312 receiving the BPDU into the BPDU, where the group with the group ID is the group to which the BPDU belongs; is configured to compare the group to which the BPDU belongs with a group ID of another second port 312, forward, if a comparison result is inconsistency, the BPDU to the first ports 311, and forward, if a comparison result is consistency, the BPDU to the consistent second port 312; and is configured to compare, when the transmission source is one the two first ports 311, the group to which the BPDU belongs with the group ID of the second port 312, forward, if a comparison result is inconsistency, the BPDU to the other first port 311, and delete, if a comparison result is consistency, the group to which the BPDU belongs in the BPDU and forward the BPDU to the consistent second port 312. In other words, the forwarding module 330 performs corresponding forwarding according to a port receiving the BPDU. If a port receiving the BPDU is the second port 312, the group ID of the second port 312 is embedded (alternatively called labeled) in a packet. If a group ID of another second port 312 on the ring node 300 is the same as the group ID of the second port 312, the BPDU is forwarded to the second port 312 having the same group ID, and otherwise, the BPDU is forwarded to the first ports 311. If a port receiving the BPDU is one of the first ports 311, it is checked whether the group to which the BPDU belongs that is embedded in a packet is the same as the group ID of the second port 312 on the ring node 300, and if yes, the group ID of the packet is removed, and the BPDU is forwarded to the second port 312 with the same group ID, and otherwise, the BPDU is forwarded to the other first port 311. The forwarding module 330 is similar to the forwarding module 330 shown in
As shown in
It should be additionally noted that in step 310, when the mode message is not a transparent mode and the second port 312 closes the RSTP, the BPDU received by the second port 312 may be directly discarded, and the BPDU received by one of the two first port 311 is forwarded to the other first port 311.
The following description is made in a manner of embodiments with reference to
As shown in
To sum up, it can be known that the present invention differs from the prior art in that, a mode message and a group ID are set for each ring node of a redundant ring, such that in a network environment in which the redundant ring and the RSTP run concurrently, the ring node allows, when the mode message is a transparent mode, to forward, according to the group ID, a BPDU to a consistent network topology, and enables each network topology to be converged to a steady state RSTP domain. By means of this technical means, the problem that a redundant ring and an RSTP cannot run concurrently existing in the prior art can be resolved, thereby achieving the technical effect of improving the scalability of the network architecture.