CN105610673B - A kind of VLAN conversion equipment and method - Google Patents

A kind of VLAN conversion equipment and method Download PDF

Info

Publication number
CN105610673B
CN105610673B CN201610035460.7A CN201610035460A CN105610673B CN 105610673 B CN105610673 B CN 105610673B CN 201610035460 A CN201610035460 A CN 201610035460A CN 105610673 B CN105610673 B CN 105610673B
Authority
CN
China
Prior art keywords
key
lookup
vlan
result
arbitration
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
CN201610035460.7A
Other languages
Chinese (zh)
Other versions
CN105610673A (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.)
Fiberhome Telecommunication Technologies Co Ltd
Original Assignee
Fiberhome Telecommunication 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 Fiberhome Telecommunication Technologies Co Ltd filed Critical Fiberhome Telecommunication Technologies Co Ltd
Priority to CN201610035460.7A priority Critical patent/CN105610673B/en
Publication of CN105610673A publication Critical patent/CN105610673A/en
Application granted granted Critical
Publication of CN105610673B publication Critical patent/CN105610673B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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]
    • H04L12/4645Details on frame tagging

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a kind of VLAN conversion equipment and method, the VLAN conversion art that is related in ethernet bridge.The device includes signal sending end mouth, KEY generation module, KEY searching module, lookup result arbitration modules and VLAN processing module;KEY generation module is used for: being generated the lookup KEY of 3 kinds of lookup types according to the signal that signal sending end mouth is sent and is searched enabled;KEY searching module is used for: being searched in KEY and is determined lookup result corresponding with KEY is searched in database;Lookup result arbitration modules are used for: lookup result is arbitrated;VLAN processing module is used for: being searched entry associated with arbitration result in VLAN operating database, is obtained VLAN processing result according to the entry.The present invention can make same port while support the conversion of a variety of VLAN TAG types, can distinguish the priority of different business, additionally it is possible to normalize the operating result handled VLAN.

Description

