CN101409685B - Forwarding method based on virtual LAN mapping and access equipment - Google Patents

Forwarding method based on virtual LAN mapping and access equipment Download PDF

Info

Publication number
CN101409685B
CN101409685B CN200810227924XA CN200810227924A CN101409685B CN 101409685 B CN101409685 B CN 101409685B CN 200810227924X A CN200810227924X A CN 200810227924XA CN 200810227924 A CN200810227924 A CN 200810227924A CN 101409685 B CN101409685 B CN 101409685B
Authority
CN
China
Prior art keywords
message
vlan
mac
vlan label
network side
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.)
Active
Application number
CN200810227924XA
Other languages
Chinese (zh)
Other versions
CN101409685A (en
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.)
Beijing Ziguang Communication Technology Group Co.,Ltd.
Original Assignee
Hangzhou H3C 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 Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN200810227924XA priority Critical patent/CN101409685B/en
Publication of CN101409685A publication Critical patent/CN101409685A/en
Application granted granted Critical
Publication of CN101409685B publication Critical patent/CN101409685B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a forwarding method based on VLAN mapping and an access device thereof. In the method, a VLAN distribution table based on MAC is maintained according to a VLAN mapping table. The VLAN distribution table comprises the corresponding relation between MAC addresses of devices on the user side and VLAN labels on the network side. The VLAN labels on the network side are corresponding to the VLAN labels of the devices on the user side. A source MAC address of a message which is sent out from the user side is used for searching for the VLAN distribution table. According to the searching result, the VLAN label of the message on the network side is determined. And the VLAN label of the message on the user side is replaced by the determined VLAN label on the network side. The message is forwarded according to the target MAC address of the message and the replaced VLAN label on the network side. The resource occupation of the system is reduced.

Description

