Background technology
STP (Spanning Tree Protocol, Spanning-Tree Protocol) sets up according to the 802.1D standard that IEEE association formulates, and is used for eliminating at local area network (LAN) the agreement of data link layer physics loop.The equipment that moves this agreement is found loop in the network by interactive information each other, and selectively certain port is blocked, the loop network structure is trimmed to loop-free tree network structure the most at last, thereby prevent message constantly hyperplasia and Infinite Cyclic in loop network, avoid equipment owing to repeat to receive the problem that message processing capability that identical message causes descends and take place.
MSTP (Multiple Spanning Tree Protocol; Multiple Spanning Tree Protocol) the 802.1s standard definition of formulating by IEEE; it can remedy the defective of STP and RSTP; both can restrain fast; the flow that can make different VLAN is again transmitted along path separately, thereby provides better load balancing mechanism for redundant link.The main feature of MSTP is as follows:
1) MSTP is provided with VLAN mapping table (that is: VLAN and the mapping table that generates tree), and VLAN and generation tree are connected.By increasing this notion of " example " (a plurality of VLAN are incorporated in the set), a plurality of VLAN can be bundled in the example, to save communication overhead and resources occupation rate.
2) MSTP is divided into a plurality of territories with a switching network, forms many in each territory and generates tree, generates between the tree independently of one another.
3) MSTP prunes loop network becomes an acyclic tree network, avoids hyperplasia and the Infinite Cyclic of message in loop network, and a plurality of redundant paths of data forwarding also are provided simultaneously, realizes the load balancing of vlan data in data forwarding process.
At present, MSTP extensively applies in the double layer network, is used for detecting and block the physics loop that double layer network may occur, and prevents broadcasting packet Infinite Cyclic in double layer network.Yet existing MSTP only applies to but can't support for virtual double layer networks such as VPLS or PBB in two layers of switching network.Here, VPLS (Virtual Private LAN Service, virtual special local area network) is a kind of point of providing in common network layer 2VPN business to multiple spot; PBB (Provider backbone bridge, provider backbone bridge) is the IP MAN that is independent of telecommunications self, and the main at present MAC in MAC technology that adopts provides point-to-point private line service.
In some more common VPLS and the two stack networkings application of VPLS/PBB, can only rely on networking mode and increase restriction and avoid loop.
For example: in VPLS layering networking shown in Figure 1 is used, UPE1 (UPE:User-facing Provider Edge, near the PE equipment of user side) respectively with NPE1 (NPE:Network Provider Edge, network core PE equipment), NPE2 sets up active and standby PW (Pseudo Wire, virtual link) connects, for fear of loop occurring, can not set up PW between NPE1 and the NPE2 and be connected.The normal condition down-off will transmitted between UPE1 and the NPE1 or between UPE1 and the NPE2, and NPE1/NPE2 can only will be forwarded to far-end NPE or the flow of far-end NPE is forwarded to local UPE from the UPE1 flow.Be connected if set up PW between NPE1 and the NPE2, will produce the such loop traffic of UPE1-NPE1-NPE2-UPE1.Certainly, can on UPE1, will abandon, but NPE2 sends to the normal message forwarding that the flow of UPE1 will certainly influence UPE1 from the flow of NPE2; And, at UPE1 equipment active and standby PW taking place switches or return when cutting, may cause moment loop or packet loss, influence VPLS flow transfer quality.Therefore, for fear of this situation, generally evade by networking mode, promptly do not set up PW between NPE1 and the NPE2 and be connected, this causes can not articulating under NPE1 and the NPE2 CE (Customer Edge, user network boundary device).
Again for example, in the two stack networkings of VPLS/PBB were used, all VPLS territories all must be through the two stack equipment switchings in center to the flow in PBB territory.If have only the two stack equipment in a center, in case two stack device fails in center so, the flow between VPLS territory and the PBB territory just can't be transmitted; But when having the two stack equipment in Duo Tai center, will inevitably in whole VPLS/PBB territory, produce loop, as shown in Figure 2.
Among Fig. 2, PE (Provider Edge, edge device on the service provider network) is edge device in the VPLS territory, PE2/BEB2 and PE3/BEB3 are two two stack equipment, BEB1 is the edge device in the PBB territory, and the broadcasting packet that PE1 sends will form loop along the PE1-PE2-BEB1-BEB3-PE1 path.For fear of forming loop, two stack networkings still only limit to have only the networking of the two stack equipment in a center at present, and there is very big potential safety hazard in this networking mode itself.
Summary of the invention
The invention provides a kind of method of in virtual double layer network, avoiding loop, between connecting, form effective loop detection in the public network PW of virtual double layer network annular, and prune unnecessary connection and remove loop, thereby the networking utilization of virtual double layer networks such as expansion VPLS/PBB.
A kind of method of avoiding loop in virtual double layer network provided by the invention comprises:
A, in the virtual switch instance VSI of the network equipment of virtual double layer network, enable Multiple Spanning Tree Protocol MSTP, and with VSI example and a MSTP example binding;
B, described MSTP example send Bridge Protocol Data Unit BPDU message and carry out loop detection.
Preferably, the purpose media access control MAC address of described BPDU message is the particular address that sets in advance, and source MAC is the MAC Address of the equipment of the described BPDU message of transmission.
Preferably, the described particular address that the sets in advance sign that is the 01-80-C2-VSI example.
Preferably, described virtual double layer network comprises: the two stack networking networks of virtual special local area network VPLS hierarchical network and VPLS/ provider backbone bridge PBB;
Described VSI example comprises: VPLS example and PBB example.
Preferably, the network equipment of described virtual double layer network is: the edge device PE on the service provider network;
This method sends before the BPDU message carries out loop detection at the MSTP example, further comprises: be connected if a PE has set up main virtual link PW with the 2nd PE, set up with the 3rd PE and be equipped with PW and be connected, and exist PW to be connected between the 2nd PE and the 3rd PE, then:
The one PE is set to the root bridge, and MSTP priority is set to the highest on a PE; On the 2nd PE equipment, the 2nd PE is connected with PW between the PE is set to root PW and connects, and the 2nd PE is connected the connection as appointment PW with PW between the 3rd PE; On the 3rd PE, the 3rd PE is connected with PW between the 2nd PE as specifying PW to connect, and the 3rd PE is connected as blocking the PW connection with PW between the PE.
Preferably, the network equipment of described virtual double layer network is: backbone edge bridge BEB;
This method sends before the BPDU message carries out loop detection at the MSTP example, further comprises: be connected if a BEB has set up PW with the 2nd BEB with the 3rd BEB respectively, and exist PW to be connected between the 2nd BEB and the 3rd BEB, then:
The one BEB is set to the root bridge, and MSTP priority is set to the highest on a BEB; On the 2nd BEB equipment, the 2nd BEB is connected with PW between the BEB is set to root PW and connects, and the 2nd BEB is connected the connection as appointment PW with PW between the 3rd BEB; On the 3rd BEB, the 3rd BEB is connected with PW between the 2nd BEB as specifying PW to connect, and the 3rd BEB is connected as blocking the PW connection with PW between the BEB.
After described A, may further include:
Be that the described network equipment is specified the opposite end that sends the BPDU message in the VSI example;
When receiving the BPDU message, the network equipment is that the BPDU message of the particular address that sets in advance is transferred to key-course and handled with purpose MAC;
When the BPDU message that receives from the local subscriber apparatus side, be used as the general data message and handle;
When the BPDU message that receives from the far-end network equipment side, be used as the general data message and handle.
After described A, may further include: carry out following mapping:
With the path cost of VSI example virtual link PW port path expense corresponding to the MSTP example;
The sign of the VSI place network equipment is identified as the bridge in the expansion MSTP territory;
With the outgoing interface of the PW place PW equipment of VSI example corresponding to the common port in the MSTP territory.
As seen from the above technical solution, the method of avoiding loop in virtual double layer network provided by the invention is by enabling MSTP in the VSI example of the network equipment of virtual double layer network, and with VSI example and a MSTP example binding, thereby, the MSTP example can send the BPDU message and carry out loop detection in virtual double layer network, and prunes unnecessary connection and remove loop.The inventive method is used and VPLS hierarchical network or the two stack networking networks of VPLS/PBB, can between public network PW annular connects, be formed effective loop detection, thus the networking utilization of expansion VPLS/PBB.
Embodiment
For making purpose of the present invention, technical scheme and advantage clearer, below with reference to the accompanying drawing embodiment that develops simultaneously, the present invention is described in further detail.
Main thought of the present invention is: by enable MSTP in the VSI example of the network equipment of virtual double layer network, and with VSI example and a MSTP example binding, thereby, the MSTP example can send Bridge Protocol Data Unit (BPDU in virtual double layer network, Bridge Protocol Data Unit) message carries out loop detection, and prune unnecessary connection and remove loop, thereby the networking utilization of expansion VPLS/PBB.
Among the present invention, the VSI example comprises VPLS example and PBB example, is example with the two stack networkings of VPLS layering networking and VPLS/PBB, and wherein, dual-homed situation and the VPLS layering of the inner CE of VPLS is similar, is that example describes and gets final product with the Hierarchical Virtual Private LAN Service, as shown in Figure 3.
PE1 has set up active and standby PW with PE2 and PE3 respectively and has been connected, and sets up VPLS between PE2 and the PE3 and connects, and has set up MAC IN MAC between BEB4 and PE2, the PE3 and has been connected.Two loops that may occur are arranged in the above-mentioned networking, are respectively PE1-PE2-PE3-PE1 and BEB4-PE2-PE3-BEB4.For fear of these two loops, can in the VSI of PE equipment example, enable MSTP, and, send specific Bridge Protocol Data Unit (BPDU, Bridge Protocol Data Unit) by MSTP and carry out loop detection example binding of VSI example and MSTP.
For with existing user network in MSTP BPDU message distinguish mutually, need expand the BPDU message of VSI, enable to carry VSI information and can be received by each PE/BEB equipment.Generally, the purpose MAC of BPDU is 01-80-C2-00-00-00 and 01-80-C2-00-00-08, its purpose of BPUD message MAC after the expansion is 01-80-C2-VSI ID, as VSI ID is 1, then corresponding its BPDU message purpose MAC is 01-80-C2-01-00-00, this target MAC (Media Access Control) address of PE/BEB recognition of devices.The source MAC of BPDU message is the MAC of sending ending equipment, just sends the MAC Address of the equipment of this BPDU message.
The method that enables MSTP in the VSI of PE1 equipment example is as follows:
Vsi vsi1 static//establishment vsi1 example
Vsi vsi1-id 1 //ID of vsi 1 example
Peer 2.2.2.2enable mstp//be created to the PW connection of PE2 and enable MSTP
Peer 3.3.3.3enable mstp//be created to the PW connection of PE2 and enable MSTP
The method that enables MSTP in the VSI of BEB4 equipment example is as follows:
Vsi vsi1 i-sid 1//establishment vsi1 example
Peer 2-2-2enable mstp//be created to the PW connection of PE2 and enable MSTP
Peer 3-3-3enable mstp//be created to the PW connection of PE3 and enable MSTP
VSI example on PE2 and the PE3 is the two stack examples of VPLS/PBB, therefore, need comprise the MSTP configuration of VPLS opposite end and PBB opposite end, and it is as follows to enable the MSTP method on the PE2 equipment:
vsi?vsi1?i-sid?1
vsi?vsi1-id?1
peer?1.1.1.1?enable?mstp
peer?3.3.3.3enable?mstp
peer?4-4-4enable?mstp
It is as follows to enable the MSTP method on the PE3 equipment:
vsi?vsi?1i-sid?1
vsi?vsi1-id?1
peer?1.1.1.1enable?mstp
peer?2.2.2.2enable?mstp
peer?4-4-4enable?mstp
Through after the above-mentioned processing, enabled MSTP in the VPLS example of each PE equipment in the Hierarchical Virtual Private LAN Service territory, will carry out the MSTP loop detection by the BPDU protocol massages of timed sending expansion between the PE equipment.Compare with common MSTP BPDU message, its purpose of the BPDU message MAC after the expansion is 00-80-C2-VSI ID, and its source MAC is the MAC of sending ending equipment, and outer packaging V PLS tunnel header.
In order to realize that in the VSI territory correct MSTP detects, and need carry out following setting:
1) in the VSI example, specify the opposite end that sends the BPDU message for PE equipment, the only transmission of the Peer in the VSI of appointment example when PE equipment sends the BPDU message, and can not send this protocol massages to Peer opposite end that does not have appointment and local CE side.
2) when receiving the BPDU message, the message that receives is a two layer message that carries the VPLS label, the purpose MAC attribute of the BPDU of PE recognition of devices expansion, and forwarding chip is gone up CPU with message Trap, transfers to the key-course of PE equipment and handles.
3) the MSTP BPDU protocol massages that enters for local CE side is used as the general data message and is handled.
4) the MSTP BPDU protocol massages that enters for the far-end PE side is used as the general data message and is handled.
BPDU message format after the expansion is as shown in table 1:
?MAC |
The VPLS label |
MAC(00-80-C2-VSI?ID) |
Transmitting terminal MAC |
BPDU?Load |
Table 1
In the table 1, outer MAC is that PE equipment is connected employed outgoing interface MAC with other Peer opposite end, the VPLS label is that the PW between the PE connects label, the purpose MAC of internal layer MAC is 00-80-C2-VSI ID, can support 16M VSI example according to this extended mode, satisfy existing VPLS specification requirement far away.
In order to realize that in the VSI territory MSTP detects, base attribute in the VSI and common MSTP territory must be shone upon, specifically comprise the following aspects:
(1) VSI example and MSTP binding, corresponding to the VLAN in the common MSTP territory, a plurality of VSI examples can be bound with a MSTP example, as a plurality of VLAN and a MSTP example binding;
(2) path cost of VSI PW is corresponding to the port path expense in the MSTP;
(3) ID of VSI place PE equipment is as the bridge ID in the expansion MSTP territory;
(4) outgoing interface of VSI PW place PW equipment is corresponding to the common port in the MSTP territory.
Still be example with the two stack networkings of the layering among Fig. 3, in order to satisfy the loop detection requirement of the two stack networkings of layering, can carry out MSTP respectively in the VPLS territory and in the PBB territory and detect, the VPLS territory belongs to different MSTP examples with the PBB territory, blocks purpose PW respectively and connect in two examples.In the VPLS territory, carry out following setting:
Therefore (1) PE1 is the root bridge, STP priority is configured to the highest (priority high equipment as the root bridge) on PE1 equipment;
(2) on the PE2 equipment, the PW between PE2 and the PE1 connects as root PW, and the PW between PE2 and the PE3 is as specifying PW;
(3) on the PE3 equipment, the PW between PE3 and the PE2 is as specifying PW, and the PW between PE3 and the PE1 is as blocking-up PW.
Afterwards, will in the PW of PE1-PE2-PE3 connection, generate PW state in the VPLS territory based on MSTP.Under the normal condition, the PW between the PE3-PE1 is blocked (Block), forms normal forward-path between the PE1-PE2-PE3, has only when the PW between the PE1-PE2-PE3 connects the appearance interruption, just can allow the PW state between the PE3-PE1 become Forward.
Same, in the PBB territory, also can carry out MSTP and detect, in the PBB territory, carry out following setting:
(1) BEB3 is the root bridge, therefore is configured to STP priority the highest on BEB3 equipment;
(2) on the BEB2 equipment, the PW between BEB2 and the BEB3 connects as root PW, and the PW between BEB2 and the BEB4 is as specifying PW;
(3) on the BEB4 equipment, the PW between BEB4 and the BEB3 is as specifying PW, and the PW between BEB4 and the BEB4 is as blocking-up PW.
Under the normal condition, it should be noted that the PW between BEB2 and the BEB3 is connected to VPLS PW connection, VPLS PW and PBB PW are the forward-paths that is equal under two stack network environments.Have only BEB4-BEB2-BEB3 to connect and compose normal forward-path in the PBB territory, and the PW between the BEB4-BEB3 is blocked, has only that its state just can become Forward when the connection between the BEB4-BEB2-BEB3 of front is interrupted.
In Hierarchical Virtual Private LAN Service and dual-stack network, after the MSTP computing, on PE3 equipment, the PW of PE3-PE1 connects by Block, and on the BEB4 equipment, BEB4 equipment connects by Block, to the PW between the BEB3 as shown in Figure 4.
For the PE1 equipment in the VPLS territory, the unknown unicast that comes on the local private network side is connected through VPLS master PW with broadcast traffic and is broadcast to PE2, and PE2 receives this message, and is broadcast to PE3 and BEB4, is transmitted to the CE equipment of local terminal respectively by the two.At this moment, for PE3 equipment since PE3 to the PW between the PE1 by Block, so flow can not be repeated to broadcast back PE1; Meanwhile, connect by Block because BEB4 arrives the PW of PE3, therefore, the broadcast traffic that arrives BEB4 also can be dropped.
For the BEB4 in the PBB, the unknown unicast and the broadcast traffic of coming on the local private network side, transmit through PBB, because PBB does not have the branch of active and standby PW at present, can not select forward-path in advance, therefore can in the PBB example, broadcast, simultaneously since the PW between BEB4 and the BEB3 by Block, therefore message only can be forwarded to BEB2, BEB2 is forwarded to PE1 and PE3 after receiving message, transmit by local CE equipment behind the VPLS message of PE1 reception public network, because the influence that level is cut apart can not be forwarded to the public network side of PE3 once more; PE3 equipment can be transmitted to local CE equipment after receiving the VPLS message from PE2, and simultaneously to the PE1 device forwards, because the PW between the PE3-PE1 is by Block, so message can not be forwarded to PE1 once more.
Therefore, the present invention by introduce MSTP in the VSI territory, can connect VSI PW according to the networking needs and carry out correct blocking-up and forwarding under the environment of the two stacks of layering, has ensured the topological state of network, has also improved the reliability of network simultaneously.
As seen from the above technical solution, the method of avoiding loop in virtual double layer network provided by the invention is by enabling MSTP in the VSI example of the network equipment of virtual double layer network, and with VSI example and a MSTP example binding, thereby, the MSTP example can send the BPDU message and carry out loop detection in virtual double layer network, and prunes unnecessary connection and remove loop.The inventive method is used and VPLS hierarchical network or the two stack networking networks of VPLS/PBB, can between public network PW annular connects, be formed effective loop detection, thus the networking utilization of expansion VPLS/PBB.
The above only is preferred embodiment of the present invention, and is in order to restriction the present invention, within the spirit and principles in the present invention not all, any modification of being made, is equal to replacement, improvement etc., all should be included within the scope of protection of the invention.