A kind of VLAN conversion equipment and method
Technical field
The present invention relates to the VLAN (Virtual Local Area Network, virtual LAN) in ethernet bridge to turn Change field, and in particular to a kind of VLAN conversion equipment and method.
Background technique
Currently, the service traffics in communication network based on packet have been over TDM (time division multiplexing) service traffics, occupy The mainstream of communication.Communication network is also converted to from the communication network for being adapted to the transmission of TDM business and is more suitable for the logical of packet business transmission Believe net, for communication network in above-mentioned conversion process, Ethernet has obtained bigger application.
IEEE802.1AD extends VLAN, defines the SVLAN (Service for service carrier network Provider VLAN) and original IEEE802.1Q in be used for customer network CVLAN (Customer VLAN).Above-mentioned extension So that ethernet technology is obtained bigger application, moves towards Metropolitan Area Network (MAN) and wide area network from local area network.In the PE of carrier network On (Provider Edge, operator edge) bridge, as long as distributing different SVLAN for different client traffic stream, it will be able to Distinguish different client traffics.There may be diversity applications, such as certain clients to exist by certain clients in a network The application such as INTERNET, IPTV, VOIP, these applications are needed to need using SVLAN or simultaneously using SVLAN and CVLAN (hereinafter referred to as S+C VLAN).
Although can be identified for that the multiple business of a variety of clients using SVLAN or S+CVLAN, identical industry in a network Business is to need normalization, such as the INTERNET business of different clients can uniformly be attributed to INTERNET in PE bridge and answer With this just needs to do VLAN conversion, and the identical vlan table of identical business is shown.There are two directions for VLAN conversion, from client The business of side to network side needs to carry out based on Input Port (input port) and VLAN, and root is needed from network side to customer side The conversion opposite with entrance is carried out according to output port (Output Port) and VLAN.
Currently, there are many types of VLAN conversion, such as SVLAN processing is added to the frame without tag and Untag; SVLAN is added to (SIT frame) frame of only one layer CTAG;SVLAN is added to SIT frame and does CVLAN conversion;To only one layer The frame (SOT frame) of STAG does SVLAN conversion, to dual-VLAN TAG frame (Double TAG frame, be abbreviated as DT frame)) be SVLAN and CVLAN conversion;To a variety of action types such as DT frame deletion SVLAN.In TR156 (the realization standard about GPON ONU) and PTN In (Packet Transport Network, Packet Transport Network) application, certain service port may need to support various TAG simultaneously The input of type frame.
At present for the operation of VLAN conversion, generally 1~2 kind of VLAN combination is selected to carry out according to input port.Such as: root Conversion operation is carried out according to SVLAN, conversion operation is carried out according to SVLAN+CVLAN, is in VLAN conversion process after searching matching Respective operation is arranged in every kind of TAG type, is then selected again according to the TAG type of data frame.
But the above-mentioned operation for VLAN conversion is in practical applications, has the following deficiencies:
(1) the above-mentioned operation for VLAN conversion limits VLAN type entrained by the frame from port input, when from same When the frame of a port input includes STAG, CTAG, DT frame and will do VLAN conversion, translation type is insufficient.
(2) the above-mentioned operation for VLAN conversion is combined the two kinds of lookups selected based on port-select, cannot distinguish between excellent First grade, or priority cannot be distinguished based on each service application.
(3) the above-mentioned operation for VLAN conversion cannot distinguish between the TAG type of data frame, no when carrying out searching matching Processing behavior can be normalized, need to be that different processing behaviors is arranged in every kind of TAG type in result items, increase RAM The use of (Random-Access Memory, random access memory) resource and design complexity.
TCAM (ternary content addressable memory, three-state content addressing can be used in above-mentioned 3 disadvantages Memory) search mode overcome, but use TCAM mode, equipment cost can be significantly greatly increased, especially for the small of access layer Equipment.
Summary of the invention
In view of the deficiencies in the prior art, present invention solves the technical problem that are as follows: 1, make same port (input or it is defeated Support the conversions of a variety of VLAN TAG types simultaneously out), 2, distinguish the priority of different business, 3, by what is handled VLAN Operating result normalization.Of the invention is relatively simple for structure, and equipment cost is lower, is suitable for promoting.
To achieve the above objectives, VLAN conversion equipment provided by the invention, including signal sending end mouth, the device also wrap It includes: KEY generation module, KEY searching module, lookup result arbitration modules and VLAN processing module;It is provided in KEY searching module KEY searches database, and VLAN processing module is provided with VLAN operating database;KEY searches database and VLAN operating database It include several entries, the entry that each KEY searches database is associated with 1 entry in VLAN operating database;
The signal sending end mouth is used for: sending 3 kinds of signals to KEY generation module, 3 kinds of signals are as follows: the VLAN of input frame TAG type, SVID:SVLAN ID, CVID:CVLAN ID;
The KEY generation module is used for: being generated the lookup KEY of 3 kinds of lookup types according to the signal that receives and corresponding is looked into It looks for enabled, effective lookup KEY for searching type and corresponding search enabled is sent to KEY searching module;
The lookup KEY of 3 kinds of lookups type and corresponding search enable are as follows:
Searching type KEY_TYPE1: lookup KEY is KEY1, and KEY1 is port numbers PORT and CVID, the corresponding lookup of KEY1 It enables as KEY1_EN;
KEY_TYPE2: lookup KEY is KEY2, and KEY2 is PORT and SVID, and the corresponding lookup of KEY2 enables as KEY2_EN;
KEY_TYPE3: lookup KEY be KEY3, KEY3 PORT, SVID and CVID, KEY3 it is corresponding search enable be KEY3_EN;
The KEY searching module is used for: being searched in database in KEY, is searched and match corresponding with the lookup KEY received Lookup result is sent to lookup result arbitration modules by lookup result;Every group of lookup result includes whether matching value HIT, excellent First grade value RSLT_PRI and index OP_INDEX;
It includes several entries that the KEY, which searches database, and the content of each entry includes:
ENTRY_VALID: indicate whether the entry is effective, and invalid entries are not involved in lookup and matching;
PORT: matching input item, the PORT for matched and searched KEY;
CVID: matching input item, the CVID for matched and searched KEY;
SVID: matching input item, the SVID for matched and searched KEY;
KEY_TYPE: indicate that the entry needs to match with the corresponding lookup KEY for searching type, the value of KEY_TYPE and 3 The lookup type that kind searches KEY is corresponding;;
RSLT_PRI: priority value;
NEW_CVID: the CVID value for updating or replacing is needed;
NEW_SVID: the SVID value for updating or replacing is needed;
NEW_CPRI: the priority value for the CVLAN for needing to update or replace;
NEW_SPRI: the priority value for the SVLAN for needing to update or replace;
The lookup result arbitration modules are used for: 3 groups of lookup results being arbitrated, send arbitration result to VLAN processing Module, arbitration result include the HIT and OP_INDEX for the lookup result that arbitration obtains;
The VLAN processing module is used for: in VLAN operating database, being searched and the OP_INDEX phase in arbitration result Associated entry obtains VLAN processing result according to the entry;
The VLAN operating database includes several entries, and the expression item of each entry includes the operation behavior of CVLAN CVLAN_OP,SVLAN_OP,CPRI_OP,SPRI_OP;The VLAN processing result includes CVLAN_OP, SVLAN_OP, CPRI_ The HIT of OP, SPRI_OP and arbitration result.
Based on the above technical solution, the signal sending end mouth is input port or output port.
Based on the above technical solution, the VLAN TAG type of the input frame includes: UNTAG, only band internal layer VLAN tag SIT, only band outside VLAN label SOT and have inside and outside 2 layers of VLAN tag DT.
Based on the above technical solution, the CVLAN_OP in the VLAN operating database and SVLAN_OP are wrapped Include: addition deletes, replaces and do not operate;CPRI_OP and SPRI_OP includes: addition, replacement and does not operate.
VLAN conversion method provided by the invention based on above-mentioned apparatus, method includes the following steps:
3 kinds of signals that S1:KEY generation module is sent according to signal sending end mouth generate the lookup KEY of 3 kinds of lookup types It is enabled with corresponding search;KEY generation module is determined and is exported effectively according to the VLAN TAG type of input frame in 3 kinds of signals The lookup KEY and corresponding lookup for searching type are enabled to KEY searching module, go to S2;
S2:KEY searching module is searched in database in KEY, and received each lookup KEY is searched and matched, is obtained To lookup result, S3 is gone to;
S3: lookup result arbitration modules arbitrate lookup result, and arbitration result is exported to VLAN processing module, turn To S4;
S4:VLAN processing module searches entry associated with arbitration result, according to this in VLAN operating database Mesh obtains VLAN processing result.
Based on the above technical solution, 3 kinds of lookup KEY for searching type and corresponding search described in S1 enable Are as follows:
Searching type KEY_TYPE1: lookup KEY is KEY1 { PORT, CVID }, and lookup enables as KEY1_EN;
KEY_TYPE2: lookup KEY is KEY2 { PORT, SVID }, and corresponding lookup enables as KEY2_EN;
KEY_TYPE3: lookup KEY is KEY3 { PORT, SVID, CVID }, and corresponding lookup enables as KEY3_EN;
On this basis, KEY generation module described in S1 is determined according to the VLAN TAG type of input frame in 3 kinds of signals And the lookup KEY of type is effectively searched in output and corresponding lookup is enabled to KEY searching module, specifically includes the following steps:
S101:KEY generation module judge input frame in 3 kinds of signals VLAN TAG type whether and meanwhile include STAG: Otherwise the TAG of TAG, CTAG:CVLAN of SVLAN go to S103 if so, going to S102;
S102:KEY generation module exports the lookup KEY of 3 kinds of lookup types and corresponding lookup enables to search mould to KEY Block, S1 terminate;
S103:KEY generation module judges whether the VLAN TAG type of input frame only has STAG, if so, S104 is gone to, it is no Then go to S105;
S104:KEY generation module exports KEY2 and KEY2_EN to KEY searching module, and S1 terminates, and goes to S2;
S105:KEY generation module judges whether the VLAN TAG type of input frame only has CTAG, if so, S106 is gone to, it is no Then go to S107;
S106:KEY generation module exports KEY3 and KEY3_EN to KEY searching module, and S1 terminates, and goes to S2;
S107:KEY generation module determines to enable without effectively searching KEY and corresponding search, and S1 terminates, at this time VLAN Conversion method also terminates.
Based on the above technical solution, S2 specifically includes the following steps:
Effectively whether the lookup that the judgement of S201:KEY searching module requires to look up enabled, if so, going to S202, otherwise goes to S205;
S202:KEY searching module carries out HASH calculating to the lookup KEY that current lookup enables, according to the low level rope of HASH Draw determining KEY and search corresponding entry in database, goes to S203;
S203:KEY searching module searches the ENTRY_VALID of current entries in database according to KEY, judges current entries Whether effectively, if so, going to S204, S205 is otherwise gone to;
S204:KEY searching module obtains enabling the corresponding lookup result for searching KEY with current lookup being HIT, RSLT_ PRI and OP_INDEX;The value of HIT is 1, represents current lookup KEY successful match, and the value of RSLT_PRI is identical as current entries, The value of OP_INDEX is VLAN operating database call number associated with current entries;S2 terminates, and goes to S3;
The generation of S205:KEY searching module enables the value that the corresponding lookup result for searching KEY is HIT with current lookup The equal vacancy of 0, RSLT_PRI and OP_INDEX represents not with the matched entry of current lookup KEY, and S2 terminates, and goes to S3.
Based on the above technical solution, S3 specifically includes the following steps:
S301: lookup result arbitration modules judge whether the HIT value in all lookup results all represents mismatch, if It is to go to S302, otherwise goes to S303;
S302: lookup result arbitration modules export arbitration result to VLAN processing module, arbitration result are as follows: HIT 0, OP_ INDEX vacancy, S3 terminate, and VLAN conversion method also terminates at this time;
S303: lookup result arbitration modules obtain arbitration result according to the highest lookup result of RSLT_PRI value, when multiple When lookup result highest RSLT_PRI value having the same, according to KEY3 > KEY2 > KEY1 default priority, output arbitration knot Fruit is to VLAN processing module;Arbitration result are as follows: HIT 1, the lookup KEY for representing current arbiter result have been matched, OP_INDEX with The OP_INDEX of corresponding lookup result is identical, and S3 terminates, and goes to S4.
Compared with the prior art, the advantages of the present invention are as follows:
(1) present invention determines lookup according to the VLAN TAG type of input frame on the basis of using RAM storing data library KEY (i.e. VLAN conversion lookup combines).At the same time, KEY searching module matched and searched KEY of the invention, obtains lookup result; Lookup result arbitration modules are based on lookup result entry priority, determine arbitration result;VLAN processing module is according to arbitration result The device and method for directly determining VLAN operation behavior.
In view of this, can make same port (input or output) when the present invention carries out VLAN conversion while support a variety of The conversion of VLAN TAG type, additionally it is possible to carry out different VLAN processing based on different business, operating result can not only be made Normalization, directly obtains operating result according to arbitration result, and can be not only used for input VLAN conversion, and can be used for exporting VLAN Conversion.
(2) of the invention relatively simple for structure, equipment cost is lower, is suitable for promoting.
Detailed description of the invention
Fig. 1 is the structural block diagram of VLAN conversion equipment in the embodiment of the present invention;
Fig. 2 is the schematic diagram that KEY searches database in the embodiment of the present invention;
Fig. 3 is the schematic diagram of VLAN operating database in the embodiment of the present invention;
Fig. 4 is the flow chart of VLAN conversion method in the embodiment of the present invention;
Fig. 5 is the flow chart of S1 in the embodiment of the present invention;
Fig. 6 is the flow chart of S2 in the embodiment of the present invention.
Specific embodiment
Invention is further described in detail with reference to the accompanying drawings and embodiments.
Shown in Figure 1, the VLAN conversion equipment in the embodiment of the present invention, including signal sending end mouth, KEY generate mould Block, KEY searching module, lookup result arbitration modules and VLAN processing module.It is provided with KEY in KEY searching module and searches data Library, VLAN processing module are provided with VLAN operating database;KEY searches database and VLAN operating database includes several Mesh, each KEY lookup data base entries are associated with 1 entry in VLAN operating database,
Signal sending end mouth is input port or output port, is used for: 3 kinds of signals of transmission to KEY generation module, 3 Kind signal are as follows: the VLAN TAG type of input frame, SVID (ID of service vlan id, SVLAN, SVLAN, that is, service vlan) With CVID (ID of customer vlan id, CVLAN, CVLAN, that is, customer VLAN);The VLAN TAG type of input frame includes 4 Kind: UNTAG, SIT (only band inner VLAN label), SOT (only band outside VLAN label) and DT (are marked with inside and outside 2 layers of VLAN Label).
KEY generation module is used for: generating the lookup KEY of 3 kinds of lookup types and corresponding lookup according to the signal received makes Can, it enables effective lookup KEY for searching type and corresponding search to be sent to KEY searching module.The lookup of 3 kinds of lookup types KEY and corresponding search enable are as follows:
KEY_TYPE1 (searches Class1): lookup KEY is KEY1 { PORT (port numbers), CVID }, and lookup enables as KEY1_ EN;
KEY_TYPE2: lookup KEY is KEY2 { PORT, SVID }, and corresponding lookup enables as KEY2_EN;
KEY_TYPE3: lookup KEY is KEY3 { PORT, SVID, CVID }, and corresponding lookup enables as KEY3_EN.
KEY searching module is used for: being searched in database in KEY, is searched and match lookup corresponding with the lookup KEY received As a result, lookup result is sent to lookup result arbitration modules.
Every group of lookup result includes HIT (whether matching value), RSLT_PRI (priority value) and OP_INDEX (index); 3 groups of lookup results are as follows:
1, lookup result corresponding with KEY1: { HIT1, RSLT_PRI1, OP_INDEX1 };
2, lookup result corresponding with KEY2: { HIT2, RSLT_PRI2, OP_INDEX2 };
3, lookup result corresponding with KEY3: { HIT3, RSLT_PRI3, OP_INDEX3 }.
Shown in Figure 2, it includes n entries, the content of each entry that KEY, which searches database, are as follows:
ENTRY_VALID: indicate whether the entry is effective, and invalid entries are not involved in lookup and matching;
PORT: matching input item, the PORT for matched and searched KEY;
CVID: matching input item, the CVID for matched and searched KEY;
SVID: matching input item, the SVID for matched and searched KEY;
KEY_TYPE: indicating that the entry needs to match with the corresponding lookup KEY for searching type, and KEY_TYPE has 3 kinds of values, It is corresponding (i.e. KEY_TYPE1, KEY_TYPE2, KEY_TYPE3) with 3 kinds of lookup lookup types of KEY respectively;
RSLT_PRI: priority value is arbitrated when for being searched simultaneously multiple KEY types, and priority is high to be had Priority;
NEW_CVID: the CVID value for updating or replacing is needed;
NEW_SVID: the SVID value for updating or replacing is needed;
NEW_CPRI: the priority value for the CVLAN for needing to update or replace;
NEW_SPRI: the priority value for the SVLAN for needing to update or replace.
Lookup result arbitration modules are used for: 3 groups of lookup results being arbitrated, send arbitration result to VLAN processing mould Block, arbitration result include the HIT and OP_INDEX for the lookup result that arbitration obtains.
VLAN processing module is used for: in VLAN operating database, being searched associated with the OP_INDEX in arbitration result Entry, obtained according to the entry and export VLAN processing result.
Shown in Figure 3, VLAN operating database includes m entries, and the expression item of each entry is that CVLAN_OP (is indicated The operation behavior of CVLAN), the SVLAN_OP operation behavior of SVLAN (indicate), CPRI_OP (operation behavior for indicating CPRI), SPRI_OP (operation behavior for indicating SPRI).According to the expression item of each entry it is found that VLAN processing result include HIT, CVLAN_OP, SVLAN_OP, CPRI_OP and SPRI_OP.
CVLAN_OP and SVLAN_OP includes: addition, deletion, replacement and does not operate;CPRI_OP and SPRI_OP are wrapped Include: addition is replaced and is not operated.
It is shown in Figure 4, the VLAN conversion method in the present embodiment based on above-mentioned apparatus, comprising the following steps:
3 kinds of signals that S1:KEY generation module is sent according to signal sending end mouth generate the lookup KEY of 3 kinds of lookup types It is enabled with corresponding search;KEY generation module is determined and is exported effectively according to the VLAN TAG type of input frame in 3 kinds of signals The lookup KEY and corresponding lookup for searching type are enabled to KEY searching module, go to S2.
S2:KEY searching module is searched in database in KEY, and received each lookup KEY is searched and matched, is obtained To lookup result, S3 is gone to.
S3: lookup result arbitration modules arbitrate lookup result, and arbitration result is exported to VLAN processing module, turn To S4.
S4:VLAN processing module searches entry associated with arbitration result, according to this in VLAN operating database Mesh obtains VLAN processing result.
Shown in Figure 5,3 kinds of lookup KEY for searching type and corresponding search enable in S1 are as follows:
KEY_TYPE1: lookup KEY is KEY1 { PORT, CVID }, and lookup enables as KEY1_EN;
KEY_TYPE2: lookup KEY is KEY2 { PORT, SVID }, and corresponding lookup enables as KEY2_EN;
KEY_TYPE3: lookup KEY is KEY3 { PORT, SVID, CVID }, and corresponding lookup enables as KEY3_EN.
On this basis, KEY generation module is determining and defeated according to the VLAN TAG type of input frame in 3 kinds of signals in S1 The lookup KEY and corresponding lookup for effectively searching type out are enabled to KEY searching module, specifically includes the following steps:
S101:KEY generation module judge input frame in 3 kinds of signals VLAN TAG type whether and meanwhile include dual-VLAN TAG:STAG (TAG of SVLAN) and CTAG (TAG of CVLAN), if so, going to S102, otherwise goes to S103.
S102:KEY generation module exports the lookup KEY of 3 kinds of lookup types and corresponding lookup enables to search mould to KEY Block, S1 terminate.
S103:KEY generation module judges whether the VLAN TAG type of input frame only has STAG, if so, S104 is gone to, it is no Then go to S105.
S104:KEY generation module exports KEY2 and KEY2_EN to KEY searching module, and S1 terminates, and goes to S2.
S105:KEY generation module judges whether the VLAN TAG type of input frame only has CTAG, if so, S106 is gone to, it is no Then go to S107.
S106:KEY generation module exports KEY3 and KEY3_EN to KEY searching module, and S1 terminates, and goes to S2.
S107:KEY generation module determines to enable without effectively searching KEY and corresponding search, and S1 terminates, VLAN conversion Method also terminates.
It is shown in Figure 6, S2 specifically includes the following steps:
Effectively whether the lookup that the judgement of S201:KEY searching module requires to look up enabled, if so, going to S202, otherwise goes to S205。
S202:KEY searching module carries out HASH calculating to the lookup KEY that current lookup enables, according to the low level rope of HASH Draw determining KEY and search corresponding entry in database, goes to S203.
S203:KEY searching module searches the ENTRY_VALID of current entries in database according to KEY, judges current entries Whether effectively, if so, going to S204, S205 is otherwise gone to.
S204:KEY searching module obtains enabling the corresponding lookup result for searching KEY with current lookup being HIT, RSLT_ PRI and OP_INDEX;The value of HIT is 1, represents current lookup KEY successful match, and the value of RSLT_PRI is identical as current entries, The value of OP_INDEX is VLAN operating database call number associated with current entries;S2 terminates, and goes to S3.
The generation of S205:KEY searching module enables the value that the corresponding lookup result for searching KEY is HIT with current lookup The equal vacancy of 0, RSLT_PRI and OP_INDEX, i.e., not with the matched entry of current lookup KEY, S2 terminates, and goes to S3.
S3 specifically includes the following steps:
S301: lookup result arbitration modules judge whether the HIT value in all lookup results all represents mismatch, if It is to go to S302, otherwise goes to S303.
S302: lookup result arbitration modules export arbitration result to VLAN processing module, cut out result are as follows: HIT 0, OP_ INDEX vacancy, S3 terminate, and VLAN conversion method also terminates.
S303: lookup result arbitration modules obtain arbitration result according to the highest lookup result of RSLT_PRI value, when multiple When lookup result highest RSLT_PRI value having the same, according to HIT3 (KEY3) > HIT2 (KEY2) > HIT1 (KEY1) default Priority, output arbitration result to VLAN processing module.Arbitration result are as follows: HIT 1, OP_INDEX and corresponding lookup result OP_INDEX is identical, and S3 terminates, and goes to S4.
The present invention is not limited to the above-described embodiments, for those skilled in the art, is not departing from Under the premise of the principle of the invention, several improvements and modifications can also be made, these improvements and modifications are also considered as protection of the invention Within the scope of.The content being not described in detail in this specification belongs to the prior art well known to professional and technical personnel in the field.

