CN100372333C - Distributed realization of rapid generating tree under multiple CPU environment - Google Patents

Distributed realization of rapid generating tree under multiple CPU environment Download PDF

Info

Publication number
CN100372333C
CN100372333C CNB2004100498352A CN200410049835A CN100372333C CN 100372333 C CN100372333 C CN 100372333C CN B2004100498352 A CNB2004100498352 A CN B2004100498352A CN 200410049835 A CN200410049835 A CN 200410049835A CN 100372333 C CN100372333 C CN 100372333C
Authority
CN
China
Prior art keywords
port
equipment
root
root port
local
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
CNB2004100498352A
Other languages
Chinese (zh)
Other versions
CN1713608A (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.)
New H3C Information Technologies Co Ltd
Original Assignee
Hangzhou H3C 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 H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CNB2004100498352A priority Critical patent/CN100372333C/en
Publication of CN1713608A publication Critical patent/CN1713608A/en
Application granted granted Critical
Publication of CN100372333C publication Critical patent/CN100372333C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Abstract

The present invention discloses a distributed implement method for a rapid spanning tree protocol in a multiple CPU environment, which comprises the following steps: each device only stores data at a local port and state machine information; each device maintains one virtual port, and information stored in the virtual port is current root port information in a distributed system; an RSTP (rapid spanning tree protocol) selects a unique external root port in the system according to local port information and information stored at the virtual port; the rapid convergence characteristic of the distributed RSTP is guaranteed by means of information synchronization among devices. If information received by a certain device in the distributed system is better than information stored at the virtual port of the device, then the device reselects a better port as the external root port, and issues the root port information to other devices in the system to inform other devices to reselect a root port; contrarily, the device selects the ports as selectable ports or appointed ports.

Description

