Background technology
MSTP is the most general redundancy backup technology of present Ethernet.But MSTP has the imperfection part in actual applications, and for example under multi-domain environment, the convergence time of MSTP significantly increased and instability after the root port of territory root device broke.
It is residual in network below to provide the old root information of a kind of MSTP, the situation that causes MSTP network topological convergence instability and convergence time to increase, specifically shown in Fig. 1~6:
As shown in Figure 1, DUT1 is total root bridge of whole network, belongs to territory A; DUT2, DUT3, DUT4 belong to territory B, and DUT2 is the territory root; The role of each port of DUT1, DUT2, DUT3, DUT4 as shown in Figure 1.
After linkdown that DUT2 links to each other with total root bridge DUT1 fell, DUT2 sent with the MSTP calculating message that oneself is total root, shown in the empty arrow among the B of Fig. 2 territory:
After the root port of DUT3 (port 23) is received this message, find that the priority of total root DUT1 that its backup port (port 24) is upward stored is higher than the priority of the total root DUT2 in the message, so former backup port (port 24) is switched to root port, simultaneously former root port (port 23) is switched to designated port, and be that total root, old territory root DUT2 are that the territory root sends MSTP calculating message to DUT2 with old root DUT1 still, shown in the solid arrow among Fig. 3.
When the root port (port 23) of DUT3 receives that the MSTP of DUT2 transmission calculates message, the root port of DUT4 (port 22) is also received this message, DUT4 finds that the priority of total root DUT1 that the backup port (port23) of oneself is stored is higher than the priority of the total root DUT2 in the message, so port 23 is switched to root port, simultaneously port 22 is switched to designated port, port 24 ports continue as designated port, DUT4 is that total root, DUT4 are that the territory root sends MSTP calculating message to DUT2, DUT3 with DUT1 simultaneously, shown in the empty arrow among Fig. 3.
After DUT2 receives that the MSTP of DUT3, DUT4 transmission calculates message, the MSTP INFORMATION DISCOVERY of the MSTP information of carrying in the message by relatively DUT3, DUT4 transmission and oneself storage: the MSTP that DUT3 sends calculates the MSTP information optimum that carries in the message, so designated port (port 23) is switched to root port, port 22 is switched to designated port, sending with old root DUT1 to DUT4 simultaneously is that the MSTP that total root, old territory root DUT2 are the territory root calculates message, shown in the solid arrow among Fig. 4.
Receive DUT3 at DUT2, when the MSTP that DUT4 sends calculates message, the root port of DUT3 (port 24) receives that the MSTP that DUT4 sends calculates message, because DUT3 does not have the root backup port, then DUT3 compares the priority of this bridge and total root that message carries, the priority of territory root, the priority of finding this bridge is low, then directly the STP information of oneself storing is comprised: total root, territory root etc. replaces to the STP information of carrying in the message, port role remains unchanged, sending with DUT1 to DUT2 from designated port (port 23) simultaneously is total root, DUT4 is that the MSTP of territory root calculates message, shown in the empty arrow among Fig. 4.
After DUT4 receives that the MSTP of DUT2 transmission calculates message, go up the MSTP information of storage by comparing the MSTP information of carrying in the message with the root port (port 23) of oneself, find that the MSTP information of carrying in the message is more excellent, then designated port (port 22) is switched to root port, former root port (port 23) is switched to backup port, former designated port (port 24) remains unchanged, sending with old root DUT1 to DUT3 simultaneously is that the MSTP that total root, old territory root DUT2 are the territory root calculates message, shown in the solid arrow among Fig. 5.
When DUT4 receives that the MSTP of DUT2 transmission calculates message, DUT2 receives that the MSTP that DUT3 sends calculates message, because DUT2 does not have the root backup port, relatively behind the total root that carries in this bridge priorities and the message, the territory root information, can direct STP information replace to the STP information of carrying in the message with this bridge, port role remains unchanged, and sending with DUT1 to DUT4 simultaneously is that total root, DUT4 are the MSTP calculating message of territory root, shown in the empty arrow among Fig. 5.
DUT3 receives when the MSTP of DUT4 transmission calculates message, because DUT3 does not have the root backup port, behind total root that this bridge priorities of comparison and message carry, the territory root information, can direct STP information replace to the STP information of carrying in the message with this bridge, port role remains unchanged, sending with old root DUT1 to DUT2 from designated port (port 23) simultaneously is that the MSTP that total root, old territory root DUT2 are the territory root calculates message, shown in the solid arrow among Fig. 6.
When DUT3 receives that the MSTP of DUT4 transmission calculates message, after DUT4 receives that the MSTP of DUT2 transmission calculates message, find that the territory root that carries in the message is oneself, message is directly abandoned, simultaneously port 22 ports are switched to designated port, port 23 ports are switched to root port, the port role of port 24 ports is constant, sending with DUT1 to DUT2, DUT3 simultaneously is that total root, DUT4 are the MSTP calculating message of territory root, shown in empty arrow among Fig. 6.
So far by relatively finding: Fig. 6 and Fig. 3 are identical, the MSTP that carries old root information calculate message in territory B cocycle one circle, then this message can continue to circulate, and causes the MSTP network topology to restrain fast.
According to foregoing description, network topology can can't be stablized forever, but owing in MSTP calculating message, a Message Age field is arranged, it can identify this message and how long transmit in network, its value is every all can be increased through a MSTP equipment, and after its value was greater than Max Age, this message will be regarded as invalid packet and abandon, so the old root in the network can be worn out at last, network topology can be stablized.
In sum, in the existing MSTP mechanism, the phenomenon that invalid old root information circulates and transmits may occur in the territory, thereby cause the MSTP network topology to restrain fast.
Embodiment
By analyzing the MSTP protocol discovery, in MSTP equipment is received from the territory, the territory root is for oneself and when satisfying the BPDU message of one of following condition, if not with packet loss, but normally calculate, then can cause invalid old root information to be transmitted, and then cause the topology of MSTP to restrain fast in the territory cocycle:
1, total root information in the BPDU message and the total root information of oneself are inconsistent;
2, external path Overhead in the BPDU message and the external path Overhead of oneself are inconsistent;
3, territory root information in the BPDU message and the territory root information of oneself are inconsistent.
Therefore, basic thought of the present invention is: in MSTP equipment is received from the territory, the territory root is for oneself and when satisfying the BPDU message of one of above-mentioned condition, directly with this packet loss, transmit in the territory cocycle to avoid old root information, make invalid old root information aging rapidly, thereby the MSTP network topology can restrain fast.
The present invention is further described in more detail below in conjunction with drawings and the specific embodiments.
The flow chart of the acceleration MSTP network topological convergence that Fig. 7 provides for the embodiment of the invention, as shown in Figure 7, its concrete steps are as follows:
Step 701:MSTP equipment receives bridge protocol data unit (BPDU, Bridge Protocol DataUnit) message.
It is a kind of of BPDU message that MSTP calculates message.
Whether step 702:MSTP equipment judges the BPDU message from the territory, if, execution in step 703; Otherwise, execution in step 708.
Can carry in the territory in the BPDU message or overseas identification information, according to this identification information, MSTP equipment can learn that the BPDU message is from still overseas in the territory.
Step 703:MSTP equipment judges whether the territory root in the message is oneself, if, execution in step 704; Otherwise, execution in step 707.
Step 704:MSTP equipment judges whether the total root information in the message is consistent with total root information of oneself storing, if, execution in step 705; Otherwise, dropping packets, this flow process finishes.
Step 705:MSTP equipment judges whether the external path Overhead in the message is consistent with the external path Overhead of oneself storing, if, execution in step 706; Otherwise, dropping packets, this flow process finishes.
The external path expense refers to the path cost between territory root and the total root.In Fig. 3, total root of DUT2 storage is that DUT2, territory root also are DUT2, and then the external path expense that calculates of DUT2 is 0; And DUT4 to go up total root of storage be that DUT1, territory root are DUT4, then the external path expense that calculates of DUT4 is the path cost between DUT4 and the DUT1.
Step 706:MSTP equipment judges whether the territory root information in the message is consistent with the territory root information of oneself storing, if, execution in step 707; Otherwise, dropping packets, this flow process finishes.
Step 707:MSTP equipment is handled this message according to message processing mode in the territory.
Step 708:MSTP equipment is handled this message according to overseas message processing mode.
Below provide three and use the realization MSTP topology embodiment illustrated in fig. 7 example of convergence fast:
The inconsistent situation of total root information of total root information in example one, the BPDU message and MSTP equipment.
As shown in Figure 1, after linkdown that DUT2 links to each other with total root bridge DUT1 fell, DUT2 will send MSTP to DUT3, DUT4 and calculate message, shown in the empty arrow among Fig. 2 oneself to be total root.
After the root port of DUT3 (port 23) is received this message, find that the priority of total root DUT1 that its backup port (port 24) is upward stored is higher than the priority of the total root DUT2 in the message, so former backup port (port 24) is switched to root port, simultaneously former root port (port 23) is switched to designated port, and with old root DUT1 be total root, old territory root DUT2 to be the territory root send MSTP to DUT2 calculates message, shown in the solid arrow among the B of Fig. 3 territory.
When the root port (port 23) of DUT3 receives that the MSTP of DUT2 transmission calculates message, the root port of DUT4 (port 22) is also received this message, DUT4 finds that the priority of total root DUT1 that the backup port (port23) of oneself is stored is higher than the priority of the total root DUT2 in the message, so port 23 is switched to root port, simultaneously port 22 is switched to designated port, port 24 ports continue as designated port, and DUT4 is that total root, DUT4 are that the territory root sends MSTP calculating message to DUT2, DUT3 with DUT1 simultaneously.Shown in the empty arrow among Fig. 3.
Set DUT2 and receive the MSTP calculating message of DUT3 transmission than receiving that the MSTP calculating message that DUT4 sends is Zao, the total root and the territory root of the last storage of DUT2 this moment still are oneself, this moment eligible 1: total root information in the message and the total root information of oneself are inconsistent, according to embodiment illustrated in fig. 7, DUT2 can directly abandon message.Like this, the MSTP that carries old root information calculates message can be again by the MSTP device forwards, thereby has avoided invalid old root information to be recycled the situation of forwarding, has quickened the MSTP network topological convergence.
The inconsistent situation of external path expense of external path expense in example two, the BPDU message and MSPT equipment oneself.
As shown in Figure 1, setting DUT2 is littler to the path cost of total root DUT1 than DUT4 to the path cost of total root DUT1.
After linkdown that DUT2 links to each other with total root DUT1 falls, DUT2 will send out MSTP for total root and territory root to DUT3, DUT4 with oneself and calculate message, shown in empty arrow among the B of Fig. 2 territory.
After the root port of DUT3 (port 23) is received this message, find that the priority of total root DUT1 that its backup port (port 24) is upward stored is higher than the priority of the total root DUT2 in the message, so former backup port (port 24) is switched to root port, simultaneously former root port (port 23) is switched to designated port, and be that total root, old territory root DUT2 are that the territory root sends MSTP calculating message to DUT2 with old root DUT1 still, shown in the solid arrow among Fig. 3.
When the root port (port 23) of DUT3 receives that the MSTP of DUT2 transmission calculates message, the root port of DUT4 (port 22) is also received this message, DUT4 finds that the priority of total root DUT1 that the backup port (port23) of oneself is stored is higher than the priority of the total root DUT2 in the message, so port 23 is switched to root port, simultaneously port 22 is switched to designated port, port 24 ports continue as designated port, DUT4 is that total root, DUT4 are that the territory root sends MSTP calculating message to DUT2, DUT3 with DUT1 simultaneously, shown in the empty arrow among Fig. 3.
Set DUT2 and receive the MSTP calculating message of DUT4 transmission than receiving that the MSTP calculating message that DUT3 sends is Zao, after DUT2 receives that the MSTP of DUT4 transmission calculates message so, find that the priority of the total root DUT1 in the message is higher than the priority of the total root DUT2 of oneself, so designated port port 22 is switched to root port, simultaneously total root is updated to DUT1, the territory root is updated to DUT4, as shown in Figure 8.
DUT2 receives that the MSTP that DUT3 sends calculates message afterwards, total root of total root and DUT2 in this message oneself is identical, all be DUT1, but the external path expense of external path expense and DUT2 in the message oneself is different, eligible 2, then according to embodiment illustrated in fig. 7, DUT2 can directly abandon this message.Like this, the MSTP that carries old root information calculates message can be again by the MSTP device forwards, thereby has avoided invalid old root information to be recycled the situation of forwarding, has quickened the MSTP network topological convergence.
The inconsistent situation of territory root information of territory root information in example three, the BPDU message and MSTP equipment oneself.
As shown in Figure 1, it is identical to the path cost of total root DUT1 with DUT4 to the path cost of total root DUT1 to set DUT2, but the priority of DUT2 is higher than DUT4.
After linkdown that DUT2 links to each other with total root DUT1 fell, DUT2 will be oneself to be that total root and territory root send MSTP to DUT3, DUT4 and calculate message, shown in the empty arrow among Fig. 2.
After the root port of DUT3 (port 23) is received this message, find that the priority of total root DUT1 that its backup port (port 24) is upward stored is higher than the priority of the total root DUT2 in the message, so former backup port (port 24) is switched to root port, simultaneously former root port (port 23) is switched to designated port, and be that total root, old territory root DUT2 are that the territory root sends MSTP calculating message to DUT2 with old root DUT1 still, shown in the solid arrow among Fig. 3.
When the root port (port 23) of DUT3 receives that the MSTP of DUT2 transmission calculates message, the root port of DUT4 (port 22) is also received this message, DUT4 finds that the priority of total root DUT1 that the backup port (port23) of oneself is stored is higher than the priority of the total root DUT2 in the message, so port 23 is switched to root port, simultaneously port 22 is switched to designated port, port 24 ports continue as designated port, DUT4 is that total root, DUT4 are that the territory root sends MSTP calculating message to DUT2, DUT3 with DUT1 simultaneously, shown in the empty arrow among Fig. 3.
Set DUT2 and receive the MSTP calculating message of DUT4 transmission than receiving that the MSTP calculating message that DUT3 sends is Zao, after DUT2 receives that the MSTP of DUT4 transmission calculates message so, find that the priority of the total root DUT1 in the message is higher than the priority of the total root DUT2 of oneself, so designated port port 22 is switched to root port, simultaneously total root is updated to DUT1, the territory root is updated to DUT4, as shown in Figure 8.
DUT2 receives that the MSTP that DUT3 sends calculates message afterwards, total root information that this message carries, external path Overhead be identical with DUT2 oneself all, but territory root and DUT2 in the message oneself is different, and eligible 3, then according to embodiment illustrated in fig. 7, DUT2 can directly abandon this message.Like this, the MSTP that carries old root information calculates message can be again by the MSTP device forwards, thereby has avoided invalid old root information to be recycled the situation of forwarding, has quickened the MSTP network topological convergence.
In actual applications, MSTP equipment definite BPDU message from the territory in and after the territory root is own, also can be only with any one compares corresponding in the total root in the BPDU message, external path expense, the territory root information with total root, external path expense, the territory root information self stored, if it is inconsistent, then abandon the BPDU message, if consistent, then handle this message according to message processing mode in the territory.
Perhaps, also can be only with any two kinds of compare corresponding in the total root in the BPDU message, external path expense, the territory root information with total root, external path expense, the territory root information self stored, if any one is inconsistent, then abandon the BPDU message, if all consistent, then handle this message according to message processing mode in the territory.Specifically can be divided into three kinds of situations:
Situation one, MSTP equipment judge whether the total root information in the message is consistent with total root information of oneself storing, if inconsistent, dropping packets; If consistent, continue then to judge whether the external path Overhead in the message is consistent with the external path Overhead of oneself storing, if then handle this message according to message processing mode in the territory; Otherwise, dropping packets.
Situation two, MSTP equipment judge whether the total root information in the message is consistent with total root information of oneself storing, if inconsistent, dropping packets; If consistent, continue then to judge whether the territory root information in the message is consistent with the territory root information of oneself storing, if handle this message according to message processing mode in the territory; Otherwise, dropping packets.
Situation three, MSTP equipment judge whether the external path Overhead in the message is consistent with the external path Overhead of oneself storing, if inconsistent, dropping packets; If consistent, continue then to judge whether the territory root information in the message is consistent with the territory root information of oneself storing, if handle this message according to message processing mode in the territory; Otherwise, dropping packets.
The structural representation of the MSTP equipment that Fig. 9 provides for the embodiment of the invention, as shown in Figure 9, it mainly comprises: message territory and territory root identification module 91 and abandon judge module 92, wherein:
Message territory and territory root identification module 91: receiving the BPDU message that other MSTP equipment is sent, is oneself if detect message from the territory root in the territory and in the message, then message is sent to and abandons judge module 92.
Abandon judge module 92: receive the BPDU message that message territory and territory root identification module 91 are sent, if detect: the external path Overhead in the inconsistent or message of total root information of the total root information in the message and this module stores and the external path Overhead of this module stores is inconsistent or message in the territory root information and the territory root information of this module stores inconsistent, then abandon this BPDU message.
As shown in Figure 9, message territory and territory root identification module 91 can by: message territory identification module 911 and territory root identification module 912 are formed, abandon judge module 92 can by: total root comparison module 921, external path expense comparison module 922 and territory root comparison module 923 are formed, in addition, MSTP equipment also can comprise: message processing module (MPM) 93 and overseas message processing module (MPM) 94 in the territory, and each module functions is as follows:
Message territory identification module 911: receive the BPDU message that other MSTP equipment is sent, whether judge message, if message is sent to territory root identification module 912 from the territory; Otherwise, message is sent to overseas message processing module (MPM) 94.
Territory root identification module 912: receive the BPDU message that message territory identification module 911 is sent, judge whether the territory root in the message is this MSTP equipment, if message is sent to total root comparison module 921; Otherwise, message is sent to message processing module (MPM) 93 in the territory.
Total root comparison module 921: total root information of storing this MSTP equipment, the BPDU message that acceptance domain root identification module 912 is sent, judge whether the total root information in the message is consistent with total root information of this module stores, if message is sent to external path expense comparison module 922; Otherwise, dropping packets.
External path expense comparison module 922: the external path expense of storing this MSTP equipment, receive the BPDU message that total root comparison module 921 is sent, judge whether the external path Overhead in the message is consistent with the external path expense of this module stores, if message is sent to territory root comparison module 923; Otherwise, dropping packets.
Territory root comparison module 923: the territory root information of storing this MSTP equipment, receive the BPDU message that external path expense comparison module 922 is sent, judge whether the territory root information in the message is consistent with the territory root information of this module stores, if message is sent to message processing module (MPM) 93 in the territory; Otherwise, dropping packets.
Message processing module (MPM) 93 in the territory: the BPDU message that acceptance domain root identification module 912 or territory root comparison module 923 are sent, handle this message according to message processing mode in the territory.
Overseas message processing module (MPM) 94: receive the message that message territory identification module 911 is sent, handle this message according to overseas message processing mode.
In actual applications, abandoning judge module also can include only: total root comparison module, be used to store total root information of this MSTP equipment, the BPDU message that acceptance domain root identification module 912 is sent, judge whether the total root information in the message is consistent with total root information of this module stores, if message is sent to message processing module (MPM) 93 in the territory; Otherwise, dropping packets.
Perhaps, include only: external path expense comparison module, be used to store the external path expense of this MSTP equipment, the BPDU message that acceptance domain root identification module 912 is sent, judge whether the external path Overhead in the message is consistent with the external path expense of this module stores, if message is sent to message processing module (MPM) 93 in the territory; Otherwise, dropping packets.
Perhaps, include only: territory root comparison module is used to store the territory root information of this MSTP equipment, the BPDU message that acceptance domain root identification module 912 is sent, judge whether the territory root information in the message is consistent with the territory root information of this module stores, if message is sent to message processing module (MPM) 93 in the territory; Otherwise, dropping packets.
Perhaps, also can be only by: total root comparison module and external path expense comparison module are formed, wherein:
Total root comparison module: the total root information that is used to store this MSTP equipment, the BPDU message that acceptance domain root identification module 912 is sent, judge whether the total root information in the message is consistent with total root information of this module stores, if message is sent to external path expense comparison module; Otherwise, dropping packets.
External path expense comparison module: the external path expense of storing this MSTP equipment, receive the BPDU message that total root comparison module is sent, judge whether the external path Overhead in the message is consistent with the external path expense of this module stores, if message is sent to message processing module (MPM) 93 in the territory; Otherwise, dropping packets.
Perhaps, also can be only by: total root comparison module and territory root comparison module are formed, wherein:
Total root comparison module: store total root information of this MSTP equipment, the BPDU message that acceptance domain root identification module 912 is sent judges whether the total root information in the message is consistent with total root information of this module stores, if message is sent to territory root comparison module; Otherwise, dropping packets.
Territory root comparison module: store the territory root information of this MSTP equipment, receive the BPDU message that total root comparison module is sent, judge whether the territory root information in the message is consistent with the territory root information of this module stores, if message is sent to message processing module (MPM) 93 in the territory; Otherwise, dropping packets.
Perhaps, also can be only by: external path expense comparison module and territory root comparison module are formed, wherein:
External path expense comparison module: the external path expense of storing this MSTP equipment, the BPDU message that acceptance domain root identification module 912 is sent, judge whether the external path Overhead in the message is consistent with the external path expense of this module stores, if message is sent to territory root comparison module; Otherwise, dropping packets.
Territory root comparison module: the territory root information of storing this MSTP equipment, receive the BPDU message that external path expense comparison module is sent, judge whether the territory root information in the message is consistent with the territory root information of this module stores, if message is sent to message processing module (MPM) 93 in the territory; Otherwise, dropping packets.
The above only is process of the present invention and method embodiment, in order to restriction the present invention, all any modifications of being made within the spirit and principles in the present invention, is not equal to replacement, improvement etc., all should be included within protection scope of the present invention.