Background technology
In EPON system, traditional transfer of data is only used the VLAN label of common port, when data flow is being admitted to the VLAN label of only being stamped common network while processing in switch.Because the VLAN label of common network is limited, for the data flow in private network access public network situation, the number of the VLAN label of common network is limited, there will be unavoidably the problem of label collision.Meanwhile, user wishes that the data flow of user side is carried out to certain individual to be processed, such as the VLAN label etc. that adds some user side private networks.QinQ technology has been born under the demand.
Traditional QinQ technology, conventionally on OLT equipment, increase a QinQ port, first data flow is added a vpn label (being the VLAN label of user side) at user side, and QinQ port adds a unified outer layer label (being the VLAN label of common network) to entering the data flow of this port subsequently.The addition manner of this VLAN label, in practice, limitation is larger, for example, when a plurality of users are during from same QinQ port access network, cannot distinguish etc. user type and type of service.Therefore, need to adopt another kind of QinQ technology, i.e. selective QinQ technology to VLAN transfer process.
So-called selective QinQ technology, refers to according to the value difference in every data flow, distributes to corresponding outer layer label of every data flow, thereby different data flow is carried out to different processing.Particularly, in selective QinQ, actual meeting be added different outer layer labels according to the information such as port numbers of the VLAN label of message, MAC Address, IP agreement, source address, destination address, priority or application program to different data flow, thereby realized according to different user, different business, different priorities etc., message is taked to corresponding processing mode.But in traditional selective QinQ technology, only can process (i.e. data flow under the transformation rule in VLAN) for the data flow being included in the vlan list defaulting in OLT equipment, for the data flow under non-conversion rule, owing to adding VLAN, operate the data flow in default vlan list that is not included in producing, traditional selective QinQ technology can not well be processed, and even can carry out misclassification to this data flow.
Chinese patent (CN1838629) discloses a kind of method that the QinQ of utilization technology realizes virtual switch, to solve prior art, can not between different geographical has the network of different VLAN ID sign, realize the problem of double layer intercommunication.Comprise the steps: configuration step, in intermediate equipment, configure QinQ VLAN swap table, comprise the information such as new private network VLAN ID after public network VLAN ID, outbound port number, private network VLAN ID and exchange; Query steps, when QinQ terminates, removes to inquire about QinQ VLAN swap table with the VLAN ID of the outer public network VLAN ID+ outbound port peeled off number+private network, obtains new private network VLANID; Exchange and forwarding step, replace original VLAN ID with new private network VLAN ID, and the packet after replacing is sent from outbound port.Technique scheme is only introduced QinQ technology, and introduce and be confined to add public network VLAN ID outward at private network VLAN ID, when output, peeling outer layer public network VLAN ID, to form a new private network VLAN ID, can not solve problems of the prior art.
Chinese patent (CN1838628) discloses a kind of method that realizes network interconnection between different QinQ apparatus, incompatible to solve between QinQ equipment dissimilar in prior art, have between the network of different QinQ equipment can not intercommunication problem.Comprise the steps: to configure QinQ access style table for defining the QinQ device type value of various approvals in an intermediate equipment, according to inbound port QinQ packet information inquiry QinQ access style table, process legal QinQ type data packets; In equipment, configure QinQ type conversion table for defining the QinQ types value of opposite equip. approval, by searching QinQ type conversion table, output QinQ type of data packet value is replaced with to the QinQ types value that opposite equip. is supported.Technique scheme is not explained selective QinQ technology and is further improved, cannot solve problems of the prior art.
Summary of the invention
According to the defect existing in prior art, existing selective QinQ technology cannot be carried out the problem of different switching in the situation that of descending N:1 to the up-downgoing data flow of sending in same ONU equipment, and a kind of method of the VLAN of realization conversion is now provided, and specifically comprises:
A method that realizes VLAN conversion, is applicable in EPON system; Described EPON system comprises ONU equipment and OLT equipment; Described OLT equipment connects described ONU equipment by PON interface; Described OLT equipment connects external network by NNI interface; In described OLT equipment, include the Switching Module of realizing VLAN conversion;
Described data flow is admitted in described Switching Module by described PON interface after being added the VLAN label of user side;
Described Switching Module carries out VLAN conversion, the data flow of changing through VLAN by described NNI interface output subsequently after the described data flow receiving being added to the VLAN label of common port;
Wherein: described ONU equipment and the corresponding data flow sequence number of every data flow between described OLT equipment;
The method of the described VLAN of realization conversion comprises:
Step 1, described OLT equipment reads described data flow;
Step 2, for described data flow sequence number corresponding to data flow every described, coupling one corresponding address domain information; And according to the default ownership goal information of corresponding every the described upstream of described address domain information matched and searched;
Step 3, according to ownership goal information described in each, to a default processing rule collection of data flow coupling every described;
Step 4, according to processing rule collection described in each, processes accordingly to data flow every described; Described OLT equipment is exported treated described data flow subsequently.
Preferably, this realizes the method for VLAN conversion, and wherein, described data flow comprises upstream and downstream data flow; Described upstream is sent to described OLT equipment by described ONU equipment by described PON interface, after described OLT device processes, by described NNI interface, is sent to external network; Described downstream data flow is read by described NNI interface by described OLT equipment from described external network, and by described PON interface, is sent to corresponding described ONU equipment after described OLT device processes;
, the corresponding described downstream data flow of described upstream.
Preferably, this realizes the method for VLAN conversion, and wherein, described data flow sequence number comprises transmission sequence number information and target address information; Every corresponding described transmission sequence number information of described upstream, every corresponding described target address information of described downstream data flow.
Preferably, this realizes the method for VLAN conversion, wherein, in described step 2, to upstream every described, distributes the method for a default ownership goal information specifically to comprise:
Step 21, according to described transmission sequence number information, searches the matching range that defaults in the described address domain information in described Switching Module;
Step 22, the VLAN sequence number comprising according to described upstream is searched the described address domain information corresponding with described transmission sequence number information in described matching range;
Step 23, according to described address domain information, obtains a corresponding ownership goal information as the described ownership goal information of described upstream.
Preferably, this realizes the method for VLAN conversion, and wherein, in described step 22, the described address domain information of order coupling in described matching range, to find the described address domain information that adapts to described VLAN sequence number.
Preferably, this realizes the method for VLAN conversion, wherein, in described step 22, determines that the method for described matching range specifically comprises:
Step 221, searches address domain information described in first in described matching range;
Step 222, the quantity of searching the described address domain information that described matching range comprises;
Step 223, limits described matching range with the result of described step 221 and the result of described step 222.
Preferably, the method that this realizes VLAN conversion, wherein, arranges a default address domain information; The default ownership goal information of described default address domain information correspondence one; When the described VLAN sequence number comprising according to described upstream, cannot mate and obtain corresponding described address and information, adopt described default address domain information, to obtain corresponding described default ownership goal information.
Preferably, this realizes the method for VLAN conversion, wherein, in described step 2, to downstream data flow every described, distributes the method for a default ownership goal information specifically to comprise: according to described target address information, and the described ownership goal information that coupling one is default.
Preferably, this realizes the method for VLAN conversion, wherein, in described step 2, if to described downstream data flow, cannot mate a default described ownership goal information, distribute the corresponding described ownership goal information of corresponding described upstream to described downstream data flow.
Preferably, this realizes the method for VLAN conversion, and wherein, in described step 2, all data flow that enter described OLT equipment from described PON interface are all detected as described upstream.
Preferably, this realizes the method for VLAN conversion, and wherein, in described step 3, described processing rule is concentrated and comprised a plurality of data rules and a plurality of operation rules; Described data rule is for limiting the attribute of described data flow; Described operation rules is for being suitable for the corresponding operating of described data rule to described data flow;
Described data rule is corresponding one by one with described operation rules.
Preferably, this realizes the method for VLAN conversion, wherein, in described step 3, a preset default processing rule collection in described Switching Module; Described default processing rule set pair is answered described default ownership goal information; Described default processing rule is concentrated and has been comprised a plurality of default data rules and a plurality of default operation rules; Described default data rule is for limiting the attribute of described data flow; Described default operation rules is for being suitable for the corresponding operating of described default data rule to described data flow.
The beneficial effect of technique scheme is: realize the selective QinQ allocation rule based on LLID, realize the VLAN conversion of downstream data flow 1:N, make the data flow in non-conversion rule also can obtain corresponding rule process.
Embodiment
Below in conjunction with the drawings and specific embodiments, the invention will be further described, but not as limiting to the invention.
Selective QinQ technology of the prior art, has generally included two kinds of processing schemes:
The selective QinQ of scheme one be embodied as the implementation method based on single logical link mark (Logical Link Identifier, LLID) single ownership goal (subscriber), the implementation of 1:1, realizes by the classifying rules of ownership goal.?
In scheme one, be fixing unique subscriber of the corresponding distribution of every corresponding all upstreams of LLID, and search corresponding classifying rules according to this subscriber.According to the above-mentioned classifying rules finding, the data flow under this subscriber is processed subsequently, is comprised and add SVLAN(Service VLAN, service provider VLAN), delete SVLAN and other VLAN conversion etc.The defect of scheme one is, when upstream is processed, due to one of the unified coupling of many upstreams that may exist under same LLID is fixed to unique subscriber, therefore for N:1 change over condition (being to have many data flow under same LLID), the vpn label of the upstream under same LLID is respectively CVLAN10-18(Custom VLAN, when user side VLAN), the corresponding SVLAN that will be converted to is SVLAN100; When corresponding downstream data flow be take destination address (MAC Address) when MAC1 is sent out, carrying out the corresponding downstream data flow of changing can be all article one rule by coupling, be about to SVLAN100 and convert CVLAN10 to, cannot realize the correct conversion of 1:N in downstream data flow.
In scheme two, for every corresponding all upstreams correspondences of LLID are distributed a subscriber, and in conjunction with overall NNI VLAN conversion table (defaulting in the VLAN conversion table that also affects OLT equipment in upper strata by NNI interface), realize the VLAN conversion of data flow.In scheme two, when the descending data flow that has corresponding newly-increased CVLAN, i.e. this data flow being not included in the VLAN conversion table defaulting in upper strata, because the VLAN conversion table being present in upper strata is not learnt the CVLAN value of this data flow, therefore cannot to it, change according to default VLAN conversion table, whole transfer process there will be problem.
For the problems referred to above of carrying out producing in the process of VLAN conversion, in preferred embodiment of the present invention, provide a kind of method of the improved VLAN of realization conversion in selective QinQ technology.
As shown in Figure 1, in preferred embodiment of the present invention, the method that realizes VLAN conversion is applicable in EPON system.This EPON system has comprised OLT equipment 1 and ONU equipment 2.OLT equipment 1 has comprised a PON(Passive Optical Network, EPON) interface 11 and a NNI(Network Node Interface, network node interface) interface 12, OLT equipment 1 connects ONU equipment 2 by PON interface 11, further, OLT equipment 1 receives the data flow being sent by ONU equipment 2 by PON interface 11.OLT equipment 1 passes through the outwards treated data flow of output of NNI interface 12, and further, OLT equipment 1 connects external networks 3 by NNI interface 12, and passes through NNI interface 12 to external network 3 output streams.
In preferred embodiment of the present invention, a Switching Module 13 is set in each OLT equipment, the VLAN transfer process of data flow is all carried out in Switching Module 13.
In preferred embodiment of the present invention, the data flow of transmitting in EPON system is divided into upstream and downstream data flow.So-called upstream is sent to the data flow of OLT equipment 1 from ONU equipment 2.OLT equipment 1 is received this data flow and is processed by PON interface 11, subsequently treated data flow is exported by NNI interface; So-called downstream data flow is the data flow that OLT equipment 1 receives from NNI interface 12, is sent to ONU equipment 2 after treatment from the PON interface 11 of OLT equipment 1.
In preferred embodiment of the present invention, every data flow is corresponding to a data flow sequence number.In preferred embodiment of the present invention, this data flow sequence number is determined according to the classification of data flow, is specially: when data flow is upstream, above-mentioned data flow sequence number is specially transmission sequence number information, be LLID, so-called LLID is the sequence number of specifying a logical transmission link.Under a LLID, can comprise many data flow.When data flow is downstream data flow, above-mentioned data flow sequence number is specially the target address information (being mac address information) of data flow.
In preferred embodiment of the present invention, the mode that can adopt a plurality of ONU to connect forms an EPON system (system configuration that comprises an ONU equipment is only shown in Fig. 1).One of them OLT equipment is connected by the PON interface of a plurality of ONU equipment in PON interface and opposite end.
When up, data flow is added the VLAN label (inner VLAN label) of a user side when user side; Subsequent data stream is admitted to the PON interface of OLT equipment.This up data flow is added the VLAN label (being outside VLAN label) of a common port on PON interface, and the VLAN label of the common port being added according to this is processed accordingly; Treated data flow is output by NNI interface, in output, removes the outside VLAN label in this data flow.
Same, when descending, when the OLT of opposite end equipment receives above-mentioned data flow by NNI interface, the target address information that this OLT equipment comprises according to data flow (being the MAC Address of target) adds a corresponding outside VLAN label, and processes accordingly; Subsequently, OLT equipment is sent to corresponding ONU equipment by PON interface by treated data flow, when sending, removes above-mentioned outside VLAN label.In whole transmitting procedure, transmitting apparatus and receiving equipment are all without the outside VLAN label of learning that transfer OLT equipment adds like this.
In preferred embodiment of the present invention, the method that realizes VLAN conversion of carrying out according to the foundation structure in Fig. 1 specifically as shown in Figure 2, for:
Step 1, OLT equipment reading data flow;
In preferred embodiment of the present invention, for upstream, OLT equipment is from PON interface reading out data; For downstream data flow, OLT equipment is from NNI interface reading out data.
Step 2, for every data flow sequence number that data flow is corresponding, coupling one corresponding address domain information; And according to the default ownership goal information of corresponding every the upstream of address domain information matched and searched;
In preferred embodiment of the present invention, as described above, when data flow is upstream, data flow sequence number should be transmission sequence number information (LLID) mutually; When data flow is downstream data flow, data flow sequence number should be the target address information (MAC Address) of data flow mutually.
Step 3, according to each ownership goal information, to a default processing rule collection of every data flow coupling;
In preferred embodiment of the present invention, above-mentioned processing rule is concentrated and has been comprised data rule (key territory) and operation rules (fib territory).In preferred embodiment of the present invention, data rule has comprised the one or more restriction of a series of fields such as VLAN value to data flow, priority, ethernet type, VLAN range of choice; Operation rules comprises one or more operations that data-driven rule is carried out the relevant field of data flow, deletes conversion, revises priority etc. such as VLAN is added.Therefore,, in preferred embodiment of the present invention, above-mentioned data rule and operation rules are corresponding one by one.
Step 4, according to each processing rule collection, processes accordingly to every data stream; OLT equipment is exported treated data flow subsequently.
In preferred embodiment of the present invention, above-mentioned steps 1 is done to further expansion, specifically as shown in Figure 3:
Step 21, according to transmission sequence number information, searches the matching range that defaults in the address domain information in Switching Module;
In preferred embodiment of the present invention, in Switching Module, set in advance a plurality of address domain informations (VLAN Domain).The corresponding transmission sequence number information (LLID) of each address domain information.In preferred embodiment of the present invention, when Switching Module reads one or more upstream being included under single LLID, Switching Module, according to this LLID information, is searched the matching range that may have corresponding address domain information.
Step 22, the VLAN sequence number comprising according to upstream is searched the address domain information corresponding with transmission sequence number information in matching range;
In preferred embodiment of the present invention, in the matching range of having determined, a plurality of address domain informations have been comprised.
In preferred embodiment of the present invention, the VLAN sequence number that upstream comprises is VLANID.When mating according to above-mentioned VLAN sequence number, its matching way is order coupling, in preferred embodiment even of the present invention, at above-mentioned matching range, comprised X address domain information (VLAN Domain_0 to VLAN Domain_X), according to the order of VLAN Domain_0 to VLAN Domain_X, down mated successively.When matching corresponding address domain information, stop matching process, and extract corresponding address domain information as the address domain information to should data flow.In preferred embodiment of the present invention, the process of above-mentioned matched and searched address field can complete in one second is searched unit.In preferred embodiment of the present invention, above-mentioned second to search unit can be an address domain information look-up table (VLAN Domain Table).
Step 23, according to address domain information, obtains a corresponding ownership goal information as the ownership goal information of upstream.
In preferred embodiment of the present invention, the corresponding ownership goal information (Subscriber ID) of each address domain information.When coupling obtains after an address domain information, according to this address domain information, find a corresponding ownership goal information.In preferred embodiment of the present invention, above-mentioned process of searching ownership goal information can complete in one the 3rd searches unit.In preferred embodiment of the present invention, the above-mentioned the 3rd searches unit can search list (VLAN Map Table) for a VLAN user.
Further, in preferred embodiment of the present invention, as shown in Figure 4, the process of above-mentioned definite matching range specifically comprises:
Step 221, searches first address domain information in matching range;
Step 222, the quantity of searching the address domain information that matching range comprises;
Step 223, limits matching range with the result of step 221 and the result of step 222.
In preferred embodiment of the present invention, the process of above-mentioned definite matching range can complete in one first searches unit.In preferred embodiment of the present invention, first search unit can for one record LLID and address domain information corresponding relation search list (LLID Table).Therefore,, in preferred embodiment of the present invention, in above-mentioned steps 221, the operation of determining first address domain information can be the initial address of determining this matching range.And due in preferred embodiment of the present invention, the length of each address domain information is restricted to 1, so in above-mentioned steps 222, the operation of searching the quantity of the address domain information that matching range comprises can be the length of determining matching range.Be in preferred embodiment of the present invention, can determine according to the original position of address domain information the position of first address domain information, according to its length, determine the quantity of the address domain information that matching range comprises.
In preferred embodiment of the present invention, at each address domain information, comprised a plurality of ownership goal information (Subscriber ID_1-Subscriber ID_X).The process of searching ownership goal information also adopts the mode of sequential search to carry out.
In preferred embodiment of the present invention, add a default address domain information in second searches unit, this default address domain information can be arranged in last position in all address domain informations.In preferred embodiment of the present invention, when matching corresponding address domain information according to the corresponding transmission sequence number information of upstream by PON interface input OLT equipment, the corresponding VLAN sequence number of this upstream is what newly increase, or the VLAN sequence number not yet learnt of OLT equipment, now system is mated default address domain information to this upstream automatically.
Meanwhile, in preferred embodiment of the present invention, the corresponding default ownership goal information of default address domain information.Therefore, in preferred embodiment of the present invention, can, according to default address domain information, be, the ownership goal information corresponding to not being preset in an acquiescence of upstream distribution of the VLAN sequence number in OLT equipment.
In preferred embodiment of the present invention, comprised the objective attribute target attribute of a plurality of correspondences under each ownership goal information, these objective attribute target attributes are arranged in the memory cell of a correspondence.Further, this memory cell comprises a plurality of independently memory modules, and each memory module correspondence is preserved all objective attribute target attributes under an ownership goal information.In preferred embodiment of the present invention, said memory cells can be an attribute list (Per Subscribe Behavior Table).
Next the ownership goal of downstream data flow is distributed and elaborated.
In preferred embodiment of the present invention, the OLT equipment of corresponding upstream is exported treated upstream by its NNI interface, and the OLT equipment of opposite end receives the downstream data flow transmitting from external network by NNI interface.Therefore,, in preferred embodiment of the present invention, in an EPON system, upstream is always corresponding to a downstream data flow.
Further, in preferred embodiment of the present invention, downstream data flow distributing user target information is mainly realized to coupling by the entrained target address information (MAC Address) of downstream data flow.Target address information ordinary representation the MAC Address of the downstream data flow subscriber equipment that will transfer to.The target address information that Switching Module comprises according to downstream data flow, for the ownership goal information that this downstream data flow distributes MAC up study in this address to distribute, accomplishes that downlink user target information is consistent.
In preferred embodiment of the present invention, if downstream data flow does not comprise corresponding target address information, or the target address information that downstream data flow comprises can not match with default target address information, be that downstream data flow is broadcast or unknown unicast, be not this downstream data flow distributing user target information, do not carry out the processing of lower line discipline.
In preferred embodiment of the present invention, the above-mentioned data flow from PON interface input ONU equipment, is all detected as upstream.
Above the described process that realizes VLAN conversion can be as shown in Fig. 5-6.The flow process of in preferred embodiment of the present invention, upstream being processed has been shown in Fig. 5, wherein Rx llid is for receiving the step of LLID, in LLID Table, search original position (start) and the length (length) of VLAN Domain, and determine the matching range (having comprised VLAN Domain_0-VLAN Domain_X) as shown in VLAN Domain Table.Region value information in sequential search matching range, and definite corresponding ownership goal information (Subscriber ID) subsequently.In Fig. 5, the latter linked of subscriber ID is each attribute of its correspondence.
On the basis of technique scheme, core concept of the present invention is, according to default transformation rule, the upstream that is provided with different CVLAN labels to corresponding to (coming from an ONU transmission) under same LLID, distributes corresponding different Subscriber ID according to the difference of its CVLAN label; For downstream data flow, the target address information comprising according to each downstream data flow (MAC Address of target device) distributes a corresponding Subscriber ID to it, and the Subscriber ID that this Subscriber ID and this downstream data flow are assigned with when up matches.While stating transformation rule in realization, can accomplish that single Subscrbier ID is only corresponding to single up-downgoing data flow, for needing to be converted into for example SVLAN100 of same SVLAN(under same LLID) many data flow, because the MAC Address of its target device is different, correspondingly be assigned with different Subscriber ID, therefore can adopt different Subscriber ID to realize the different switching under same LLID with the data flow of different CVLAN labels, can solve completely and cannot the in the situation that of descending N:1, to the up-downgoing data flow of sending in same ONU equipment, carry out the problem of different switching.
Determine after ownership goal information, according to this ownership goal information, at processing rule, concentrate and find corresponding data rule (Subscriber ID keys), to determine, the attribute under this ownership goal information is done to which kind of restriction; In preferred embodiment of the present invention, as shown in Figure 5, Long rule, short rule and VLANrule etc. are the respective rule in data rule; L2key is the data rule of two layers of VLAN, and corresponding L3key is the data rule of three layers of VLAN, by that analogy.Search subsequently the corresponding operation rules of this data rule (Subscriber ID fib), and according to the data rule finding and operation rules, this upstream is done to corresponding operation.In preferred embodiment of the present invention, as shown in Figure 5, Subscriber ID fib latter linked is the specific rules in operation rules.
The flow process of in preferred embodiment of the present invention, downstream data flow being processed has been shown in Fig. 6.Wherein Rx nni represents to flow from NNI interface downlink data receiving.In preferred embodiment of the present invention, the entrained target address information of this downstream data flow is MAC1, and as shown in Figure 6, the destination address of this downstream data flow (DA) is MAC1, and ownership goal information (SUB) is subscriber1(sub1).In preferred embodiment of the present invention, by this target address information MAC1, obtain corresponding ownership goal information (Subscriber ID), above-mentioned search procedure is searched in list (L2Table) and is carried out at two layers of VLAN.Subsequently, be similar to shown in Fig. 5, obtain corresponding data rule and operation rules, and operate accordingly.
The foregoing is only preferred embodiment of the present invention; not thereby limit embodiments of the present invention and protection range; to those skilled in the art; should recognize that being equal to that all utilizations specification of the present invention and diagramatic content done replace and the resulting scheme of apparent variation, all should be included in protection scope of the present invention.