The distributed implementation method of RSTP under many CPU environment
Technical field
The present invention relates to the RSTP of distributed system, the distributed implementation method of particularly a kind of RSTP under many CPU environment.
Background technology
Along with development of internet technology, the application of ethernet switched network is more and more general.Ethernet switched network is meant to be interconnected by netting twine by many ethernet switching devices to be formed.Ethernet switching device is only done to transmit to the data message and is handled, and message is not made any modification and sign.
In switching network, the physical connection of network is various, therefore, under a lot of situations, can have loop in switching network.Because ethernet device is transparent to the processing of message, promptly do not change and identify, therefore when having loop, whether switching equipment can't be distinguished message to be transmitted and be forwarded, message can repeat to transmit in this loop, cause message continuous hyperplasia in loop, finally cause whole network owing to packet congestion is paralysed.Fig. 1 shows the message hyperplasia situation under such loop situation.
Spanning tree algorithm (STP) is exactly in order to address the above problem appearance.Spanning tree algorithm basic principle be to determine topology of networks by between each switching equipment, transmitting bridge tube reason data cell (BPDU), and block the physical link of redundancy.As shown in Figure 1, under this network environment, by exchange BPDU, switching equipment can be found to have loop between own and the miscellaneous equipment, this moment, wherein an equipment can be blocked redundant port, made this port can only receive and send the BPDU message, and can't receive and send common data message, the problem of message hyperplasia in the time of so just can solving loop, as shown in Figure 2.
In order to prevent interim loop, when the physical structure of network changes, in the time of the link that blocks need being moved to forwarding state, need to wait for 30 second time, this time value is an empirical value, in general, can guarantee that during this period of time other switching equipment in the network have been found that the variation of this physical structure, thereby the redundant link that early cut-off may exist, like this when the link switchover of blocking when transmitting, interim loop can not occur in the network and cause the message hyperplasia to make whole network paralysis.
This shortcoming of Spanning-Tree Protocol is clearly, and promptly port is moved to forwarding state needs 30 seconds time delays, and this all is unallowed under a lot of application scenarios.At this shortcoming, RSTP (RSTP) has appearred.RSTP need not to wait for 30 seconds time delays, and only need just link can be moved to forwarding state by once shaking hands.The operation principle of RSTP is as follows:
1, for the port (can be referred to as edge port Edge Port) that directly links to each other with PC or other non-switching equipment, these ports can directly migrate to forwarding state and need not to wait for 30 seconds.So just can guarantee that the user can be communicated in the network immediately after start.
2, all devices only allows a paths even toward root bridge (promptly generating the tree root of tree) in the network, that is to say, every equipment can only have a port to connect toward root bridge (we claim that this port is root port Root Port), and other port that connects past root bridge will be used as the redundancy port existence, and this port gets clogged (we claim that this port is optional port Alternate Port).Synchronization, it is forwarding state that every nonroot bridge equipment has and only have a port.Therefore, when RSTP determined that original root port becomes blocked state, it can select a port as new root port from Alternate Port, and immediately it is moved to forwarding state.
3, the responsible port that E-Packets downstream in switching network, we are referred to as designated port (Designated Port), when designated port is moved to forwarding state from blocked state, need the BPDU of a request of equipment transmission downstream earlier, when upstream device is received this request BPDU, only connect two equipment of upstream and downstream (we are referred to as point-to-point link Point to Point) if receive the link of this BPDU, then upstream device can send a synchronizing signal to other all of the ports earlier, the port of receiving this signal will according to circumstances block oneself, be provided with then oneself to finish synchronously.After downstream equipment is received " finishing synchronously " signal of all other all of the ports except that the port that receives request BPDU, this equipment will upstream send one by receiving port and reply BPDU, designated port can be moved to forwarding state after receiving that this replys BPDU immediately.By above-mentioned processing, RSTP can be avoided 30 seconds stand-by period basically, and apace port is moved to forwarding state, thereby improves whole network of network convergence rate.
On the other hand, along with development of internet technology, increasing user need be linked in the network by ethernet device, thereby has also just occurred 256 or surpass the ethernet switching device (or being referred to as access device) of the high port density of 256 port numbers.This equipment generally adopts closed-in construction, and promptly master control borad adds the structure of polylith interface board, and interface board is plugged on the frame as an interpolation frame.This structure is a kind of typical many CPU distributed frame as shown in Figure 3, and promptly master control borad and every interface board all have a CPU to be responsible for correlation computations and controlled function.In Fig. 3, SRPA (Switching ﹠amp; Routing ProcessingUnit) is exchange route plate; LPU (Line Processing Unit) is a business board; PWR (Power) is a power module; FAN is the fan frame.
For box-shaped device, as shown in Figure 4, the equipment that Jiang Duotai is identical connects the common pile system of forming by special cable, so that the access device up to the high port density of hundreds of port number to be provided.Pile system can manage by order line and standard webmaster, and user and other network equipments only are equivalent to an equipment.Pile system is another common many CPU distributed system.Every box-shaped device all has at least one CPU, and each CPU plays not same-action according to designing in the pile system that do not coexist.
Under this many CPU distributed system, Spanning-Tree Protocol and RSTP must be handled it as an equipment, and itself and common multiple devices are by the switching network difference of netting twine interconnection:
1, the inner link that connects (comprise in the frame type equipment being connected between each interface board and master control borad the cable that piles up between each stack member connects in link and the pile system) must remain forwarding state, and the state of these links can not be subjected to the influence of external network structural change;
2, frame type equipment and pile system can only have the port of a company toward the root bridge, and the root port of an outside promptly can only be arranged;
3, the port number of the required management of agreement needs more high performance CPU to calculate than generally speaking more.
For this many CPU distributed system, especially frame type equipment, generally adopt master-slave mode to realize RSTP.Main equipment in master control borad or the pile system is responsible for mainly realizing that to the processing of BPDU message and the realization of algorithm, main equipment is issued to each interface board with the port stp state of calculating by remote control commands.The general only responsible BPDU that receives from local port that receives of interface board or slave unit, sending this BPDU to main equipment then handles, interface board and pile system slave unit are responsible for resolving the control command of autonomous device in addition, finish setting to the local port stp state according to instruction.
In this principal and subordinate's scheme, the realization of all spanning tree algorithms is finished by main equipment, the not responsible realization spanning tree algorithm of slave unit.Below the implementation procedure of master-slave mode will be described according to Fig. 5:
1, preserves the protocol state machine state and the port status parameter of all of the port on the main equipment;
2, after slave unit is received BPDU, send BPDU to main equipment, and send receiving port number to main equipment in the lump;
3, main equipment is according to the BPDU that receives and corresponding port number, the generation of all of the port tree role and determine the stp state of port in the computing system.The selection of port role and port status determine to see also IEEE Std 802.1w-2001.Amendment 2:Rapid Reconfiguration.
4, main equipment is handed down to slave unit with the stp state of port by control command; Main equipment also will need to send corresponding slave unit to by the BPDU that certain port on the slave unit sends;
5, after slave unit is received the control command that main equipment issues, the port stp state is set according to this instruction;
6, slave unit is according to coming autonomous device BPDU and transmitting terminal slogan that this BPDU message is sent from corresponding port.
The shortcoming of this technology is:
1, main equipment need be responsible for the generation tree calculating of all of the port in the system, and the CPU of main equipment needs high performance CPU.Slave unit only need be finished the processing of simple functions.For pile system, all devices all needs high-performance CPU like this, increases equipment cost, and the waste of slave unit cpu resource is serious;
When 2, main equipment calculates the port stp state, need be issued to each slave unit by control command.Need strict sequencing control because port is moved to forwarding state, promptly port needs to block all potential loops before entering forwarding state.Therefore issuing with the substep of each slave unit of this control command carried out the very difficult this sequential requirement that guarantees, causes increasing the possibility in interim loop;
3, increased the link that the BPDU message is transmitted, caused the BPDU losing probability to increase, can cause causing the network topology structure upheaval when serious owing to BPDU loses;
4, reduce the speed of network convergence, to the management of a large amount of ports, CPU need spend more time and carry out role and state computation, has therefore reduced the migration rapidity of port status;
5, main equipment need be preserved the data message and the state machine information of all of the port, needs more memory to preserve these data, has increased the manufacturing cost of equipment;
6, during master malfunction, need reselect a main equipment and be responsible for all of the port in the control system, the handoff procedure of new main equipment can cause whole topology of networks upheaval.
RSTP another implementation in many CPU distributed system (especially pile system) is " concentrating equation " implementation.So-called " concentrating equation " implementation is meant that all CPU in the system participate in the calculating of spanning tree algorithm, each CPU is when calculating port role and state, need all of the port in the computing system, after every equipment is received the BPDU message, all need this message is broadcast to intrasystem all miscellaneous equipments; After calculating finished, each CPU only was responsible for the stp state of control local port.Intrasystem each CPU is equivalent to the main equipment in the technology one, different is, main equipment in the technology one is responsible for all of the port state in the control system, though and the stp state of the interior all of the port of each the CPU computing system in the technology two, the port of reality control this locality at last.
This concentrate need be broadcast to all devices with the BPDU message to the equation implementation in system, below in conjunction with Fig. 6 the implementation procedure of this technology is described, wherein in Fig. 6, the 1-port receives BPDU; The 2-receiving equipment sends this BPDU to other all devices; The 3-port sends BPDU:
1, the data message and the state machine information that all need all of the port in the saved system on all devices;
2, after equipment is received the BPDU message from local port, deliver local cpu earlier and handle, and then this BPDU message is broadcast to other all devices and carries the inbound port number of this BPDU;
3. every equipment is according to the BPDU that receives and corresponding port number, the generation of all of the port tree role and determine the stp state of port in the computing system.The selection of port role and port status determine to see also IEEE Std 802.1w-2001.Amendment 2:Rapid Reconfiguration.
4. after determining the stp state of port, if this port in this locality, then directly is provided with the stp state of this port, otherwise computing mode is not only carried out working control;
5. every equipment is determined from the BPDU message of local port transmission according to current result of calculation, and message is sent from local port.
The shortcoming of this technology is:
1. every equipment all needs the generation tree of all of the port in the system that is responsible for to calculate, and equipment needs high performance CPU.Can increase the device fabrication cost;
2. increased the link that the BPDU message is transmitted, cause the BPDU losing probability to increase, can cause causing the network topology structure upheaval when serious owing to BPDU loses, and may cause losing of BPDU and cause that the result of calculation of each equipment is inconsistent, cause the spanning-tree state mistake in computation of whole system;
3. reduce the speed of network convergence, to the management of a large amount of ports, CPU need spend more time and carry out role and state computation, has therefore reduced the migration rapidity of port status;
4. every data message and state machine information that equipment all needs to preserve all of the port needs more memory to preserve these data, has increased the manufacturing cost of equipment;
5. the BPDU that receives of all of the port need broadcast in system, can take a large amount of bandwidth resources, causes the waste of equipment room communication bandwidth, thereby causes systematic function to descend.
Summary of the invention
The purpose of this invention is to provide the distributed implementation method of a kind of RSTP under many CPU environment.
An aspect according to invention the invention provides the distributed implementation method of a kind of RSTP under many CPU environment, comprising:
Each equipment is only preserved the data and the state machine information of local port;
Virtual port of every plant maintenance, the information that described virtual port is preserved are current root port information in the distributed system;
The information that RSTP (RSTP) preserves according to local port information and virtual port, relatively the priority of each port is come unique outside root port in the selective system.
Wherein, the port priority preserved by the port priority that contains among the BPDU (bridge protocol data unit) that is relatively received and virtual port of RSTP comes the interior unique outside root port of selective system.
Wherein, when the port priority of preserving when the virtual port of an equipment is lower than the port priority that contains among the BPDU that is received, RSTP selects unique outside root port to be positioned at this equipment, then BPDU and this port numbers of receiving sent to other all devices as synchronization message, to block the root port of other all devices.
Wherein, when the port priority of preserving when the virtual port of an equipment is higher than the port priority that contains among the BPDU that is received, the local root port of this equipment is chosen as optional port or designated port.
Wherein, when the root port that gets clogged needed fast transferring to arrive forwarding state, this was filled in root port all of the port in system and is issued " root port is reselected " signal, and this signal is broadcast to intrasystem other all of the ports by the synchronization message logical channel; Whether the equipment inspection local port of receiving " root port is reselected " signal is synchronous with the root port that gets clogged, if synchronously, then block local port, equipment will send " this equipment root port reselect " synchronously to the root port place equipment of getting clogged and indicate then; " this equipment root port reselect " synchronously sign of receiving that other all devices are sent in the system when the root port place equipment that gets clogged, and local other ports are when also all finishing synchronously, and the root port that gets clogged directly migrates to forwarding state.
Wherein, when the upstream designated port need be moved to forwarding state, designated port sends synchronization request message downstream, and downstream root port this moment other equipment in local all of the port and system send synchronizing signal, and synchronizing signal is broadcast to other all devices by the synchronization message logical channel; Receive that the equipment of this synchronizing signal carries out synchronization action in this locality, block potential redundancy port as required, after finishing synchronously, send the message that finishes synchronously to root port place equipment; When root port place equipment is received the message that finishes synchronously of other all devices in the system, and local other ports have been when also all having finished synchronously, and root port upstream designated port sends syn ack message; The upstream designated port directly migrates to forwarding state after receiving syn ack message.
According to another aspect of the present invention, the invention provides the distributed implementation method of a kind of RSTP under many CPU environment, wherein each equipment is only preserved the data and the state machine information of local port; Virtual port of every plant maintenance, the information that described virtual port is preserved are current root port information in the distributed system; This method may further comprise the steps:
A) after device port is received BPDU (bridge protocol data unit) message, message is delivered local RSTP (RSTP) handle, unique outside root port in the information selection systems that RSTP preserves according to local port information and virtual port;
B) if the outside root port of selecting is positioned at this equipment, then RSTP BPDU and this port numbers that this port is received sends to other all devices as synchronization message, is used to block the root port of other all devices;
C) if when equipment is received the root port information of sending from other equipment, this information is saved on the local virtual port, and triggering local root port role again selects, if when the root port information of oneself does not have far-end root port information excellent, the local root port will be selected as optional port or designated port.
D) when the root port that gets clogged needs fast transferring to arrive forwarding state, this is filled in root port all of the port in system and is issued " root port is reselected " signal, and this signal is broadcast to intrasystem other all of the ports by the synchronization message logical channel;
Whether the equipment inspection local port of e) receiving " root port is reselected " signal is synchronous with the root port that gets clogged, if synchronously, then block local port, equipment will send " this equipment root port reselect " synchronously to the root port place equipment of getting clogged and indicate then;
When f) " this equipment root port reselect " synchronously sign of receiving when the root port place equipment that gets clogged that other all devices are sent in the system, and local other ports also all finished synchronously, the root port that gets clogged directly migrated to forwarding state;
G) when the upstream designated port need be moved to forwarding state, designated port sends synchronization request message downstream, downstream root port this moment other equipment in local all of the port and system send synchronizing signal, and synchronizing signal is broadcast to other all devices by the synchronization message logical channel;
H) equipment of receiving this synchronizing signal is carried out synchronization action in this locality, blocks potential redundancy port as required, after finishing synchronously, sends the message that finishes synchronously to root port place equipment;
I) receive the message that finishes synchronously of other all devices in the system when root port place equipment, and local other ports have been when having finished synchronously all also, root port upstream designated port sends syn ack message;
J) after the upstream designated port is received syn ack message, directly migrate to forwarding state.
Wherein, when intrasystem certain device discovery change in topology or when receiving change in topology message, send change in topology message by the synchronization message logical channel to other all devices, equipment refreshes local address forwarding information after receiving this message.
The present invention has the following advantages:
1, reduces the amount of calculation of single CPU, solve the cpu performance needs of problems, promptly under the system of high port density, reduce requirement, adopt low performance CPU also can finish the computational process of RSTP cpu performance.
2, avoid BPDU to transmit, solve BPDU losing in the main equipment transport process to the stable influence that is brought of topology in inner link.
3, each CPU only controls the stp state of local port, avoids owing to sending stp state to other equipment reliability and the interim loop problem that instruction brings being set.
4, every data and state machine information that device just will be preserved local port reduces the demand to memory, reduces the device fabrication cost;
5, need between each equipment, not broadcast the BPDU message, reduce demand communication bandwidth between the equipment;
6,, avoided owing to the information synchronization between the equipment causes system's spanning-tree state mistake in computation by a kind of special method of synchronization;
7, adopt the design of equation distributed way, can not cause the spanning-tree state of whole system to recomputate during an equipment fault;
8, every equipment only calculates local port, and the minimizing at double of port number has improved the computational speed of Spanning-Tree Protocol, reduces the convergence time of network.
Above-mentioned purpose of the present invention, characteristics and effect will become clearer by following detailed description in conjunction with the accompanying drawings.
Description of drawings
Fig. 1 is the schematic diagram of message hyperplasia under the loop of prior art;
Fig. 2 is the schematic diagram that the port of the redundancy of prior art gets clogged;
Fig. 3 is existing many CPU frame type equipment schematic diagram;
Fig. 4 is existing many CPU pile system schematic diagram;
Fig. 5 utilizes master-slave mode to realize the schematic diagram of RSTP;
Fig. 6 utilizes the schematic diagram of concentrating the equation implementation;
Fig. 7 shows that the rapid spanning-tree of distributed system and general internet calculates the schematic diagram of difference;
Fig. 8 is the distributed realization schematic diagram of the RSTP under many CPU environment of the present invention;
Fig. 9 is the schematic diagram of the root port role transition state machine of distributed RSTP under many CPU environment.
Embodiment
Under the distributed situations of many CPU such as closed-in construction and pile system, the calculated characteristics of the RSTP under RSTP and the common many apparatus interconnections situation is different, describes difference below in detail:
1,, externally can only have a root port, and the root port of other equipment can only be the internal port that connects toward root port place equipment for distributed system.And in common interference networks, every equipment can independently be selected the root port of oneself, physical connection structure difference, and the parameter configuration difference all can cause the root port selected also different;
2, in the distributed system, the inner link that connects need remain forwarding state, whenever all can not be generated tree protocol and block.And in common interference networks, the link of interconnection can at any time be generated tree protocol as required and block;
When 3, port stp state fast transferring is to forwarding state, need to guarantee that all potential redundant links all get clogged, in distributed system, because inner link can not get clogged, therefore, when port was moved to forwarding state, it is synchronous with it that RSTP need guarantee to be positioned at port on other equipment (far-end port), moved to blocked state in case of necessity.And for common interconnect equipment, every device just will guarantee that local port is synchronous with the port that need move to forwarding state, need not to be concerned about the port on other equipment;
4, when the device discovery topology change or when receiving topological alteration notifying message, RSTP need refresh the address forwarding information that the local port that is necessary is acquired.For distributed system, when finding topology change or receiving topology change notification, the address forwarding information that RSTP needs the port of necessity all in the updating system to acquire.And for the equipment of common interconnection, its needs refresh the address forwarding information that local port is acquired, and need not to be concerned about the port of other equipment.
The present invention adopts " distributing to equation " design, the characteristics of this scheme are data and the state machine information that every equipment only is responsible for preserving local port, only handle BPDU message, and only control local port, the port of miscellaneous equipment in the system is not directly controlled from local port.In order to select the fast transferring of a unique root port and realization port stp state for whole system, between each equipment, RSTP carries out each equipment RSTP state synchronization by sending specific message in system.
Below in conjunction with Fig. 8 implementation procedure of the present invention is described:
1, each equipment is only preserved the data and the state machine information of local port.
2, virtual port of every plant maintenance, the information that this port is preserved are current root port information in the distributed system, if there is not root port in the system, then this port information of preserving can think invalid.
3, after port is received the BPDU message, message is delivered local RSTP handle.The information that RSTP preserves according to local port information and virtual port is come the root port in the selective system.Particularly, RSTP is in the election root port, the information that can preserve by all of the port on the compare facilities (comprises root bridge ID, to the distance of root, bridge ID, upstream designated port ID and the port id of oneself are specified in the upstream, if this equipment does not have upstream equipment, then specify bridge ID to be own bridge ID, designated port ID is the ID of own port), elect one to connect the port of past root bridge as root port by shortest path.That is to say that distributed RSTP characteristics are in election during root port, the information of being preserved on not only can all of the port (being local port) of compare facilities itself also can compare the information on that virtual port.
If 4 root ports of selecting are positioned at this equipment, then RSTP agreement BPDU and this port numbers that this port is received sends to other all devices as synchronization message.
When 5, if equipment is received the root port information of sending from other equipment, this information is saved on the local virtual port, and triggering local root port role again selects, if when the root port information of oneself does not have far-end root port information excellent, the local root port will be selected as optional port or designated port.
6, when the root port that gets clogged needs fast transferring to arrive forwarding state, root port can issue " root port is reselected " signal by all of the port in system, and this signal is broadcast to intrasystem other all of the ports by the synchronization message logical channel.
If 7 equipment are received " root port is reselected " signal, equipment can check whether local port is synchronous with this root port, if synchronously, then block this port, equipment will send " this equipment root port reselect " synchronously to root port place equipment and indicate then.
When 8, root port place equipment " this equipment root port reselect " synchronously sign of receiving that other all devices are sent in the system, and local other ports also all finished synchronously, root port directly migrated to forwarding state.
9, when the upstream designated port need be moved to forwarding state, designated port can send synchronization request message downstream, this moment, the downstream root port need send synchronizing signal by other equipment in local all of the port and system, and synchronizing signal also is to be broadcast to other all devices by the synchronization message logical channel.
10, after equipment is received this synchronizing signal, carry out synchronization action in this locality, block potential redundancy port as required.After finishing synchronously, equipment can send the message that finishes synchronously to root port place equipment.
11, receive the message that finishes synchronously of other all devices in the system when root port place equipment, and local other ports finish synchronously all also, then root port designated port response upstream syn ack message.
12, after the upstream designated port is received syn ack message, can directly migrate to forwarding state.
13, when intrasystem certain device discovery change in topology or receive change in topology message, can send change in topology message to other all devices by the synchronization message logical channel, equipment can refresh local address forwarding information after receiving this message.
Synchronization message adopts the reliable transmission mode to send, and transmission system itself guarantees that synchronization message is not lost.Synchronization message itself possesses 30 seconds ageing rather than 6 seconds ageing times of common BPDU.As long as synchronization message arrived in 30 seconds, mistake in computation promptly can not take place in RSTP.And in the prior art, this time generally is 6 seconds.Therefore, the present invention can improve the reliability of RSTP under the distributed system.
Below with reference to Fig. 9 concrete technical characterstic of the present invention is described.
1, selects unique outside root port
(1) definition of priority vector and priority comparison principle
The priority vector of RSTP is defined as: V{R, and RC, DB, DP, RP}, wherein:
R represents the root bridge ID in the network;
RC represents the distance of this bridge to the root bridge;
DB represents to specify bridge ID, i.e. the transmission bridge ID of this message;
DP represents designated port ID, i.e. the transmit port ID of message;
RP represents to receive the port id of this message;
The priority vector of RSTP comprises bridge priorities vector bridgePriority, port priority vector portPriority and message priority vector msgPriority.This external role also uses rootPriority and designatedPriority and rootPathPriority when calculating.The definition that each priority is suitable sees also IEEE 802.1w-2001 17.4 joints.
If when two vectorial V1, V2 compare:
((R1<R2))‖
((R1=R2)&&(RC1<RC2))‖
((R1=R2)&&(RC1=RC2)&&(DB1<DB2))‖
((R1=R2)&&(RC1=RC2)&&(DB1=DB2)&&(DP1<DP2))‖
((R1=R2)&&(RC1=RC2)&&(DB1=DB2)&&(DP1=DP2)&&(RP1<RP2))
Then V1 is than V2 excellent (Better).
(2) for each equipment increases a virtual port, the port role of this port participation device calculates
If there is root port in the miscellaneous equipment in the distributed system, then the portPriority of this port is the rootPathPriority of root port, i.e. { Rr, RCr, DBr, DPr, RPr}, each vectorial member all represents the information that this root port is preserved, and RPr represents root port ID (just receiving the port id of this information).
If do not have root port or root port in the distributed system on this equipment, then the portPriority of this port be B, 0, B, 0,0}, wherein B represents the bridge ID of this distributed system.
If this port is received new BPDU, whether the BPDU that then relatively receives than own excellent, if excellent then refresh the port role that local portPriority triggers this equipment then again and calculate.
If this port is received { Rr, RCr, DBr, DPr, the unavailable information of RPr}, then consistent with current portPriority, if consistent, then upgrading portPriority is bridgePriority, i.e. { B, 0, B, 0,0} triggers this device role then and recomputates; If inconsistent, then do not deal with.
(3) port role selection course
1) calculate rootPathPriority:
A) be the port of received to all portPriority, RSTP calculates the rootPathPriority of this port.RootPathPriority=portPriority, but the PathCost value of this port of RC+ of RC=portPriority wherein;
B) bridgePriority is calculated its rootPathPriority.rootPathPriority=bridgePriority;
C) if the portPriority of virtual port is not equal to bridgePriority, then calculate the rootPathPriority of this port.The rootPathPrioriy of the root port of this distributed system of portPriority=of the rootPathPriority=port of virtual port;
2) select optimum rootPathPriority, the i.e. rootPriority of this equipment.
The rootPathPriority relatively more all according to the priority vector comparison principle selects the rootPriority of this equipment of conduct of an optimum.
3) calculate the designatedPriority of all of the port according to rootPriority.DesignatedPriority is used for determining the BPDU content that this port sends.
4) determine each port role of this equipment according to the aforementioned calculation result.
Port status synchronous (the reRoot process is synchronous) when 2, root port is reselected
The direction that each bridge is gone to the root bridge can only have a paths (that is to say to have a root port), when new root port moves, does not have other path if go to the root direction, and then this root port can be moved to forwarding state immediately.
New root port does not have other to go to the path of root bridge in order to guarantee, it sends the reRoot signal between the forwarding state migration to all of the port, promptly notifies all of the port oneself to become root port, and wishes to move to forwarding state.
Other port if oneself be root bridge (be timer rrWhile does not have overtime) recently, then needs oneself is moved to blocked state after receiving the reRoot signal, stops the rrWhile timer then.
The rrWhile that root port is monitored all other ports regularly when all timers have all stopped (reRooted), represent currently not towards the path of root bridge, and at this moment, root port can be moved to forwarding state immediately.
For this synchronizing process, expand in the whole distributed system scope, can adopt following operating process:
(1) sends reRoot information
1) the reRoot sign of local all outside ports is set;
2) by the synchronization message transmission channel, this operation is sent to other all devices in the system, the reRoot sign of the port of these equipment is set;
3) each equipment carries out role's migration according to the state machine of the corresponding port of reRoot sign excitation.
(2) expand the reRooted definition
Define reRooted in the agreement: except the rrwhile timer of root port, the rrwhile timer of other all of the ports is all overtime in the system.
For distributed system, each equipment increase unitReRooted1, unitReRooted2 ..., unitReRootedM, wherein M is the maximum device number in the distributed system, represents wherein any one with unitReRootedX.
In addition, definition meReRooted is that this equipment is synchronous, and promptly the rrwhile timer of this equipment other ports except root port is all overtime.
Like this, reRooted is new is defined as:
MeReRooted﹠amp; ﹠amp; UnitReRooted1﹠amp; ﹠amp; UnitReRooted2﹠amp; ﹠amp; ... ﹠amp; ﹠amp; UnitReRootedM (except that the unitReRooted of this equipment)
(3) miscellaneous equipment sends the meReRooted signal to root port place equipment
After the meReRooted set of each equipment, send the meReRooted signal by the synchronization message transmission channel to root port place equipment, after root port place equipment is received this signal, corresponding unitReRooted variable is set, whether check reRooted then, if then encourage the state machine of root port to move, promptly fast transferring is to forwarding state.
3, the fast transferring synchronizing process of designated port (sync synchronizing process)
Designated port needs the proposal (synchronization request) of root port transmission downstream signal when forwarding state is moved, root port is provided with local proposed sign after receiving this signal.If because change in topology takes place recently, promptly the synced of root port is reset, then root port need send the sync signal to intrasystem all of the port, notifies these port upstream ports havings need move to forwarding state.
Designated port is after receiving the sync signal, if the synced of oneself does not have set, then port is moved to blocked state, then with oneself synced set.Because it does not provide forward-path, can not constitute loop danger for other port, can be directly with the synced set of port.
After root port detected the synced set of all other ports, promptly behind the allsynced, root port was provided with the synced sign of oneself, and upstream designated port sends the agree signal then, represents that oneself is synchronous.
Forwarding state can be moved to immediately in the upstream after receiving the agree signal.
For this synchronizing process, expand in the whole distributed system scope, can adopt following operating process:
(1) sends sync information
1) the sync sign of local all outside ports is set;
2) by the synchronization message transmission channel, this operation is sent to other all devices in the system, the sync sign of the port of these equipment is set;
3) each equipment carries out role's migration according to the state machine of the corresponding port of sync sign excitation.
(2) expand the allSynced definition
Define allSynced in the agreement: other all of the ports in the system except that root port are the synced state.
For distributed system, each equipment increase unitSynced1, unitSynced2 ..., unitSyncedM, wherein M is intrasystem maximum device number, represents wherein any one with unitSyncedX.
In addition, definition meSynced is that this equipment is synchronous, and promptly other all of the ports except that root port are the synced state in this equipment.
Like this, allSynced is new is defined as:
MeSynced﹠amp; ﹠amp; UnitSynced1﹠amp; ﹠amp; UnitSynced2﹠amp; ﹠amp; ... ﹠amp; ﹠amp; UnitSyncedM (except that the unitSynced of this equipment)
(3) miscellaneous equipment sends the meSynced signal to root port place equipment
After the meSynced set of each equipment, send the meSynced signal by the synchronization message transmission channel to root port place equipment, after root port place equipment is received this signal, corresponding unitSynced variable is set, whether check allSynced then, if then encourage root port upstream designated port send the agree signal.
4, topology change message synchronization process
Port is after finding change in topology or receiving change in topology message, and change in topology treatment state machine notifies other all of the port outwards to send topology change information.
For distributed system, processing procedure is as follows:
1) the tcProp sign of local other all of the port except that own is set, thereby encourages the state machine of these ports, trigger the tcWhile timer, remove the address forwarding information that port is acquired;
2) by the synchronization message transmission channel, this operation is sent to other all devices in the system, the tcProp sign of all of the port on these equipment is set, thereby encourage the port status machine of these equipment, trigger the tcWhile timer, remove the address of port and transmit item.
In sum, the present invention has following beneficial effect:
1, reduces RSTP to the demand of CPU and memory resource, reduce manufacturing of equipment This;
2, avoid BPDU to transmit in inner link, solve BPDU losing in the main equipment transport process Mistake is to the stable impact that brings of topology.
3, each CPU only controls the stp state of local port, avoids owing to need to send to other equipment Stp state arranges instruction and the reliability brought and interim loop problem.
4, need between each equipment, not broadcast the BPDU message, reduce the need to communication bandwidth between the equipment Ask;
5, the present invention has avoided owing to the information synchronization between the equipment causes by the special method of synchronization System's spanning-tree state mistake in computation;
6, the present invention adopts the design of equation distributed way, can not cause whole system during an equipment fault The spanning-tree state of system recomputates;
7, every equipment only calculates local port, the Spanning-Tree Protocol that the at double minimizing of port number provides Computational speed, the convergence rate of raising network.

Claims (10)

1. the distributed implementation method of a RSTP under many CPU environment comprises:
Each equipment is only preserved the data and the state machine information of local port;
Virtual port of every plant maintenance, the information that described virtual port is preserved are current root port information in the distributed system;
The information that RSTP is preserved according to local port information and virtual port, relatively the priority of each port is come unique outside root port in the selective system.
2. method according to claim 1, wherein RSTP comes outside root port unique in the selective system by the port priority of the port priority that contains in the bridge protocol data unit of relatively being received and virtual port preservation.
3. method according to claim 2, wherein, when the port priority of preserving when the virtual port of an equipment is lower than the port priority that contains in the bridge protocol data unit of being received, RSTP selects unique outside root port to be positioned at this equipment, then bridge protocol data unit and this port numbers of receiving sent to other all devices as synchronization message, to block the root port of other all devices.
4. method according to claim 2, wherein, when the port priority of preserving when the virtual port of an equipment is higher than the port priority that contains in the bridge protocol data unit of being received, the local root port of this equipment is chosen as optional port or designated port.
5. method according to claim 3, wherein:
When the root port that gets clogged needed fast transferring to arrive forwarding state, this was filled in root port all of the port in system and is issued " root port is reselected " signal, and this signal is broadcast to intrasystem other all of the ports by the synchronization message logical channel;
Whether the equipment inspection local port of receiving " root port is reselected " signal is synchronous with the root port that gets clogged, if synchronously, then block local port, equipment will send " this equipment root port reselect " synchronously to the root port place equipment of getting clogged and indicate then;
" this equipment root port reselect " synchronously sign of receiving that other all devices are sent in the system when the root port place equipment that gets clogged, and local other ports are when also all finishing synchronously, and the root port that gets clogged directly migrates to forwarding state.
6. according to each described method of claim 2 to 5, wherein:
When the upstream designated port need be moved to forwarding state, designated port sends synchronization request message downstream, downstream root port this moment other equipment in local all of the port and system send synchronizing signal, and synchronizing signal is broadcast to other all devices by the synchronization message logical channel;
Receive that the equipment of this synchronizing signal carries out synchronization action in this locality, block potential redundancy port as required, after finishing synchronously, send the message that finishes synchronously to root port place equipment;
When root port place equipment is received the message that finishes synchronously of other all devices in the system, and local other ports have been when also all having finished synchronously, and root port upstream designated port sends syn ack message;
The upstream designated port directly migrates to forwarding state after receiving syn ack message.
7. the distributed implementation method of a RSTP under many CPU environment, wherein each equipment is only preserved the data and the state machine information of local port; Virtual port of every plant maintenance, the information that described virtual port is preserved are current root port information in the distributed system; This method may further comprise the steps:
A) after device port is received bridge protocol data unit message, message is delivered local RSTP handle, unique outside root port in the information selection systems that RSTP is preserved according to local port information and virtual port;
B) if the outside root port of selecting is positioned at this equipment, then RSTP bridge protocol data unit and this port numbers that this port is received sends to other all devices as synchronization message, the notice miscellaneous equipment is re-elected, and is positioned at the root port of miscellaneous equipment with obstruction;
C) if when equipment is received the root port information of sending from other equipment, this information is saved on the local virtual port, and triggering local root port role again selects, if when the root port information of oneself does not have far-end root port information excellent, the local root port will be selected as optional port or designated port.
8. method according to claim 7, further comprising the steps of:
D) when the root port that gets clogged needs fast transferring to arrive forwarding state, this is filled in root port all of the port in system and is issued " root port is reselected " signal, and this signal is broadcast to intrasystem other all of the ports by the synchronization message logical channel;
Whether the equipment inspection local port of e) receiving " root port is reselected " signal is synchronous with the root port that gets clogged, if synchronously, then block local port, equipment will send " this equipment root port reselect " synchronously to the root port place equipment of getting clogged and indicate then;
When f) " this equipment root port reselect " synchronously sign of receiving when the root port place equipment that gets clogged that other all devices are sent in the system, and local other ports also all finished synchronously, the root port that gets clogged directly migrated to forwarding state.
9. according to claim 7 or 8 described methods, further comprising the steps of:
G) when the upstream designated port need be moved to forwarding state, designated port sends synchronization request message downstream, downstream root port this moment other equipment in local all of the port and system send synchronizing signal, and synchronizing signal is broadcast to other all devices by the synchronization message logical channel;
H) equipment of receiving this synchronizing signal is carried out synchronization action in this locality, blocks potential redundancy port as required, after finishing synchronously, sends the message that finishes synchronously to root port place equipment;
I) receive the message that finishes synchronously of other all devices in the system when root port place equipment, and local other ports have been when having finished synchronously all also, root port upstream designated port sends syn ack message;
J) after the upstream designated port is received syn ack message, directly migrate to forwarding state.
10. method according to claim 8, wherein, when intrasystem certain device discovery change in topology or when receiving change in topology message, send change in topology message by the synchronization message logical channel to other all devices, equipment refreshes local address forwarding information after receiving this message.
CNB2004100498352A 2004-06-25 2004-06-25 Distributed realization of rapid generating tree under multiple CPU environment Active CN100372333C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2004100498352A CN100372333C (en) 2004-06-25 2004-06-25 Distributed realization of rapid generating tree under multiple CPU environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2004100498352A CN100372333C (en) 2004-06-25 2004-06-25 Distributed realization of rapid generating tree under multiple CPU environment

