CN111464436B - Method for solving single-port loop of RSTP (remote station transfer protocol) - Google Patents
Method for solving single-port loop of RSTP (remote station transfer protocol) Download PDFInfo
- Publication number
- CN111464436B CN111464436B CN202010259187.2A CN202010259187A CN111464436B CN 111464436 B CN111464436 B CN 111464436B CN 202010259187 A CN202010259187 A CN 202010259187A CN 111464436 B CN111464436 B CN 111464436B
- Authority
- CN
- China
- Prior art keywords
- port
- rstp
- received
- bridge
- bpdu 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/18—Loop-free operations
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/60—Network streaming of media packets
- H04L65/65—Network streaming protocols, e.g. real-time transport protocol [RTP] or real-time control protocol [RTCP]
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Small-Scale Networks (AREA)
Abstract
The invention discloses a method for solving a single-port loop of an RSTP protocol, which comprises the following steps: step S1, the standard RSTP protocol runs, and the BPDU message is received; step S2, the port detects whether the received BPDU message is the BPDU message sent by the port, if yes, the step S3 is executed, otherwise, the standard processing logic of RSTP is entered; step S3, according to the different port roles, different processing methods are adopted for the BPDU messages sent by the received port to solve the single-port loop. The invention can solve the problem of network loop after the equipment which can not run the RSTP protocol is accessed to a certain port of the equipment which runs the RSTP protocol after the ring-shaped networking.
Description
Technical Field
The invention relates to the technical field of airborne network security, in particular to a method for solving a single-port loop of an RSTP protocol.
Background
The aircraft may have as many as a hundred devices onboard, communicating with each other via an ethernet interconnection. Under an airborne environment, the use amount of cables needs to be reduced as much as possible, the flight weight is reduced, and meanwhile, networking is required to have redundant link protection. Therefore, the method of using ring networking is widely applied to onboard networking. However, ethernet switches (also called bridges) require that no loops can be present in the network, otherwise a network storm can occur causing the entire network to be unavailable for interruption. The most widely used method for loop dynamic detection and loop removal in a network is the IEEE 802.1D 2004 RSTP protocol.
The RSTP protocol is also used to detect loops in airborne networks. The RSTP protocol, however, requires that all bridge devices in the network support the RSTP protocol, otherwise a situation may occur in which the loop cannot be broken. Due to the special requirements of the onboard equipment, the power consumption and the volume of partial equipment are as low as possible, so that partial equipment in the ring type networking may not be capable of running the RSTP protocol (the equipment which is incapable of running the RSTP protocol is simply referred to as simple network equipment). The simple network equipment is accessed to a certain equipment port running the RSTP protocol after networking through a normal loop-free network, and because the simple network equipment does not send the BPDU message, the equipment running the RSTP protocol can not receive the BPDU control message of the RSTP protocol at an access port, the access port is considered as an edge port and is in a normal forwarding state according to the RSTP protocol specification, and at the moment, the simple network equipment and all the equipment running the RSTP protocol are networked together and run normally. However, when a simple network device forms a network loop under certain conditions, the formed ring network storm generates a large amount of network storm messages to the access port of the device running the RSTP protocol, thereby affecting the bandwidth utilization of the entire network (as shown in fig. 1).
Disclosure of Invention
In order to solve the technical problem that a network loop is formed by simple network equipment in an airborne ring-shaped networking to generate a large amount of network storm messages so as to influence the broadband use of the whole network, the invention provides a method for solving a single-port loop of an RSTP protocol, and simultaneously ensures that the method provided by the invention is completely compatible and intercommunicated with standard RSTP.
The invention is realized by the following technical scheme:
a method of resolving RSTP protocol single port loops, the method comprising the steps of:
step S1, the standard RSTP protocol runs, and the BPDU message is received;
step S2, the port detects whether the received BPDU message is the BPDU message sent by the port, if yes, the step S3 is executed, otherwise, the standard processing logic of RSTP is entered;
step S3, according to the different port roles, different processing methods are adopted for the BPDU messages sent by the received port to solve the single-port loop.
Preferably, step S3 of the present invention specifically includes:
step S31, judging whether the port is the root port, if yes, executing step S32; if not, go to step S33;
step S32, clearing the spanning tree priority vector of the port, triggering the port role to reselect, and executing the standard processing logic of RSTP;
step S33, the port role is set as the backup port, and the device information source is the receiving and setting receiving information timer.
Further, step S32 of the present invention specifically includes: after receiving BPDU message, replacing the spanning tree priority vector information stored in the port with the spanning tree priority vector information of the bridge, setting the port priority vector information to be received, setting a receiving information timer, re-triggering the port to carry out root bridge election, and converting the port into a designated port by a new election result.
Further, in step S32, the invention adopts the standard processing logic of RSTP when the port role is reselected, and the specific processing is divided into the following two cases:
a) when the local bridge has the substitute port, the substitute port is directly switched to the root port, and the original root port is changed into the designated port because the designated bridge in the spanning tree priority vector is the local bridge;
b) when the bridge has no substitute port, the original root port is switched to the appointed port after selecting a new root bridge.
Preferably, the timeout timing of the receipt information timer of the present invention is set to three times the hello timing time of the RSTP protocol.
Further, step S33 of the present invention specifically includes: after receiving the BPDU message, setting the role of the port as a backup port, wherein the port is received when setting port priority vector information, and setting the overtime timing of the received information as three times of hello timing time of an RSTP protocol.
Compared with the prior art, the invention has the following advantages and beneficial effects:
the method of the invention is mainly to introduce a single-port loop detection method on the original processing logic of the RSTP protocol, and indirectly influences the operation result of the RSTP state machine through special processing after the port receives the BPDU message sent by the port, thereby realizing the solution of the loop under the port, and the modified RSTP protocol can keep compatibility with the standard RSTP.
Drawings
The accompanying drawings, which are included to provide a further understanding of the embodiments of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the principles of the invention. In the drawings:
fig. 1 is a schematic diagram of a network structure of a single port loop of the RSTP protocol.
FIG. 2 is a schematic flow chart of the method of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to examples and accompanying drawings, and the exemplary embodiments and descriptions thereof are only used for explaining the present invention and are not meant to limit the present invention.
Example 1
The embodiment provides a method for solving a single-port loop of an RSTP protocol.
The principle of the method of the embodiment is as follows: when the standard RSTP protocol is running, after receiving a BPDU message, comparing the priority in the message with the priority of a Port in a Port Information state machine, and processing according to the comparison result, when a Port lower loop as shown in fig. 1 occurs, the BPDU message sent by the Port and the BPDU messages sent by other devices are received because of the loop, but the BPDU messages do not cause the change of the Port role state, so that the network is affected by a network storm, and the following steps adopt different processing modes for receiving the BPDU message sent by the Port according to the difference of the Port roles, thereby solving the loop under the Port.
Specifically, as shown in fig. 2, the method of the present embodiment includes the following steps:
step S1, the standard RSTP protocol runs, and the BPDU message is received;
step S2, the port detects whether the received BPDU message is the BPDU message sent by the port, if yes, the step S3 is executed, otherwise, the standard processing logic of RSTP is entered;
step S3, according to the different port roles, different processing methods are adopted for the BPDU messages sent by the received port to solve the single-port loop.
The execution principle of step S3 is: (1) when the port is a root port, after receiving a BPDU message, replacing spanning tree priority vector information stored at the port with spanning tree priority vector information of the bridge, setting port priority vector information to be RECEIVED (info variable is set to RECEIVED), setting receiving information timeout timing (rcvdnfowhill variable) to triple hello timing time, re-triggering the port to perform root bridge election (setting a reselect variable and clearing the selected variable), and enabling the port to be converted into an appointed port by a new election result, thereby entering the processing of (2). (2) When the Port role is the designated Port, the substitute Port and the backup Port, the Port role is directly set as the backup Port after receiving the BPDU message, the Port priority vector information is set to be received, the receiving information overtime timing is set to be triple hello timing time, and as the Port role is changed, the Port State Transition State machine finally converts the Port State into the blocking State, thereby avoiding the influence of the network storm caused by the loop under the Port on the equipment.
Specifically, in the present embodiment, step S3 executes the following process:
step S31, judging whether the port is the root port, if yes, executing step S32; if not, go to step S33;
step S32, after receiving BPDU message, replacing the spanning tree priority vector information stored in the port with the spanning tree priority vector information of the bridge, setting the port priority vector information to be received, setting a received information timer, re-triggering the port to carry out root bridge election, converting the port into a designated port by a new election result, and skipping to execute RSTP standard processing logic;
in this embodiment, the standard processing logic of RSTP is used when re-electing the root bridge, that is, according to whether there is a substitute port in the current bridge, the processing is divided into the following two cases:
a) when the bridge has the substitute port, the substitute port is directly switched to the root port, and the original root port is changed into the designated port because the designated bridge in the spanning tree priority vector is the bridge.
b) When the bridge has no substitute port, the original root port is switched to the designated port after a new root bridge is elected.
In both cases the state after port transition is the designated port. And simultaneously, finishing the processing, wherein the appointed port continues to send the BPDU message after the election is finished, and the BPDU message is received by the port again because of the loop, and finally, the step S33 is carried out.
Step S33, setting the Port role (the Port role is non-root Port, including appointed Port, alternative Port, backup Port) as backup Port, setting the Port priority vector information to be received, setting the receiving information overtime timing as triple hello timing time, finally converting the Port State to block by Port State Transition State machine because the Port role is changed, thus avoiding the influence of network storm caused by loop under the Port on the device.
Because the port converted into the port whose port role is converted into the backup port in step S33 is converted into the designated port due to the timeout of the received information, if the access network existing loop under the port exists all the time, the conditions listed in step S2 are met all the time, and the access port of the loop of the single port is always in the blocking state. The existing loop of the access network does not influence the network running the RSTP protocol.
If the access network loop under the port disappears at a certain moment, the port cannot receive the BPDU message sent by the port and times out (rcvdinfo while variable), at this moment, the port enters the standard processing logic of RSTP to reselect the port role, finally, the port becomes an edge port, and the network automatically recovers to normal.
Since the prerequisite of the processing method listed in step S3 in this embodiment is that "the port receives the BPDU packet sent by the port", and this condition has no corresponding processing mechanism in the standard RSTP, the post-processing action performed based on this prerequisite will not affect the compatibility of the modified RSTP and the standard RSTP.
The onboard network networking method of the embodiment can solve the problem of network loops after a device (hereinafter, also simply referred to as a simple network device) which cannot run the RSTP protocol accesses a certain port of the device running the RSTP protocol after ring networking. The invention is also suitable for the scenes that other devices which can not run the RSTP protocol are connected into the RSTP protocol after forming a loop, and comprises a plurality of common small local area networks embedded among the devices.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are merely exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.
Claims (2)
1. A method for resolving RSTP protocol single port loops, the method comprising the steps of:
step S1, the standard RSTP protocol runs, and the BPDU message is received;
step S2, the port detects whether the received BPDU message is the BPDU message sent by the port, if yes, the step S3 is executed, otherwise, the standard processing logic of RSTP is entered;
step S3, according to the different port roles, different processing methods are adopted to the received BPDU message sent by the port to solve the single port loop; the step S3 specifically includes:
step S31, judging whether the port is the root port, if yes, executing step S32; if not, go to step S33;
step S32, after receiving BPDU message, replacing the spanning tree priority vector information stored in the port with the spanning tree priority vector information of the bridge, setting the port priority vector information to be received, setting a received information timer, re-triggering the port to carry out root bridge election, converting the port into a designated port by a new election result, and skipping to execute RSTP standard processing logic;
step S33, setting the Port role as backup Port, setting the Port priority vector information as received, setting the timeout timing of the received information as triple hello timing time, finally converting the Port State into block by Port State Transition State machine because the Port role is changed, thereby avoiding the influence of network storm caused by the loop under the Port on the device.
2. The method according to claim 1, wherein the standard processing logic of RSTP is adopted when the port role is reselected in step S32, and the specific processing is divided into the following two cases:
when the local bridge has the substitute port, the substitute port is directly switched to the root port, and the original root port is changed into the designated port because the designated bridge in the spanning tree priority vector is the local bridge;
when the bridge has no substitute port, the original root port is switched to the appointed port after selecting a new root bridge.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010259187.2A CN111464436B (en) | 2020-04-03 | 2020-04-03 | Method for solving single-port loop of RSTP (remote station transfer protocol) |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010259187.2A CN111464436B (en) | 2020-04-03 | 2020-04-03 | Method for solving single-port loop of RSTP (remote station transfer protocol) |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111464436A CN111464436A (en) | 2020-07-28 |
CN111464436B true CN111464436B (en) | 2022-02-01 |
Family
ID=71681636
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010259187.2A Active CN111464436B (en) | 2020-04-03 | 2020-04-03 | Method for solving single-port loop of RSTP (remote station transfer protocol) |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111464436B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112688867B (en) * | 2020-12-22 | 2022-07-12 | 浪潮思科网络科技有限公司 | Method, device, equipment and medium for operating spanning tree protocol in MLAG environment |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1845512A (en) * | 2006-05-25 | 2006-10-11 | 杭州华为三康技术有限公司 | Method and apparatus for detecting loop |
US7177946B1 (en) * | 2001-12-06 | 2007-02-13 | Cisco Technology, Inc. | Optimal sync for rapid spanning tree protocol |
CN101699799A (en) * | 2009-11-13 | 2010-04-28 | 福建星网锐捷网络有限公司 | Method and network equipment for preventing network loop and spanning tree protocol network system |
CN102571520A (en) * | 2011-12-31 | 2012-07-11 | 北京格林伟迪科技有限公司 | Method for realizing rapid convergence in looped network |
CN103067274A (en) * | 2012-12-19 | 2013-04-24 | 中兴通讯股份有限公司 | Spanning tree back-up port quick recovery method and device |
CN103763201A (en) * | 2013-12-31 | 2014-04-30 | 深信服网络科技(深圳)有限公司 | Loop cutting-off method and device based on STP / RSTP protocol |
CN104243334A (en) * | 2014-09-26 | 2014-12-24 | 杭州华三通信技术有限公司 | Method and equipment for preventing link congestion |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7076594B2 (en) * | 2000-12-22 | 2006-07-11 | Cisco Technology, Inc. | Apparatus and method for preventing one way connectivity loops in a computer network |
US8325629B2 (en) * | 2005-07-15 | 2012-12-04 | Cisco Technology, Inc. | System and method for assuring the operation of network devices in bridged networks |
CN105939275B (en) * | 2015-09-23 | 2020-01-03 | 杭州迪普科技股份有限公司 | MSTP domain calculation method and device |
CN106559331B (en) * | 2015-09-30 | 2020-01-21 | 华为技术有限公司 | Message transmission method, device and network system in MSTP (Multi-service transport platform) network |
-
2020
- 2020-04-03 CN CN202010259187.2A patent/CN111464436B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7177946B1 (en) * | 2001-12-06 | 2007-02-13 | Cisco Technology, Inc. | Optimal sync for rapid spanning tree protocol |
CN1845512A (en) * | 2006-05-25 | 2006-10-11 | 杭州华为三康技术有限公司 | Method and apparatus for detecting loop |
CN101699799A (en) * | 2009-11-13 | 2010-04-28 | 福建星网锐捷网络有限公司 | Method and network equipment for preventing network loop and spanning tree protocol network system |
CN102571520A (en) * | 2011-12-31 | 2012-07-11 | 北京格林伟迪科技有限公司 | Method for realizing rapid convergence in looped network |
CN103067274A (en) * | 2012-12-19 | 2013-04-24 | 中兴通讯股份有限公司 | Spanning tree back-up port quick recovery method and device |
CN103763201A (en) * | 2013-12-31 | 2014-04-30 | 深信服网络科技(深圳)有限公司 | Loop cutting-off method and device based on STP / RSTP protocol |
CN104243334A (en) * | 2014-09-26 | 2014-12-24 | 杭州华三通信技术有限公司 | Method and equipment for preventing link congestion |
Non-Patent Citations (1)
Title |
---|
网络环路的分析及对策;周佳;《电力信息化》;20120415(第04期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN111464436A (en) | 2020-07-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102821050B (en) | A kind of RSTP is applied to the processing method of Single-ring network topology | |
US7969915B2 (en) | Technical enhancements to STP (IEEE 802.1D) implementation | |
US7440397B2 (en) | Protection that automatic and speedily restore of Ethernet ring network | |
US7911938B2 (en) | System and method for preventing loops in the presence of control plane failures | |
US8139510B2 (en) | Optimizations and enhancements to the IEEE RSTP 802.1w implementation | |
US9473382B2 (en) | Method and system for link aggregation | |
EP2472795B1 (en) | Method and system for re-building single ring network topology | |
US20070104093A1 (en) | Method of inter-RPR-ring bridge redundancy | |
US9641396B2 (en) | Packet processing method and system | |
EP3316555B1 (en) | Mac address synchronization method, device and system | |
US10721094B2 (en) | Ethernet ring protection switching method and node | |
CN101110820B (en) | Method and switchboard for processing spanning tree protocol message | |
CN103607317A (en) | Two-layer loop detection method, two-layer loop detection device and communication system | |
CN101854283A (en) | Communication method and equipment of RPR (Resilient Packet Ring) looped network | |
CN113395261B (en) | Method, equipment and medium for spanning tree protocol fast convergence in MLAG environment | |
CN110535715B (en) | Linux-based port state real-time detection method, circuit and switch | |
CN104079462A (en) | Ring network configuration detection method and device | |
CN101771705B (en) | Processing method based on RRPP and device | |
CN102957588A (en) | Method and system for protecting looped network from broadcast storm | |
CN111464436B (en) | Method for solving single-port loop of RSTP (remote station transfer protocol) | |
CN112995002B (en) | Switch ring network design method, switch and storage medium | |
JP2011223172A (en) | Ring-type network system, communication apparatus and failure detection method | |
CN106059880B (en) | Link fault processing method and device | |
CN103840965A (en) | Method for enhancing quick fault convergence in RSTP | |
US20220247671A1 (en) | Device virtualization method, apparatus, system, device, and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |