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 carrier network, private user can not perceive protocol massages and there occurs change in public network.The appearance of BPDU Tunnel makes private user can be built the double layer network of oneself by carrier network, makes the different piece of same private network be positioned at the both sides of runner public-network.
See Fig. 1, Fig. 1 is the double layer network schematic diagram of the leap carrier network that prior art utilizes BPDU Tunnel to build, 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 is connected to the PE2 of carrier network by CE2, carries out two-layer protocol message transmission between PE1 and PE2 by BPDUTunnel.When private network 1 CE2 from CE1 to private network 2 send two-layer protocol message time, the transmitting procedure of message is as follows:
(1) PE1 receives the two-layer protocol message that CE1 sends, message is encapsulated and the target MAC (Media Access Control) address of message is assumed to be (0x0180-C200-0002) and replace to a specific multicast mac address (being assumed to be 0x010F-E200-0003), then forward in the operator network.
(2) PE2 receives the two-layer protocol message after encapsulation (also referred to as BPDU Tunnel message) from carrier network, decapsulation carried out to message and reduces the target MAC (Media Access Control) address (target MAC (Media Access Control) address also by two-layer protocol message reverts to 0x0180-C200-0002) of message, then sending to CE2.
In said process, the object MAC of the two-layer protocol message that CE2 receives remains 0x0180-C200-0002, and therefore perception is less than the change of two-layer protocol message.
The agreement of current support BPDU Tunnel is a lot, such as LACP agreement, can use LACP agreement between local CE and far-end CE, set up link aggregation group based on BPDU Tunnel.For LACP agreement, message normally carries out man-to-man transmission by direct connected link, does not have problem, but when message passes through carrier network in the mode of BPDU Tunnel, will go wrong, be described below for Fig. 2:
Fig. 2 is the schematic diagram that prior art sets up the link aggregation group based on BPDU Tunnel between local CE and far-end CE, as shown in Figure 2, the aggregated links be made up of link 11,12,13 between CE1 and PE1 is communicated with, and the aggregated links be made up of link 21,22,23 between CE2 and PE2 is communicated with.After PE1 receives the LACP message that CE1 sent by link 11, carry out broadcasting away after MAC replaces to LACP message, LACP message arrives PE2 and forwards via PE2, CE2 will from link 21, link 22, link 23 receives LACP message and carries out calculating (all of the port that the message that local terminal link sends can be broadcast to opposite end), the mutual of local terminal all link of link and opposite end will be caused like this, define many-to-one connection, its direct result be protocol massages constantly between link mutual (such as: the link 1 of CE1 establishes a communications link with the link 1 of CE2 a little while, establish a communications link with the link 2 of CE2) a little while, link aggregation group is caused constantly to shake and cannot be polymerized.
The link aggregation group concussion problem caused to all of the port of opposite end in order to avoid the above-mentioned LACP message broadcasting because sending from a link of local terminal, need to make the link of carrier network both sides form man-to-man relation in some way, current solution is divided in different VLAN by the port of every bar link, by using the concussion carried out networking restriction and evade link aggregation group to the LACP of cross operator.
See Fig. 3, Fig. 3 be prior art between local CE and far-end CE, set up based on BPDU Tunnel link aggregation group time networking restriction schematic diagram, Fig. 3 is based on Fig. 2, as shown in Figure 3, the port of the upper connecting link 11,12,13 of PE1 is respectively P11, P12, P13, and the port of the upper connecting link 21,22,23 of PE2 is 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 at the port by link 11,12,13: the upper enable bpdu tunnel dot1q lacp (the BPDU Tunnel function of LACP) of P11, P12, P13, and PE2 is at the port by link 21,22,23: the upper enable bpdu tunnel dot1q lacp of P21, P22, P23.
In figure 3, when PE1 receives the LACP message from CE1, the target MAC (Media Access Control) address of amendment LACP message is specific multicast mac address, and stamps the VLAN label of entrance place VLAN for LACP message, is then sent to carrier network.In the operator network, amended LACP message is taken as data message and forwards; 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, thus the different and isolation that realizes between link of the VLAN added according to the port of connecting link, ensure the man-to-man corresponding relation of communication link, link aggregation group thus can be avoided to shake.
Prior art by PE for every communication link provides a VLAN, ensure the one-to-one relationship of communication link in link aggregation group, although the appearance that link aggregation group can be avoided to shake, also result in the waste of public network VLAN resource.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearly understand, to develop simultaneously embodiment below in conjunction with accompanying drawing, technical scheme of the present invention is described in detail.
In the present invention, in order to pass through BPDU Tunnel transmission protocol message, need the one-to-one relationship ensureing communication link in link aggregation group, for this reason, local PE and far-end PE all set up static link aggregation group, and two static link aggregation group are mutually corresponding, in addition, also need, by the member port one_to_one corresponding in two static link aggregation group, to form the mapping relations between corresponding aggregation group port; Local PE is when distally PE sends the protocol massages from local CE, the port information that local PE receives the member port of this protocol massages is carried in protocol massages, to indicate the outbound port that this protocol massages is corresponding in far-end PE, by the mapping relations between local PE aggregation group port corresponding to far-end PE, the communication link that member port connects is mapped, thus the one-to-one relationship of communication link in link aggregation group can be ensured, while avoiding link aggregation group to shake, the VLAN wasting of resources can also be reduced.
Be described to transmit LADP message by BPUD Tunnel below.
Be the method flow diagram of the embodiment of the present invention by BPDU Tunnel transmission protocol message see Fig. 4, Fig. 4, the method is applied to PE equipment; As shown in Figure 4, the method mainly comprises the following steps:
Step 401, set up mapping relations between local PE aggregation group port corresponding to far-end PE in advance.
In the present embodiment, first the static link aggregation group to far-end CE that the static link aggregation group to local CE set up by local PE and far-end PE are set up is mapped, and can set up both corresponding relations by distributing identical aggregation group mark for two static link aggregation group; Secondly, local PE is set up to each member port in the static link aggregation group of local CE and far-end PE set up to each member port one_to_one corresponding in the static link aggregation group of far-end CE, corresponding relation between this port can be set up by distributing identical port numbering for the corresponding member port on each member port of local PE and far-end PE.Such as, in figure 3, PE1 sets up to have and comprises member port: the static link aggregation group bagg1 of P11, P12, P13, PE2 sets up mailbag containing 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 first for bagg1 and bagg2 distribute identical aggregation group mark (such as 1), the port numbering then distributed for P11, P12, P13 is respectively 1,2,3; The port numbering distributed for P21, P22, P23 is respectively 1,2,3; Like this, can determine that bagg1 and bagg2 has corresponding relation according to link aggregation group mark, meanwhile, member port P11, P12, the P13 that can determine in bagg1 according to port numbering distinguish one_to_one corresponding with member port P21, P22, the P23 in bagg2 respectively.
In summary, in the present embodiment, the concrete grammar setting up the mapping relations between local PE with far-end PE corresponding aggregation group port can be: the aggregation group of distributing the corresponding static link aggregation group arriving far-end CE set up with far-end PE identical to the static link aggregation group of local CE set up for local PE identifies, and is the port numbering distribution of each port in the static link aggregation group of the local PE foundation port numbering identical with corresponding ports in the corresponding static link aggregation group that far-end PE is set up.
When step 402, local PE receive the LACP message from local CE, the port information of the member port receiving LACP message to be carried in LACP message and to be sent to far-end PE by BPDU Tunnel.
Here, described port information comprises port numbering, port said polymeric group.Such as PE1 have received LACP message from CE1 from member port P11 in figure 3, then the port information of P11 (port numbering of P11 is the mark of 1, P11 said polymeric group with bagg1: 1 represents) can be carried in LACP message and send.
In this step, send LACP message by BPDU Tunnel to comprise to far-end PE: to encapsulate LACP message and the target MAC (Media Access Control) address revising LACP message is specific multicast mac address, to be then sent in carrier network and via carrier network arrival far-end PE.
In IEEE802.3ad standard, for LACP message has reserved the expansion of 50Bytes for LACP protocol characteristic, in the present embodiment, can utilize part reserved field as port information field, thus realize in LACP message, carry port information.Such as, get the TLV of 4Bytes wherein as port information, port information TLV schematic diagram as shown in Figure 5, wherein, TLV Type takies 8 bit positions, is worth for LACP P Mapping; TLV Length takies 8 bit positions, and value is that 4, TLV Value takies 16 bit positions, wherein, bit_0 ~ bit_3 is used for identification port, as carried out identification port with port numbering, then in figure 3, P11 0001 mark, P12 0010 mark, P13 0011 mark; Bit_4 ~ bit_6 is temporarily preserved for expansion; Bit_7 ~ bit_E is used for identifying static link aggregation group, if the bagg2 of bagg1 and the PE2 side of PE1 side is all by 00000001 mark; In addition Bit_F be used for identification port whether can data message transmission, the value of bit_F will be described follow-up.
When step 403, local PE receive the LACP message that far-end PE sent by BPDU Tunnel, determine according to the mapping relations between the port information carried in LACP message and the local local PE aggregation group port corresponding to far-end PE preserved the member port that local PE is corresponding, LACP message is sent to local CE by the member port that the local PE that determines is corresponding.
In this step, determine that the method for the member port that local PE is corresponding is mated for performing port information according to the mapping relations between the port information carried in LACP message and the local local PE aggregation group port corresponding to far-end PE preserved, the port information carried in LACP message is mated with the port information to each member port in the static link aggregation group of local CE that local PE sets up, the member port that the match is successful is defined as corresponding member port.Suppose the PE2 that the LACP message received from member port P11 is sent by BPDU Tunnel by PE1, the port information then carried in 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, because the port information of P21 and the port information of P11 match, (port numbering is 1, belonging to port, the mark of link aggregation group is 1), therefore P21 is defined as member port corresponding to local PE, LACP message is sent to CE2 by P21.
It should be noted that, when local PE foundation has multiple static link aggregation group, in multiple static link aggregation group that the port information carried in the LACP message needing far-end PE to send and local PE set up, the port information of each member port mates, until successful match is to a member port, and the member port this matched is defined as member port corresponding to local PE.
In the embodiment of the present invention shown in Fig. 4, when local PE is established to the static link aggregation group of local CE, also need in described static link aggregation group the BPDU Tunnel function of enable LACP on each member port.
When local PE is connected with multiple local CE, and when setting up the static link aggregation group had to each local CE, from the LACP message that one of them local CE sends, other local CE is broadcast to after being carried out BPDU Tunnel encapsulation by local PE, thus the loopback of the LACP message after encapsulating can be caused to send, there is isomerism.For this reason, for the LACP message from local CE that local PE receives, the port that enable the BPDU Tunnel function of LACP of this LACP message from local PE need be forbidden to send, to avoid the appearance of isomerism.
In the embodiment of the present invention shown in Fig. 4, after local PE is established to the static link aggregation group of local CE, the data transmission state of member port each in static link aggregation group is set to not choose unselected, to avoid data message to lose, and carry out the amendment of data transmission state at the follow-up LACP message sent according to local CE.Described data transmission state comprises chooses selected and unselected, if the data transmission state of member port is selected, then represent that this member port can be used for data message transmission, if the data transmission state of member port is unselected, then represent that this member port should not be used to the data message transmission data transmission state of the member port (do not affect the transmission of this member port to protocol massages).
In actual applications, Actor_State field is carried in the LACP message that local CE sends to local PE, Actor_State field as shown in Figure 6, collection and Distribution two son fields are included in field, if these two son fields are all set (namely value is 1), then illustrate that the member port of this LACP message of reception of local PE can be used for data message transmission, otherwise, then illustrate that the member port of this LACP message of reception of local PE is not available to data message transmission.Therefore, after local PE receives the LACP message from local CE, whether the member port that can judge to receive LACP message according to the set situation of the Actor_State field in LACP message can data message transmission, if, the data transmission state then arranging this member port is selected, otherwise the data transmission state arranging this member port is unselected.
Link aggregation group between local CE and far-end CE is normally set up, for local CE and far-end CE, LACP state normal, data message can be sent out mutually; For local PE and far-end PE, local PE needs to transmit to the data transmission state of each member port in the static link aggregation group of local CE the data message that distally PE sends according to what set up, and far-end PE needs to transmit to the data transmission state of each member port in the static link aggregation group of far-end CE the data message sent from local PE according to what set up.Below in conjunction with Fig. 3, examples is described (supposing to carry out load balancing between member port).
First example, that supposes that PE1 sets up all can data message transmission to each member port in the static link aggregation group of CE1, and PE2 set up all can data message transmission to each member port in the static link aggregation group of CE2, in this case, the process that data message mails to CE2 from CE1 is as follows:
(1) data message is sent to PE1 by link 11,12,13 according to the Load Sharing Algorithm of this locality by CE1, is sent to carrier network and is transferred to PE2 by carrier network via PE1;
(2) PE2 receives the data message from CE1, judges that member port P21, P22, P23 all can data message transmissions, therefore according to the Load Sharing Algorithm of this locality, data message is sent to CE2 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, that supposes that PE1 sets up can data message transmission to member port P11 and P12 in the static link aggregation group of CE1, P13 cannot data message transmission, and PE2 set up all can data message transmission to each member port in the static link aggregation group of CE2, in this case, the data message process that mails to CE2 from CE1 is as follows:
(1) data message is sent to PE1 by link 11,12 according to the Load Sharing Algorithm of this locality by CE1, is sent to carrier network and is transferred to PE2 by carrier network via PE1;
(2) PE2 receives the data message from CE1, judges that port P21, P22, P23 all can data message transmissions, therefore according to the Load Sharing Algorithm of this locality, data message is sent to CE2 by link 21,22,23.
The process that data message mails to CE1 from CE2 is as follows:
(1) data message is sent to PE2 by link 21,22,23 according to the Load Sharing Algorithm of this locality by CE2, is sent to carrier network and is transferred to PE1 by carrier network via PE2;
(2) PE1 receives the data message from CE1, judges that port P11, P12 can data message transmissions, and P23 can not data message transmission, therefore according to the Load Sharing Algorithm of this locality, data message is sent to CE1 by link 11,12.
Above the method for the embodiment of the present invention by Bridge Protocol Data Unit tunnel BPDU Tunnel transmission protocol message is described in detail, has present invention also offers a kind of device by Bridge Protocol Data Unit tunnel BPDU Tunnel transmission protocol message.
Be the structural representation of the embodiment of the present invention by the device of BPDU Tunnel transmission protocol message see Fig. 7, Fig. 7, 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, for setting up the mapping relations between this PE aggregation group port corresponding to far-end PE in advance;
Receiving element 702, for receiving the protocol massages from local CE; For receiving the protocol massages that far-end PE is sent by BPDUTunnel;
Control unit 703, for when receiving element 702 receives the protocol massages from local CE, the port information of member port receiving this protocol massages to be carried in this protocol massages and to notify that transmitting element 704 sends this protocol massages to far-end PE by BPDUTunnel; Described port information comprises port numbering, port said polymeric group; During for receiving protocol massages that far-end PE sent by BPDU Tunnel at receiving element 702, determine according to the mapping relations between the port information carried in LACP message and local this PE aggregation group port corresponding to far-end PE preserved the member port that this PE is corresponding, this protocol massages is sent to local CE by the member port that this PE is corresponding by notice transmitting element 704.
In said apparatus,
Described map unit 701 is when setting up the mapping relations between this PE aggregation group port corresponding to far-end PE, specifically comprise: the mark of the static link aggregation group to local CE set up for this PE is distributed the aggregation group identical to the corresponding static link aggregation group of far-end CE set up with far-end PE and identified, and be the port numbering distribution of each port in the static link aggregation group of the local PE foundation port numbering identical with corresponding ports in the corresponding static link aggregation group that far-end PE is set up;
Described control unit 703 is when determining corresponding member port according to the mapping relations between the port information carried in this protocol massages and this PE aggregation group port corresponding to far-end PE, specifically comprise: the port information carried in this protocol massages is mated with the port information to each member port in each static link aggregation group of local CE that this PE sets up, the member port that the match is successful is defined as corresponding member port.
In said apparatus,
Described protocol massages is Link Aggregation Control Protocol LACP message.
Described map unit 701 when setting up this PE to the static link aggregation group of local CE, the BPDU Tunnel function of enable LACP on each member port in this static link aggregation group further;
Described control unit 703, after receiving element 702 receives the LACP message from local CE, is further used for: forbid that the port that enable the BPDU Tunnel function of LACP of this LACP message from described PE sends by transmitting element 704.
Described map unit 701 is after the static link aggregation group setting up this PE to local CE, be further used for: be set to not choose unselected by the data transmission state of each member port in this static link aggregation group, described data transmission state comprises chooses selected and unselected;
Described control unit 703 is after receiving element 702 receives the LACP message from local CE, be further used for: whether the member port judging to receive LACP message according to the set situation of the Actor_State field in LACP message can data message transmission, if, the data transmission state then arranging this member port is selected, otherwise the data transmission state arranging this member port is unselected;
Described receiving element 702, is further used for the data message that reception far-end PE is sent by BPDU Tunnel;
Described transmitting element 704, when receiving for receiving element 702 data message that far-end PE sent by BPDU Tunnel, according to the data transmission state forwarding data packets of member port each in static link aggregation group to local CE.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment made, equivalent replacement, improvement etc., all should be included within the scope of protection of the invention.