Retransmission method and access device based on VLAN mapping
Technical field
The present invention relates to the business treatment technique field, be specifically related to retransmission method and access device based on VLAN mapping.
Background technology
At present, in carrier network, propose more and more can realize fine-grained management, can pass through VLAN (VLAN, Virtual Local Area Network) information each user, every kind of business are discerned user's different business.User's multiple business type, as internet service, professional, the ip voice (VOIP of Internet Protocol Television (IPTV), Voice Over IP) business, gather the gateway (HG of family, Home Gateway), home gateway is every kind of vlan information that traffic assignments is different, and for the consideration that is easy to safeguard, the home gateway configuration requirement of different user is unified.The notion of VLAN mapping (Mapping) proposes under this background just.Because each user's home gateway is with the identical VLAN of a kind of traffic assignments, need carry out unique mapping to identical VLAN by VLAN Mapping, so that by the vlan information identifying user after the mapping.
VLAN Mapping has 2 kinds of implementations at present:
1, uses the hardware table item of VLAN Mapping, directly carry out the replacement of VLAN label.This implementation is the simplest, but because the two-way hardware table item that all needs to support the VLAN Mapping of some is gone into/gone out to each access interface of equipment, cost is higher.
2, use the stream rule directly to carry out the modification of VLAN label, need issue the VLAN label that the coupling home gateway distributes at each service port of equipment, the action of stream rule is that the VLAN label that service message carries is replaced with VLAN label after the mapping, when the reverse mapping of VLAN Mapping, also need the configuration flow rule to realize simultaneously.
Based on media interviews control (MAC, Media Access Control) VLAN distributes (MACbased VLAN) to be meant that the source MAC according to message is that message distributes the VLAN label, generally require message not have the VLAN label, if but the vlan information that message carries is distrusted in the equipment support, also can distribute vlan information for the message that carries the VLAN label, replace the VLAN label that carries in the message with the vlan information that distributes.A lot of equipment are all supported this function, but because configuration is upward more loaded down with trivial details, and workload is big, are not easy to safeguard, generally seldom use.
Fig. 1 is a VLAN Mapping typical services illustraton of model, as shown in Figure 1, at user side 2 kinds of business is arranged: PC business of networking and IPTV business, home gateway are that 2 kinds of business are distributed VLAN 1 and VLAN 2 respectively; Access device is converted to network side VLAN 101,201,102,202,103,203 with user side VLAN 1 and the VLAN 2 that home gateway distributes, the PC business of networking of VLAN 101 identifying users 1 wherein, the IPTV business of VLAN 201 identifying users 1, the PC business of networking of VLAN 102 identifying users 2, the IPTV business of VLAN 202 identifying users 2, the PC business of networking of VLAN 103 identifying users 3, the IPTV business of VLAN 203 identifying users 3.In actual networking during, as long as certain that guarantees that VLAN label after the mapping can certain user of unique identification is professional to delineation of activities; According to type of service the VLAN label after shining upon is done flexible secondary VLAN label encapsulation (QinQ) at convergence-level equipment, promptly add outside VLAN label 1001, at the professional outside VLAN label 2001 that adds of IPTV at business of networking; The different business that outside VLAN label that just can carry according to message at the service convergence point server and inner VLAN label are distinguished particular user is carried out default action respectively, as is carried out Limit Rate, and service quality (QOS, Quality ofService) etc. is set.
For ease of subsequent descriptions, the VLAN that home gateway is distributed is called user vlan, is labeled as C_VLAN, VLAN 1 as shown in Figure 1 and VLAN 2; VLAN after the mapping is called network side VLAN, is labeled as SP_VLAN, VLAN 101,201,102,202,103,203 as shown in Figure 1.
Use the stream rule directly to carry out the modification of VLAN label, need be in each service port configuration flow rule of equipment, the content of stream rule is the C_VLAN that the coupling home gateway distributes, VLAN 1 promptly shown in Figure 1 and VLAN 2; The action of stream rule is that the C_VLAN in the service message is replaced with SP_VLAN after the mapping, and promptly VLAN 101,201,102,202,103,203.After finishing above-mentioned configuration, the VLAN label from the message (as PC business of networking or IPTV service message) that user side sends will be replaced by the SP_VLAN after the mapping.In like manner, reverse traffic need be made opposite VLANMapping, need issue many stream rules respectively at uplink port, the content of stream rule is coupling SP_VLAN, be VLAN 101,201,102,202,103,203, the action of stream rule is that the SP_VLAN in the message is replaced with C_VLAN, i.e. VLAN 1 and VLAN 2.
By above analysis as can be known, suppose to offer a kind business in Operation Network, the appliance services port has b, and uplink port c, each service port has d user, and then required stream rule resource is (c+1) * a*b*d bar.
Fig. 2 is for realizing the forwarding process schematic diagram of VLAN Mapping by the stream rule, as shown in Figure 2, Port X and Port Y are the descending access service port of access device, and Port Z links to each other with convergence-level equipment as the uplink port of access device.Carry out VLAN Mapping:VLAN1--at Port X〉VLAN101, the MAC Address of customer service equipment is MAC 1; VLAN 2--〉VLAN 201, the MAC Address of customer service equipment is MAC2.Carry out VLAN Mapping:VLAN1--at Port Y〉VLAN 102, the MAC Address of customer service equipment is MAC 3; VLAN 2--〉VLAN 202, the MAC Address of customer service equipment is MAC 4.Carry out reverse VLAN Mapping:VLAN 101--at Port Z〉VLAN 1, the source MAC of data service is MAC 5; VLAN201--〉VLAN 2, the source MAC of data service is MAC 6; VLAN 102--〉VLAN 1, the source MAC of data service is MAC 7; VLAN 202--〉VLAN 2, the source MAC of data service is MAC 8.
Suppose that MAC address learning carried out before the stream rule is replaced VLAN ID, then the VLAN situation of MAC address learning is as shown in Figure 2 on access device, MAC1 study is in VLAN 1, MAC 2 study are in VLAN 2, and MAC 3 study are in VLAN 1, and MAC 4 study are in VLAN2, MAC 5 study are in VLAN 101, MAC 6 study are in VLAN 201, and MAC 7 study are in VLAN 102, and MAC 8 study are in VLAN 202.Suppose bidirectional traffic be MAC1<--MAC 5, MAC 2<--MAC 6, MAC 3<--MAC 7, MAC 4<--MAC 8.With bidirectional traffic MAC 1<--MAC 5 is example, because MAC 1 is that study is in VLAN 1, and MAC 5 study are in VLAN 101, when E-Packeting, understand because in the VLAN of appointment, search, and message is broadcasted as unknown message less than target MAC (Media Access Control) address, for fear of this phenomenon, MAC 1 need be added among the VLAN 101, MAC 5 adds among the VLAN 1, and bidirectional traffic could be done correct clean culture forwarding like this.Therefore, for guaranteeing professional operate as normal, same MAC Address should all exist in 2 VLAN before and after the mapping, be that MAC 1 wants simultaneously in VLAN 1 and VLAN 101, the rest may be inferred for other MAC Address, so, on access device shown in Figure 2, should have 16 MAC Address to be present in the mac address forwarding table.Above-mentioned phenomenon is present in the situation that MAC address learning carries out after revising VLAN ID equally.
As seen, existing by there being following shortcoming in the forwarding process that flows rule realization VLAN Mapping:
1, because the two-way stream that all uses of VLAN Mapping is regular, occupying system resources is more.
2, because the source MAC of bidirectional traffic is learnt in different VLAN, can produce broadcasting and flood.
3, for fear of flooding that MAC address learning may produce in different VLAN, need software that MAC Address is added among the VLAN after the mapping, to consider the problem of MAC address aging simultaneously, increased the complexity of software processes.
Summary of the invention
The invention provides retransmission method and access device, to reduce taking of system resource based on VLAN Mapping.
Technical scheme of the present invention is achieved in that
A kind of retransmission method based on the VLAN mapping, this method comprises:
According to the VLAN allocation table of VLAN mapping table maintenance based on MAC, described VLAN allocation table comprises the MAC Address of user side equipment and the corresponding relation of network side VLAN label, the network side VLAN label of the user side VLAN label correspondence that described network side VLAN label is a user side equipment;
The source MAC that uses user side to send message is inquired about described VLAN allocation table, determines the network side VLAN label of described message according to Query Result, and the user side VLAN label of described message is replaced with determined network side VLAN label;
According to the target MAC (Media Access Control) address of described message and the network side VLAN label forwarding message after the replacement.
Describedly safeguard that according to described VLAN mapping table the VLAN allocation table based on MAC comprises:
In VLAN mapping table, search the network side VLAN label of the user side VLAN label correspondence in the message that user side sends, the source MAC of this message and this network side VLAN label are added to respectively in the VLAN allocation table and mac address forwarding table based on MAC.
Described source MAC and this network side VLAN label with this message adds to respectively based on further comprising in the VLAN allocation table of MAC and the mac address forwarding table: issue the stream rule that comprises user side VLAN label and network side VLAN label, and,
When access device from the up port that converges when receiving message, in mac address forwarding table, search network side VLAN label and target MAC (Media Access Control) address corresponding output port in the message, the user side VLAN label of Network Search side VLAN label correspondence in the stream rule, network side VLAN label with in the user side VLAN label replacement message forwards message from described outbound port.
Each access interface of access device is set to software learning MAC Address mode in advance.
For each port that disposes VLAN mapping table, the mac address forwarding table entry deletion of the MAC Address correspondence of the user side equipment that this port is connected.
Further comprise before the described network side VLAN label of in VLAN mapping table, searching the user side VLAN label correspondence in the message that user side sends:
In VLAN allocation table, search the source MAC of message based on MAC, if do not find, in mac address forwarding table, search the source MAC and the user side VLAN label of message, if do not find yet, then carry out described action of in VLAN mapping table, searching the network side VLAN label of the user side VLAN label correspondence in the message that user side sends.
Described user side VLAN label with described message replaces with after the determined network side VLAN label, further comprise according to the target MAC (Media Access Control) address of described message with before the network side VLAN label forwarding message after replacing:
Search the source MAC and the network side VLAN label of message in mac address forwarding table, if do not find, then source MAC and the network side VLAN label with message adds in the mac address forwarding table.
Described VLAN mapping table is the N:1 mapping, and wherein, N is the positive integer greater than 1,
The source MAC that also comprises message in the described stream rule.
Described method further comprises:
Access device receives message from the up port that converges, in mac address forwarding table, search network side VLAN label and target MAC (Media Access Control) address corresponding output port in the message, the user side VLAN label of Network Search side VLAN label and target MAC (Media Access Control) address correspondence in the stream rule, network side VLAN label with in the user side VLAN label replacement message forwards message from described outbound port.
Described method further comprises: find the MAC address aging in the mac address forwarding table, then according to the network side VLAN label of this MAC Address correspondence, the VLAN based on MAC that deletes this network side VLAN label correspondence distributes list item and stream rule.
A kind of access device, this equipment comprises:
The list item memory module, the VLAN allocation table that storage is safeguarded according to VLAN mapping table based on MAC, described VLAN allocation table comprises the MAC Address of user side equipment and the corresponding relation of network side VLAN label, the network side VLAN label of the user side VLAN label correspondence that described network side VLAN label is a user side equipment;
The forwarded upstream module, the source MAC that uses user side to send message is inquired about described VLAN allocation table, determine the network side VLAN label of described message according to Query Result, and the user side VLAN label of described message is replaced with determined network side VLAN label; According to the target MAC (Media Access Control) address of described message and the network side VLAN label forwarding message after the replacement.
Described forwarded upstream module further comprises, is used to issue the module of the stream rule that comprises user side VLAN label and network side VLAN label,
And, described access device further comprises: descending forwarding module, be used for receiving message from the up port that converges, in mac address forwarding table, search network side VLAN label and target MAC (Media Access Control) address corresponding output port in the message, the user side VLAN label of Network Search side VLAN label correspondence in the stream rule, network side VLAN label with in the user side VLAN label replacement message forwards message from described outbound port.
Described access device further comprises:
The port arrangement module, each access interface of access device is set to software learning MAC Address mode.
Described port arrangement module further comprises, is used for for each port that disposes VLAN mapping table the module of the mac address forwarding table entry deletion of the MAC Address correspondence of the user side equipment that this port is connected.
Described forwarded upstream module further comprises, be used for when the time from access interface reception message, distribute the source MAC that does not find message in the list item at VLAN based on MAC, then in the mac address forwarding table item, search the source MAC and the user side VLAN label of message, if do not find yet, then determine in VLAN mapping table, to search the module of the network side VLAN label of the user side VLAN label correspondence in this message.
Described forwarded upstream module further comprises, be used for when the time from access interface reception message, if in VLAN allocation table, find the source MAC of message based on MAC, then in the mac address forwarding table item, search the source MAC and the network side VLAN label of message, if do not find, then the source MAC of message and network side VLAN label are added to the module in the mac address forwarding table.
What described port arrangement module disposed on each access interface of access device is the N:1VLAN mapping table,
Described forwarded upstream module is when issuing the stream rule that comprises user side VLAN label and network side VLAN label, and further the source MAC with message adds in the stream rule,
Described access device further comprises: descending forwarding module, be used for receiving message from the up port that converges, in mac address forwarding table, search network side VLAN label and target MAC (Media Access Control) address corresponding output port in the message, search the network side VLAN label in the message and the user side VLAN label of target MAC (Media Access Control) address correspondence in the rule at stream, network side VLAN label with in the user side VLAN label replacement message forwards message from described outbound port.
This access device further comprises:
Aging module is found the MAC address aging in the mac address forwarding table, and then according to the network side VLAN label of this MAC Address correspondence, the VLAN based on MAC that deletes this network side VLAN label correspondence distributes list item and stream rule.
Compared with prior art, the present invention does not use the stream rule at up direction, has reduced taking of system resource.
The embodiment of the invention can be added the source MAC and the SP_VLAN of message to the MACbased vlan table, like this, uplink message just can be realized the replacement of VLAN label by MAC based vlan table, thereby, for the equipment that does not dispose VLAN mapping table in the hardware, use the embodiment of the invention also can realize the fastext forwarding.
In addition, in the embodiment of the invention, only with MAC address learning in SP_VLAN, avoided broadcasting flooding, reduced the software processes burden simultaneously.
Description of drawings
Fig. 1 is a VLAN Mapping typical services illustraton of model;
Fig. 2 is for realizing the forwarding process schematic diagram of VLAN Mapping by the stream rule;
The forwarded upstream flow chart that Fig. 3 provides for the embodiment of the invention based on VLAN mapping;
The descending forwarding process figure that Fig. 4 provides for the embodiment of the invention based on VLAN mapping;
Fig. 5 is for using instantiation schematic diagram of the present invention;
The composition schematic diagram of the access device that Fig. 6 provides for the embodiment of the invention.
Embodiment
Core concept of the present invention is: according to the vlan table of VLAN Mapping table maintenance based on MAC, it is MAC based vlan table, described MAC based vlan table comprises the MAC Address of user side equipment and the corresponding relation of SP_VLAN at least, and described SP_VLAN is the SP_VLAN of the C_VLAN correspondence in the uplink message sent of user side equipment;
Use the source MAC inquiry MAC based vlan table of the uplink message that user side equipment sends, determine the SP_VLAN of described message, and the C_VLAN of described message is replaced with determined SP_VLAN according to Query Result; Transmit uplink message according to the target MAC (Media Access Control) address of uplink message and the SP_VLAN after the replacement.
The source MAC of uplink message is the MAC Address of the user side equipment of sending this message.
The present invention is further described in more detail below in conjunction with drawings and the specific embodiments.
The forwarded upstream flow chart that Fig. 3 provides for the embodiment of the invention based on VLAN mapping, as shown in Figure 3, its concrete steps are as follows:
Step 300: be each access interface configuration software VLAN Mapping table of access device, the mapping relations between this VLAN Mapping table maintenance customer side VLAN and the network side VLAN, i.e. C_VLAN--〉SP_VLAN; Dispose the port of VLAN mapping table for each, the mac address forwarding table entry deletion of the MAC Address correspondence of the user side equipment that this port is connected; The access interface that respectively disposes VLAN mapping table is set to software learning MAC Address mode.
Access interface is set to software learning MAC Address mode, then receive message from this port after, hardware can initiatively not carry out MAC address learning.
Step 301: access device receives the message that customer service equipment is sent from an access interface, searches the source MAC of this message in MAC based vlan table.
When access device receives a uplink message, all in hardware, look into MAC basedVLAN table usually earlier, look into mac address forwarding table then.
At least comprise in the MAC based vlan table: the source MAC of uplink message and the SP_VLAN corresponding with described source MAC.
Step 302: the source MAC according to uplink message is inquired about at described MAC based vlan table, determines whether to find the source MAC of message, if, execution in step 310; Otherwise, execution in step 303.
Step 303: access device is searched the source MAC of this uplink message and the mac address forwarding table item of C_VLAN correspondence in mac address forwarding table.
Step 304: judge whether to find, if, execution in step 305; Otherwise, execution in step 306.
In the present invention, generally the content of MAC based vlan table and mac address forwarding table is synchronous, that is: if a source MAC is present in the MAC based vlan table, then this source MAC is inevitable also is present in the mac address forwarding table, and vice versa; But, may make only to be present in the MAC based vlan table or only to be present in the mac address forwarding table at certain source MAC sometime owing to the reasons such as time difference of MAC address aging.
Step 305: access device is searched the C_VLAN and the target MAC (Media Access Control) address corresponding output port of message in mac address forwarding table, and message is forwarded from outbound port, and this flow process finishes.
Step 306: access device sends to innernal CPU with message by management interface.
Because each access interface is set to software learning MAC Address mode in the step 300, therefore, when not finding the outbound port of message in mac address forwarding table, message will be sent to CPU and be for further processing.
After step 307:CPU receives message, C_VLAN in the analytic message, in the VLAN Mapping that in access device, the disposes table, search the SP_VLAN of described C_VLAN correspondence, with the source MAC of message and SP_VLAN adds in the MAC based vlan table and mac address forwarding table in.
So far, realized according to VLAN Mapping table, promptly based on the maintenance of the VLAN allocation table of MAC to MAC based vlan table.Those skilled in the art can know, and described source MAC is the MAC Address of user side equipment, and described C_VLAN is a user side VLAN label, and described SP_VLAN is MAC Address and the corresponding network side VLAN label of C_VLAN with user side equipment.
Step 308: access device produces the stream rule that network side VLAN is replaced with the user side VLAN corresponding with it: SP_VLAN--〉C_VLAN.
Stream rule in this step is used when descending forwarding, so those skilled in the art all can know, and the treatment step that the stream rule is set is not limited between step 307 and step 309 to be carried out.
Step 309:CPU is after determining the SP_VLAN corresponding with described uplink message by inquiry VLAN Mapping table, with the C_VLAN in the SP_VLAN replacement message, in mac address forwarding table, search target MAC (Media Access Control) address, SP_VLAN corresponding output port with message, message is forwarded from outbound port, and this flow process finishes.
Owing to only in mac address forwarding table, deleted the mac address forwarding table item of the MAC Address correspondence of the user side equipment that each access interface of disposing VLAN mapping table connects among the present invention in advance, promptly deleted the forwarding-table item of the source MAC correspondence of uplink message in the mac address forwarding table, do not handle and the mac address forwarding table item of the target MAC (Media Access Control) address correspondence of uplink message is done deletion, therefore under normal circumstances, can carry out normal forwarding operation according to the target MAC (Media Access Control) address of uplink message and the SP_VLAN inquiry mac address forwarding table after the replacement.
Step 310: access device is with the C_VLAN in the SP_VLAN replacement message of source MAC correspondence in the MAC based vlan table item.
From this step as can be seen, uplink message is transmitted and is not used the stream rule.
Step 311: access device is searched the source MAC in the message and the mac address forwarding table item of SP_VLAN correspondence in mac address forwarding table.
Step 312: judge whether to find, if, execution in step 313; Otherwise, execution in step 314.
Step 313: access device is searched target MAC (Media Access Control) address, the SP_VLAN corresponding output port in the message in mac address forwarding table, and message is forwarded from outbound port, and this flow process finishes.
Step 314: access device sends to innernal CPU by management interface with message.
Step 315:CPU adds source MAC in the message and SP_VLAN in the mac address forwarding table to.
Step 316:CPU searches target MAC (Media Access Control) address, the SP_VLAN corresponding output port in the message in mac address forwarding table, message is sent from outbound port.
If CPU does not find target MAC (Media Access Control) address, SP_VLAN corresponding output port with message in mac address forwarding table, then message is broadcasted in SP_VLAN.
Fig. 3 has provided the message forwarding handling process that receives from interface port, below provides converging the message forwarding handling process that port receives from up.
The descending forwarding process figure that Fig. 4 provides for the embodiment of the invention based on VLAN mapping, as shown in Figure 4, its concrete steps are as follows:
Step 401: access device receives message, target MAC (Media Access Control) address, the SP_VLAN corresponding output port of searching this message in mac address forwarding table from the up port that converges.
Step 402: access device is searched the C_VLAN of the SP_VLAN correspondence in the message in the stream rule.
Stream rule in this step produces in step 308 shown in Figure 3, and those skilled in the art after obtaining the necessary information that produces the stream rule, also can satisfy the downlink traffic forwarding at other and issue the stream rule when requiring as can be known.
Step 403: access device is with the SP_VLAN in the C_VLAN replacement message.
Step 404: access device forwards message from outbound port.
In actual applications, but whether also regular check MAC Address of CPU is aging, if aging, MAC based vlan table item and the stream of then deleting this MAC Address correspondence are regular.Concrete steps are as follows: dispose the access interface of VLAN mapping table for each, CPU is according to the SP_VLAN and the MAC Address of port, in mac address forwarding table, search the mac address forwarding table item of this SP_VLAN and MAC Address correspondence, if do not find, then determine this MAC address aging, then delete the MAC based vlan table item and the stream rule of SP_VLAN correspondence.Wherein, in step 301, for access interface configuration VLAN mapping table the time, CPU can write down the SP_VLAN and the MAC Address of this port, so that follow-up MAC address aging uses.
From flow process shown in Fig. 3,4 as can be seen: the embodiment of the invention can be added the source MAC and the SP_VLAN of message to MAC based vlan table, like this, uplink message just can be realized the replacement of VLAN label by MAC based vlan table, thereby, for the equipment that does not dispose VLAN mapping table in the hardware, use the embodiment of the invention also can realize the fastext forwarding.
Simultaneously, only use the stream rule in the embodiment of the invention at down direction, reduced taking of system resource, suppose in Operation Network, to offer a kind business, the appliance services port has b, and uplink port c, each service port has d user, then required stream rule resource is the a*b*d bar, much smaller than (c+1) of the prior art * a*b*d bar.
In addition, in the embodiment of the invention, only with MAC address learning in SP_VLAN, avoided broadcasting flooding, reduced the software processes burden simultaneously.
Below provide one and use instantiation of the present invention:
As shown in Figure 5, the port Port X that establishes access device supports two kinds of business, and the MAC Address of two kinds of business devices is respectively MAC 1, MAC 2, and home gateway is that business device 1 has disposed VLAN1, for business device 2 has disposed VLAN 2; For the VLAN mapping table of the Port X of access device configuration is: VLAN 1--〉VLAN 101; VLAN 2--〉VLAN 201.Simultaneously, with MAC 1, the mac address forwarding table entry deletion of MAC 2 correspondences; The MAC address learning mode of Port X is configured to the software learning mode.Access device receives the message that business device 1 is sent from Port X, do not find the source MAC of message in MAC based vlan table: MAC 1, in mac address forwarding table, do not find simultaneously the source MAC of message: the C_VLAN:VLAN 1 in MAC 1 and the message, then message is sent to CPU, CPU finds C_VLAN:VLAN 1 correspondence in the message in VLAN mapping table SP_VLAN is: VLAN 101, then MAC 1 and VLAN 101 are added in MAC based vlan table and the mac address forwarding table, simultaneously, with the VLAN 1 in the VLAN 101 replacement messages, in mac address forwarding table, search the target MAC (Media Access Control) address of message: MAC 3 and VLAN 101 corresponding output port then, message is forwarded from outbound port.
VLAN mapping in Fig. 3,4 illustrated embodiments is 1:1VLAN mapping, in actual applications, also exist N:1VLAN mapping (N〉1 and N be positive integer), that is: N C_VLAN is mapped on the same SP_VLAN.At this moment, the difference of forwarded upstream flow process and flow process shown in Figure 3 is that the stream rule in the step 315 is: the source MAC+SP_VLAN--of message〉C_VLAN; The difference of descending forwarding process and flow process shown in Figure 4 is: in the step 402, access device is searched the target MAC (Media Access Control) address of message and the C_VLAN of SP_VLAN correspondence in the stream rule.
The composition schematic diagram of the access device that Fig. 6 provides for the embodiment of the invention, as shown in Figure 6, it mainly comprises: list item memory module 60, port arrangement module 61, forwarded upstream module 62 and descending forwarding module 63, wherein:
List item memory module 60 comprises: VLAN mapping table, MAC based vlan table and mac address forwarding table memory module.
Port arrangement module 61: be each access interface configuration software VLAN mapping table of access device, the mac address forwarding table entry deletion of the MAC Address correspondence of the user side equipment that each access interface that disposes VLAN mapping table is connected; Each access interface is set to software learning MAC Address mode.
Forwarded upstream module 62: access device receives message from access interface, in MAC based vlan table, search the source MAC of message, if do not find, then in mac address forwarding table, search the source MAC and the C_VLAN of this message, if do not find, in VLAN mapping table, search the SP_VLAN of the C_VLAN correspondence in this message, source MAC and this SP_VLAN of this message are added to respectively in MAC based vlan table and the mac address forwarding table, issue the stream rule that comprises C_VLAN and SP_VLAN simultaneously, C_VLAN with in the SP_VLAN replacement message forwards message according to mac address forwarding table;
If in MAC based vlan table, find the source MAC of message, then with the C_VLAN in the SP_VLAN replacement message of source MAC correspondence in the MAC BasedVLAN table, in mac address forwarding table, search SP_VLAN and source MAC in the message, if find, then in mac address forwarding table, search SP_VLAN and target MAC (Media Access Control) address corresponding output port in the message, message is forwarded from outbound port; If do not find, then source MAC and the SP_VLAN with message adds in the mac address forwarding table, searches SP_VLAN and target MAC (Media Access Control) address corresponding output port in the message in mac address forwarding table, and message is forwarded from outbound port;
If in MAC based vlan table, do not find the source MAC of message, then in mac address forwarding table, search C_VLAN and source MAC in the message, if find, then in mac address forwarding table, search the C_VLAN and the target MAC (Media Access Control) address corresponding output port of message, message is forwarded from outbound port.
Descending forwarding module 63: be used for receiving message from the up port that converges, in mac address forwarding table, search SP_VLAN and target MAC (Media Access Control) address corresponding output port in the message, in the stream rule, search the C_VLAN of the SP_VLAN correspondence in the message, SP_VLAN with in the C_VLAN replacement message forwards message from described outbound port.
In actual applications, if port arrangement module 61 be access device the configuration of each access interface be the N:1VLAN mapping table, then, forwarded upstream module 62 is when issuing the stream rule that comprises C_VLAN and SP_VLAN, further the source MAC with message adds in the stream rule, simultaneously, descending forwarding module 63 when receiving message, be searched C_VLAN from the up port that converges according to the target MAC (Media Access Control) address of SP_VLAN and message in the stream rule.
Access device also can comprise: aging module, be used for when finding the MAC address aging of mac address forwarding table, and according to the SP_VLAN of this MAC Address correspondence, the VLAN based on MAC that deletes this SP_VLAN correspondence distributes list item and stream rule.
The above only is process of the present invention and method embodiment, in order to restriction the present invention, all any modifications of being made within the spirit and principles in the present invention, is not equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (18)

