CN101132285A - System and method for implementing MAC-IN-MAC - Google Patents

System and method for implementing MAC-IN-MAC Download PDF

Info

Publication number
CN101132285A
CN101132285A CNA200610111345XA CN200610111345A CN101132285A CN 101132285 A CN101132285 A CN 101132285A CN A200610111345X A CNA200610111345X A CN A200610111345XA CN 200610111345 A CN200610111345 A CN 200610111345A CN 101132285 A CN101132285 A CN 101132285A
Authority
CN
China
Prior art keywords
mac
message
service instance
physical address
vlan
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CNA200610111345XA
Other languages
Chinese (zh)
Inventor
朱倩影
梁冰
叶锦华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CNA200610111345XA priority Critical patent/CN101132285A/en
Priority to PCT/CN2007/070472 priority patent/WO2008025279A1/en
Publication of CN101132285A publication Critical patent/CN101132285A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]

Abstract

This invention provides a system and a method for realizing MAC-IN-MAC, in which, the system includes: a local device and switch device of the opposite, and the interface board of the network of the local device is connected with the interface board of the opposite end of the opposite switch device via the MAC-IN-MAC tunnel. This invention also provides a method for realizing it including: converting pure Ethernet messages to MAC-IN-MAC messages and sending them to the MAC-IN-MAC tunnel to be sent to the switch device of the opposite end.

Description

