A kind of label distribution method, device and systemA kind of label distribution method, device and system technical field
The present invention relates to the communications field, more particularly to a kind of label distribution method, device and system.Background technology
At present, (Border Gateway Pro say tocol, Border Gateway Protocol to BGP)/ MPLS (Multiprotocol Label Switch, multiprotocol label switching)VPN (Virtual Private Network, Virtual Private Network)Technology has tended to be ripe and stably, using also more and more extensive.In the art, data are forwarded the packet by label, thus involve the label method of salary distribution.The existing label method of salary distribution has following two:
Book
Firstth, the label method of salary distribution based on route, the label method of salary distribution is that (there is provided business border by Provider Edge in PE)To from CE (Customer Edge, user border on router)One different label of every route assignment that router is acquired.
Secondth, the label method of salary distribution based on VPN, the label method of salary distribution is for the same label of all route assignments inside a VPN.
During the present invention is realized, inventor has found that prior art at least has problems with:
In order to save label resources, various network deployment scenarios need to use the label method of salary distribution based on VPN as far as possible.But, this label method of salary distribution based on VPN is not particularly suited for CSC (Carrier Supporting Carrier, the operator of operator)The scenes such as scene, cross-domain Option B scenes and cross-domain Option C scenes.In above-mentioned scene, if all using the label method of salary distribution based on VPN in each equipment, tunnel can not be just set up between PE equipment to transmit data, therefore, the tagged manner based on route can only be used.
In the case where route amount is larger, the label resources consumption in the PE equipment under foregoing scene is very big, and (Incoming Label Map, enter label mapping table to equipment I LM)The list item safeguarded is needed also to increase, so that the requirement to place capacity is very high.The content of the invention
In order to overcome prior art big defect of label resource consumption under the scenes such as CSC scenes, cross-domain Option B scenes and cross-domain Option C scenes, the invention provides a kind of label distribution method, device and system.The technical scheme is as follows:A kind of label distribution method, methods described includes:The feature of route is matched according to matching condition, matching result is obtained, the matching condition includes:The feature of the route whether be as defined in feature and/or a plurality of route feature it is whether identical;And
It is the corresponding label method of salary distribution of the Route Selection according to the matching result, the label method of salary distribution includes:The label method of salary distribution based on route, the label method of salary distribution based on VPN, the label method of salary distribution based on interface and the label method of salary distribution based on next-hop.
A kind of label distribution device, described device includes:
Matching module, the feature for matching route according to matching condition, obtains matching result, the matching condition includes:The feature of the route whether be as defined in feature and/or a plurality of route feature it is whether identical;And
Performing module, for being the corresponding label method of salary distribution of the Route Selection according to the matching result of the matching module, the label method of salary distribution includes:The label method of salary distribution based on route, the label method of salary distribution based on VPN, the label method of salary distribution based on interface and the label method of salary distribution based on next-hop.
A kind of label distribution system, the system includes:Belong to the multiple first providers border router and first user's border router of the first autonomous system and belong to the multiple second providers border router and second user border router of the second autonomous system, at least one first provider border router and at least one second provider's border router are connected with each other, and foregoing label distribution device is provided with first provider border router of the interconnection and second provider's border router.
The beneficial effect of technical scheme provided in an embodiment of the present invention is:The corresponding label method of salary distribution is selected by matching the feature of route, label resources can be effectively saved.In addition, by the way that the label method of salary distribution is corresponding with the feature routeing, so as to carry out unified management to the label method of salary distribution, using relatively flexibly, being conducive to according to the new label method of salary distribution of the increase in demand of network deployment scenarios.Brief description of the drawings
Fig. 1 is the flow chart for the label distribution method that the embodiment of the present invention 1 is provided;
Fig. 2 a are the network architecture diagrams of an application of the label distribution method that the embodiment of the present invention 2 is provided;
Fig. 2 b are the flow charts for the label distribution method that the embodiment of the present invention 2 is provided;
Fig. 3 a are the network architecture diagrams of an application of the label distribution method that the embodiment of the present invention 3 is provided;
Fig. 3 b are the flow charts for the label distribution method that the embodiment of the present invention 3 is provided;
Fig. 4 a are the network architecture diagrams of an application of the label distribution method that the embodiment of the present invention 4 is provided;
Fig. 4 b are the flow charts for the label distribution method that the embodiment of the present invention 4 is provided;
The structured flowchart for the label distribution device that Fig. 5 embodiment of the present invention 5 is provided.Embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
Embodiment 1
As shown in figure 1, present embodiments providing a kind of label distribution method, it comprises the following steps:
101:The feature of route is matched according to matching condition, matching result is obtained, matching condition includes:The feature of the route whether be as defined in feature and/or a plurality of route feature it is whether identical.
Specifically, the feature of foregoing route includes:Route prefix, the VPN labels for routeing mask-length, BGP routing properties and route.
Correspondingly, foregoing matching condition includes:Route mask-length whether be defined length, route prefix whether be defined route prefix, a plurality of route whether VPN label identical and next-hop of a plurality of route it is whether identical in one or more combinations.
102:It is the corresponding label method of salary distribution of Route Selection according to matching result.
Specifically, the aforementioned label method of salary distribution includes:The label method of salary distribution based on route(Often it route per label), the label method of salary distribution based on VPN(Per VPN per label), the label method of salary distribution based on interface(Per interface per label)And the label method of salary distribution based on next-hop(Per next-hop per label), the also referred to as label method of salary distribution based on neighbours of the label method of salary distribution based on next-hop(Per neighbours per label).
The embodiment of the present invention selects the corresponding label method of salary distribution by matching the feature of route, can effectively save label resources.In addition, by the way that the label method of salary distribution is corresponding with the feature routeing, so as to carry out unified management to the label method of salary distribution, using relatively flexibly, being conducive to according to the new label method of salary distribution of the increase in demand of network deployment scenarios.Embodiment 2
The present embodiment illustrates the label distribution method of the embodiment of the present invention by taking CSC scenes as an example.
CSC scenes refer to such a network model:Some large-scale operators directly to client in addition to providing VPN services, also a part of Internet resources bag operator small-sized to some can be carried on the work, that is, the user of BGP/MPLS VPN service providers is also likely to be a service provider in itself, in this case, the former is referred to as one-level operator, and the latter is referred to as second-level runner.
As shown in Figure 2 a, AS (Autonomous System, autonomous system):200 corresponding operators are one-level operator, AS:100 corresponding operators are second-level runner.The CE of one-level operator, such as CE1 are only the road inside second-level runnerBy being distributed to the PE of one-level operator, such as PE1, without issuing second-level runner client(It is not shown)Route.That is, for one-level operator, the route of the PE equipment rooms of second-level runner is the VPN-IPv4 routes of one-level operator, and the route of second-level runner is invisible in one-level operator.The route quantity for needing to safeguard in one-level carrier network can so be reduced.
Because under the scene, the route of second-level runner client is sightless for one-level operator, so the flow of second-level runner client has to pass through encapsulation, that is, one-level operator can just be passed through by tunnel reaches distant client website.This requires the PE equipment in second-level runner, as set up tunnel end to end between PE3 and PE4, and tunnel must be set up between two hosts end to end, that is, different PE (32 Host routes in the PE equipment of one-level operator for second-level runner)There must be different labels just to can guarantee that the foundation in end-to-end tunnel.So, in this case, in the PE equipment of one-level operator, for the different PE equipment in the same VPN of second-level runner, it is impossible to share a label, otherwise tunnel can not just be set up.That is, the label method of salary distribution based on VPN can not be disposed in the PE equipment of one-level operator, the label method of salary distribution based on route can only be used, label consumption is very big.
In this case, as shown in Figure 2 b, the label distribution method of the present embodiment includes:
201:The feature of route is matched according to matching condition, matching result is obtained, matching condition includes:The feature of the route whether be as defined in feature and/or a plurality of route feature it is whether identical.
Specifically, for the embodiment of the present invention, in ASBR (the Autonomous System Border Router, Autonomous System Boundary Router, AS Boundary Router of second-level runner), i.e., the feature of route is matched on the CE1 and CE2 in figure.The feature of the route can be route prefix and route mask-length or be only route mask-length.Correspondingly, in the present embodiment, the matching condition includes whether route prefix is whether predetermined prefix and route mask-length are 32 or only include whether route mask-length is 32.
Specifically matching process is:By every route and ACL (Access Control-List, accesses control list)The route of middle configuration is matched, and the route prefix and mask-length of 32 Host routes are configured with the ACL or route mask-length is only configured with.Further, according to the different content configured in ACL, following two matching ways can be used:Firstth, when ASBR receives route, the route prefix and mask-length of route are detected, by the route prefix and mask-length of route and ACL (Access Control-List, accesses control list)In configuration match, here the route prefix of the route on the Loopback interface IP addresses for the PE equipment that the configuration in ACL includes second-level runner and route mask-length, for example, it is 1. 1. 1. 1 (mask-length is 32), 2. 2. 2. 2 (mask-length is 32) of route that route prefix is configured in ACL.If meeting matching condition, i.e. route prefix and mask-length is all eligible, then judges the route as the route on the Loopback interface IP addresses of the PE equipment of 32 Host routes, i.e. second-level runner.
Secondth, when ASBR receives route, the configuration in the mask-length and ACL of route is matched, here, in ACLThe mask-length that is configured to be the route of 32, if meeting matching condition, that is, whether the mask-length routeing is 32, then judge the route as 32 Host routes.In both modes, the former can improve the route on the degree of accuracy of matching result, i.e., the Loopback interface IP addresses for the PE equipment that second-level runner is accurately matched by route prefix list, but configuration parameter amount is more;And the latter can save configuration, that is, all 32 Host routes are matched, both modes can be selected according to actual needs.
202:Matching result is that the route is 32 Host routes, using the label method of salary distribution based on route.
Specifically, for the route matched in step 201, the ASBR of second-level runner uses the label method of salary distribution based on route, the different label of different route assignments.
203:Matching result be it is described route be outside 32 Host routes the network segment route, to the network segment route do not distribute label.
Pass through above-mentioned steps 201-203, in the ASBR of second-level runner, the matching of route characteristics is carried out i.e. in the CE equipment of one-level operator, so as on the ASBR of second-level runner to 32 route implementings the label method of salary distribution based on route, that is, the CE of one-level operator, that is to the route on the Loopback interface IP addresses of the PE equipment of second-level runner on the PE1 and PE2 in Fig. 2 a, the label method of salary distribution based on route, the label different to different route assignments are used.It is that different PE set different labels so as to distinguish the different PE of second-level runner in the CE equipment of one-level operator.When the PE of one-level operator is received from 32 routes that the CE of one-level operator comes, because it carries different labels, so the PE of one-level operator can also distribute different labels for these routes with different labels, that is, in the PE equipment of one-level operator, to 32 Host routes of the PE equipment of second-level runner, also the label method of salary distribution based on route is used, so, can be between the PE equipment of second-level runner, as set up tunnel end to end between PE3 and PE4, so as to ensure the transmission of data.Simultaneously for other network segments route, the ASBR of second-level runner, the i.e. CE of one-level operator do not distribute label for it, with it is existing to all routes all using the label method of salary distribution based on route compared with, effectively save label resources.Because the ASBR of second-level runner is not other network segment route assignment labels, when the route that the PE of the one-level operator CE for receiving one-level operator are sent, for these routes without label, network segment route in i.e. same VPN instance, same label is distributed, and then label resources can also be effectively saved in the PE equipment of one-level operator.
In the PE equipment of second-level runner, then using the label method of salary distribution based on VPN instance or the label method of salary distribution based on interface.Because the ASBR of second-level runner can distinguish 32 Host routes of the PE equipment of second-level runner, tunnel is set up between the PE equipment of second-level runner, so the label method of salary distribution based on VPN instance or the label method of salary distribution based on interface can be used in the PE equipment of second-level runner, and then label resources can also be saved in the PE equipment of second-level runner.Embodiment 3
As shown in Figure 3 a, the present embodiment illustrates the label distribution method of the present invention by taking cross-domain VPN Option C scenes as an example.Under the scene, ASBR is not safeguarded or issued in VPN-IPv4 routes, different AS, the AS in such as figure:100 and AS:200 PE, such as RR-1 (Route Reflector, Router Reflector)The EBGP connections of Multihop modes are set up between RR-2, direct switched vpc N-IPv4 routes, ASBR passes through MP-IBGP (Multi-Protocol internal BGP, multi-protocols Internal BGP)Into respective AS PE equipment issue IPv4 label routings, and by reach this AS in PE equipment IPv4 label routings notify to it opposite end AS ASBR peer-to-peers.The purpose of issue IPv4 label routings be in order to which the tunnel in respective domain is bonded together, so as to form PE equipment in different AS domains, the tunnel end to end between such as PE2 and PE4.
Because ASBR does not safeguard that VPN-IPv4 is route, IPv4 label routings are only issued, that is to say, that, ASBR can not learn which VPN is routes belong to, so the label method of salary distribution based on VPN can not be used, the label method of salary distribution based on route can only be used, label consumption is big.
In this case, as shown in Figure 3 b, the label distribution method of the present embodiment comprises the following steps.
301:The feature of route is matched according to matching condition, matching result is obtained, matching condition includes:The feature of the route whether be as defined in feature and/or a plurality of route feature it is whether identical.
Specifically, for the embodiment of the present invention, the feature of route is matched on ASBR.The feature of the route can be route prefix and route mask-length or be only route mask-length.Correspondingly, in the present embodiment, the matching condition includes whether route prefix is whether predetermined prefix and route mask-length are 32 or only include whether route mask-length is 32.
Specifically matching process is:Every route is matched with the route configured in accesses control list, the route prefix and mask-length of 32 Host routes are configured with the accesses control list or route mask-length is only configured with.It is possible to further use following two matching ways:
Firstth, when ASBR receives route, the route prefix and mask-length of route are detected, by the route prefix and mask-length of route and ACL (Access Control-List, accesses control list)In configuration match, here the configuration in ACL includes the route prefix and route mask-length of the route on the Loopback interface IP addresses of PE equipment, for example, it is 1. 1. 1. 1 (mask-length is 32), 2. 2. 2. 2 (mask-length is 32) of route that route prefix is configured in ACL.If meeting matching condition, i.e. route prefix and mask-length is all eligible, then judges the route as the route on the Loopback interface IP addresses of 32 Host routes, i.e. PE equipment.
Secondth, when ASBR receives route, the configuration in the mask-length and ACL of route is matched, here, in ACLThe mask-length that is configured to be the route of 32, if meeting matching condition, that is, whether the mask-length routeing is 32, then judge the route as 32 Host routes. 302:Matching result is that the route is 32 Host routes, using the label method of salary distribution based on route for the route matched in step 301, uses the label method of salary distribution based on route, the different label of different route assignments.And in PE equipment, then using the label method of salary distribution based on VPN instance or the label method of salary distribution based on interface.
For other network segments route, i.e., the route of non-32 can distribute label(As used the label method of salary distribution based on next-hop), label can not also be distributed.
The present embodiment on ASBR by matching the feature of route, match 32 Host routes of PE equipment, and employ the label method of salary distribution based on route for 32 Host routes of PE equipment, that is, on ASBR the label method of salary distribution based on route is employed only for the route on the Loopback interface IP addresses of PE equipment, so, for different PE (32 Host routes in ASBR equipment)Different labels are just provided with, so as to set up the tunnel end to end from PE2 to PE4, so as to ensure the transmission of data.Simultaneously for other network segments route, label is not distributed or the label method of salary distribution based on next-hop is used, with it is existing to all routes all using the label method of salary distribution based on route compared with, effectively save label resources.
In PE equipment, then using the label method of salary distribution based on VPN instance or the label method of salary distribution based on interface.Due to
ASBR can distinguish 32 Host routes of PE equipment, tunnel is set up between PE equipment, so the label method of salary distribution based on VPN instance or the label method of salary distribution based on interface can be used in PE equipment, and then label resources are also saved in PE equipment.Embodiment 4
As shown in fig. 4 a, the present embodiment illustrates the label distribution method of the present invention by taking cross-domain VPN Option B scenes as an example.Under the scene, ASBR1 and ASBR2 in the ASBR in different AS, i.e. figure pass through MP-EBGP (Multi-Protocol extension BGP, multi-protocols External BGP)The VPN_IPv4 routes that they are received from respective AS PE equipment are exchanged, then the route learnt from other side are sent to the PE equipment in domain.ASBR1 and ASBR2 is when transmitting route, need to change the next-hop routeing, the next-hop of route is changed into ASBR1 when the routing forwarding that PE learns out of domain is given overseas ASBR2 by ASBR1, and when ASBR1 by the routing forwarding learnt from ASBR2 to PE in domain when, next-hop is also changed into ASBR1.In order to save label resources, the PE equipment in each AS, such as PE1 can use the label method of salary distribution based on VPN or the label method of salary distribution based on interface.And in order to ensure the stability of network, a CE equipment, such as CE1 would generally be by two PE equipment, such as PE1 and another unshowned PE equipment are connected with ASBR1, and one of them is used for route stand-by.In this case, if ASBR1 also uses the label method of salary distribution based on VPN, route so from the two PE equipment will be assigned to same label, during data transfer, which PE equipment ASBR1 can not be judged the data forwarding received to, that is, the tunnel of transmission data can not be set up.Same, according to the label method of salary distribution based on interface, an ASBR interface can receive the route from different PE equipment, after the same label of these route assignments, when ASBR receives data, it can not equally judge which PE sent it to, the tunnel of transmission data can not be set up.So in such a scenario, prior art can only also use the label method of salary distribution based on route, label consumption is very big.
As shown in Figure 4 b, the label distribution method of the present embodiment comprises the following steps.
401:The feature of route is matched according to matching condition, matching result is obtained, matching condition includes:The feature of the route whether be as defined in feature and/or a plurality of route feature it is whether identical.
Specifically, on ASBR respectively the VPN label for a plurality of route that coupling learning is arrived and route next-hop, obtain matching result.If VPN label is identical, illustrate that these routes come from same VPN instance, if the next-hop of route is identical, illustrate these routes by same PE device forwards.That is, in the present embodiment, whether matching condition is identical for the feature of a plurality of route.Further, whether matching condition is identical for the next-hop of the whether identical and a plurality of route of VPN label of a plurality of route.
402:It is the corresponding label method of salary distribution of the Route Selection according to the matching result.
Specifically, if the VPN label of route is identical and next-hop is identical, and VPN label identical route assignment same label identical to next-hop, and for the different route of VPN label or next-hop, different labels are distributed.This method of salary distribution is referred to as the label method of salary distribution based on next-hop, also referred to as the label method of salary distribution based on neighbours.
The matching that the label distribution method of the present embodiment passes through the progress route characteristics on ASBR, for next-hop is identical and VPN labels identical route uses the label method of salary distribution based on next-hop, because route overseas in domain is required for label being changed into the label that is locally-assigned on ASBR, so using the label method of salary distribution based on next-hop, it can avoid foregoing during data transfer, ASBR1 can not judge the situation to which PE equipment by the data forwarding received, set up so as to set up from PE to ASBR, ASBR is set up to overseas ASBR tunnel out of domain again, that is, the embodiment of the present invention effectively can save label resources on the premise of correct route, ensure the transmission of data.Embodiment 5
As shown in figure 5, the embodiments of the invention provide a kind of label distribution device, the device includes:
Matching module 501, the feature for matching route according to matching condition, obtains matching result, matching condition includes:The feature of the route whether be as defined in feature and/or a plurality of route feature it is whether identical;
Performing module 502, for being the corresponding label method of salary distribution of the Route Selection according to the matching result of matching module 501,The label method of salary distribution includes:The label method of salary distribution based on route, the label method of salary distribution based on VPN, the label method of salary distribution based on interface and the label method of salary distribution based on next-hop.
Specifically, the feature of foregoing route includes:Route prefix, the VPN label for routeing mask-length, Border Gateway Protocol routing property and route.Correspondingly, foregoing matching condition includes:Route mask-length whether be defined length, route prefix whether be defined route prefix, a plurality of route whether VPN label identical and next-hop of a plurality of route it is whether identical in one or more combinations.
Alternatively, matching module 501 includes:
Mask-length matching unit, for being matched according to accesses control list to the mask-length of every route;Or route prefix matching unit, for every route to be matched with the route prefix configured in accesses control list.Alternatively, matching module 501 includes:
Tag match unit, the VPN label for matching route;
Next-hop matching unit, the next-hop for matching route.
Label distribution in label distribution device and embodiment of the method that the present embodiment is related to belongs to same design, and it implements process and refers to embodiment of the method, repeats no more here.
It it should be noted that the device can be only fitted in PE equipment, can also configure on ASBR, can be selected according to different network deployment scenarios.
As it was previously stated, the embodiment of the present invention for the corresponding label method of salary distribution of Route Selection, can effectively save label resources by matching the feature of route.In addition, by the way that the label method of salary distribution is corresponding with the feature routeing, so as to carry out unified management to the label method of salary distribution, using relatively flexibly, being conducive to according to the new label method of salary distribution of the increase in demand of network deployment scenarios.Embodiment 6
The embodiments of the invention provide a kind of label distribution system, the system includes:Belong to the multiple first providers border router and first user's border router of the first autonomous system and belong to the multiple second providers border router and second user border router of the second autonomous system, at least one first provider border router and at least one second provider's border router are connected with each other, and aforementioned label distributor is provided with first provider border router of the interconnection and second provider's border router.Further, in fig. 2 a, AS:100 be the first autonomous system, AS:200 be the second autonomous system, CE1, CE2, PE3, PE4 are first provider's border router, PE1, PE2 are second provider's border router, and CE1 and CE2 are also represented by being provided with aforementioned label distributor on first user's border router, CE1 and CE2.In fig. 3 a, AS:100 be the first autonomous system, AS:200 be the second autonomous system, ASBR1, PE1, PE2 are first provider's border router, CE1, CE2 are first user's border router, ASBR2, PE3, PE4 are second provider's border router, CE3, CE4 are to be provided with aforementioned label distributor on second user border router, ASBR1 and ASBR2.
In fig .4, AS:100 be the first autonomous system, AS:200 be the second autonomous system, ASBR1, PE1, PE2 are first provider's border router, CE1, CE2 are first user's border router, ASBR2, PE3, PE4 are second provider's border router, CE3, CE4 are to be provided with aforementioned label distributor on second user border router, ASBR1 and ASBR2.One of ordinary skill in the art will appreciate that realizing all or part of step of above-described embodiment can be completed by hardware, the hardware of correlation can also be instructed to complete by program, described program can be stored in a kind of computer-readable recording medium, storage medium mentioned above can be read-only storage, disk or CD etc..Presently preferred embodiments of the present invention is the foregoing is only, is not intended to limit the invention, within the spirit and principles of the invention, any modification, equivalent substitution and improvements made etc. should be included in the scope of the protection.