1. retransmission method based on virtual LAN VLAN mapping is characterized in that this method comprises:
According to the VLAN allocation table of VLAN mapping table maintenance based on MAC, described VLAN allocation table comprises the MAC Address of user side equipment and the corresponding relation of network side VLAN label, the network side VLAN label of the user side VLAN label correspondence that described network side VLAN label is a user side equipment;
The source MAC that uses user side to send message is inquired about described VLAN allocation table, determines the network side VLAN label of described message according to Query Result, and the user side VLAN label of described message is replaced with determined network side VLAN label;
According to the target MAC (Media Access Control) address of described message and the network side VLAN label forwarding message after the replacement.
2. the method for claim 1 is characterized in that, describedly safeguards that according to described VLAN mapping table the VLAN allocation table based on MAC comprises:
In VLAN mapping table, search the network side VLAN label of the user side VLAN label correspondence in the message that user side sends, the source MAC of this message and this network side VLAN label are added to respectively in the VLAN allocation table and mac address forwarding table based on MAC.
3. method as claimed in claim 2, it is characterized in that, described source MAC and this network side VLAN label with this message adds to respectively based on further comprising in the VLAN allocation table of MAC and the mac address forwarding table: issue the stream rule that comprises user side VLAN label and network side VLAN label, and
When access device from the up port that converges when receiving message, in mac address forwarding table, search network side VLAN label and target MAC (Media Access Control) address corresponding output port in the message, the user side VLAN label of Network Search side VLAN label correspondence in the stream rule, network side VLAN label with in the user side VLAN label replacement message forwards message from described outbound port.
4. the method for claim 1 is characterized in that, each access interface of access device is set to software learning MAC Address mode in advance.
5. method as claimed in claim 4 is characterized in that, for each port that disposes VLAN mapping table, and the mac address forwarding table entry deletion of the MAC Address correspondence of the user side equipment that this port is connected.
6. method as claimed in claim 2 is characterized in that, further comprises before the described network side VLAN label of searching the user side VLAN label correspondence in the message that user side sends in VLAN mapping table:
In VLAN allocation table, search the source MAC of message based on MAC, if do not find, in mac address forwarding table, search the source MAC and the user side VLAN label of message, if do not find yet, then carry out described action of in VLAN mapping table, searching the network side VLAN label of the user side VLAN label correspondence in the message that user side sends.
7. the method for claim 1, it is characterized in that described user side VLAN label with described message replaces with after the determined network side VLAN label, further comprise according to the target MAC (Media Access Control) address of described message with before the network side VLAN label forwarding message after replacing:
Search the source MAC and the network side VLAN label of message in mac address forwarding table, if do not find, then source MAC and the network side VLAN label with message adds in the mac address forwarding table.
8. method as claimed in claim 3 is characterized in that, described VLAN mapping table is the N:1 mapping, and wherein, N is the positive integer greater than 1,
The source MAC that also comprises message in the described stream rule.
9. method as claimed in claim 8 is characterized in that, described method further comprises:
Access device receives message from the up port that converges, in mac address forwarding table, search network side VLAN label and target MAC (Media Access Control) address corresponding output port in the message, the user side VLAN label of Network Search side VLAN label and target MAC (Media Access Control) address correspondence in the stream rule, network side VLAN label with in the user side VLAN label replacement message forwards message from described outbound port.
10. the method for claim 1, it is characterized in that, described method further comprises: find the MAC address aging in the mac address forwarding table, then according to the network side VLAN label of this MAC Address correspondence, the VLAN based on MAC that deletes this network side VLAN label correspondence distributes list item and stream rule.
11. an access device is characterized in that, this equipment comprises:
The list item memory module, the VLAN allocation table that storage is safeguarded according to VLAN mapping table based on MAC, described VLAN allocation table comprises the MAC Address of user side equipment and the corresponding relation of network side VLAN label, the network side VLAN label of the user side VLAN label correspondence that described network side VLAN label is a user side equipment;
The forwarded upstream module, the source MAC that uses user side to send message is inquired about described VLAN allocation table, determine the network side VLAN label of described message according to Query Result, and the user side VLAN label of described message is replaced with determined network side VLAN label; According to the target MAC (Media Access Control) address of described message and the network side VLAN label forwarding message after the replacement.
12. access device as claimed in claim 11 is characterized in that,
Described forwarded upstream module further comprises, is used to issue the module of the stream rule that comprises user side VLAN label and network side VLAN label,
And, described access device further comprises: descending forwarding module, be used for receiving message from the up port that converges, in mac address forwarding table, search network side VLAN label and target MAC (Media Access Control) address corresponding output port in the message, the user side VLAN label of Network Search side VLAN label correspondence in the stream rule, network side VLAN label with in the user side VLAN label replacement message forwards message from described outbound port.
13. access device as claimed in claim 11 is characterized in that, described access device further comprises:
The port arrangement module, each access interface of access device is set to software learning MAC Address mode.
14. access device as claimed in claim 13, it is characterized in that, described port arrangement module further comprises, is used for for each port that disposes VLAN mapping table the module of the mac address forwarding table entry deletion of the MAC Address correspondence of the user side equipment that this port is connected.
15. as claim 13 or 14 described access devices, it is characterized in that,
Described forwarded upstream module further comprises, be used for when the time from access interface reception message, distribute the source MAC that does not find message in the list item at VLAN based on MAC, then in the mac address forwarding table item, search the source MAC and the user side VLAN label of message, if do not find yet, then determine in VLAN mapping table, to search the module of the network side VLAN label of the user side VLAN label correspondence in this message.
16. as claim 13 or 14 described access devices, it is characterized in that,
Described forwarded upstream module further comprises, be used for when the time from access interface reception message, if in VLAN allocation table, find the source MAC of message based on MAC, then in the mac address forwarding table item, search the source MAC and the network side VLAN label of message, if do not find, then the source MAC of message and network side VLAN label are added to the module in the mac address forwarding table.
17. access device as claimed in claim 13 is characterized in that,
What described port arrangement module disposed on each access interface of access device is the N:1VLAN mapping table,
Described forwarded upstream module is when issuing the stream rule that comprises user side VLAN label and network side VLAN label, and further the source MAC with message adds in the stream rule,
Described access device further comprises: descending forwarding module, be used for receiving message from the up port that converges, in mac address forwarding table, search network side VLAN label and target MAC (Media Access Control) address corresponding output port in the message, search the network side VLAN label in the message and the user side VLAN label of target MAC (Media Access Control) address correspondence in the rule at stream, network side VLAN label with in the user side VLAN label replacement message forwards message from described outbound port.
18. access device as claimed in claim 11 is characterized in that, this access device further comprises:
Aging module is found the MAC address aging in the mac address forwarding table, and then according to the network side VLAN label of this MAC Address correspondence, the VLAN based on MAC that deletes this network side VLAN label correspondence distributes list item and stream rule.
CN200810227924XA 2008-12-01 2008-12-01 Forwarding method based on virtual LAN mapping and access equipment Active CN101409685B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200810227924XA CN101409685B (en) 2008-12-01 2008-12-01 Forwarding method based on virtual LAN mapping and access equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200810227924XA CN101409685B (en) 2008-12-01 2008-12-01 Forwarding method based on virtual LAN mapping and access equipment