Publications (2)

Publication Number Publication Date
CN1713608A CN1713608A (en) 2005-12-28
CN100372333C true CN100372333C (en) 2008-02-27

Family

ID=35719049

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2004100498352A Active CN100372333C (en) 2004-06-25 2004-06-25 Distributed realization of rapid generating tree under multiple CPU environment

Country Status (1)

Country Link
CN (1) CN100372333C (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101232508B (en) * 2008-02-26 2012-04-18 杭州华三通信技术有限公司 Equipment and method for speeding up poly spanning tree protocol network topological convergence
CN101527643B (en) * 2009-03-26 2011-05-11 杭州华三通信技术有限公司 Method, system and main equipment for acquiring stacking system information
CN102624630B (en) * 2012-03-28 2015-09-23 杭州华三通信技术有限公司 A kind of avoiding method of temporary loop and equipment
CN104270267B (en) * 2014-09-26 2019-03-15 新华三技术有限公司 A kind of port switching method and single-board device
CN111698155B (en) * 2020-06-17 2022-10-04 深圳市信锐网科技术有限公司 STP protocol message distributed processing method, system and related equipment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5761435A (en) * 1994-03-17 1998-06-02 Hitachi, Ltd. Multiprocessor bridge having storage for spanning tree operation mode information indicating whether each port of the bridge is operable under spanning tree protocol
WO2000018071A1 (en) * 1998-09-24 2000-03-30 Madge Networks Limited Communications network bridge
US6202114B1 (en) * 1997-12-31 2001-03-13 Cisco Technology, Inc. Spanning tree with fast link-failure convergence
EP0684716B1 (en) * 1994-05-25 2002-02-27 International Business Machines Corporation A data communication network and method for operating said network
US6407985B1 (en) * 1998-06-29 2002-06-18 Cisco Technology, Inc. Load sharing over blocked links
CN1434611A (en) * 2002-01-22 2003-08-06 富士通株式会社 Spanning tree detour method and device
JP2003298606A (en) * 2002-03-29 2003-10-17 Fujitsu Ltd Spanning tree setting system
US6697339B1 (en) * 1999-03-04 2004-02-24 3Com Corporation High availability spanning tree with rapid reconfiguration with alternate port selection

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5761435A (en) * 1994-03-17 1998-06-02 Hitachi, Ltd. Multiprocessor bridge having storage for spanning tree operation mode information indicating whether each port of the bridge is operable under spanning tree protocol
EP0684716B1 (en) * 1994-05-25 2002-02-27 International Business Machines Corporation A data communication network and method for operating said network
US6202114B1 (en) * 1997-12-31 2001-03-13 Cisco Technology, Inc. Spanning tree with fast link-failure convergence
US6407985B1 (en) * 1998-06-29 2002-06-18 Cisco Technology, Inc. Load sharing over blocked links
WO2000018071A1 (en) * 1998-09-24 2000-03-30 Madge Networks Limited Communications network bridge
US6697339B1 (en) * 1999-03-04 2004-02-24 3Com Corporation High availability spanning tree with rapid reconfiguration with alternate port selection
CN1434611A (en) * 2002-01-22 2003-08-06 富士通株式会社 Spanning tree detour method and device
JP2003298606A (en) * 2002-03-29 2003-10-17 Fujitsu Ltd Spanning tree setting system

Also Published As

Publication number Publication date
CN1713608A (en) 2005-12-28

Similar Documents

Publication Publication Date Title
CN1783841B (en) Soft router protocol disaggregation
US9178795B2 (en) Method and ethernet switching device for detecting loop position in ethernet
EP2472795B1 (en) Method and system for re-building single ring network topology
US9106595B2 (en) Frame transmission and communication network
CN1980230B (en) Method for managing VRRP group
CN104025513B (en) Apparatus and method for the control level in data center network
CN101662421B (en) Method and device for transmitting control message based on ethernet multi-ring network
CN102821050A (en) Processing method for applying rapid spanning tree protocol to monocyclic network topology
EP3039830B1 (en) Network switching systems and methods
JPH0624366B2 (en) Network failure recovery method
CN105340230A (en) Virtual chassis topology management
CN1825832B (en) Ring rapid spanning tree protocol
CN110313138A (en) High availability is realized using multiple network elements
EP2595345B1 (en) Redundant gateway system for device level ring networks
US9197507B2 (en) Auto-configuring multi-layer network
CN102571520B (en) A kind of method realizing Fast Convergent in looped network
CN103607293A (en) Flow protection method and equipment thereof
JPWO2016135828A1 (en) Relay device and communication system
CN100372333C (en) Distributed realization of rapid generating tree under multiple CPU environment
CN103441940A (en) Method and device for switching network device from stand-by state to main state and network device
CN112995002B (en) Switch ring network design method, switch and storage medium
WO2014075594A1 (en) Service transmission protection method and device based on intersecting ring of multi-ring structure network
WO2014117499A1 (en) Multicast recovering method and apparatus, and relay device comprising multicast recovering apparatus
CN111052684B (en) Method for operating a communication network in a ring topology and such a communication network
CN113810297B (en) Multi-network converged train network system and communication method thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Patentee after: NEW H3C TECHNOLOGIES Co.,Ltd.

Address before: 310053 Hangzhou hi tech Industrial Development Zone, Zhejiang province science and Technology Industrial Park, No. 310 and No. six road, HUAWEI, Hangzhou production base

Patentee before: HANGZHOU H3C TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230614

Address after: 310052 11th Floor, 466 Changhe Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: H3C INFORMATION TECHNOLOGY Co.,Ltd.

Address before: 310052 Changhe Road, Binjiang District, Hangzhou, Zhejiang Province, No. 466

Patentee before: NEW H3C TECHNOLOGIES Co.,Ltd.