Background technology
BPDU Tunnel (tunnel) technology allows from BPDU user network, two layer-management agreements (Bridge Protocol Data Unit, the bridge protocol data unit) with the form in tunnel by two layers of switching network (such as, carrier network), thereby for being positioned at the differently user network in territory, its BPDU message can be realized transparent transmission.
As shown in Figure 1, the working condition that has shown transparent transmission BPDU message in two layers of switching network: user network A comprises A1 and the A2 that connects by carrier network, by configuration bpdu Tunnel function on the input-output apparatus at carrier network two ends, realize the transparent transmission of BPDU message in carrier network of user network A, and the BPDU message of different user network is isolated mutually in carrier network.
Concrete, the scheme of carrying out the BPDU message transmission generally comprises:
Going into the tunnel direction, shown in Fig. 2 A, the BPDU message that input-output apparatus sends for user network, discern the corresponding VLAN of this user network, the TAG mark (Ttag) of corresponding interpolation VLAN also encapsulates it as load, and, revise BPDU message original purpose MAC Address (DMAC, it is to be noted, the DMAC that relates to herein all represents BPDU message original purpose MAC Address) be the tunnel target MAC (Media Access Control) address of corresponding VLAN (TMAC, it is pointed out that the TMAC that relates to all represents the tunnel target MAC (Media Access Control) address herein), and amended message sent the input-output apparatus that provides the tunnel direction; For example, will to be revised as special multicast mac address from the DMAC (as: 0x0180-C200-0000) of the BPDU message of user's network be TMAC (as: 0x010F-E200-0003) to the input-output apparatus of input;
In two layers of switching network, the BPDU message after the encapsulation is as transmitting among the VLAN of data message under user network;
Going out the tunnel direction, shown in Fig. 2 B, input-output apparatus carries out decapsulation to the BPDU message that receives, and carries out the load inspection, if carry the BPDU message of Ttag, then removes the Ttag of VLAN, and recovery TMAC is DMAC; For example, the input-output apparatus of output is that TMAC (as: 0x010F-E200-0003) identifies the BPDU message according to this special multicast mac address, it is reduced to DMAC (as: 0x0180-C200-0000), and the BPDU message is delivered to the user network of appointment according to this DMAC.
The scheme of the above-mentioned BPDU of carrying out message transmission can be the application for a patent for invention of CN1863148 referring to publication number.
But, in technique scheme, be limited to the numerical limitations of tunnel target MAC (Media Access Control) address, and consider the complexity of identification, generally, only give a tunnel target MAC (Media Access Control) address, and the BPDU message will be replicated the whole input-output apparatus that are transmitted among the VLAN for a VLAN; Owing in a VLAN, often have a plurality of input-output apparatus, be the real purpose input-output apparatus of BPDU message and part wherein may only be arranged.In this case, input-output apparatus is owing to can't be distinguished real purpose input-output apparatus by TMAC, therefore must discern the protocol type field in the BPDU content, determine corresponding original purpose MAC according to the particular type of message.
This just means, go out the necessary pre-configured message particular type of input-output apparatus of tunnel direction and the corresponding relation of original purpose MAC Address, and each the BPDU message that receives all carried out decapsulation, this has increased the resource overhead of input-output apparatus undoubtedly, realizes also relative complex simultaneously.Specifically, all input-output apparatus that receive the BPDU message all will be carried out the step of decapsulation-protocol type field identification, if with the message particular type coupling of this equipment disposition, then carry out message and transmit according to the original purpose MAC Address; If do not match, illustrate that this input-output apparatus does not possess corresponding original purpose MAC Address, abandon this BPDU message, then work of treatment such as the decapsulation done of front and field identification all becomes the skimble-skamble wasting of resources.
Simultaneously, owing to go out the corresponding relation of necessary pre-configured message particular type of the input-output apparatus of tunnel direction and original purpose MAC Address, this just means that also input-output apparatus is only supported the two layer-management agreements that it can be discerned, autgmentability and flexibility are all very poor, this has also caused existing BPDU tunneling technique can only solve limited and fixing several two layer-management agreements, as STP (Spanning TreeProtocol, Spanning-Tree Protocol), 802.1x agreement, IGMP (Internet Group ManagementProtocol, Internet igmpinternet) etc.
As can be seen, in the prior art in two layers of switching network the technical scheme of transparent transmission BPDU message exist the defective of handling the wasting of resources, autgmentability and very flexible, still do not have the adequate solution scheme at present.
Summary of the invention
Embodiments of the invention aim to provide can be in two layers of switching network the technical scheme of transparent transmission BPDU message, make the BPDU message of two layer-management agreements can simple and effectively be implemented in two layers of transparent transmission in the switching network, and need not to be subject to the particular type of two layer-management agreements.
For achieving the above object, embodiments of the invention provide a kind of in two layers of switching network transparent transmission BPDU method of message, be applicable to BPDU tunnel user network that connect, that be in different regions in two layers of switching network, and this user network is realized unified network management by BPDU tunnel transparent transmission BPDU message; May further comprise the steps:
S1, going into BPDU tunnel end, encapsulation BPDU message adds the original purpose MAC Address of this BPDU message in the message after the encapsulation to;
S2, send message after the encapsulation by the BPDU tunnel;
S3, going out BPDU tunnel end,, carrying out the message of relative users network and transmit by obtaining and discern the original purpose MAC Address of received message.
For achieving the above object, embodiments of the invention also provide a kind of in two layers of switching network the system of transparent transmission BPDU message, be applicable to BPDU tunnel user network that connect, that be in different regions in two layers of switching network, and this user network is realized unified network management by corresponding BPDU tunnel transparent transmission BPDU message; Comprise:
Encapsulation unit is arranged on into BPDU tunnel end, is used to encapsulate the BPDU message, and the original purpose MAC Address of this BPDU message is added in the message after the encapsulation;
Transmitting element is arranged on into BPDU tunnel end and with this encapsulation unit and is connected, and is used for sending message after the encapsulation by the BPDU tunnel;
Address acquisition unit is separately positioned on out BPDU tunnel end, is used to obtain the original purpose MAC Address of received message;
Retransmission unit is separately positioned on out BPDU tunnel end and is connected with this address acquisition unit, and the message that is used to discern this original purpose MAC Address and carry out the relative users network is transmitted.
For achieving the above object, embodiments of the invention also provide a kind of input-output apparatus, be used to connect two layers of switching network and user network, as the going into BPDU tunnel end or go out BPDU tunnel end of BPDU tunnel in these two layers of switching networks, by corresponding BPDU tunnel transparent transmission BPDU message realize connect user network and the unified management that is in the user network of other region; Comprise:
Encapsulation unit is used at this input-output apparatus as going under the situation of BPDU tunnel end, and encapsulation BPDU message adds the original purpose MAC Address of this BPDU message in the message after the encapsulation to;
Transmitting element is connected with this encapsulation unit, is used for by the message after the transmission encapsulation of BPDU tunnel;
Address acquisition unit is used for going out under the situation of BPDU tunnel end in this input-output apparatus conduct, is used to obtain the original purpose MAC Address of received message;
Retransmission unit is connected with this address acquisition unit, and the message that is used to discern this original purpose MAC Address and carry out the relative users network is transmitted.
As shown from the above technical solution, embodiments of the invention are by adding the original purpose MAC Address of BPDU message in the message after the encapsulation, and are discerned going out BPDU tunnel end, have following beneficial effect:
1, avoids all going out the decapsulation identifying operation of BPDU tunnel end, realized the transparent transmission of BPDU message in two layers of switching network of two layer-management agreements simply and effectively;
2, need not to pay close attention to two concrete layer-management protocol types, have good autgmentability and flexibility.
With reference to the accompanying drawing description of a preferred embodiment, above-mentioned and other purpose of the present invention, feature and advantage will be more obvious by following.
Embodiment
To describe specific embodiments of the invention in detail below.Should be noted that the embodiments described herein only is used to illustrate, be not limited to the present invention.
At first mandatory declaration is, the technical scheme of transparent transmission BPDU message in two layers of switching network that the embodiment of the invention provides, be applicable to BPDU tunnel user network that connect, that be in different regions in two layers of switching network (as carrier network), and this user network is realized unified network management by corresponding BPDU tunnel transparent transmission BPDU message; Because BPDU tunneling technique comparative maturity, so the present invention is not illustrated with regard to the detail of BPDU tunnel transparent transmission, only described with regard to improvements of the present invention.
Please in conjunction with the accompanying drawings 3, the flow chart of the present invention transparent transmission BPDU method of message one embodiment in two layers of switching network is provided, may further comprise the steps:
S1, going into BPDU tunnel end, encapsulation BPDU message adds the DMAC of this BPDU message in the message after the encapsulation to;
At present, generally be BPDU tunnel end, the protocol type field by message mates determines the original purpose MAC Address.Since this mode not only limited can transparent transmission protocol type, and the bigger overhead of existence, even may after identifying protocol type field, find and not be suitable for originally to go out BPDU tunnel end, therefore caused the waste of handling resource, therefore technical scheme of the present invention is set about from the message encapsulation, by the processing of step S1, make the BPDU message after the encapsulation directly carry its DMAC, to reach the purpose that causes out BPDU tunnel end quick identification.
S2, send message after the encapsulation by the BPDU tunnel;
In this step S2, be the transmission of duplicating of carrying out message according to the VLAN TAG of two layers of switching network, so the whole tunnels port of this user network in these two layers of switching networks can both be received the copy of this message.
S3, going out BPDU tunnel end, by obtaining and discern the DMAC of received message, carry out the message of relative users network and transmit.
Because message carries DMAC, so this step S3 need not to carry out the identification of protocol type field, but directly obtains DMAC, avoided will carrying out the loaded down with trivial details step that decapsulation is discerned again earlier in the prior art but in an embodiment of the present invention.
Concrete, seeing also Fig. 4, step S3 comprises:
S31, go out the DMAC that BPDU tunnel end is discerned received message;
If this DMAC of S32 and this go out the specified user network MAC Address coupling of BPDU tunnel end, then the message that this is received is descapsulated into the BPDU message, and transmits this BPDU message according to this DMAC to user network.
As can be seen, a kind of situation that may occur is provided in this step S32, also be based on message of the present invention and encapsulate improved respective handling scheme, carry out the BPDU tunnel end that goes out that the BPDU message transmits by needs targetedly and carry out decapsulation and subsequent treatment, this is an advantage place of the present invention.
For instance, if in the pairing two layers of switching network VLAN of user network, a plurality of ports form the BPDU tunnel each other, and the part port is configured to support the STP agreement by the user, and the part port is configured to support the IGMP agreement by the user; When going into BPDU tunnel port encapsulation transmission STP protocol massages, since the hardware level can't the district office encapsulation specifically be which kind of agreement, then according to traditional approach, all ports that receive this message all need to carry out decapsulation and type of message identification, when identifying the STP agreement, could determine finally need carry out the port that message is transmitted.And in embodiment provided by the present invention, by the identification to DMAC, directly just can determine to carry out the port that message is transmitted.
Another advantage of the present invention is, do not need to pay close attention to the particular type of agreement, even can be the unsupported agreement of this equipment: realize configuration to the transparent transmission agreement by the mode of specifying MAC Address at BPDU tunnel end, be that the user can pass through configuration interface, appointment is carried out transparent transmission to protocol massages arbitrarily, thereby support two-layer protocol the most widely, comprise the two layer-management agreements that the tunnel end can not be discerned.
If S33 DMAC with go out the specified user network MAC Address of BPDU tunnel end and do not match, then abandon the message that receives, promptly go out BPDU tunnel port accordingly and need not to carry out follow-up processing.
As can be seen, in this step S33, provide the another kind of situation that may occur, avoided whole ports all to carry out the existing resource loss problem of decapsulation.
By above-mentioned two embodiment, avoided all going out the decapsulation identifying operation of BPDU tunnel end, realized the transparent transmission of BPDU message in two layers of switching network of two layer-management agreements simply and effectively; Need not to pay close attention to two concrete layer-management protocol types, so the two layer-management agreements that this method was suitable for have good autgmentability and flexibility.
Concrete, going into BPDU tunnel end, above-mentioned steps S1 can take following steps to realize, shown in Fig. 5 A:
The corresponding VLAN of user network that S11, identification send this BPDU message to be obtaining two layers of forwarding object in the switching network, and extracts the usefulness of DMAC for the message encapsulation from described BPDU message;
S12, in this BPDU message the TAG mark of corresponding interpolation VLAN, and this DMAC is replaced with the tunnel target MAC (Media Access Control) address (TMAC) of VLAN correspondence;
S13, encapsulate this BPDU message;
Wherein, step S12~S13 is identical with the processing of prior art, repeats no more;
S14, the dmac address that extracts is added in the message after the encapsulation; Concrete, the suffix of this DMAC as message can be added in the end of encapsulation back message; It may be noted that this DMAC can add any part of encapsulated message to, but help subsequent treatment, belong to preferable embodiment as message suffix.
Wherein, before and after step S1 handled, BPDU message structure schematic diagram was shown in Fig. 5 B.As can be seen, after the processing through above-mentioned steps S1, be among the step S2 according to the message after this TMAC transmission encapsulation.
Accordingly, going out BPDU tunnel end, above-mentioned steps S32 can take following steps to realize, as shown in Figure 6A:
S321, the message that receives is descapsulated into the BPDU message;
The TAG mark of VLAN in S322, the removal BPDU message;
S323, TMAC is replaced with DMAC;
S324, the BPDU message is sent to corresponding user network according to DMAC.
Wherein, before and after step S32 handled, BPDU message structure schematic diagram was shown in Fig. 6 B.
Below by a specific embodiment, to provided by the present invention in two layers of switching network transparent transmission BPDU method of message described, referring to Fig. 7.
In the present embodiment, to specify DMAC be that the message of 000f-e200-0004 carries out the tunnel transparent transmission for user1 and user3.So, according to the present invention, just between two users, formed the two layer tunnel of this message.After then message enters from the user1 port, DMAC replaces with TMAC and stamps the TAG in tunnel, message is through the forwarding of middle several switching equipment, the port that arrival user3 links to each other, because the Tunne1 outlet of the dmac address that this port is a message to be preserved, thereby go out the tunnel processing, take out dmac address from the end of message, to adopt this DMAC displacement TMAC, and remove the TAG in tunnel simultaneously, message has just reverted to unprocessed form.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can be finished by the relevant hardware of program command, described program can be stored in the computer read/write memory medium, this program comprises the steps: when carrying out
S1, going into BPDU tunnel end, encapsulation BPDU message adds the original purpose MAC Address of described BPDU message in the message after the encapsulation to;
S2, send message after the described encapsulation by the BPDU tunnel;
S3, going out BPDU tunnel end,, carrying out the message of relative users network and transmit by obtaining and discern the original purpose MAC Address of received message.
Described storage medium comprises: ROM/RAM (Read Only Memory/Random-AccessMemory, read-only memory/random-access memory), magnetic disc or CD etc.
Embodiments of the invention also provide the system 100 of transparent transmission BPDU message in two layers of switching network, be equally applicable to BPDU tunnel user network that connect, that be in different regions in two layers of switching network, and this user network is realized unified network management by corresponding BPDU tunnel transparent transmission BPDU message.
As shown in Figure 8, an embodiment of the system 100 of transparent transmission BPDU message in two layers of switching network who is provided comprises:
Encapsulation unit 101 is arranged on into BPDU tunnel end, is used to encapsulate the BPDU message, and the dmac address of BPDU message is added in the message after the encapsulation;
Transmitting element 102 is arranged on into BPDU tunnel end and with encapsulation unit 101 and is connected, and is used for sending message after the encapsulation by the BPDU tunnel;
Address acquisition unit 103 is separately positioned on out BPDU tunnel end, is used to obtain the DMAC of received message;
Retransmission unit 104 is separately positioned on out BPDU tunnel end and is connected with address acquisition unit 103, and the message that is used to discern DMAC and carries out the relative users network is transmitted.
As can be seen, by the above-mentioned processing of the system 100 of transparent transmission BPDU message in two layers of switching network, can Direct Recognition DMAC, realize the transparent transmission of BPDU message in two layers of switching network of two layer-management agreements simply and effectively; Need not to pay close attention to two concrete layer-management protocol types simultaneously, only by specifying the original purpose MAC Address can realize support to the most extensive two layer-management agreements, therefore the application of native system has good autgmentability and flexibility for two layer-management agreements.
Since provided by the present invention in two layers of switching network the system 100 of transparent transmission BPDU message directly carry out the identification of DMAC, therefore need not that the message that all receives is all carried out decapsulation and handle, this is an advantage place of the present invention.Therefore, retransmission unit 104 can correspondingly comprise:
Address Recognition module 1041, whether the DMAC that is used to discern received message goes out the specified user network MAC Address coupling of BPDU tunnel end with the place;
Decapsulation sending module 1042 is used to accept the match triggers of Address Recognition module 1041, and the message that receives is descapsulated into the BPDU message, and transmits the BPDU message according to dmac address to user network;
Packet loss module 1043 is used to accept the triggering that do not match of Address Recognition module 1041, abandons the message that receives.
Concrete, encapsulation unit 101 can comprise:
Message identification module 1011 is used for discerning the corresponding VLAN of user network of transmission BPDU message and extracts DMAC from described BPDU message;
Packet labeling module 1012 is connected with message identification module 1011, is used for the TAG mark at the corresponding interpolation of BPDU message VLAN, and DMAC is replaced with the TMAC of VLAN correspondence;
Message package module 1013 is connected with packet labeling module 1013, is used for the BPDU message after encapsulated message mark module 1012 is handled;
The original purpose MAC Address is added module 1014, is connected with message package module 1013 with message identification module 1011, and the DMAC that is used for extracting adds the message after the encapsulation to.
Accordingly, the decapsulation sending module 1042 in the retransmission unit 104 can comprise:
Decapsulation submodule (not shown), the message that is used for receiving is descapsulated into the BPDU message;
Back mark submodule (not shown) is used for removing the TAG mark that back BPDU message VLAN is handled in decapsulation, and the TMAC of VLAN is replaced with DMAC;
Message is transmitted the submodule (not shown), and the BPDU message after being used for according to DMAC back mark being handled sends to corresponding user network.
Referring to Fig. 9, shown another embodiment of the system 100 of transparent transmission BPDU message in two layers of switching network.
Embodiments of the invention also provide a kind of input-output apparatus 200, be used to connect two layers of switching network and user network, as the going into BPDU tunnel end or go out BPDU tunnel end of BPDU tunnel in these two layers of switching networks, by corresponding BPDU tunnel transparent transmission BPDU message realize connect user network and the unified management that is in the user network of other region.
As shown in figure 10, this input-output apparatus 200 comprises:
Encapsulation unit 201 is used at input-output apparatus 200 as going under the situation of BPDU tunnel end, and encapsulation BPDU message adds the DMAC of this BPDU message in the message after the encapsulation to;
Transmitting element 202 is connected with encapsulation unit 201, is used for by the message after the transmission encapsulation of BPDU tunnel;
Address acquisition unit 203 is used for going out under the situation of BPDU tunnel end in input-output apparatus 200 conducts, is used to obtain the DMAC of received message;
Retransmission unit 204 is connected with address acquisition unit 203, and the message that is used to discern dmac address and carries out the relative users network is transmitted.
Concrete, this retransmission unit 204 can with provided by the present invention in two layers of switching network the retransmission unit 104 in the system 100 of transparent transmission BPDU message adopt same structure, do not repeat them here.
As can be seen, by input-output apparatus 200 provided by the invention, when it connects user network and two layers of switching network as BPDU tunnel end, can initiatively DMAC be encapsulated in the message, and can determine whether to carry out the operation of decapsulation and forwarding by the dmac address that identification receives message.Thereby, when establishing this input-output apparatus in two layers of switching network, can realize the transparent transmission of BPDU message in two layers of switching network of two layer-management agreements simply and effectively as BPDU tunnel end; And need not to pay close attention to two concrete layer-management protocol types.
Though described the present invention with reference to several exemplary embodiments, should be appreciated that used term is explanation and exemplary and nonrestrictive term.The spirit or the essence that do not break away from invention because the present invention can specifically implement in a variety of forms, so be to be understood that, the foregoing description is not limited to any aforesaid details, and should be in the spirit and scope that claim limited of enclosing explain widely, therefore fall into whole variations in claim or its equivalent scope and remodeling and all should be the claim of enclosing and contain.