Summary of the invention
The invention provides a kind of avoiding method and equipment of temporary loop, to avoid the temporary loop in spanning tree computational process.
In order to achieve the above object, the invention provides a kind of avoiding method of temporary loop, be applied in the spanning tree network of distributed apparatus and the root bridge device comprising and there is multiple veneer, in described multiple veneer, have at least two veneers to receive to come from the BPDU BPDU message in root bridge device direction; The method comprises:
After the veneer of described distributed apparatus is by port accepts to the BPDU message coming from described bridge device direction;
Do not receive if current from other veneers for determine root ROOT port plate between request receiving message, then described veneer determines that described port is ROOT port, forbid sending data traffic to other veneers, and send for determining ROOT port between plate request to other veneers and send message, and between described plate, request sends in message and carries precedence information corresponding to described port;
If request receiving message between the current plate received from other veneers, then the precedence information that the precedence information that the more described port of described veneer is corresponding is corresponding with other veneer ports carried in request receiving message between described plate; When the priority that other veneer ports described in the priority that described port is corresponding is better than are corresponding, described veneer determines that described port is ROOT port, forbid sending data traffic to other veneers, and ask to send message between other veneer transmission boards, and carry precedence information corresponding to described port in request transmission message between described plate; When the priority that other veneer ports described are corresponding is better than priority corresponding to described port, described veneer blocks described port.
Described veneer asks to send message between other veneer transmission boards, also comprise afterwards: described veneer receive from other veneers described for representing that other veneers have confirmed that between the plate of ROOT port on described veneer, response receives message, and allow to send data traffic to other veneers;
If request receiving message between the current plate received from other veneers, then when receiving request receiving message between the plate from other veneers, described veneer confirms that ROOT port is on other veneers described, and sends for representing that described veneer has confirmed that between the plate of ROOT port on other veneers described, response sends message to other veneers described.
If do not receive request receiving message between the plate from other veneers current, described veneer asks to send message between other veneer transmission boards, also comprises afterwards:
Described veneer receives request receiving message between the plate from other veneers described, carry precedence information corresponding to other veneer ports in request receiving message between described plate, other veneer ports described are the port other veneers described receiving the BPDU message coming from described bridge device direction; And the precedence information that precedence information corresponding to more described port is corresponding with other veneer ports described, know that the priority that other veneer ports described are corresponding is better than priority corresponding to described port according to comparative result, confirm that ROOT port is on other veneers described, block described port, and send for representing that described veneer has confirmed that between the plate of ROOT port on other veneers described, response sends message to other veneers described.
Comprise data traffic passage DFC between two veneers of described distributed apparatus and control flow channel C FC, described DFC is used for transmitting data stream amount between two veneers, and described CFC is used for transmission between two veneers and controls flow;
Described veneer is forbidden sending data traffic to other veneers by the DFC between obstruction itself and other veneer; And allow to send data traffic to other veneers by the DFC between relieving itself and other veneer;
Described veneer sends message by asking to send between request receiving message, plate between CFC and other veneer transmission boards to reply between message, plate to receive to reply between message, plate.
Described veneer is being forbidden sending data traffic to other veneers by the DFC between obstruction itself and other veneer, also comprises afterwards:
Described veneer is that described DFC starts Forwarding Latency timer, if do not receive yet after described Forwarding Latency timer expiry from other veneers described for representing that other veneers to have confirmed between the plate of ROOT port on described veneer that response receives message, then described veneer allows to send data traffic to other veneers by the DFC between relieving itself and other veneer, and stops described Forwarding Latency timer.
The invention provides a kind of avoiding method of temporary loop, be applied in the spanning tree network of distributed apparatus and the root bridge device comprising and there is multiple veneer, in described multiple veneer, have at least two veneers to receive to come from the BPDU BPDU message in root bridge device direction; The method comprises:
The veneer of described distributed apparatus receive from other veneers for determine root ROOT port plate between request receiving message time, wherein, carry precedence information corresponding to other veneer ports in request receiving message between described plate, and other veneer ports described are the port other veneers described receiving the BPDU message coming from described bridge device direction;
The BPDU message coming from described bridge device direction is not crossed by port accepts if current, then described veneer confirms that ROOT port is on other veneers described, and sends for representing that described veneer has confirmed that between the plate of ROOT port on other veneers described, response sends message to other veneers described;
The BPDU message coming from described bridge device direction is crossed by port accepts if current, the precedence information that the precedence information that then the more described port of described veneer is corresponding is corresponding with other veneer ports described, and know that the priority that other veneer ports described are corresponding is better than priority corresponding to described port according to comparative result, confirm that ROOT port is on other veneers described, block described port, and reply transmission message between other veneer transmission boards described.
The BPDU message coming from described bridge device direction is crossed by port accepts if current, then when receiving BPDU message, described veneer determines that described port is ROOT port, forbid sending data traffic to other veneers, and send for determining ROOT port between plate request to other veneers and send message, and between described plate, request sends in message and carries precedence information corresponding to described port; And, receive from other veneers described for representing that other veneers to have confirmed between the plate of ROOT port on described veneer that response receives message, and allow to send data traffic to other veneers.
Comprise data traffic passage DFC between two veneers of described distributed apparatus and control flow channel C FC, described DFC is used for transmitting data stream amount between two veneers, and described CFC is used for transmission between two veneers and controls flow;
Described veneer is forbidden sending data traffic to other veneers by the DFC between obstruction itself and other veneer; And allow to send data traffic to other veneers by the DFC between relieving itself and other veneer;
Described veneer sends message by asking to send between request receiving message, plate between CFC and other veneer transmission boards to reply between message, plate to receive to reply between message, plate.
Described veneer is being forbidden sending data traffic to other veneers by the DFC between obstruction itself and other veneer, also comprises afterwards:
Described veneer is that described DFC starts Forwarding Latency timer, if do not receive yet after described Forwarding Latency timer expiry from other veneers described for representing that other veneers to have confirmed between the plate of ROOT port on described veneer that response receives message, then described veneer allows to send data traffic to other veneers by the DFC between relieving itself and other veneer, and stops described Forwarding Latency timer.
The invention provides a kind of distributed apparatus, be applied to and comprise in the spanning tree network of described distributed apparatus and root bridge device, described distributed apparatus has multiple veneer, and has at least two veneers to receive in described multiple veneer to come from the BPDU BPDU message in described bridge device direction; The veneer of described distributed apparatus comprises:
Receiver module, for coming from the BPDU message in described bridge device direction by port accepts;
Judge module, for after receiving described BPDU message, judge current whether received from other veneers for determine root ROOT port plate between request receiving message;
Processing module, during for being no when judged result, determine that described port is ROOT port, forbid sending data traffic to other veneers, and send for determining ROOT port between plate request to other veneers and send message, and between described plate, request sends in message and carries precedence information corresponding to described port;
When judged result is for being, the precedence information that the precedence information that more described port is corresponding is corresponding with other veneer ports carried in request receiving message between described plate; When the priority that other veneer ports described in the priority that described port is corresponding is better than are corresponding, determine that described port is ROOT port, forbid sending data traffic to other veneers, and ask to send message between other veneer transmission boards, and carry precedence information corresponding to described port in request transmission message between described plate; When the priority that other veneer ports described are corresponding is better than priority corresponding to described port, block described port.
Described receiver module, also for sending after message in request between other veneer transmission boards, receive from other veneers described for representing that other veneers have confirmed that between the plate of ROOT port on described veneer, response receives message;
Described processing module, also for after receiving between described plate response and receiving message, allows to send data traffic to other veneers; And,
When judged result is for being, when receiving request receiving message between the plate from other veneers, confirm that ROOT port is on other veneers described, and send for representing that described veneer has confirmed that between the plate of ROOT port on other veneers described, response sends message to other veneers described.
Described receiver module, time also for being no when judged result, after between other veneer transmission boards, request sends message, receive request receiving message between the plate from other veneers described, carry precedence information corresponding to other veneer ports in request receiving message between described plate, other veneer ports described are the port other veneers described receiving the BPDU message coming from described bridge device direction;
Described processing module, also for receiving between described plate after request receiving message, the precedence information that the precedence information that more described port is corresponding is corresponding with other veneer ports described, know that the priority that other veneer ports described are corresponding is better than priority corresponding to described port according to comparative result, confirm that ROOT port is on other veneers described, block described port, and send for representing that described veneer has confirmed that between the plate of ROOT port on other veneers described, response sends message to other veneers described.
Comprise data traffic passage DFC between two veneers of distributed apparatus and control flow channel C FC, described DFC is used for transmitting data stream amount between two veneers, and described CFC is used for transmission between two veneers and controls flow;
Described processing module, specifically for forbidding sending data traffic to other veneers by the DFC between obstruction itself and other veneer; And allow to send data traffic to other veneers by the DFC between relieving itself and other veneer; And, send message by asking to send between request receiving message, plate between CFC and other veneer transmission boards to reply between message, plate to receive to reply between message, plate.
Described processing module, also for being forbidden to after other veneers send data traffic by the DFC blocked between itself and other veneer, for described DFC starts Forwarding Latency timer, if do not receive yet after described Forwarding Latency timer expiry from other veneers described for representing that other veneers to have confirmed between the plate of ROOT port on described veneer that response receives message, then allow to send data traffic to other veneers by the DFC between relieving itself and other veneer, and stop described Forwarding Latency timer.
The invention provides a kind of distributed apparatus, be applied to and comprise in the spanning tree network of described distributed apparatus and root bridge device, described distributed apparatus has multiple veneer, and has at least two veneers to receive in described multiple veneer to come from the BPDU BPDU message in described bridge device direction; The veneer of described distributed apparatus comprises:
Receiver module, for receive from other veneers for determine root ROOT port plate between request receiving message, wherein, carry precedence information corresponding to other veneer ports in request receiving message between described plate, and other veneer ports described are the port other veneers described receiving the BPDU message coming from described bridge device direction;
Judge module, for when receiving request receiving message between described plate, judges currently whether cross by port accepts the BPDU message coming from described bridge device direction;
Processing module, during for being no when judged result, confirms that ROOT port is on other veneers described, and sends for representing that described veneer has confirmed that between the plate of ROOT port on other veneers described, response sends message to other veneers described;
When judged result is for being, the precedence information that the precedence information that more described port is corresponding is corresponding with other veneer ports described, and know that the priority that other veneer ports described are corresponding is better than priority corresponding to described port according to comparative result, confirm that ROOT port is on other veneers described, block described port, and reply transmission message between other veneer transmission boards described.
Described processing module, also for when judged result is for being, then when receiving BPDU message, determine that described port is ROOT port, forbid sending data traffic to other veneers, and send for determining ROOT port between plate request to other veneers and send message, and between described plate, request sends in message and carries precedence information corresponding to described port; And, receive from other veneers described for representing that other veneers to have confirmed between the plate of ROOT port on described veneer that response receives message, and allow to send data traffic to other veneers.
Comprise data traffic passage DFC between two veneers of described distributed apparatus and control flow channel C FC, described DFC is used for transmitting data stream amount between two veneers, and described CFC is used for transmission between two veneers and controls flow;
Described processing module, specifically for forbidding sending data traffic to other veneers by the DFC between obstruction itself and other veneer; And allow to send data traffic to other veneers by the DFC between relieving itself and other veneer; And, send message by asking to send between request receiving message, plate between CFC and other veneer transmission boards to reply between message, plate to receive to reply between message, plate.
Described processing module, also for being forbidden to after other veneers send data traffic by the DFC blocked between itself and other veneer, for described DFC starts Forwarding Latency timer, if do not receive yet after described Forwarding Latency timer expiry from other veneers described for representing that other veneers to have confirmed between the plate of ROOT port on described veneer that response receives message, then allow to send data traffic to other veneers by the DFC between relieving itself and other veneer, and stop described Forwarding Latency timer.
Compared with prior art, the present invention at least has the following advantages: by data traffic between the plate of distributed apparatus also being brought in the counting system of spanning tree, to avoid the temporary loop in spanning tree computational process, eliminate the of short duration broadcast storm in network, the impact of broadcast storm in network on business is minimized.
Embodiment
The present invention proposes a kind of avoiding method of temporary loop, to avoid the temporary loop in spanning tree computational process, the method is applied in the spanning tree network of distributed apparatus and the root bridge device comprising and have multiple veneer, this spanning tree network includes but not limited to: based on the network of STP, based on RSTP (RapidSpanning Tree Protocol, RSTP) network and based on MSTP (MultipleSpanning Tree Protocol, Multiple Spanning Tree Protocol) etc.
In the present invention, BPDU (Bridge Protocol Data Unit, BPDU) message (the BPDU message that directly can send for root bridge device having at least two veneers to receive in multiple veneer to come from root bridge device direction; Or for root bridge device sends, received by other equipment, processed and the BPDU message forwarded).
For convenience of description, take Fig. 1 as application scenarios schematic diagram of the present invention, distributed apparatus comprises veneer 1 and veneer 2, and veneer 1 can receive by port one the BPDU message coming from root bridge device direction, and veneer 2 can receive by port 2 the BPDU message coming from root bridge device direction.
In the present invention, can be two parts by passage abstractdesription between the plate of distributed apparatus, it can be respectively DFC (Data Flow Chunnel, data traffic passage) and CFC (Control Flow Chunnel, control traffic channel), i.e. comprise DFC and CFC between two veneers (veneer 1 and veneer 2) of distributed apparatus; This DFC is used for transmitting data stream amount (being also service traffics) between two veneers, and this CFC is used for transmission between two veneers and controls flow (i.e. protocol massages).
It should be noted that each veneer is forbidden sending data traffic to other veneers by the DFC blocked between itself and other veneer, and allow to send data traffic to other veneers by the DFC decontroled between itself and other veneer; Such as, by the DFC blocked between veneer 1 and veneer 2, veneer 1 comes that no thoroughfare this DFC sends data traffic to veneer 2, and allows to send data traffic by this DFC to veneer 2 by the DFC decontroled between veneer 1 and veneer 2.
In addition, this protocol massages to include but not limited between plate response message between request message and plate, and veneer 1 can by response message between request message and plate between transmission board between CFC and veneer 2; And from the angle of veneer 1, between the plate that veneer 1 sends to veneer 2, request message is that between plate, request sends message, and between plate, response message is that between plate, response sends message; Between the plate that veneer 2 sends to veneer 1, request message is request receiving message between plate, and between plate, response message is that between plate, response receives message; From the angle of veneer 2, between the plate that veneer 1 sends to veneer 2, request message is request receiving message between plate, and between plate, response message is that between plate, response receives message; Between the plate that veneer 2 sends to veneer 1, request message is that between plate, request sends message, and between plate, response message is that between plate, response sends message.
The present invention is described in detail to be below divided into two kinds of situations.
Situation one, veneer 1 first receive the BPDU message coming from root bridge device direction by port one, after receive from veneer 2 between plate request message; This situation comprises:
(1) veneer 1 receives the BPDU message coming from root bridge device direction by port one, determine that port one is ROOT port, block all DFC of veneer 1, to forbid sending data traffic (namely forbidding sending data traffic to veneer 2 by the DFC blocked between veneer 1 and veneer 2) to other all veneers (for veneer 2 under this application scene); And veneer 1 sends for determining ROOT port between plate request message by CFC (CFC between veneer 1 and veneer 2) to veneer 2.
It should be noted that the ROOT port information carrying veneer 1 between this plate in request message, precedence information (repeating no more in acquisition pattern the present invention of this precedence information) as corresponding in port one; In addition, request flag position is also carried in request message between this plate, between this this plate of request flag bit representation, request message is used for determining ROOT port, is determined the judgement needing to carry out ROOT port by veneer 2 based on this request flag position, namely judges that ROOT port is positioned on veneer 1 or veneer 2.
In the present invention, veneer 1 is being forbidden, to after veneer 2 sends data traffic, also needing for the DFC between veneer 1 and veneer 2 starts a Forwarding Latency timer; If do not receive yet after Forwarding Latency timer expiry from veneer 2 for representing that veneer 2 has confirmed response message between the plate of ROOT port on veneer 1, then veneer 1 allows to send data traffic to veneer 2 by the DFC decontroled between itself and veneer 2, and stops forwarding back off timer.
(2) veneer 2 receives from veneer 1 between plate request message, based on the precedence information that port one is corresponding, veneer 2 confirms that ROOT port is on veneer 1, and sends for representing that veneer 2 has confirmed response message between the plate of ROOT port on veneer 1 to veneer 1.
Concrete, when between veneer 2 to receive from veneer 1 plate carrying request flag position by CFC after request message, the root information of precedence information corresponding for the port one carried in request message between plate and veneer 2 all of the port is compared, calculates with the spanning tree of carrying out on veneer 2; Result based on the comparison, veneer 2 can confirm ROOT port, and on veneer 1, (priority that the current all of the port of priority ratio veneer 2 that namely port one of veneer 1 transmission is corresponding is corresponding is more excellent, ROOT port is not at this plate), decontrol the DFC corresponding to this CFC, and to response message between veneer 1 transmission board.
(3) veneer 1 receive from veneer 2 for representing that veneer 2 has confirmed response message between the plate of ROOT port on veneer 1, decontrol the DFC between veneer 1 and veneer 2, to allow to send data traffic to veneer 2, and stop the Forwarding Latency timer of DFC.
Above-mentionedly received the processing procedure of the BPDU message coming from root bridge device direction by port one for veneer 1, after veneer 2 to receive the BPDU message coming from root bridge device direction by port 2, then this situation one can also comprise the steps:
(4) veneer 2 receives the BPDU message coming from root bridge device direction by port 2, compares the precedence information that precedence information corresponding to port one is corresponding with port 2; When the priority of port 2 correspondence is better than priority corresponding to port one, veneer 2 determines that port 2 is for ROOT port, forbid sending data traffic to veneer 1 by the DFC blocked between veneer 2 and veneer 1, and by CFC to request message between veneer 1 transmission board, and between this plate, in request message, carry the precedence information of port 2 correspondence; When the priority that port one is corresponding is better than the priority of port 2 correspondence, then veneer 2 blocks this port 2, and namely this port 2 is for replacing port (ALTE port) or backup port (BACKUP port).
It should be noted that, by CFC between veneer 1 transmission board during request message, request flag position is also carried in request message between this plate, between this this plate of request flag bit representation, request message is used for determining ROOT port, determined the judgement needing to carry out ROOT port by veneer 1 based on this request flag position, namely judge that ROOT port is positioned on veneer 1 or veneer 2.
In the present invention, veneer 2 is being forbidden, to after veneer 1 sends data traffic, also needing for the DFC between veneer 2 and veneer 1 starts a Forwarding Latency timer; If do not receive yet after Forwarding Latency timer expiry from veneer 1 for representing that veneer 1 has confirmed response message between the plate of ROOT port on veneer 2, then veneer 2 allows to send data traffic to veneer 1 by the DFC decontroled between itself and veneer 1, and stops forwarding back off timer.
(5) veneer 1 receives from veneer 2 between plate request message (carrying the precedence information of port 2 correspondence), the precedence information that the precedence information that relatively port one is corresponding is corresponding with port 2, know that the priority of port 2 correspondence is better than priority corresponding to port one according to comparative result, confirm that ROOT port is on veneer 2, port blocked 1 (namely this port one is for replacing port or backup port), and send for representing that veneer 1 has confirmed response message between the plate of ROOT port on veneer 2 to veneer 2.
(6) veneer 2 receive from veneer 1 for representing that veneer 1 has confirmed response message between the plate of ROOT port on veneer 2, decontrol the DFC between veneer 2 and veneer 1, to allow to send data traffic to veneer 1, and stop the Forwarding Latency timer of DFC.
Situation two, veneer 2 first receive the BPDU message coming from root bridge device direction by port 2, after receive from veneer 1 between plate request message; This situation comprises:
(1) veneer 2 receives the BPDU message coming from root bridge device direction by port 2, determine that port 2 is for ROOT port, block all DFC of veneer 2, to forbid sending data traffic (namely forbidding sending data traffic to veneer 1 by the DFC blocked between veneer 2 and veneer 1) to other all veneers (for veneer 1 under this application scene); And veneer 2 sends for determining ROOT port between plate request message by CFC (CFC between veneer 2 and veneer 1) to veneer 1.
It should be noted that the ROOT port information carrying veneer 2 between this plate in request message, as the precedence information (repeating no more in acquisition pattern the present invention of this precedence information) of port 2 correspondence; In addition, request flag position is also carried in request message between this plate, between this this plate of request flag bit representation, request message is used for determining ROOT port, is determined the judgement needing to carry out ROOT port by veneer 1 based on this request flag position, namely judges that ROOT port is positioned on veneer 1 or veneer 2.
In the present invention, veneer 2 is being forbidden, to after veneer 1 sends data traffic, also needing for the DFC between veneer 2 and veneer 1 starts a Forwarding Latency timer; If do not receive yet after Forwarding Latency timer expiry from veneer 1 for representing that veneer 1 has confirmed response message between the plate of ROOT port on veneer 2, then veneer 2 allows to send data traffic to veneer 1 by the DFC decontroled between itself and veneer 1, and stops forwarding back off timer.
(2) veneer 1 receives from veneer 2 between plate request message, based on the precedence information of port 2 correspondence, veneer 1 confirms that ROOT port is on veneer 2, and sends for representing that veneer 1 has confirmed response message between the plate of ROOT port on veneer 2 to veneer 2.
Concrete, when between veneer 1 to receive from veneer 2 plate carrying request flag position by CFC after request message, the precedence information of port 2 correspondence of carrying in request message between plate and the root information of veneer 1 all of the port are compared, calculates with the spanning tree of carrying out on veneer 1; Result based on the comparison, veneer 1 can confirm ROOT port, and on veneer 2, (i.e. the priority that the current all of the port of priority ratio veneer 1 of port 2 correspondence of veneer 2 transmission is corresponding is more excellent, ROOT port is not at this plate), decontrol the DFC corresponding to this CFC, and to response message between veneer 2 transmission board.
(3) veneer 2 receive from veneer 1 for representing that veneer 1 has confirmed response message between the plate of ROOT port on veneer 2, decontrol the DFC between veneer 2 and veneer 1, to allow to send data traffic to veneer 1, and stop the Forwarding Latency timer of DFC.
Above-mentionedly received the processing procedure of the BPDU message coming from root bridge device direction by port 2 for veneer 2, after veneer 1 to receive the BPDU message coming from root bridge device direction by port one, then this situation two can also comprise the steps:
(4) veneer 1 receives the BPDU message coming from root bridge device direction by port one, compares the precedence information that precedence information corresponding to port one is corresponding with port 2; When the priority that port one is corresponding is better than the priority of port 2 correspondence, veneer 1 determines that port one is ROOT port, forbid sending data traffic to veneer 2 by the DFC blocked between veneer 1 and veneer 2, and by CFC to request message between veneer 2 transmission board, and carry precedence information corresponding to port one in request message between this plate; When the priority of port 2 correspondence is better than priority corresponding to port one, then veneer 1 blocks this port one, and namely this port one is for replacing port (ALTE port) or backup port (BACKUP port).
It should be noted that, by CFC between veneer 2 transmission board during request message, request flag position is also carried in request message between this plate, between this this plate of request flag bit representation, request message is used for determining ROOT port, determined the judgement needing to carry out ROOT port by veneer 2 based on this request flag position, namely judge that ROOT port is positioned on veneer 1 or veneer 2.
In the present invention, veneer 1 is being forbidden, to after veneer 2 sends data traffic, also needing for the DFC between veneer 1 and veneer 2 starts a Forwarding Latency timer; If do not receive yet after Forwarding Latency timer expiry from veneer 2 for representing that veneer 2 has confirmed response message between the plate of ROOT port on veneer 1, then veneer 1 allows to send data traffic to veneer 2 by the DFC decontroled between itself and veneer 2, and stops forwarding back off timer.
(5) veneer 2 receives from veneer 1 between plate request message (carrying the precedence information that port one is corresponding), the precedence information that the precedence information that relatively port one is corresponding is corresponding with port 2, know that priority that port one is corresponding is better than the priority of port 2 correspondence according to comparative result, confirm that ROOT port is on veneer 1, port blocked 2 (namely this port 2 is for replacing port or backup port), and send for representing that veneer 2 has confirmed response message between the plate of ROOT port on veneer 1 to veneer 1.
(6) veneer 1 receive from veneer 2 for representing that veneer 2 has confirmed response message between the plate of ROOT port on veneer 1, decontrol the DFC between veneer 1 and veneer 2, to allow to send data traffic to veneer 2, and stop the Forwarding Latency timer of DFC.
For above-mentioned situation one of the present invention and situation two, when the ROOT port ageing failure of certain veneer (this veneer does not have ROOT port), then notice root information by all CFC to lose efficacy, all this veneers noticed that receives restart to calculate, if there is certain veneer to calculate ROOT port, then again process according to the mode of above-mentioned situation one and situation two.
For above-mentioned situation one of the present invention and situation two, the content of carrying in mutual message between a kind of preferred plate can be as shown in table 1.From the angle of veneer 1, veneer 1 is request message between plate to the message carrying P Flag that veneer 2 sends, and veneer 1 is response message between plate to the message carrying A Flag that veneer 2 sends; Veneer 2 is request message between plate to the message carrying P Flag that veneer 1 sends, and veneer 2 is response message between plate to the message carrying A Flag that veneer 1 sends.
Table 1
In sum, in the present invention, calculated and state transition by the role carrying out port after the information of all of the port of comprehensive distributed apparatus again, data traffic passage between the plate of distributed apparatus is also brought in the counting system of spanning tree, by controlling the state of data traffic passage between plate, solve the temporary loop in spanning tree computational process, have better effects for the of short duration broadcast storm eliminated in network.
For above-mentioned process of the present invention, consider from the angle of a veneer (being described for veneer 1), after the veneer 1 of distributed apparatus to receive the BPDU message coming from root bridge device direction by port (being described for port one), can perform the avoiding method schematic flow sheet of temporary loop as shown in Figure 2, the method comprises the following steps:
Step 201, veneer 1 judges request receiving message (for determining root ROOT port) between the current plate whether received from other veneers (carrying out follow-up explanation for veneer 2); If not, then step 202 is performed; If so, then step 204 is performed.
It should be noted that, for request receiving message between the plate received, wherein carry the precedence information that port (carrying out follow-up explanation for port 2) is corresponding, and port 2 is port veneer 2 receiving the BPDU message coming from root bridge device direction.
In the present invention, if judged result is request receiving message between the current plate received from veneer 2, then before step 201, when receiving request receiving message between the plate from veneer 2, veneer 1 will confirm that ROOT port is on veneer 2, and send for representing that veneer 1 has confirmed that between the plate of ROOT port on veneer 2, response sends message to veneer 2.
Step 202, veneer 1 determines that port one is ROOT port, forbid sending data traffic to veneer 2, and ask to send message (for determining ROOT port) between veneer 2 transmission board, and carry precedence information corresponding to port one in request transmission message between this plate.
Step 203, veneer 1 receives response between the plate from veneer 2 and receives message (for representing that veneer 2 has confirmed that ROOT port is at veneer 1), and allows to send data traffic to veneer 2.
In the present invention, step 202 is after between veneer 2 transmission board, request sends message, veneer 1 can also receive request receiving message between the plate from veneer 2 (for determining ROOT port), and carry the precedence information of port 2 correspondence between this plate in request receiving message, and port 2 is port veneer 2 receiving the BPDU message coming from root bridge device direction.
Afterwards, veneer 1 compares precedence information corresponding to the port one precedence information corresponding with port 2, and know that the priority of port 2 correspondence is better than priority corresponding to port one according to comparative result, thus confirm that ROOT port is on veneer 2, then need port blocked 1, and reply transmission message (for representing that veneer 1 has confirmed that ROOT port is at veneer 2) between veneer 2 transmission board.
Step 204, veneer 1 compares precedence information corresponding to the port one precedence information corresponding with port 2; When the priority that port one is corresponding is better than the priority of port 2 correspondence, perform step 205; When the priority of port 2 correspondence is better than priority corresponding to port one, perform step 206.
Step 205, veneer 1 determines that port one is ROOT port, forbid sending data traffic to veneer 2, and ask to send message (for determining ROOT port) between veneer 2 transmission board, and carry precedence information corresponding to port one in request transmission message between plate.Further, veneer 1 to after request sends message between veneer 2 transmission board, veneer 1 by receive from veneer 2 for represent veneer 2 confirmed ROOT port on veneer 1 plate between response receive message, and allow to send data traffic to veneer 2.
Step 206, veneer 1 port blocked 1.
In the present invention, in order to realize above-mentioned steps, can comprise DFC and CFC between two veneers of distributed apparatus, DFC is used for transmitting data stream amount between two veneers, and CFC is used for transmission between two veneers and controls flow; Veneer 1 is forbidden sending data traffic to veneer 2 by the DFC blocked between itself and veneer 2; And allow to send data traffic to veneer 2 by the DFC decontroled between itself and veneer 2; In addition, veneer 1 sends message etc. by asking to send between request receiving message, plate between CFC and veneer 2 transmission board to reply between message, plate to receive to reply between message, plate.
Further, veneer 1 is being forbidden to after veneer 2 sends data traffic by the DFC blocked between itself and veneer 2, veneer 1 also needs for this DFC starts Forwarding Latency timer, if do not receive yet after Forwarding Latency timer expiry from veneer 2 for representing that veneer 2 to have confirmed between the plate of ROOT port on veneer 1 that response receives message, then veneer 1 allows to send data traffic to veneer 2 by the DFC decontroled between itself and veneer 2, and stops forwarding back off timer.
For above-mentioned process of the present invention, consider from the angle of a veneer (being described for veneer 1), the veneer 1 of distributed apparatus receive from other veneers (being described for veneer 2) for determine ROOT port plate between request receiving message (wherein carry the precedence information that other veneer ports (being described for port 2) are corresponding, and port 2 is port veneer 2 receiving the BPDU message coming from root bridge device direction) time, the avoiding method schematic flow sheet of temporary loop as shown in Figure 3 can be performed, the method comprises the following steps:
Step 301, veneer 1 judges currently whether received by port (carrying out follow-up explanation for port one) the BPDU message coming from root bridge device direction; If not, then step 302 is performed; If so, then step 303 is performed.
Step 302, veneer 1 confirms that ROOT port is on veneer 2, and sends for representing that veneer 1 has confirmed that between the plate of ROOT port on veneer 2, response sends message to veneer 2.
Step 303, veneer 1 compares precedence information corresponding to the port one precedence information corresponding with port 2, and know that the priority of port 2 correspondence is better than priority corresponding to port one according to comparative result, confirm that ROOT port is on veneer 2, port blocked 1, and transmission message is replied between veneer 2 transmission board.
In the present invention, if judged result is currently received the BPDU message coming from root bridge device direction by port one, then before step 301, when receiving BPDU message, veneer 1 determines that port one is ROOT port, forbid sending data traffic to veneer 2, and send for determining ROOT port between plate request to veneer 2 and send message, and between plate, request sends in message and carries precedence information corresponding to port one; And, receive from veneer 2 for representing that veneer 2 to have confirmed between the plate of ROOT port on veneer 1 that response receives message, and allow to send data traffic to veneer 2.
In the present invention, in order to realize above-mentioned steps, can comprise DFC and CFC between two veneers of distributed apparatus, DFC is used for transmitting data stream amount between two veneers, and CFC is used for transmission between two veneers and controls flow; Veneer 1 is forbidden sending data traffic to veneer 2 by the DFC blocked between itself and veneer 2; And allow to send data traffic to veneer 2 by the DFC decontroled between itself and veneer 2; In addition, veneer 1 sends message etc. by asking to send between request receiving message, plate between CFC and veneer 2 transmission board to reply between message, plate to receive to reply between message, plate.
Further, veneer 1 is being forbidden to after veneer 2 sends data traffic by the DFC blocked between itself and veneer 2, veneer 1 also needs for this DFC starts Forwarding Latency timer, if do not receive yet after Forwarding Latency timer expiry from veneer 2 for representing that veneer 2 to have confirmed between the plate of ROOT port on veneer 1 that response receives message, then veneer 1 allows to send data traffic to veneer 2 by the DFC decontroled between itself and veneer 2, and stops forwarding back off timer.
In order to the technical scheme provided by the invention of elaboration clearly, below in conjunction with the application scenarios shown in Fig. 1, spanning tree computational process is described; The form that interactive information between plate (between plate between request message and plate response message) is simplified to two tuples is described, as { 1, P} represents that the priority of port is 1, with request flag position (i.e. request message between plate), { 2, A} represents that the priority of port is 2, with answer logo position (i.e. response message between plate), the numeral of priority is less, then represent that its priority is more excellent.
Based on above-mentioned scene, then concrete spanning tree computational process comprises the steps:
Step 1, after veneer 1 to receive the BPDU message that root bridge device sends by port one, due to do not receive other veneers plate between request message, therefore calculating port one is ROOT port, and the root priority that port one is corresponding is 1; Afterwards, veneer 1 blocks DFC, is that DFC starts Forwarding Latency timer, and by CFC to request message between veneer 2 transmission board, the information content of wherein carrying is { 1, P}; And veneer 1 by priority be 1 root information by port 3 to downstream device broadcasts.
Meanwhile, after veneer 2 to receive the BPDU message that root bridge device sends by port 2, due to do not receive other veneers plate between request message, therefore calculating port 2 is ROOT port, and the root priority of port 2 correspondence is 2; Afterwards, veneer 2 blocks DFC, is that DFC starts Forwarding Latency timer, and by CFC to request message between veneer 1 transmission board, the information content of wherein carrying for 2, P}, and veneer 2 by priority be 2 root information by port 4 to downstream device broadcasts.
Step 2, veneer 2 have received request message between plate by CFC, the information content of wherein carrying for 1, P}, find that the root priority in this information is 1, be better than the original root priority of this plate; Therefore the root priority of veneer 2 final calculation result becomes 1, and port 2 becomes ALTE port; Afterwards, DFC decontroled by veneer 2, stops Forwarding Latency timer corresponding to DFC, and by CFC to response message between veneer 1 transmission board, the information content of wherein carrying is information { 1, A}; And by priority be 1 root information by port 4 to downstream device broadcasts.
Step 3, veneer 1 have received request message between plate by CFC, and the information content of wherein carrying is for { 2, P}, the root priority finding in this information is 2 be not better than the original root priority of this plate; Therefore the root priority of veneer 1 final calculation result is still 1, final calculation result port one or ROOT port, and veneer 1 does not now need to respond response message between plate to veneer 2.
Further, veneer 1 can also receive response message between plate by CFC, and the information content of wherein carrying is for { 1, A}, based on this, DFC decontroled by veneer 1, stops the Forwarding Latency timer that DFC is corresponding.
In sum, spanning tree result of calculation is: port one is ROOT port, and port 2 is ALTE port (being namely in blocked state), and the DFC on two veneers is relieving state, and data traffic can normally forward.
Based on the inventive concept same with said method, the invention allows for a kind of distributed apparatus, be applied to and comprise in the spanning tree network of described distributed apparatus and root bridge device, described distributed apparatus has multiple veneer, and has at least two veneers to receive in described multiple veneer to come from the BPDU message in described bridge device direction; As shown in Figure 4, the veneer of described distributed apparatus comprises:
Receiver module 11, for coming from the BPDU message in described bridge device direction by port accepts;
Judge module 12, for after receiving described BPDU message, judge current whether received from other veneers for determine root ROOT port plate between request receiving message;
Processing module 13, during for being no when judged result, determine that described port is ROOT port, forbid sending data traffic to other veneers, and send for determining ROOT port between plate request to other veneers and send message, and between described plate, request sends in message and carries precedence information corresponding to described port;
When judged result is for being, the precedence information that the precedence information that more described port is corresponding is corresponding with other veneer ports carried in request receiving message between described plate; When the priority that other veneer ports described in the priority that described port is corresponding is better than are corresponding, determine that described port is ROOT port, forbid sending data traffic to other veneers, and ask to send message between other veneer transmission boards, and carry precedence information corresponding to described port in request transmission message between described plate; When the priority that other veneer ports described are corresponding is better than priority corresponding to described port, block described port.
Described receiver module 11, also for sending after message in request between other veneer transmission boards, receive from other veneers described for representing that other veneers have confirmed that between the plate of ROOT port on described veneer, response receives message;
Described processing module 13, also for after receiving between described plate response and receiving message, allows to send data traffic to other veneers; And,
When judged result is for being, when receiving request receiving message between the plate from other veneers, confirm that ROOT port is on other veneers described, and send for representing that described veneer has confirmed that between the plate of ROOT port on other veneers described, response sends message to other veneers described.
Described receiver module 11, time also for being no when judged result, after between other veneer transmission boards, request sends message, receive request receiving message between the plate from other veneers described, carry precedence information corresponding to other veneer ports in request receiving message between described plate, other veneer ports described are the port other veneers described receiving the BPDU message coming from described bridge device direction;
Described processing module 13, also for receiving between described plate after request receiving message, the precedence information that the precedence information that more described port is corresponding is corresponding with other veneer ports described, know that the priority that other veneer ports described are corresponding is better than priority corresponding to described port according to comparative result, confirm that ROOT port is on other veneers described, block described port, and send for representing that described veneer has confirmed that between the plate of ROOT port on other veneers described, response sends message to other veneers described.
Comprise data traffic passage DFC between two veneers of distributed apparatus and control flow channel C FC, described DFC is used for transmitting data stream amount between two veneers, and described CFC is used for transmission between two veneers and controls flow;
Described processing module 13, specifically for forbidding sending data traffic to other veneers by the DFC between obstruction itself and other veneer; And allow to send data traffic to other veneers by the DFC between relieving itself and other veneer; And, send message by asking to send between request receiving message, plate between CFC and other veneer transmission boards to reply between message, plate to receive to reply between message, plate.
Described processing module 13, also for being forbidden to after other veneers send data traffic by the DFC blocked between itself and other veneer, for described DFC starts Forwarding Latency timer, if do not receive yet after described Forwarding Latency timer expiry from other veneers described for representing that other veneers to have confirmed between the plate of ROOT port on described veneer that response receives message, then allow to send data traffic to other veneers by the DFC between relieving itself and other veneer, and stop described Forwarding Latency timer.
Wherein, the modules of apparatus of the present invention can be integrated in one, and also can be separated deployment.Above-mentioned module can merge into a module, also can split into multiple submodule further.
Based on the inventive concept same with said method, the invention allows for a kind of distributed apparatus, be applied to and comprise in the spanning tree network of described distributed apparatus and root bridge device, described distributed apparatus has multiple veneer, and has at least two veneers to receive in described multiple veneer to come from the BPDU message in described bridge device direction; As shown in Figure 5, the veneer of described distributed apparatus comprises:
Receiver module 21, for receive from other veneers for determine root ROOT port plate between request receiving message, wherein, carry precedence information corresponding to other veneer ports in request receiving message between described plate, and other veneer ports described are the port other veneers described receiving the BPDU message coming from described bridge device direction;
Judge module 22, for when receiving request receiving message between described plate, judges currently whether cross by port accepts the BPDU message coming from described bridge device direction;
Processing module 23, during for being no when judged result, confirms that ROOT port is on other veneers described, and sends for representing that described veneer has confirmed that between the plate of ROOT port on other veneers described, response sends message to other veneers described;
When judged result is for being, the precedence information that the precedence information that more described port is corresponding is corresponding with other veneer ports described, and know that the priority that other veneer ports described are corresponding is better than priority corresponding to described port according to comparative result, confirm that ROOT port is on other veneers described, block described port, and reply transmission message between other veneer transmission boards described.
Described processing module 23, also for when judged result is for being, then when receiving BPDU message, determine that described port is ROOT port, forbid sending data traffic to other veneers, and send for determining ROOT port between plate request to other veneers and send message, and between described plate, request sends in message and carries precedence information corresponding to described port; And, receive from other veneers described for representing that other veneers to have confirmed between the plate of ROOT port on described veneer that response receives message, and allow to send data traffic to other veneers.
Comprise data traffic passage DFC between two veneers of described distributed apparatus and control flow channel C FC, described DFC is used for transmitting data stream amount between two veneers, and described CFC is used for transmission between two veneers and controls flow;
Described processing module 23, specifically for forbidding sending data traffic to other veneers by the DFC between obstruction itself and other veneer; And allow to send data traffic to other veneers by the DFC between relieving itself and other veneer; And, send message by asking to send between request receiving message, plate between CFC and other veneer transmission boards to reply between message, plate to receive to reply between message, plate.
Described processing module 23, also for being forbidden to after other veneers send data traffic by the DFC blocked between itself and other veneer, for described DFC starts Forwarding Latency timer, if do not receive yet after described Forwarding Latency timer expiry from other veneers described for representing that other veneers to have confirmed between the plate of ROOT port on described veneer that response receives message, then allow to send data traffic to other veneers by the DFC between relieving itself and other veneer, and stop described Forwarding Latency timer.
Wherein, the modules of apparatus of the present invention can be integrated in one, and also can be separated deployment.Above-mentioned module can merge into a module, also can split into multiple submodule further.
Through the above description of the embodiments, those skilled in the art can be well understood to the present invention can by hardware implementing, and the mode that also can add necessary general hardware platform by software realizes.Based on such understanding, technical scheme of the present invention can embody with the form of software product, it (can be CD-ROM that this software product can be stored in a non-volatile memory medium, USB flash disk, portable hard drive etc.) in, comprise some instructions and perform method described in each embodiment of the present invention in order to make a computer equipment (can be personal computer, server, or the network equipment etc.).
It will be appreciated by those skilled in the art that accompanying drawing is the schematic diagram of a preferred embodiment, the module in accompanying drawing or flow process might not be that enforcement the present invention is necessary.
It will be appreciated by those skilled in the art that the module in the device in embodiment can carry out being distributed in the device of embodiment according to embodiment description, also can carry out respective change and be arranged in the one or more devices being different from the present embodiment.The module of above-described embodiment can merge into a module, also can split into multiple submodule further.
The invention described above sequence number, just to describing, does not represent the quality of embodiment.
Be only several specific embodiment of the present invention above, but the present invention is not limited thereto, the changes that any person skilled in the art can think of all should fall into protection scope of the present invention.