Background technology
Bridge Protocol Data Unit tunnel (BPDU Tunnel) is a kind of two layer tunnel technology, it makes the two-layer protocol message of the private user of different geographical, can carry out transparent transmission by the dedicated tunnel in the carrier network, private user can not perceive protocol massages variation has occured in public network.The appearance of BPDU Tunnel is so that private user can make up by carrier network the double layer network of oneself, so that the different piece of same private network is positioned at the both sides of runner public-network.
Referring to Fig. 1, Fig. 1 is the double layer network schematic diagram that prior art is utilized the leap carrier network of BPDU Tunnel structure, comprise private network 1, private network 2 and carrier network, wherein, private network 1 is connected to the PE1 of carrier network by CE1, private network 2 carries out two-layer protocol message transmission by BPDUTunnel by the PE2 that CE2 is connected to carrier network between PE1 and the PE2.When the CE1 of private network 1 sent two-layer protocol message to the CE2 of private network 2, the transmission course of message was as follows:
(1) PE1 receives the two-layer protocol message that CE1 sends, message encapsulated and the target MAC (Media Access Control) address of message is assumed to be (0x0180-C200-0002) replace to a specific multicast mac address (being assumed to be 0x010F-E200-0003), then at the carrier network repeating.
(2) PE2 receives two-layer protocol message (being also referred to as BPDU Tunnel message) after the encapsulation from carrier network, message is carried out decapsulation and reduces the target MAC (Media Access Control) address (target MAC (Media Access Control) address that also is about to two-layer protocol message reverts to 0x0180-C200-0002) of message, then send to CE2.
In the said process, the purpose MAC of the two-layer protocol message that CE2 receives remains 0x0180-C200-0002, so perception is less than the variation of two-layer protocol message.
Support that at present the agreement of BPDU Tunnel is a lot, LACP agreement for example can use the LACP agreement to set up link aggregation group based on BPDU Tunnel between local CE and far-end CE.For the LACP agreement, message normally carries out man-to-man transmission by direct connected link, does not have problem, yet when message passes through carrier network in the mode of BPDU Tunnel, will go wrong, and the below describes as an example of Fig. 2 example:
Fig. 2 is that prior art is set up the schematic diagram based on the link aggregation group of BPDU Tunnel between local CE and far-end CE, as shown in Figure 2, the aggregated links that is comprised of link 11,12,13 between CE1 and the PE1 is communicated with, and the aggregated links that is comprised of link 21,22,23 between CE2 and the PE2 is communicated with.After PE1 receives the LACP message that CE1 sends by link 11, the LACP message is carried out broadcasting away after MAC replaces, the LACP message arrives PE2 and transmits via PE2, CE2 will be from link 21, link 22, link 23 receives the LACP message and calculates (all of the port that the message that the local terminal link sends can be broadcast to the opposite end), will cause like this mutual of link of local terminal and all links of opposite end, formed many-to-one connection, its direct result is that constantly mutual between link (for example: the link 1 of CE1 establishes a communications link with the link 1 of CE2 protocol massages a little while, link 2 with CE2 establishes a communications link a little while), cause constantly concussion and can't polymerization of link aggregation group.
The link aggregation group concussion problem that all of the port for fear of the above-mentioned LACP message broadcasting that sends because of link from local terminal to the opposite end causes, need to make in some way the link of carrier network both sides form man-to-man relation, present solution is that the port with every link is divided among the different VLAN, by to the LACP of cross operator with carrying out the concussion that networking limits to evade link aggregation group.
Referring to Fig. 3, Fig. 3 is the networking restriction schematic diagram of prior art when setting up link aggregation group based on BPDU Tunnel between local CE and far-end CE, Fig. 3 is based on Fig. 2, as shown in Figure 3, the upper connecting link 11 of PE1,12,13 port are respectively P11, P12, P13, and the upper connecting link 21 of PE2,22,23 port are respectively P21, P22, P23.The port of link 11 and link 21 is all added VLAN1, the port of link 12 and link 22 is all added VLAN2, the port of link 13 and link 23 is all added VLAN3.PE1 is by link 11,12,13 port: P11, P12, P13 enable the BPDU Tunnel function of bpdu tunnel dot1q lacp(LACP), PE2 is by link 21,22,23 port: P21, P22, P23 enable bpdu tunnel dot1q lacp.
In Fig. 3, when PE1 received LACP message from CE1, the target MAC (Media Access Control) address of revising the LACP message was specific multicast mac address, and stamped the VLAN label of entrance place VLAN for the LACP message, then sent to carrier network.In carrier network, amended LACP message is taken as data message and transmits; When PE 2 receives amended LACP message, the target MAC (Media Access Control) address of reduction LACP message, and according to the VLAN label forwarding LACP message of LACP message to CE2, thereby the different isolation that realize between link of VLAN that add according to the port of connecting link, guarantee the man-to-man corresponding relation of communication link, thereby can avoid the link aggregation group concussion.
Prior art by in PE for every communication link provides a VLAN, guarantee the one-to-one relationship of communication link in the link aggregation group, although can avoid the appearance of link aggregation group concussion, also caused the waste of public network VLAN resource.
Embodiment
In order to make purpose of the present invention, technical scheme and advantage clearer, below in conjunction with the accompanying drawing embodiment that develops simultaneously, technical scheme of the present invention is elaborated.
Among the present invention, in order to pass through BPDU Tunnel transmission protocol message, need to guarantee the one-to-one relationship of communication link in the link aggregation group, for this reason, local PE and far-end PE are all set up the static link aggregation group, and two static link aggregation group are mutually corresponding, in addition, also need the member port in two static link aggregation group is mapped one by one, form the mapping relations between the corresponding aggregation group port; When local PE sends protocol massages from local CE to far-end PE, in protocol massages, carry the port information that local PE receives the member port of this protocol massages, to indicate the outbound port of this protocol massages correspondence on far-end PE, by the mapping relations between the corresponding aggregation group port with far-end PE of local PE the communication link that member port connects is mapped, thereby can guarantee the one-to-one relationship of communication link in the link aggregation group, when avoiding the link aggregation group concussion, can also reduce the VLAN wasting of resources.
The below is to describe as example by BPUD Tunnel transmission LADP message.
Referring to Fig. 4, Fig. 4 is the method flow diagram that the embodiment of the invention is passed through BPDU Tunnel transmission protocol message, and the method is applied to PE equipment; As shown in Figure 4, the method mainly may further comprise the steps:
Step 401, set up mapping relations between the corresponding aggregation group port with far-end PE of local PE in advance.
In the present embodiment, the static link aggregation group to far-end CE that static link aggregation group and the far-end PE to local CE of at first local PE being set up set up is mapped, can be by being that two identical aggregation group of static link aggregation group distribution identify to set up both corresponding relations; Secondly, each member port in the static link aggregation group of local CE that local PE is set up is mapped one by one with each member port in the static link aggregation group of far-end CE that far-end PE is set up, can be by set up the corresponding relation between this port for each member port of local PE and the identical port numbering of corresponding member port distribution on the far-end PE.For example, in Fig. 3, PE1 sets up to have and comprises member port: the static link aggregation group bagg1 of P11, P12, P13, PE2 sets up mailbag and contains member port: the static link aggregation group bagg2 of P21, P22, P23, in order to set up the mapping relations of member port between bagg1 and bagg2, can be first bagg1 distributes identical aggregation group sign (for example 1) with bagg2, and the port numbering that then distributes for P11, P12, P13 is respectively 1,2,3; The port numbering that distributes for P21, P22, P23 is respectively 1,2,3; Like this, can determine that according to the link aggregation group sign bagg1 and bagg2 have corresponding relation, simultaneously, according to port numbering can determine among the bagg1 member port P11, P12, P13 respectively with bagg2 in member port P21, P22, P23 corresponding one by one respectively.
In summary, in the present embodiment, set up the mapping relations between local PE and the corresponding aggregation group port of far-end PE concrete grammar can for: for the static link aggregation group to local CE that local PE sets up is distributed the identical aggregation group sign of the corresponding static link aggregation group to far-end CE of setting up with far-end PE, and be the identical port numbering of corresponding ports in the corresponding static link aggregation group of port numbering distribution and far-end PE foundation of each port in the static link aggregation group set up of local PE.
When step 402, local PE receive from the LACP message of local CE, the port information that receives the member port of LACP message is carried in the LACP message and by BPDU Tunnel sends to far-end PE.
Here, described port information comprises port numbering, the affiliated aggregation group of port.For example PE1 has received LACP message from CE1 from member port P11 in Fig. 3, then can with the port information of P11 (port numbering of P11 be under 1, the P11 aggregation group with the sign of bagg1: 1 represents) be carried in the LACP message and send.
In this step, sending the LACP message by BPDU Tunnel comprises to far-end PE: the target MAC (Media Access Control) address that the LACP message is encapsulated and revises the LACP message is specific multicast mac address, then sends in the carrier network and via carrier network and arrives far-end PE.
In the IEEE802.3ad standard, for the LACP message has been reserved the expansion that 50Bytes is used for the LACP protocol characteristic, in the present embodiment, can utilize the part reserved field as the port information field, carry port information thereby be implemented in the LACP message.For example, get wherein 4Bytes as the TLV of port information, port information TLV schematic diagram as shown in Figure 5, wherein, TLV Type takies 8 bit positions, is worth the Mapping for LACP P; TLV Length takies 8 bit positions, and value is that 4, TLV Value takies 16 bit positions, and wherein, bit_0 ~ bit_3 is used for identifying port, and as identifying port with port numbering, then in Fig. 3, P11 identifies with 0010 with 0001 sign, P12, and P13 identifies with 0011; Bit_4 ~ bit_6 temporarily is preserved for expansion; Bit_7 ~ bit_E is used for identifying the static link aggregation group, all identifies with 00000001 such as the bagg1 of PE1 side and the bagg2 of PE2 side; In addition Bit_F be used for identifying port whether can data message transmission, the value of bit_F will describe follow-up.
When step 403, local PE receive the LACP message that far-end PE sends by BPDU Tunnel, determine the member port that local PE is corresponding according to the mapping relations between the port information that carries in the LACP message and the local corresponding aggregation group port with far-end PE of local PE of preserving, the LACP message is sent to local CE by member port corresponding to local PE of determining.
In this step, determine that according to the mapping relations between the port information that carries in the LACP message and the local corresponding aggregation group port with far-end PE of local PE of preserving the method for the member port that local PE is corresponding is for carrying out the port information coupling, the port information of each member port in the static link aggregation group of local CE that the port information that carries in the LACP message and local PE are set up mates, and the member port that the match is successful is defined as corresponding member port.Suppose the PE2 that PE1 will send by BPDU Tunnel from the LACP message that member port P11 receives, the port information that then carries in the LACP message is the port information of P11, after PE2 receives this LACP message, the port information of P11 can be compared respectively with the port information of P21, P22, P23 respectively, (port numbering is 1 because the port information of P21 and the port information of P11 are complementary, the sign of link aggregation group is 1 under the port), therefore P21 is defined as member port corresponding to local PE, the LACP message is sent to CE2 by P21.
Need to prove, when local PE foundation has a plurality of static link aggregation group, the port information of each member port mates in a plurality of static link aggregation group that the port information that carries in the LACP message that needs far-end PE to send and local PE set up, until successfully match a member port, and the member port that this matches is defined as member port corresponding to local PE.
In the embodiment of the invention shown in Figure 4, when local PE was established to the static link aggregation group of local CE, also need each member port in described static link aggregation group enabled the BPDU Tunnel function of LACP.
When local PE is connected with a plurality of local CE, and when foundation has to the static link aggregation group of each local CE, the LACP message of sending from one of them local CE, can be undertaken being broadcast to other local CE after the BPDU Tunnel encapsulation by local PE, thereby the loopback of the LACP message after can causing encapsulating sends, and isomerism occurs.For this reason, for the LACP message from local CE that local PE receives, need forbid the port of the BPDU Tunnel function that enabled LACP of this LACP message from local PE is sent, to avoid the appearance of isomerism.
In the embodiment of the invention shown in Figure 4, after local PE is established to the static link aggregation group of local CE, the data transmission state of each member port is set to not choose unselected in static chain road bureau and the group, avoiding data message to lose, and carry out the modification of data transmission state at the follow-up LACP message that sends according to local CE.Described data transmission state comprises chooses selected and unselected, if the data transmission state of member port is selected, represent that then this member port can be used for data message transmission, if the data transmission state of member port is unselected, represent that then this member port should not be used to data message transmission (not the affecting this member port to the transmission of protocol massages of the data transmission state of member port).
In actual applications, local CE carries the Actor_State field in the LACP message of local PE transmission, the Actor_State field as shown in Figure 6, include two son fields of collection and Distribution in the field, if these two son fields all are set (namely value is 1), the member port that this LACP message of reception of local PE then is described can be used for data message transmission, otherwise, illustrate that then the member port of this LACP message of reception of local PE is not available to data message transmission.Therefore, local PE receives after the LACP message from local CE, can judge that the member port that receives the LACP message whether can data message transmission according to the set situation of the Actor_State field in the LACP message, if, the data transmission state that this member port then is set is selected, otherwise the data transmission state that this member port is set is unselected.
Link aggregation group between local CE and the far-end CE is normally set up, and for local CE and far-end CE, the LACP state is normal, can send out mutually data message; For local PE and far-end PE, local PE need to transmit the data message of sending from far-end PE according to the data transmission state of each member port in the static link aggregation group of local CE of setting up, and far-end PE need to be transmitted the data message of sending from local PE according to the data transmission state of each member port in the static link aggregation group of far-end CE of setting up.Below in conjunction with Fig. 3, examples describes (supposing to carry out between the member port load balancing).
First example, but each member port in the static link aggregation group of CE1 of supposing that PE1 sets up is data message transmission all, but and the equal data message transmission of each member port in the static link aggregation group of CE2 of setting up of PE2, in this case, data message is as follows from the process that CE1 mails to CE2:
(1) CE1 sends to PE1 with data message by link 11,12,13 according to the load balancing algorithm of this locality, sends to carrier network and is transferred to PE2 by carrier network via PE1;
(2) PE2 receives the data message from CE1, but judges all data message transmissions of member port P21, P22, P23, and therefore the load balancing algorithm according to this locality sends to CE2 with data message by link 21,22,23.
Conversely, mail to the process of CE1 from CE2 identical with the principle of said process for data message.
Second example, but member port P11 and the P12 data message transmission in the static link aggregation group of CE1 of supposing that PE1 sets up, P13 cannot data message transmission, but and the equal data message transmission of each member port in the static link aggregation group of CE2 of setting up of PE2, in this case, data message is as follows from the process that CE1 mails to CE2:
(1) CE1 sends to PE1 with data message by link 11,12 according to the load balancing algorithm of this locality, sends to carrier network and is transferred to PE2 by carrier network via PE1;
(2) PE2 receives the data message from CE1, but judges all data message transmissions of port P21, P22, P23, and therefore the load balancing algorithm according to this locality sends to CE2 with data message by link 21,22,23.
Data message is as follows from the process that CE2 mails to CE1:
(1) CE2 sends to PE2 with data message by link 21,22,23 according to the load balancing algorithm of this locality, sends to carrier network and is transferred to PE1 by carrier network via PE2;
(2) PE1 receives the data message from CE1, but judges port P11, P12 data message transmission, and P23 can not data message transmission, and therefore the load balancing algorithm according to this locality sends to CE1 with data message by link 11,12.
More than the method for the embodiment of the invention by Bridge Protocol Data Unit tunnel BPDU Tunnel transmission protocol message had been described in detail, the present invention also provides a kind of device by Bridge Protocol Data Unit tunnel BPDU Tunnel transmission protocol message.
Referring to Fig. 7, Fig. 7 is the structural representation that the embodiment of the invention is passed through the device of BPDU Tunnel transmission protocol message, and this application of installation is in PE equipment; As shown in Figure 7, this device comprises: map unit 701, receiving element 702, control unit 703, transmitting element 704; Wherein,
Map unit 701 is used for setting up in advance the mapping relations between the corresponding aggregation group port with far-end PE of this PE;
Receiving element 702 is used for receiving the protocol massages from local CE; Be used for receiving the protocol massages that far-end PE is sent by BPDUTunnel;
Control unit 703, be used for when receiving element 702 receives protocol massages from local CE, be carried at the port information that receives the member port of this protocol massages in this protocol massages and notify transmitting element 704 to send this protocol massages to far-end PE by BPDUTunnel; Described port information comprises port numbering, the affiliated aggregation group of port; Be used for when receiving element 702 receives the protocol massages that far-end PE sends by BPDU Tunnel, determine the member port that this PE is corresponding according to the mapping relations between the port information that carries in the LACP message and the local corresponding aggregation group port with far-end PE of this PE of preserving, notice transmitting element 704 sends to local CE with this protocol massages by member port corresponding to this PE.
In the said apparatus,
Described map unit 701 is when the mapping relations of setting up between the corresponding aggregation group port with far-end PE of this PE, specifically comprise: be that the static link aggregation group sign to local CE that this PE sets up distributes the identical aggregation group sign of the corresponding static link aggregation group to far-end CE of setting up with far-end PE, and be the identical port numbering of corresponding ports in the corresponding static link aggregation group of port numbering distribution and far-end PE foundation of each port in the static link aggregation group set up of local PE;
When the mapping relations between the corresponding aggregation group port with far-end PE of the port information that described control unit 703 carries in according to this protocol massages and this PE are determined corresponding member port, specifically comprise: the port information of each member port in each static link aggregation group of local CE that the port information that carries in this protocol massages and this PE are set up mates, and the member port that the match is successful is defined as corresponding member port.
In the said apparatus,
Described protocol massages is Link Aggregation Control Protocol LACP message.
Described map unit 701 is when setting up this PE to the static link aggregation group of local CE, and further each member port enables the BPDU Tunnel function of LACP in this static link aggregation group;
Described control unit 703 is further used for after receiving element 702 receives LACP message from local CE: forbid that transmitting element 704 sends the port of the BPDU Tunnel function that enabled LACP of this LACP message from described PE.
Described map unit 701 is being set up this PE after the static link aggregation group of local CE, be further used for: the data transmission state of each member port is set to not choose unselected in this static link aggregation group, and described data transmission state comprises chooses selected and unselected;
Described control unit 703 is after receiving element 702 receives LACP message from local CE, be further used for: judge that according to the set situation of the Actor_State field in the LACP message member port that receives the LACP message whether can data message transmission, if, the data transmission state that this member port then is set is selected, otherwise the data transmission state that this member port is set is unselected;
Described receiving element 702 is further used for receiving the data message that far-end PE is sent by BPDU Tunnel;
Described transmitting element 704, when being used for receiving element 702 and receiving the data message that far-end PE sends by BPDU Tunnel, according to the data transmission state forwarding data packets of each member port in the static link aggregation group to local CE.
The above only is preferred embodiment of the present invention, and is in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of making, is equal to replacement, improvement etc., all should be included within the scope of protection of the invention.