Publications (2)

Publication Number Publication Date
CN101409685A CN101409685A (en) 2009-04-15
CN101409685B true CN101409685B (en) 2010-10-27

Family

ID=40572478

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200810227924XA Active CN101409685B (en) 2008-12-01 2008-12-01 Forwarding method based on virtual LAN mapping and access equipment

Country Status (1)

Country Link
CN (1) CN101409685B (en)

Families Citing this family (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101668238B (en) * 2009-10-20 2013-04-17 上海市共进通信技术有限公司 Method, device and optical network unit for realizing N:1 concourse and 1:N conversion of VLAN in EPON
CN101860771B (en) * 2010-06-02 2014-06-11 中兴通讯股份有限公司 Home gateway identifying and networking method and system
CN101977247B (en) * 2010-10-19 2014-07-02 中兴通讯股份有限公司 Method and exchange equipment for realizing N:1 VLAN translation
CN102055641A (en) * 2010-12-28 2011-05-11 华为技术有限公司 Distribution method for virtual local area network and related device
CN102065018B (en) * 2011-01-07 2014-12-17 中兴通讯股份有限公司 Method and system for transmitting message
CN102710468A (en) * 2011-03-28 2012-10-03 华为技术有限公司 Customer service access method and system and access equipment
WO2011144067A2 (en) * 2011-05-24 2011-11-24 华为技术有限公司 Message handling method and apparatus
CN102158422B (en) * 2011-05-27 2014-07-23 杭州华三通信技术有限公司 Message forwarding method and equipment for layer 2 ring network
CN103379011A (en) * 2012-04-28 2013-10-30 瑞昱半导体股份有限公司 Device and method for achieving uplink converging and downlink conversion of virtual local area network
CN102684971A (en) * 2012-05-28 2012-09-19 太仓市同维电子有限公司 VLAN (Virtual Local Area Network) function realizing method and Linux system LAN gateway
CN102970227B (en) * 2012-11-12 2016-03-02 盛科网络(苏州)有限公司 The method and apparatus of VXLAN message repeating is realized in ASIC
CN102970226B (en) * 2012-11-12 2015-07-22 盛科网络(苏州)有限公司 Method and device for performing multicast datagram forwarding in application specific integrated circuit (ASIC)
CN103023827B (en) * 2012-11-23 2017-04-19 杭州华三通信技术有限公司 Data forwarding method for virtualized data centre and realization equipment of data forwarding method
CN103905285A (en) * 2014-04-06 2014-07-02 陈桂芳 Method for dividing users with the same MAC address into multiple different VLANs
CN106330492B (en) 2015-06-23 2019-11-26 华为技术有限公司 A kind of method, apparatus and system configuring user equipment forwarding table
US10187218B2 (en) * 2015-09-15 2019-01-22 Google Llc Systems and methods for processing packets in a computer network
CN105591988B (en) * 2015-09-24 2019-03-15 新华三技术有限公司 A kind of synchronous method and device of MAC Address
CN105553812A (en) * 2016-01-21 2016-05-04 盛科网络(苏州)有限公司 Many-for-one VLAN (Virtual Local Area Network) mapping chip realization method based on hardware study
CN107528780A (en) * 2016-06-21 2017-12-29 中兴通讯股份有限公司 VLAN vlan interpretation method and device
CN106658236B (en) * 2016-10-31 2020-05-05 盛科网络(苏州)有限公司 GPON service bearing chip implementing method based on multilayer VLAN label processing
CN107018081B (en) * 2017-03-15 2020-05-05 烽火通信科技股份有限公司 Method for realizing point-to-multipoint 1+1 protection
CN107040448A (en) * 2017-05-27 2017-08-11 上海斐讯数据通信技术有限公司 User vlan realizes device, system and method, WAP
CN108418741A (en) * 2018-03-07 2018-08-17 山东超越数控电子股份有限公司 A kind of extension vlan policy division methods based on VLAN id fields
CN112532501B (en) * 2019-09-18 2023-04-18 中国电信股份有限公司 Host physical address processing method and device and computer readable storage medium
CN111600787B (en) * 2020-05-20 2022-08-19 奇安信网神信息技术(北京)股份有限公司 Information processing method, information processing apparatus, electronic device, and medium
CN113365167B (en) * 2021-07-06 2022-08-12 博为科技有限公司 Dynamic adaptation method for LAN (local area network) side equipment of passive optical network system and related equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1551133A1 (en) * 2003-12-31 2005-07-06 Alcatel Printer discovery protocol system and method
US7095738B1 (en) * 2002-05-07 2006-08-22 Cisco Technology, Inc. System and method for deriving IPv6 scope identifiers and for mapping the identifiers into IPv6 addresses
CN101022392A (en) * 2007-03-06 2007-08-22 华为技术有限公司 Virtual local network-based data exchanging method and equipment
CN101022394A (en) * 2007-04-06 2007-08-22 杭州华为三康技术有限公司 Method for realizing virtual local network aggregating method and converging exchanger

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7095738B1 (en) * 2002-05-07 2006-08-22 Cisco Technology, Inc. System and method for deriving IPv6 scope identifiers and for mapping the identifiers into IPv6 addresses
EP1551133A1 (en) * 2003-12-31 2005-07-06 Alcatel Printer discovery protocol system and method
CN101022392A (en) * 2007-03-06 2007-08-22 华为技术有限公司 Virtual local network-based data exchanging method and equipment
CN101022394A (en) * 2007-04-06 2007-08-22 杭州华为三康技术有限公司 Method for realizing virtual local network aggregating method and converging exchanger

Also Published As

Publication number Publication date
CN101409685A (en) 2009-04-15

Similar Documents

Publication Publication Date Title
CN101409685B (en) Forwarding method based on virtual LAN mapping and access equipment
CN1946041B (en) VLAN polymerizing method, converging exchanger and system based on ARP detector intercept
CN100407704C (en) Method of dynamically learning address on MAC layer
CN100450080C (en) Method and apparatus for astringing two layer MAC address
CN102281181B (en) Method, device and system for realizing multicast forwarding in EVB (Extended VLAN (Virtual Local Area Network) Bridge) equipment
JP5993817B2 (en) Routing system and method in carrier network
CN101022394A (en) Method for realizing virtual local network aggregating method and converging exchanger
CN100586088C (en) Method for realizing virtual LAN aggregation and aggregation exchanger
CN105763385A (en) Flow scheduling method and apparatus
WO2016050109A1 (en) Communication method, cloud management server and virtual switch
CN105262703A (en) Routing bandwidth allocation method based on double priorities
CN102984043A (en) Forwarding method and forwarding device of multicast data stream
CN101312400B (en) Method for realizing IGMP interception function on modem device with 4 ethernet interfaces
CN101997772B (en) Flow control method, device, system and network equipment
CN109873864B (en) Communication connection establishing method and system based on video networking
CN100499549C (en) Apparatus and base station equipment for transmitting IP message in WiMAX network
CN101009669B (en) A method and system and route device for transmitting the multicast message
WO2016101515A1 (en) Method and apparatus for determining information technology (it) device port
CN102859947A (en) Method, apparatus and system for neighbor discovery
CN101442497A (en) System and method for forwarding data message
CN102694734A (en) Multicasting method of double-layer switching equipment based on Linux kernel bridge
CN108650180A (en) Pile system and its list item delivery method, device
US6981064B1 (en) Supporting multiple point-to-point sessions between network devices on an ATM backbone
JP2006033106A (en) Service providing platform system
CN101309154A (en) Datagram sending method, sending apparatus and transmission system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Patentee after: NEW H3C TECHNOLOGIES Co.,Ltd.

Address before: 310053 Hangzhou hi tech Industrial Development Zone, Zhejiang province science and Technology Industrial Park, No. 310 and No. six road, HUAWEI, Hangzhou production base

Patentee before: HANGZHOU H3C TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230803

Address after: 24th Floor, Block B, Zhizhen Building, No. 7 Zhichun Road, Haidian District, Beijing, 100088

Patentee after: Beijing Ziguang Communication Technology Group Co.,Ltd.

Address before: 310052 Changhe Road, Binjiang District, Hangzhou, Zhejiang Province, No. 466

Patentee before: NEW H3C TECHNOLOGIES Co.,Ltd.