Claims (7)

1. a kind of VLAN conversion equipment, including signal sending end mouth, it is characterised in that: the device further include: KEY generation module, KEY searching module, lookup result arbitration modules and VLAN processing module;It is provided with KEY in KEY searching module and searches database, VLAN processing module is provided with VLAN operating database;KEY searches database and VLAN operating database includes several entries, The entry that each KEY searches database is associated with 1 entry in VLAN operating database;
The signal sending end mouth is used for: sending 3 kinds of signals to KEY generation module, 3 kinds of signals are as follows: the VLAN TAG of input frame Type, SVID:SVLAN ID, CVID:CVLAN ID;
The KEY generation module is used for: generating the lookup KEY of 3 kinds of lookup types and corresponding lookup according to the signal received makes Can, it enables effective lookup KEY for searching type and corresponding search to be sent to KEY searching module;
The lookup KEY of 3 kinds of lookups type and corresponding search enable are as follows:
Searching type KEY_TYPE1: lookup KEY is KEY1, and KEY1 is port numbers PORT and CVID, and corresponding search of KEY1 enables For KEY1_EN;
KEY_TYPE2: lookup KEY is KEY2, and KEY2 is PORT and SVID, and the corresponding lookup of KEY2 enables as KEY2_EN;
KEY_TYPE3: lookup KEY is KEY3, KEY3 PORT, SVID and CVID, and the corresponding lookup of KEY3 enables as KEY3_ EN;
The KEY searching module is used for: being searched in database in KEY, is searched and match lookup corresponding with the lookup KEY received As a result, lookup result is sent to lookup result arbitration modules;Every group of lookup result includes whether matching value HIT, priority Value RSLT_PRI and index OP_INDEX;
It includes several entries that the KEY, which searches database, and the content of each entry includes:
ENTRY_VALID: indicate whether the entry is effective, and invalid entries are not involved in lookup and matching;
PORT: matching input item, the PORT for matched and searched KEY;
CVID: matching input item, the CVID for matched and searched KEY;
SVID: matching input item, the SVID for matched and searched KEY;
KEY_TYPE: indicate that the entry needs to match with the corresponding lookup KEY for searching type, the value of KEY_TYPE is looked into 3 kinds Look for the lookup type of KEY corresponding;
RSLT_PRI: priority value;
NEW_CVID: the CVID value for updating or replacing is needed;
NEW_SVID: the SVID value for updating or replacing is needed;
NEW_CPRI: the priority value for the CVLAN for needing to update or replace;
NEW_SPRI: the priority value for the SVLAN for needing to update or replace;
The lookup result arbitration modules are used for: 3 groups of lookup results being arbitrated, send arbitration result to VLAN processing mould Block, arbitration result include the HIT and OP_INDEX for the lookup result that arbitration obtains;
Lookup result arbitration modules judge whether the HIT value in all lookup results all represents and mismatch, if so, output arbitration As a result to VLAN processing module, arbitration result are as follows: HIT 0, OP_INDEX vacancy, VLAN conversion method also terminate;If it is not, root Arbitration result is obtained according to the highest lookup result of RSLT_PRI value, when multiple lookup results highest RSLT_PRI value having the same When, according to KEY3 > KEY2 > KEY1 default priority, arbitration result is exported to VLAN processing module;Arbitration result are as follows: HIT is 1, the lookup KEY for representing current arbiter result has been matched, and OP_INDEX is identical as the corresponding OP_INDEX of lookup result;
The VLAN processing module is used for: in VLAN operating database, being searched associated with the OP_INDEX in arbitration result Entry, VLAN processing result is obtained according to the entry;
The VLAN operating database includes several entries, and the expression item of each entry includes the operation behavior of CVLAN CVLAN_OP,SVLAN_OP,CPRI_OP,SPRI_OP;The VLAN processing result includes CVLAN_OP, SVLAN_OP, CPRI_ The HIT of OP, SPRI_OP and arbitration result;
CVLAN_OP and SVLAN_OP in the VLAN operating database include: addition, deletion, replacement and do not operate; CPRI_OP and SPRI_OP includes: addition, replacement and does not operate.
2. VLAN conversion equipment as described in claim 1, it is characterised in that: the signal sending end mouth be input port or Output port.
3. VLAN conversion equipment as described in claim 1, it is characterised in that: the VLAN TAG type of the input frame includes: UNTAG, only band inner VLAN label SIT, only band outside VLAN label SOT and have inside and outside 2 layers of VLAN tag DT.
4. a kind of VLAN conversion method based on any one of claims 1 to 3 described device, which is characterized in that this method includes Following steps:
3 kinds of signals that S1:KEY generation module is sent according to signal sending end mouth generate 3 kinds of lookup lookup KEY of types and right The lookup answered is enabled;KEY generation module determines according to the VLAN TAG type of input frame in 3 kinds of signals and exports effective lookup The lookup KEY of type and corresponding lookup are enabled to KEY searching module, go to S2;
S2:KEY searching module is searched in database in KEY, and received each lookup KEY is searched and matched, is looked into It looks for as a result, going to S3;
S3: lookup result arbitration modules arbitrate lookup result, and arbitration result is exported to VLAN processing module, is gone to S4;
S4:VLAN processing module is searched entry associated with arbitration result, is obtained according to the entry in VLAN operating database To VLAN processing result.
5. VLAN conversion method as claimed in claim 4, it is characterised in that: described in S1 3 kinds lookup type lookup KEY and Corresponding search enables are as follows:
Searching type KEY_TYPE1: lookup KEY is KEY1 { PORT, CVID }, and lookup enables as KEY1_EN;
KEY_TYPE2: lookup KEY is KEY2 { PORT, SVID }, and corresponding lookup enables as KEY2_EN;
KEY_TYPE3: lookup KEY is KEY3 { PORT, SVID, CVID }, and corresponding lookup enables as KEY3_EN;
On this basis, KEY generation module described in S1 is determining and defeated according to the VLAN TAG type of input frame in 3 kinds of signals The lookup KEY and corresponding lookup for effectively searching type out are enabled to KEY searching module, specifically includes the following steps:
S101:KEY generation module judge input frame in 3 kinds of signals VLAN TAG type whether and meanwhile including STAG:SVLAN Otherwise the TAG of TAG, CTAG:CVLAN go to S103 if so, going to S102;
S102:KEY generation module exports the lookup KEY of 3 kinds of lookup types and corresponding lookup is enabled to KEY searching module, S1 Terminate;
S103:KEY generation module judges whether the VLAN TAG type of input frame only has STAG and otherwise turn if so, going to S104 To S105;
S104:KEY generation module exports KEY2 and KEY2_EN to KEY searching module, and S1 terminates, and goes to S2;
S105:KEY generation module judges whether the VLAN TAG type of input frame only has CTAG and otherwise turn if so, going to S106 To S107;
S106:KEY generation module exports KEY3 and KEY3_EN to KEY searching module, and S1 terminates, and goes to S2;
S107:KEY generation module determines to enable without effectively searching KEY and corresponding search, and S1 terminates, and VLAN is converted at this time Method also terminates.
6. VLAN conversion method as claimed in claim 4, which is characterized in that S2 specifically includes the following steps:
Effectively whether the lookup that the judgement of S201:KEY searching module requires to look up enabled, if so, going to S202, otherwise goes to S205;
S202:KEY searching module carries out HASH calculating to the lookup KEY that current lookup enables, and is indexed according to the low level of HASH true Determine KEY and search corresponding entry in database, goes to S203;
S203:KEY searching module searches the ENTRY_VALID of current entries in database according to KEY, whether judges current entries Effectively, if so, going to S204, S205 is otherwise gone to;
S204:KEY searching module obtain with current lookup enable it is corresponding search KEY lookup result be HIT, RSLT_PRI and OP_INDEX;The value of HIT is 1, represents current lookup KEY successful match, the value of RSLT_PRI is identical as current entries, OP_ The value of INDEX is VLAN operating database call number associated with current entries;S2 terminates, and goes to S3;
It is 0 that S205:KEY searching module, which generates and enables the value that the corresponding lookup result for searching KEY is HIT with current lookup, The equal vacancy of RSLT_PRI and OP_INDEX represents not with the matched entry of current lookup KEY, and S2 terminates, and goes to S3.
7. VLAN conversion method as claimed in claim 6, which is characterized in that S3 specifically includes the following steps:
S301: lookup result arbitration modules judge whether the HIT value in all lookup results all represents and mismatch, if so, turning To S302, S303 is otherwise gone to;
S302: lookup result arbitration modules export arbitration result to VLAN processing module, arbitration result are as follows: HIT 0, OP_ INDEX vacancy, S3 terminate, and VLAN conversion method also terminates at this time;
S303: lookup result arbitration modules obtain arbitration result according to the highest lookup result of RSLT_PRI value, when multiple lookups As a result when highest RSLT_PRI value having the same, according to KEY3 > KEY2 > KEY1 default priority, arbitration result is exported extremely VLAN processing module;Arbitration result are as follows: HIT 1, the lookup KEY for representing current arbiter result have been matched, OP_INDEX with it is corresponding The OP_INDEX of lookup result is identical, and S3 terminates, and goes to S4.
CN201610035460.7A 2016-01-19 2016-01-19 A kind of VLAN conversion equipment and method Active CN105610673B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610035460.7A CN105610673B (en) 2016-01-19 2016-01-19 A kind of VLAN conversion equipment and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610035460.7A CN105610673B (en) 2016-01-19 2016-01-19 A kind of VLAN conversion equipment and method