A kind of system and method for realizing MAC-IN-MAC
Technical field
The present invention relates to communication technique field, the low-cost system and method for realizing the MAC-IN-MAC agreement in particularly a kind of pure Ethernet switch.
Background technology
In current metropolitan area network field, Ethernet has been one of the most popular technical solution, and Ethernet service is implemented in current a lot of operations commercial city on metropolitan area network.Three kinds of " service transparent transmission " know-why and service modes are arranged, i.e. IEEE802.1Q VLAN, Q-in-Q VLAN and MAC-IN-MAC (or M-IN-M) technology in Metro Ethernet.
The MAC-IN-MAC network is that the data of network physical address exchange and send based on the carrier network MAC Address.Because exchange and transferring data frames are to carry out in carrier network inside, user's Ether frame etc. is encapsulated in the tunnel of MAC-IN-MAC, be transmitted as just data, so this technology has realized allowing the overlapping purpose of user's MAC address and carrier network MAC Address.
The solution that this technology is good following problem:
1, the management of user's VLAN:
Operator uses MAC-IN-MAC technology transparent transmission user's in the tunnel Ether frame, makes it the network by operator.At the User Network Interface place, operator is mapped to the VLAN user number (C-VLAN ID) that carries from user's Ether frame and the value of VLAN priority (C-VLAN CoS) on the Service Instance of regulation, promptly shines upon with the service number (Service ID) of Service Instance and the value of VLAN priority (P-VLAN CoS).As a result, the user can distribute local network virtual user number (C-VLAN ID) and definite each local network virtual user's (C-VLAN) priority to meet the service needed of oneself in the network of oneself without restriction.
2, the isolation and the study of user network/carrier network MAC Address:
The MAC Address that can isolate and distinguish user and operator based on the tunnel of MAC-IN-MAC.Therefore, the MAC Address of carrier network only needs the node in the carrier network scope to obtain.In the network of operator, add new switch at oneself, or when on already present switch, adding interface, the study of MAC Address will take place, the method of this study MAC Address has more expection property, make carrier network move more stablely, broadcast frame can obviously reduce, and the result is that the user can use more effective bandwidth.
3, Fu Wu differentiation and autgmentability:
The identification of serving in the MAC-IN-MAC network is divided into two parts: a part is to locate serviced number (Service ID) identification at User Network Interface (UNI), and one or more users' VLAN user number (C-VLAN ID) is by a special map of services; Another part is operator's VLAN user number (P-VLAN ID) identification, be Service Instance end of identification in front after, discern and responsible transmission user Ether frame by the P-VLAN of operator.Network based on the MAC-IN-MAC technology can be supported 4096 P-VLAN examples and 2 respectively 28Individual Service Instance.
4, traffic engineering:
MAC-IN-MAC uses operator's virtual local area network tags (P-VLAN Tag) to implement traffic engineering.In the MAC-IN-MAC network, operator can use the Service Activation mode by the control operation network of operator's VLAN user number (P-VLAN ID) and operator's VLAN priority (P-VLAN CoS) being supported the service of different brackets, and each P-VLAN is designed to satisfy different demands for services.Therefore, Service Activation is different from traditional network configuration mode, and the complexity that it has reduced network management has improved consistency.Operator can grasp the use of Service Activation fast, because it only is some patterned simple operationss.
5, the transparent transmission of user network control protocol:
Since the Ether frame of user network utilizes the MAC-IN-MAC tunnel to transmit, its all Network Control Protocol is also passed through the tunnel network of passing through provider pellucidly so, and these control protocols are not subjected to the restriction of user network and carrier network in use.The Spanning-Tree Protocol example of enabling based on the user side network can not interact with the Spanning-Tree Protocol that carrier network is enabled, and operator must use " tunnel ", allows user's the BPDU (BPDUs) of Spanning-Tree Protocol pass through network.With the viewpoint of MAC-IN-MAC technology, user's BPDU Ether frame is by the network of tunnel passing through provider.Therefore, operator and user can both be simultaneously on the switching equipment of operator, use two layers of LMP Link Manager Protocol STP target MAC (Media Access Control) address of standard and do not have other additional conditions.Simultaneously, allow to use the BPDU MAC Address of standard on the switching equipment of operator in existing network.
Because this agreement is just in the draft stage, still there is not at present ripe realization technology, but, on three-tier switch, generally be the protocol processes that on router, realizes MAC-IN-MAC by the mode of network processing unit (NP) and switching network according to the framework of the present network equipment.Up direction, receive the Ethernet message that downstream plant is sent here by network processing unit (NP), deliver to network board then, switching network is forwarded to message on the corresponding uplink interface board according to the destination slogan, is finished the encapsulation process of MAC-IN-MAC by the network processing unit (NP) of uplink interface board.Down direction, interface board receive the MAC-IN-MAC message, finish message identification and decapsulation work by network processing unit (NP), and the study of MAC Address, burin-in process, after disposing message are uploaded to switching network and are forwarded to the corresponding downstream port.
And have in the present network equipment is pure Ethernet switch greatly, and its acp chip is two layers of exchange chip, and its core exchange chip only E-Packets by MAC and VLAN, can't discern the frame structure of MAC-IN-MAC message.
There is following shortcoming in prior art:
1, for three-tier switch, use the route system of network processing unit (NP), realize the cost costliness.
2, for Layer 2 switch, can't utilize network processing unit (NP) to realize MAC-IN-MAC solution end to end, and its core exchange chip is only transmitted by MAC and VLAN, can't discern the frame structure of MAC-IN-MAC message, add tunnel MAC and label also can't for the ether network packet, thereby can't realize utilizing the MAC-IN-MAC message to carry out the purpose that the network information is transmitted.
Summary of the invention
The present invention can not discern the weak point of MAC-IN-MAC message frame structure in order to solve present pure Ethernet switch, provide the system and method for a kind of MAC-IN-MAC of realization, thereby low cost has realized identification and the transmission of MAC-IN-MAC message in Ethernet switch.
Described technical scheme is as follows:
The invention provides the system of a kind of MAC-IN-MAC of realization, comprise local terminal equipment and opposite end switching equipment, the network side interface board of local terminal equipment is connected by the MAC-IN-MAC tunnel with the opposite end interface board of opposite end switching equipment, wherein,
The network side interface board is provided with the message conversion chip, described message conversion chip is used for obtaining MAC-IN-MAC heading information and encapsulation mode according to the VLAN user number of Ethernet message and user data physical address, and according to described encapsulation mode described Ethernet message is encapsulated, form the MAC-IN-MAC message;
The MAC-IN-MAC tunnel is used to send the MAC-IN-MAC message.
The message conversion chip specifically comprises Service Instance acquisition module, network physical address acquisition module, encapsulation mode acquisition module and package module;
The Service Instance acquisition module is used for the mapping relations between the Service Instance number of the sign carrier network that distributes according to the VLAN user number and at this VLAN, obtains described Service Instance number;
The network physical address acquisition module is used for obtaining the network physical address that enters the MAC-IN-MAC tunnel according to the mapping relations between described Service Instance number, user data physical address and the network physical address;
The encapsulation mode acquisition module is used for obtaining operator's virtual local area network tags and encapsulation mode according to the mapping relations of described Service Instance number, VLAN user number and operator's virtual local area network tags, encapsulation mode;
Package module is used for according to described encapsulation mode described message being encapsulated, and obtains the MAC-IN-MAC message.
A kind of system that realizes MAC-IN-MAC comprises local terminal equipment and opposite end switching equipment, and the network side interface board of local terminal equipment is connected by the MAC-IN-MAC tunnel with the opposite end interface board of opposite end switching equipment, wherein,
The network side interface board is provided with the message conversion chip, described message conversion chip is used for obtaining encapsulation mode according to Service Instance in the MAC-IN-MAC message number and VLAN user number, according to described encapsulation mode described MAC-IN-MAC message is carried out decapsulation, obtain the Ethernet message;
The MAC-IN-MAC tunnel is used to receive the MAC-IN-MAC message.
The message conversion chip comprises decapsulation pattern acquisition module and decapsulation module;
Decapsulation pattern acquisition module is used for obtaining the encapsulation mode of MAC-IN-MAC message when going into the tunnel according to the mapping relations between described Service Instance number, VLAN user number and the encapsulation mode;
Decapsulation module is used for according to described encapsulation mode the MAC-IN-MAC message being carried out decapsulation.
A kind of method that realizes MAC-IN-MAC may further comprise the steps:
Steps A: local terminal equipment receives the Ethernet message;
Step B: obtain MAC-IN-MAC heading information and encapsulation mode according to VLAN user number in the Ethernet message and user data physical address, and described Ethernet message is encapsulated, form the MAC-IN-MAC message according to described encapsulation mode;
Step C: described MAC-IN-MAC message is sent into the MAC-IN-MAC tunnel, and pass to the opposite end switching equipment.
Step B specifically comprises:
Step B1: the mapping relations between the Service Instance of the sign carrier network that distributes according to described VLAN user number and at this VLAN number, obtain described Service Instance number;
Step B2: obtain the network physical address that enters the MAC-IN-MAC tunnel according to the mapping relations between described Service Instance number, user data physical address and the network physical address;
Step B3: the mapping relations according to described Service Instance number, VLAN user number and operator's virtual local area network tags, encapsulation mode are obtained operator's virtual local area network tags and encapsulation mode;
Step B4: according to the encapsulation mode of gained, described Ethernet message is encapsulated, form the MAC-IN-MAC message.
Step B2 specifically comprises:
Step B21: described Service Instance number and user data physical address are carried out Hash operation, and set up respectively between cryptographic Hash that described Hash operation obtains and described network physical address, Service Instance number, the user data physical address mapping relations;
Step B22: the mapping relations between cryptographic Hash that obtains according to described Hash operation and Service Instance number, the user data physical address, obtain Service Instance number, user data physical address;
Step B23: judge the Service Instance obtain number, user data physical address whether with the Service Instance that carries out Hash operation number, user data physical address coupling, if coupling, then obtain the network physical address according to the mapping relations of cryptographic Hash and network physical address, if do not match, then encapsulate a L 2 broadcast address and be broadcast to all network physical addresses.
Step B3 specifically comprises:
Step B31: the VLAN user number in described Service Instance number and the Ethernet message is carried out Hash operation, and set up the mapping relations between VLAN user number in cryptographic Hash that described Hash operation obtains and described Service Instance number, the Ethernet message, operator's virtual local area network tags, the encapsulation mode;
Step B32: obtain Service Instance number, VLAN user number according to the mapping relations between the VLAN user number in described cryptographic Hash and Service Instance number, the Ethernet message;
Step B33: judge the Service Instance obtain number, VLAN user number whether with the Service Instance that carries out Hash operation number, VLAN user number coupling, if coupling is then obtained operator's virtual local area network tags and encapsulation mode according to the mapping relations between cryptographic Hash and operator's virtual local area network tags, the encapsulation mode.
A kind of method that realizes MAC-IN-MAC may further comprise the steps:
Step e: the opposite end switching equipment is sent into the MAC-IN-MAC tunnel with the MAC-IN-MAC message by the opposite end interface board, and is sent to local terminal equipment;
Step F: obtain encapsulation mode according to Service Instance in the MAC-IN-MAC message number and VLAN user number, described MAC-IN-MAC message is carried out decapsulation, obtain the Ethernet message according to described encapsulation mode.
Step F specifically comprises:
Step F 1:, obtain the encapsulation mode of MAC-IN-MAC message when going into the tunnel according to the mapping relations between described Service Instance number, VLAN user number and the encapsulation mode;
Step F 2: according to the encapsulation mode of described acquisition the MAC-IN-MAC message is carried out decapsulation and handle.
Step F 1 specifically comprises:
Step F 11: Service Instance in the MAC-IN-MAC message number and VLAN user number are carried out Hash operation, and set up the mapping relations between cryptographic Hash that described Hash operation obtains and Service Instance number, VLAN user number, the encapsulation mode respectively;
Step F 12: obtain Service Instance number, VLAN user number according to the mapping relations between described cryptographic Hash and described Service Instance number, the VLAN user number;
Step F 13: judge the Service Instance obtain number, VLAN user number whether with the Service Instance that carries out Hash operation number, VLAN user number coupling, if coupling is then obtained the encapsulation mode of MAC-IN-MAC message when going into the tunnel according to the mapping relations between cryptographic Hash and the encapsulation mode.
In the decapsulation process, also comprise from described MAC-IN-MAC message, extracting the step that user data physical address, Service Instance number and network physical address form learning information.
The step that forms learning information specifically comprises:
Step H: set up the mapping relations between the restriction of VLAN user number and MAC Address, judge whether to learn according to MAC Address restriction and the number of having learnt, if learn, then the network physical address of carrying in the MAC-IN-MAC message, Service Instance number, user data physical address information are extracted, store in the described mapping relations;
Step I: set up the mapping relations between VLAN user number and the counter number, refresh the counter number in the virtual local network table.
The beneficial effect that technical scheme of the present invention is brought is:
1, can in the pure ethernet switching system that with two layers of exchange chip is the core exchange chip, support the protocol processes of MAC-IN-MAC, expand the reciprocal exchange of business of Ethernet switch, avoid two layers of defective that the exchange chip function is limited.
2, can in the pure ethernet switching system that with two layers of exchange chip is the core exchange chip, support multiple business such as VPN(Virtual Private Network), traffic engineering based on two layers of exchange chip of MAC-IN-MAC message.
Description of drawings
Fig. 1 is a kind of schematic diagram of realizing the method for MAC-IN-MAC of the present invention;
Fig. 2 is the flow chart of Ethernet message encapsulation in a kind of method that realizes MAC-IN-MAC of the present invention;
Fig. 3 is the flow chart of MAC-IN-MAC message decapsulation in a kind of method that realizes MAC-IN-MAC of the present invention;
Fig. 4 is a kind of system configuration schematic diagram of realizing MAC-IN-MAC of the present invention;
Fig. 5 is a kind of system configuration schematic diagram (encapsulation mode) of realizing MAC-IN-MAC of the present invention;
Fig. 6 is a kind of system configuration schematic diagram (decapsulation pattern) of realizing MAC-IN-MAC of the present invention.
Embodiment
The invention will be further described below in conjunction with the drawings and specific embodiments, but not as a limitation of the invention.
A kind of system and method for realizing MAC-IN-MAC of the present invention, it is at the basic comprising of the Ethernet switch under the prior art, in the message conversion chip of its network side power board, realize the encapsulation reconciliation encapsulation process of MAC-IN-MAC message, thereby make Ethernet switch can discern and transmit the MAC-IN-MAC message, realize the goal of the invention that reduces cost.
Embodiment 1
As shown in Figure 1, the system of realization MAC-IN-MAC provided by the present invention comprises local terminal equipment (as Ethernet switch) and opposite end switching equipment, network side interface board in the Ethernet switch utilizes its message conversion chip will be converted to the MAC-IN-MAC message by the Ethernet message that two layers of exchange chip pass on and sends into the MAC-IN-MAC tunnel, and then passes to the opposite end switching equipment by the opposite end interface board.
The MAC-IN-MAC tunnel is the netting twine that the network side interface board of Ethernet switch links to each other with the opposite end interface board of opposite end switching equipment, technical solutions according to the invention at first need dispose a virtual local network table (vlan table) in the message conversion chip of network side interface board, this indicator is configured single virtual LAN subscriber number (C-VLAN ID), mapping relations between the Service Instance of the sign carrier network that has reflected the VLAN user number and distributed at this VLAN number, its structure is as shown in table 1.This table as index, mainly comprises following information with user's VLAN user number: whether will carry out the MAC-IN-MAC encapsulation at this VLAN; The Service Instance of allocation identification carrier network number (below abbreviate as Service Instance number); The limited number of times of carrying out MAC address learning at this VLAN.
VLAN list structure such as table 1:
Figure A20061011134500121
Table 1
The local area network (LAN) message (VLAN message) that need enter the MAC-IN-MAC tunnel enters Ethernet switch equipment from the user side interface plate, the core exchange chip of this equipment (being called two layers of exchange chip usually) with this message switching to the network side interface board, and on the network side interface board, carry out MAC-IN-MAC message encapsulation, the local area network (LAN) message of present embodiment is an example with the Ethernet message, and the concrete steps of its encapsulation comprise:
Step 101: comprise VLAN user number (C-VLAN ID), user data physical address structures such as (C-DA) in the Ethernet message.Whether the VLAN user number in the message conversion chip logical foundation message on the network side interface board is looked into the local area network (LAN) message (VLAN message) that virtual local network table obtains passing over needs to carry out the MAC-IN-MAC encapsulation, then according to the VLAN user number inquiry virtual local network table that comprises in the local area network (LAN) message (being generally the Ethernet message), obtain Service Instance number (SID) as needs at the sign carrier network of this VLAN distribution;
Step 102: the user data physical address (C-DA) that comprises in Service Instance number and the Ethernet message is carried out Hash operation obtain the physical address table index, and look into physical address table according to this physical address table index.
According to the mapping relations configures physical address table between Service Instance number, user data physical address and the network physical address, its structure is as shown in table 2:
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 as below RSV Mac_times[15:0]
1 RSV Service Instance number [27:0]
2 User data physical address [31:0]
3 4 User data physical address [47:32] DMAC[47:32]
DMAC[31:0]
5 H PNOD[14:0] T CNOD[14:0]
Name Line number The position Describe
VALID is effective The 0th row BIT[31] This list item of the invalid 1=of this list item of 0=is effective
RSV keeps the position The 0th row BIT[30] RSV
STATIC static state The 0th row BIT[29] 0=is dynamic, can cannot be worn out, cover by aging 1=static state
RSV keeps the position The 0th row BIT[28] RSV
The Mac_times timestamp The 0th row BIT[15:0] The physical address table timestamp, be 1 unit 1 second
SID Service Instance number The 1st row SID Service Instance number [27:0] SID Service Instance number (28bit)
C-DA user data physical address The 2nd row BIT[31:0] Customer objective MAC, 48bit
The 3rd row BIT[31:16]
The DMAC target MAC (Media Access Control) address The 3rd row BIT[15:0] Network physical address, opposite end MAC, 48bit
The 4th row BIT[31:0]
HEAD leader will The 5th row BIT[31] The linked list head sign
TAIL tail tag will The 5th row BIT[15] Chained list tail tag will
The PNOD father node The 5th row BIT[30:16] The father node address, 15bit
The CNOD child node The 5th row BIT[14:0] The child node address, 15bit
Table 2
Though can directly obtain the network physical address according to the mapping relations between Service Instance number, user data physical address and the network physical address, but because the index of physical address table before 76bit (Service Instance number: 28bit altogether without Hash operation, the user data physical address: 48bit), promptly 2 76Individual list item, even each list item is only supported 64bit, whole list item scale has also reached 2 76* more than the 64bit, and plug-in RAM generally has only 8~36Mbit, is difficult to satisfy the demands, and therefore need utilize hash algorithm that this index is shortened.
Hash algorithm can adopt more common CRC16 algorithm, and (generator polynomial is γ=x 16+ x+1, γ are 16bit, and x is 32bit), the index of 76bit divides to be given x triple time and carries out CRC and calculate.
Step 103: judge that whether with in the step 102 user data physical address that to deposit in the list item of physical address table index correspondence, Service Instance number carry out user data physical address, the Service Instance number coupling of Hash operation.If coupling, then execution in step 104, if do not match, then execution in step 105.
(essence of hash algorithm is exactly the little space that the large space of x correspondence is mapped to the γ correspondence because hash algorithm unavoidably will bring collision problem, two different x obtain identical γ probably), therefore designing this physical address table is the chain sheet form, the different index (x) that is hashing onto same list item address (γ) is stringed together with a chain, its chain string mode is for example: x 1, x2 obtains γ by Hash operation, first node (father node) is deposited x1 information so, in the list item of x1 an address pointer that points to the child node that has x2 information is arranged simultaneously, so that just can find x2 along x1.
Step 104: the direct memory access (DMA) value of depositing in the taking-up physical address table (DMAC value) promptly obtains the carrier network address as the network physical address.
Step 105: check whether the list item in the physical address table is the chained list tail, if not, then find next node, up to the node that finds coupling according to list item neutron node address; If arrived the node that the chained list tail does not find coupling yet, be broadcast to all network physical address then for this L 2 broadcast address of message encapsulation (full F).
Step 106: described Service Instance number and VLAN user number are carried out Hash operation, obtain the BTAG table index, and obtain operator's virtual local area network tags (P-VLAN TAG) and encapsulation mode according to the BTAG table.
Because agreement regulation MAC-IN-MAC message also needs to dispose a virtual local area network tags, this label is used to carry a plurality of Service Instances, obtain by Service Instance number mapping, therefore need Service Instance of configuration number and VLAN user number mapping table to operator's virtual local area network tags (P-VLAN TAG) and encapsulation mode, here be referred to as the BTAG table, this list structure is as shown in table 3:
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 RSV As below P-VLAN TAG SVLAN
1 RSV SID Service Instance number
2 H PNOD T CNOD
Name Line number The position Describe
VALID effective marker position The 0th row BIT[24] This VLAN of the invalid 1=of this VLAN of 0=is effective
The ENCA_MOD encapsulation mode The 0th row BIT[26] MAC-IN-MAC encapsulation mode: 0: transparent mode 1:STAG pattern
P-VLAN TAG The 0th row BIT[23:12] The P-VLAN TAG that needs interpolation
S VLAN outside VLAN value The 0th row BIT[11:0] The outside VLAN that ejects under the STAG pattern
SID Service Instance number The 1st row BIT[23:0] The Service Instance of the usefulness of tabling look-up number
HEAD leader will The 2nd row BIT[31] The linked list head sign
TAIL tail tag will The 20th row BIT[30:16] Chained list tail tag will
The PNOD father node The 2nd row BIT[15] The father node address
The CNOD child node The 2nd row BIT[14:0] The child node address
Table 3
This table is a Hash table equally, and is identical in hash algorithm and the step 103, repeats no more here.
By this table, but table look-at is learnt operator's virtual local area network tags and encapsulation mode.
Step 107: judge that the encapsulation mode that obtains is transparent mode or STAG pattern.
The MAC-IN-MAC agreement is supported two kinds of encapsulation modes: transparent mode and STAG pattern.
Step 108: if the encapsulation mode that obtains is the STAG pattern, then eject outside VLAN, add MAC-IN-MAC encapsulation header (including Service Instance number, network physical address and operator's virtual local area network tags) then, and recomputate CRC and replace original C RC field (the IEEE802.1ah regulation adopts general CRC32 algorithm).
Step 109: as the encapsulation mode that obtains is transparent mode, then former message (comprising CRC) is used as payload, adds MAC-IN-MAC heading and new crc field (the IEEE802.1ah regulation adopts general CRC32 algorithm).
At last, the MAC-IN-MAC message after the encapsulation is sent into the MAC-IN-MAC tunnel, and pass to the opposite end switching equipment by the opposite end interface board.
Embodiment 2:
As shown in Figure 1, when the opposite end switching equipment sends the MAC-IN-MAC message to local terminal equipment (as Ethernet switch) by the opposite end interface board, it spreads out of the MAC-IN-MAC tunnel to the network side interface board, carrying out the decapsulation of MAC-IN-MAC message on the network side interface board handles, obtain the Ethernet message and send two layers of exchange chip to, and spread out of by the user side interface plate.
It is as follows that the MAC-IN-MAC message need go out the decapsulation detailed step in MAC-IN-MAC tunnel:
Step 201: it is a MAC-IN-MAC message that the heading that carries according to message is judged this message.
Step 202: Service Instance in the MAC-IN-MAC message number and VLAN user number are carried out Hash operation, look into BTAG table (table 3), obtain encapsulation mode and the outside VLAN value of this message when going into the tunnel.
Step 203: judge that the encapsulation mode obtain is transparent mode or STAG pattern, if STAG pattern execution in step 204, if transparent mode execution in step 205 then.
The MAC-IN-MAC agreement is supported two kinds of encapsulation modes: transparent mode, STAG pattern.
Step 204: find in the table 3 storage go into the tunnel time outside VLAN value that ejected, eject the MAC-IN-MAC heading add simultaneously on this outside VLAN value, and recomputate CRC byte (CRC32 algorithm), give two layers of exchange chip then and exchange.
Step 205: directly eject MAC-IN-MAC heading and last CRC byte, revert to the Ethernet message and give two layers of exchange chip and exchange.
Step 206: the user data physical address in the network physical address of carrying in the MAC-IN-MAC message, Service Instance number and the Ethernet message is extracted, write physical address table, carry out physical address table and safeguard.
Logic in the message conversion chip is supported the 24K address space, and wherein 16K deposits linked list head, and 8K deposits the chained list information of conflict address.From virtual local network table, find the MAC Address restriction of current VLAN,,, then do not learn if reached restriction according to MAC Address restriction and the number of having learnt; If do not have, then the user data physical address number is carried out Hash operation together with Service Instance, remove to search physical address table, if find direct memory access (DMA) (DMAC) value with this message coupling, illustrate that this MAC Address by study, does not then refresh this list item; If do not find the value of coupling, then the network address, opposite end that this message is carried is added in the physical address table and is gone.After having learnt, refresh the counter number in the virtual local network table.
In addition, also need to introduce aging mechanism, avoid unwanted list item committed memory space always,, then this physical address table entry deletion is fallen if in official hour, do not receive the pairing MAC-IN-MAC message of certain list item in the table.
Embodiment 3
Referring to Fig. 4, the present invention also provides the system of a kind of MAC-IN-MAC of realization, comprises local terminal equipment and opposite end switching equipment, and the network side interface board of described local terminal equipment is connected by the MAC-IN-MAC tunnel with the opposite end interface board of opposite end switching equipment, wherein,
Described network side interface board is provided with the message conversion chip, and described message conversion chip is used to handle the message that is delivered on the network side interface board;
Described MAC-IN-MAC tunnel is used to transmit the MAC-IN-MAC message.
The MAC-IN-MAC tunnel is generally netting twine.
Embodiment 4
Referring to Fig. 5, the present invention also provides the system of a kind of MAC-IN-MAC of realization, comprises local terminal equipment and opposite end switching equipment, and the network side interface board of described local terminal equipment is connected by the MAC-IN-MAC tunnel with the opposite end interface board of opposite end switching equipment, wherein,
The network side interface board is provided with the message conversion chip, and it is used for the Ethernet message that two layers of exchange chip with local terminal equipment (as Ethernet switch) pass over and is packaged into the MAC-IN-MAC message;
The MAC-IN-MAC tunnel is used for the MAC-IN-MAC message that the network side interface board generates is delivered to the opposite end switching equipment.
And the message conversion chip specifically comprises Service Instance acquisition module, network physical address acquisition module, encapsulation mode acquisition module and package module;
The Service Instance acquisition module is used for the mapping relations between the Service Instance number of the sign carrier network that distributes according to the VLAN user number and at this VLAN, obtains described Service Instance number;
The network physical address acquisition module is used for obtaining the network physical address that enters the MAC-IN-MAC tunnel according to the mapping relations between described Service Instance number, user data physical address and the network physical address;
The encapsulation mode acquisition module is used for obtaining operator's virtual local area network tags and encapsulation mode according to the mapping relations of described Service Instance number, VLAN user number and operator's virtual local area network tags, encapsulation mode;
Package module is used for according to described encapsulation mode described message being encapsulated, and obtains the MAC-IN-MAC message.
Embodiment 5
Referring to Fig. 6, a kind of system that realizes MAC-IN-MAC comprises local terminal equipment and opposite end switching equipment, and the network side interface board of described local terminal equipment is connected by the MAC-IN-MAC tunnel with the opposite end interface board of opposite end switching equipment, wherein,
The MAC-IN-MAC tunnel is used for the MAC-IN-MAC message is sent to the network side interface board by the opposite end switching equipment;
The network side interface board is provided with the message conversion chip, and its MAC-IN-MAC message that is used for receiving carries out decapsulation, obtains the Ethernet message.
The message conversion chip also comprises decapsulation pattern acquisition module and decapsulation module;
Decapsulation pattern acquisition module is used for obtaining the encapsulation mode of MAC-IN-MAC message when going into the tunnel according to the mapping relations between described Service Instance number, VLAN user number and the encapsulation mode;
Decapsulation module is used for according to described encapsulation mode the MAC-IN-MAC message being carried out decapsulation.
The above execution mode only is the preferred embodiments of the present invention; the invention is not restricted to the foregoing description; the any conspicuous change of under the prerequisite that does not deviate from the principle of the invention it being done for persons skilled in the art all belongs to the protection range of design of the present invention and claims.

Claims (13)

1. a system that realizes MAC-IN-MAC comprises local terminal equipment and opposite end switching equipment, it is characterized in that, the network side interface board of described local terminal equipment is connected by the MAC-IN-MAC tunnel with the opposite end interface board of opposite end switching equipment, wherein,
Described network side interface board is provided with the message conversion chip, described message conversion chip is used for obtaining MAC-IN-MAC heading information and encapsulation mode according to the VLAN user number of Ethernet message and user data physical address, and according to described encapsulation mode described Ethernet message is encapsulated, form the MAC-IN-MAC message;
Described MAC-IN-MAC tunnel is used to send the MAC-IN-MAC message.
2. a kind of system that realizes MAC-IN-MAC according to claim 1 is characterized in that described message conversion chip specifically comprises Service Instance acquisition module, network physical address acquisition module, encapsulation mode acquisition module and package module;
Described Service Instance acquisition module is used for the mapping relations between the Service Instance number of the sign carrier network that distributes according to the VLAN user number and at this VLAN, obtains described Service Instance number;
Described network physical address acquisition module is used for obtaining the network physical address that enters the MAC-IN-MAC tunnel according to the mapping relations between described Service Instance number, user data physical address and the network physical address;
Described encapsulation mode acquisition module is used for obtaining operator's virtual local area network tags and encapsulation mode according to the mapping relations of described Service Instance number, VLAN user number and operator's virtual local area network tags, encapsulation mode;
Described package module is used for according to described encapsulation mode described message being encapsulated, and obtains the MAC-IN-MAC message.
3. a system that realizes MAC-IN-MAC comprises local terminal equipment and opposite end switching equipment, it is characterized in that, the network side interface board of described local terminal equipment is connected by the MAC-IN-MAC tunnel with the opposite end interface board of opposite end switching equipment, wherein,
Described network side interface board is provided with the message conversion chip, described message conversion chip is used for obtaining encapsulation mode according to Service Instance in the MAC-IN-MAC message number and VLAN user number, according to described encapsulation mode described MAC-IN-MAC message is carried out decapsulation, obtain the Ethernet message;
Described MAC-IN-MAC tunnel is used to receive the MAC-IN-MAC message.
4. the system of realization MAC-IN-MAC according to claim 3 is characterized in that described message conversion chip comprises decapsulation pattern acquisition module and decapsulation module;
Described decapsulation pattern acquisition module is used for obtaining the encapsulation mode of MAC-IN-MAC message when going into the tunnel according to the mapping relations between described Service Instance number, VLAN user number and the encapsulation mode;
Described decapsulation module is used for according to described encapsulation mode the MAC-IN-MAC message being carried out decapsulation.
5. a method that realizes MAC-IN-MAC is characterized in that, said method comprising the steps of:
Steps A: local terminal equipment receives the Ethernet message;
Step B: obtain MAC-IN-MAC heading information and encapsulation mode according to VLAN user number in the Ethernet message and user data physical address, and described Ethernet message is encapsulated, form the MAC-IN-MAC message according to described encapsulation mode;
Step C: described MAC-IN-MAC message is sent into the MAC-IN-MAC tunnel, and pass to the opposite end switching equipment.
6. the method for realization MAC-IN-MAC according to claim 5 is characterized in that described step B specifically comprises:
Step B1: the mapping relations between the Service Instance of the sign carrier network that distributes according to described VLAN user number and at this VLAN number, obtain described Service Instance number;
Step B2: obtain the network physical address that enters the MAC-IN-MAC tunnel according to the mapping relations between described Service Instance number, user data physical address and the network physical address;
Step B3: the mapping relations according to described Service Instance number, VLAN user number and operator's virtual local area network tags, encapsulation mode are obtained operator's virtual local area network tags and encapsulation mode;
Step B4: according to the encapsulation mode of gained, described Ethernet message is encapsulated, form the MAC-IN-MAC message.
7. the method for realization MAC-IN-MAC according to claim 6 is characterized in that described step B2 specifically comprises:
Step B21: described Service Instance number and user data physical address are carried out Hash operation, and set up respectively between cryptographic Hash that described Hash operation obtains and described network physical address, Service Instance number, the user data physical address mapping relations;
Step B22: the mapping relations between cryptographic Hash that obtains according to described Hash operation and Service Instance number, the user data physical address, obtain Service Instance number, user data physical address;
Step B23: judge the Service Instance obtain number, user data physical address whether with the Service Instance that carries out Hash operation number, user data physical address coupling, if coupling, then obtain the network physical address according to the mapping relations of cryptographic Hash and network physical address, if do not match, then encapsulate a L 2 broadcast address and be broadcast to all network physical addresses.
8. the method for realization MAC-IN-MAC according to claim 6 is characterized in that described step B3 specifically comprises:
Step B31: the VLAN user number in described Service Instance number and the Ethernet message is carried out Hash operation, and set up the mapping relations between VLAN user number in cryptographic Hash that described Hash operation obtains and described Service Instance number, the Ethernet message, operator's virtual local area network tags, the encapsulation mode;
Step B32: obtain Service Instance number, VLAN user number according to the mapping relations between the VLAN user number in described cryptographic Hash and Service Instance number, the Ethernet message;
Step B33: judge the Service Instance obtain number, VLAN user number whether with the Service Instance that carries out Hash operation number, VLAN user number coupling, if coupling is then obtained operator's virtual local area network tags and encapsulation mode according to the mapping relations between cryptographic Hash and operator's virtual local area network tags, the encapsulation mode.
9. a method that realizes MAC-IN-MAC is characterized in that, said method comprising the steps of:
Step e: the opposite end switching equipment is sent into the MAC-IN-MAC tunnel with the MAC-IN-MAC message by the opposite end interface board, and is sent to local terminal equipment;
Step F: obtain encapsulation mode according to Service Instance in the MAC-IN-MAC message number and VLAN user number, described MAC-IN-MAC message is carried out decapsulation, obtain the Ethernet message according to described encapsulation mode.
10. the method for realization MAC-IN-MAC according to claim 9 is characterized in that described step F specifically comprises:
Step F 1:, obtain the encapsulation mode of MAC-IN-MAC message when going into the tunnel according to the mapping relations between described Service Instance number, VLAN user number and the encapsulation mode;
Step F 2: according to the encapsulation mode of described acquisition the MAC-IN-MAC message is carried out decapsulation and handle.
11. the method for realization MAC-IN-MAC according to claim 10 is characterized in that described step F 1 specifically comprises:
Step F 11: Service Instance in the MAC-IN-MAC message number and VLAN user number are carried out Hash operation, and set up the mapping relations between cryptographic Hash that described Hash operation obtains and Service Instance number, VLAN user number, the encapsulation mode respectively;
Step F 12: obtain Service Instance number, VLAN user number according to the mapping relations between described cryptographic Hash and described Service Instance number, the VLAN user number;
Step F 13: judge the Service Instance obtain number, VLAN user number whether with the Service Instance that carries out Hash operation number, VLAN user number coupling, if coupling is then obtained the encapsulation mode of MAC-IN-MAC message when going into the tunnel according to the mapping relations between cryptographic Hash and the encapsulation mode.
12. method according to the described realization of any claim of claim 9-11 MAC-IN-MAC, it is characterized in that, in the described decapsulation process, also comprise from described MAC-IN-MAC message, extracting the step that user data physical address, Service Instance number and network physical address form learning information.
13. a kind of method that realizes MAC-IN-MAC according to claim 12 is characterized in that the step of described formation learning information specifically comprises:
Step H: set up the mapping relations between the restriction of VLAN user number and MAC Address, judge whether to learn according to MAC Address restriction and the number of having learnt, if learn, then the network physical address of carrying in the MAC-IN-MAC message, Service Instance number, user data physical address information are extracted, store in the described mapping relations;
Step I: set up the mapping relations between VLAN user number and the counter number, refresh the counter number in the virtual local network table.
CNA200610111345XA 2006-08-23 2006-08-23 System and method for implementing MAC-IN-MAC Pending CN101132285A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CNA200610111345XA CN101132285A (en) 2006-08-23 2006-08-23 System and method for implementing MAC-IN-MAC
PCT/CN2007/070472 WO2008025279A1 (en) 2006-08-23 2007-08-14 System, method and apparatus for implementing message transfer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA200610111345XA CN101132285A (en) 2006-08-23 2006-08-23 System and method for implementing MAC-IN-MAC

Publications (1)

Publication Number Publication Date
CN101132285A true CN101132285A (en) 2008-02-27

Family

ID=39129418

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA200610111345XA Pending CN101132285A (en) 2006-08-23 2006-08-23 System and method for implementing MAC-IN-MAC

Country Status (2)

Country Link
CN (1) CN101132285A (en)
WO (1) WO2008025279A1 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101986666A (en) * 2010-11-05 2011-03-16 清华大学 Network data transmission method based on virtual network interface and reverse address resolution
CN102143072A (en) * 2011-03-21 2011-08-03 华为数字技术有限公司 Method for fluid control configuration and network equipment
CN102420760A (en) * 2011-12-02 2012-04-18 盛科网络(苏州)有限公司 Method and device for realizing forwarding among chips through Internet encapsulation packet processing header
CN104040986A (en) * 2012-12-10 2014-09-10 华为技术有限公司 Message forwarding method and device
CN104396192A (en) * 2010-06-29 2015-03-04 华为技术有限公司 Asymmetric network address encapsulation
CN104539477A (en) * 2014-12-15 2015-04-22 国家计算机网络与信息安全管理中心 Method for collecting message information of multiple Ether lines
US9912495B2 (en) 2010-05-28 2018-03-06 Futurewei Technologies, Inc. Virtual layer 2 and mechanism to make it scalable

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100337450C (en) * 2002-08-05 2007-09-12 华为技术有限公司 Communication method between virtual local area webs
CN100364289C (en) * 2004-04-30 2008-01-23 华为技术有限公司 Method for implementing layer-2 equipment interconnection in resilient packet ring (RPR) based network
CN100512211C (en) * 2005-09-12 2009-07-08 中兴通讯股份有限公司 Method for realizing virtual switching between different type networks

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9912495B2 (en) 2010-05-28 2018-03-06 Futurewei Technologies, Inc. Virtual layer 2 and mechanism to make it scalable
CN104396192A (en) * 2010-06-29 2015-03-04 华为技术有限公司 Asymmetric network address encapsulation
US10389629B2 (en) 2010-06-29 2019-08-20 Futurewei Technologies, Inc. Asymmetric network address encapsulation
US10367730B2 (en) 2010-06-29 2019-07-30 Futurewei Technologies, Inc. Layer two over multiple sites
CN104396192B (en) * 2010-06-29 2018-03-06 华为技术有限公司 Dissymmetric network address encapsulates
CN101986666B (en) * 2010-11-05 2013-07-24 清华大学 Network data transmission method based on virtual network interface and reverse address resolution
CN101986666A (en) * 2010-11-05 2011-03-16 清华大学 Network data transmission method based on virtual network interface and reverse address resolution
CN102143072B (en) * 2011-03-21 2013-12-04 北京华为数字技术有限公司 Method for fluid control configuration and network equipment
CN102143072A (en) * 2011-03-21 2011-08-03 华为数字技术有限公司 Method for fluid control configuration and network equipment
CN102420760A (en) * 2011-12-02 2012-04-18 盛科网络(苏州)有限公司 Method and device for realizing forwarding among chips through Internet encapsulation packet processing header
CN104040986A (en) * 2012-12-10 2014-09-10 华为技术有限公司 Message forwarding method and device
CN104040986B (en) * 2012-12-10 2017-03-08 华为技术有限公司 Message forwarding method and device
CN104539477A (en) * 2014-12-15 2015-04-22 国家计算机网络与信息安全管理中心 Method for collecting message information of multiple Ether lines
CN104539477B (en) * 2014-12-15 2017-10-27 国家计算机网络与信息安全管理中心 A kind of method gathered to a plurality of ether circuit message information

Also Published As

Publication number Publication date
WO2008025279A1 (en) 2008-03-06

Similar Documents

Publication Publication Date Title
CN101127696B (en) Data forwarding method for layer 2 network and network and node devices
CN101160850B (en) Method and device for forwarding packet
US9967371B2 (en) Metro ethernet network with scaled broadcast and service instance domains
US8031640B2 (en) Packet transmission apparatus, packet forwarding method and packet transmission system
CN101257452B (en) Method for ether passive optical network access equipment to transmit downlink data packet
CN101296186B (en) Routing switching device, method and switching cable fastener plate
CN100563211C (en) The implementation method of a kind of virtual gateway, virtual subnet and system
US8902757B2 (en) Method and system for transparent LAN services in a packet network
CN101132285A (en) System and method for implementing MAC-IN-MAC
CN102882784B (en) LSP information from flooding method and apparatus in SPBM
CN104221323A (en) Method for multicast flow routing selection
CN100521653C (en) Method and system for nesting group network by skeleton bridging technology
CN1934560A (en) Method of sending information through a tree and ring topology of a network system
CN102111320B (en) Method for controlling plane data interaction in distributed system
CN100364289C (en) Method for implementing layer-2 equipment interconnection in resilient packet ring (RPR) based network
CN102801622B (en) A kind of retransmission method of data message and retransmission unit
CN103152283B (en) A kind of method and apparatus of aggregated links load balancing
CN103200126B (en) XG-PON system flow management device and method
CN102325087A (en) Method and system for realizing VLAN (Virtual Local Area Network) QinQ
CN101697525B (en) Looped network based configuration and data transmission method and system of address forwarding table
CN103236992B (en) The method realizing the interconnection of rack system backboard
CN1330148C (en) Method and device for implementing upper ring and lower ring of flexible gruoping ring
CN105591913B (en) Message forwarding method in TRILL network and device
JP5569624B2 (en) Network relay device and network
CN102136955B (en) Decoupled virtual private LAN service (VPLS) forwarding frame-based message forwarding method and equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20080227