Publications (2)

Publication Number Publication Date
CN105610673A CN105610673A (en) 2016-05-25
CN105610673B true CN105610673B (en) 2018-12-11

Family

ID=55990218

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610035460.7A Active CN105610673B (en) 2016-01-19 2016-01-19 A kind of VLAN conversion equipment and method

Country Status (1)

Country Link
CN (1) CN105610673B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101098286A (en) * 2007-03-15 2008-01-02 中兴通讯股份有限公司 Multi-to-one VLAN mapping method
CN101931835A (en) * 2010-09-03 2010-12-29 深圳市共进电子有限公司 Method and device for realizing VLAN (Virtual Local Area Network) convergence and conversion in EPON (Ethernet Passive Optical Network)
CN102055669A (en) * 2010-12-20 2011-05-11 武汉烽火网络有限责任公司 Method for realizing N:1 virtual local area network (VLAN) mapping in 10 gigabit-capable passive optical network (10GPON) system
CN102594674A (en) * 2012-02-09 2012-07-18 烽火通信科技股份有限公司 Method and device for realizing double-virtual local area network (VLAN) cross forwarding
CN102655504A (en) * 2011-12-16 2012-09-05 中兴通讯股份有限公司 Method and device for carrying out N:1Vlan conversion by using virtual port
CN103701679A (en) * 2013-12-16 2014-04-02 上海斐讯数据通信技术有限公司 VLAN (virtual local area network) conversion implementation method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101098286A (en) * 2007-03-15 2008-01-02 中兴通讯股份有限公司 Multi-to-one VLAN mapping method
CN101931835A (en) * 2010-09-03 2010-12-29 深圳市共进电子有限公司 Method and device for realizing VLAN (Virtual Local Area Network) convergence and conversion in EPON (Ethernet Passive Optical Network)
CN102055669A (en) * 2010-12-20 2011-05-11 武汉烽火网络有限责任公司 Method for realizing N:1 virtual local area network (VLAN) mapping in 10 gigabit-capable passive optical network (10GPON) system
CN102655504A (en) * 2011-12-16 2012-09-05 中兴通讯股份有限公司 Method and device for carrying out N:1Vlan conversion by using virtual port
CN102594674A (en) * 2012-02-09 2012-07-18 烽火通信科技股份有限公司 Method and device for realizing double-virtual local area network (VLAN) cross forwarding
CN103701679A (en) * 2013-12-16 2014-04-02 上海斐讯数据通信技术有限公司 VLAN (virtual local area network) conversion implementation method

Also Published As

Publication number Publication date
CN105610673A (en) 2016-05-25

Similar Documents

Publication Publication Date Title
CN104580027B (en) A kind of OpenFlow message forwarding methods and equipment
US10778612B2 (en) Variable TCAM actions
US8792497B2 (en) Method and apparatus for performing link aggregation
EP2503743B1 (en) Usage Of Masked Ethernet Addresses Between Transparent Interconnect Of Lots Of Links (Trill) Routing Bridges
JP5585219B2 (en) Switching device and virtual LAN construction method
CN102238083B (en) For the system and method for adapted packet process streamline
US10708272B1 (en) Optimized hash-based ACL lookup offload
US20100260188A1 (en) Method and device for processing qinq packet
US20140006706A1 (en) Ternary Content-Addressable Memory Assisted Packet Classification
US10805390B2 (en) Automated mirroring and remote switch port analyzer (RSPAN) functions using fabric attach (FA) signaling
US10530692B2 (en) Software FIB ARP FEC encoding
CN102857428B (en) A kind of message forwarding method based on Access Control List (ACL) and equipment
CN103581022B (en) MAC address finding and transmitting method and device
CN103701679B (en) A kind of method for realizing VLAN conversions
CN101352003A (en) Method of providing virtual router functionality
CN103475559B (en) Method and system for processing and transmitting message according to contents of message
CN103957157B (en) Route method for network interface to define forwarding rule
CN109639451A (en) Port configuration method, device, storage medium and electronic device
EP3200398A1 (en) Automated mirroring and remote switch port analyzer (rspan)/encapsulated remote switch port analyzer (erspan) functions using fabric attach (fa) signaling
CN107342948B (en) A kind of data flow recognition process unit based on TCAM, system and method
CN103457824A (en) Message processing method and device
CN104202229B (en) A kind of device for passive optical network OLT QINQ message processing methods and system
CN105610673B (en) A kind of VLAN conversion equipment and method
CN112383647A (en) Network system based on SPACE6 and dual-stack technology
CN100379236C (en) Method for processing items of address analyzing protocol table

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant