Embodiment
In order to make purpose of the present invention, technical scheme and advantage clearer, below by specific embodiment and referring to accompanying drawing, the present invention is described in detail.
Among the application, the one PE and the 2nd PE be BGP VPNv4 or VPNv6 neighbours each other, the one PE obtains at least one private network tags, and for each private network tags in the described private network tags, encapsulation contains the route withdraw message of this private network tags and sends it to the 2nd PE; Described route withdraw message is used for triggering the 2nd PE according to the private network tags of described route withdraw message, deletion is with whole VPNv4s or the VPNv6 route of described private network tags as outgoing label in VPNv4 or VPNv6 routing table, namely trigger described the 2nd PE and resolve described route withdraw message, extract in the described route withdraw message private network tags and with it as index, in VPNv4 or VPNv6 routing table, deletion is with whole VPNv4s or the VPNv6 route of described private network tags as outgoing label.That is to say, use a route withdraw message that contains above-mentioned private network tags, just can delete in batches VPNv4 or VPNv6 route, thereby can greatly reduce because send PE equipment and the offered load that too much route withdraw message causes.
The method flow of the embodiment of the present application one as shown in Figure 2, the method for a kind of batch deletion VPNv4 or VPNv6 route may further comprise the steps:
Step 201: the first provider edge router (PE) obtains at least one private network tags.
The private network tags here is that a PE this locality is distributed, and obtains private network tags and divides three kinds of scenes, is:
Scene 1: in the Layer3 Virtual Private Network as shown in Figure 1, when the link communication between a PE and the Customer Edge router (CE) breaks down, the one PE inquiry down hop is whether the private network tags of described CE has other forwarding equivalence class FEC to use, if, then a PE sends the route withdraw message to the 2nd PE, and described route withdraw message carries all VPNv4 or the VPNv6 routing iinformation that down hop is described CE.If not, then obtain described private network tags.
Scene 2: when the BGP VPNv4 between a PE and the 3rd PE or VPNv6 Routing Protocol broke, a PE obtained private network tags, and described private network tags is for entering one to one label with outgoing label from the 3rd PE; Wherein, a PE can carry out the private network tags exchange, and the 3rd PE is BGP VPNv4 or the VPNv6 neighbours of a PE and is different from the 2nd PE.The 3rd PE and a PE can be in same territory, also can be cross-domain.
Scene 3: when a PE local deletion VPN route forwarding table (VRF), obtain all private network tags that described VRF distributes.
The back can enumerate three embodiment for these three kinds of scenes and specify: be respectively how to obtain private network tags in each scene, and how utilize the private network tags of obtaining to delete in batches VPNv4 or VPNv6 route.
As preferred embodiment, under above-mentioned three kinds of scenes, after the one PE obtains at least one private network tags, also can utilize described private network tags to delete in batches VPNv4 or the VPNv6 route of a PE this locality, namely a PE with the described private network tags of obtaining as index, in the VPNv4 or VPNv6 routing table of a PE this locality, delete with described private network tags as the whole VPNv4 that enter label or VPNv6 route.
Step 202: a PE is for each private network tags in the described private network tags, and encapsulation contains the route withdraw message of this private network tags and sends it to the 2nd PE; The 2nd PE is Border Gateway Protocol (BGP) VPNv4 or the VPNv6 neighbours of a PE.
The described route withdraw message that contains this private network tags is divided into two types, be VPNv4 route withdraw message and VPNv6 route withdraw message, include following field: the unreachable information prefix length of multi-protocols (MP unreach NLRI Prefix length, be called for short " prefix length "), the unreachable information labels stack of multi-protocols (MP unreach NLRI Label Stack, be called for short " label stack "), the unreachable information router sign of multi-protocols (MP unreach NLRI Route Distinguisher, be called for short " Route Distinguisher "), the unreachable information IPv4 of multi-protocols or IPv6 route prefix (MP unreach NLRI IPv4/IPv6Prefix is called for short " IPv4 or IPv6 route prefix ");
If described route withdraw message is VPNv4 route withdraw message, the signal field is as shown in table 1 below:
MP unreach NLRI Prefix length(prefix length) |
120 |
MP unreach NLRI Label Stack(label stack) |
Label |
MP unreach NLRI Route Distinguisher(Route Distinguisher) |
0:0 |
MP unreach NLRI IPv4/IPv6Prefix(IPv4 or IPv6 route prefix) |
255.255.255.255 |
Table 1
As known from Table 1, the value of label stack is above-mentioned private network tags after the encapsulation, the IPv4 route prefix is 255.255.255.255, and prefix length is 120, is the length of 32 route masks of IPv4, Route Distinguisher is self-defining value, can establish arbitrary value, just passable as long as a PE and the 2nd PE consult, such as being made as 0:0 or 100:0, show it is VPNv4 or VPNv6 route, add that before IPv4 or IPv6 address it has been VPNv4 or VPNv6 address that Route Distinguisher just shows.
If described route withdraw message is VPNv6 route withdraw message, the signal field is as shown in table 2 below:
Table 2
As can be seen from Table 2, the value of label stack is above-mentioned private network tags after the encapsulation, and the IPv6 route prefix is FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF, and prefix length is 216, be the length of 64 route masks of IPv6, Route Distinguisher is self-defining value.
In the existing route withdraw message, the label stack field contents is in disarmed state all the time, and such as being set to 0 or maximum, what IPv4 or IPv6 route prefix were inserted is effective IPv4 or IPv6 address.
In the application's the route withdraw message, what the label stack field was inserted is effective private network tags, the application utilizes this effective private network tags to realize deleting in batches VPNv4 or VPNv6 route just, what IPv4 or IPv6 route prefix were inserted is disabled IPv4 or IPv6 address, such as, the IPv4 address 255.255.255.255 that inserts, or IPv6 address FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF, when resolving the route withdraw message, the back can use these disabled IPv4 or IPv6 address.
Step 203: trigger described the 2nd PE according to the private network tags in the described route withdraw message by the route withdraw message, deletion is with whole VPNv4s or the VPNv6 route of described private network tags as outgoing label in VPNv4 or VPNv6 routing table.
After the 2nd PE receives route withdraw message from a PE, private network tags in the described route withdraw message is resolved and extracted to described route withdraw message, process is as follows:
For VPNv4 route withdraw message, if Route Distinguisher RD is 0:0, judge whether that RD is that 0:0 and IPv4 address are: 255.255.255.255, judge that namely whether the VPNv4 address is: 0:0255.255.255.255, if so, then extract private network tags in the described VPNv4 route withdraw message.
Here actual is to determine first that the IPv4 address is disabled, then just can go to read private network tags, if the IPv4 address is available, has just deleted according to existing procedure, is exactly to have deleted route according to described available IPv4 address.
For VPNv6 route withdraw message, if Route Distinguisher RD is 0:0, judge whether that RD is that 0:0 and IPv6 address are: FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF, judge namely whether the VPNv6 address is 0:0FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF, if so, then extract private network tags in the described VPNv6 route withdraw message.
If above-mentioned judgement for VPNv4 or VPNv6 route withdraw message is no, be that the VPNv4 address is not: Route Distinguisher 255.255.255.255, or the VPNv6 address is not: Route Distinguisher FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF, then according to original flow process deletion VPNv4 or VPNv6 route, namely delete item by item VPNv4 or VPNv6 route according to the IPv4 in the route withdraw message or IPv6 route prefix, rather than delete in batches with private network tags.
The 2nd PE carries out extracting private network tags after the analysis judgment to VPNv4 or the VPNv6 route withdraw message that a PE sends, with described private network tags as index, in the VPNv4 or VPNv6 routing table of the 2nd PE, deletion is with whole VPNv4s or the VPNv6 route of described private network tags as outgoing label.
Preferably, before step 201, in BGP OPEN message, add in advance the optional capability class parameter of supporting to delete in batches with private network tags VPNv4 or VPNv6 route;
Before a PE and the 2nd PE set up BGP VPNv4 or VPNv6 neighbours, the one PE sends the BGPOPEN message, after a PE received the BGP OPEN message that described the 2nd PE sends, the optional capability class of supporting according to the optional capability class parameter of carrying in the described OPEN message that receives and a PE this locality carried out capability negotiation.Capability negotiation mechanism back can be introduced.
Optional capability class parameter in the described OPEN message comprises following field as shown in Figure 3: capability class (Parm.Type), parameter length (Parm.Length); Wherein,
The capability class value is self-defining value consensus between a PE and the 2nd PE, and not identical with arbitrary capability class value of stipulating in the bgp protocol, to avoid conflict, for example:
Delete in batches the capability class of VPNv4 route for supporting with private network tags, the type field can be 101.
Delete in batches the capability class of VPNv6 route for supporting with private network tags, the type field can be 102.
Here 101,102 be self-defining value, it is unimportant that what value is the type field get, as long as consult just passablely between a PE and the 2nd PE, but the value of getting can not be conflicted mutually with arbitrary capability class value of stipulating in the bgp protocol.
Parameter length value (Length field) is 0, reality only needs the information of capability class value to get final product, but in order to meet the negotiation packet reference format of BGP, reads message information when being convenient to carry out capability negotiation between the PE, here kept the Length field, its value is made as 0.
Send mutually above-mentioned OPEN message between the one PE and the 2nd PE, for a PE, the capability negotiation mechanism that support is deleted VPNv4 or VPNv6 route in batches with private network tags is as follows:
1) carries this optional capability class parameter in the OPEN message that the far-end BGP VPNv4 of PE reception or VPNv6 neighbours the 2nd PE send, the one PE does not support this ability, then ignore this optional capability class parameter field, fail to consultations, VPNv4 or VPNv6 route are deleted by original flow process.
2) PE supports this ability, does not carry this optional capability class parameter from the OPEN message that the 2nd PE sends, and fails to consultations, and VPNv4 or VPNv6 route are deleted by original flow process.
3) carry this optional capability class parameter in the OPEN message that the 2nd PE of PE reception sends, a PE also supports this ability, then consults successfully, supports between a PE and the 2nd PE to delete in batches VPNv4 or VPNv6 route with private network tags.
For the 2nd PE, process equally after receiving the OPEN message that a PE sends.
Described optional capability class parameter comprises following field: capability class, parameter length; Wherein, the capability class value be a PE with the 2nd PE between consensus self-defining value and not with bgp protocol in arbitrary capability class value of stipulating identical, the parameter length value is 0.
The below enumerates three embodiment for above-mentioned three kinds of scenes and specifies: be respectively how to obtain private network tags in each scene, and how utilize the private network tags of obtaining to delete in batches VPNv4 or VPNv6 route.VPNv4 or VPNv6 route withdraw message format among following three embodiment are identical with embodiment one.
The method flow of the embodiment of the present application two may further comprise the steps as shown in Figure 4:
Step 401: when the link communication between a PE and the CE breaks down, do not have other forwarding equivalence class FEC to use if down hop is the private network tags of described CE, then obtain described private network tags.
In the Layer3 Virtual Private Network as shown in Figure 1, when the link communication between a PE and the CE breaks down, shake such as link, then a PE is the direct-connected route deletion of private network interface of described CE with down hop, the one PE inquires about down hop in its VPNv4 or VPNv6 route table items be whether the private network tags of described CE has other forwarding equivalence class FEC to use, and judges whether that namely other route next jump is used:
If have, then according to prior art deletion VPNv4 or VPNv6 route.
If no, then a PE discharges this private network tags from its VPNv4 or VPNv6 route table items, thereby obtains this private network tags.
Here why will carry out the operation of above-mentioned inquiry, be that each VPN only divides a label because the PE equipment of the manufacturers produce that has is at present applied for private network tags by VPN; How many down hops the PE equipment of the manufacturers produce that has has what private network tags are just arranged by VPN route next jump application private network tags in the VPN route.For the PE equipment of pressing VPN application private network tags, if by private network tags deletion route, the route that then breaks down except meeting deletion down hop also can be deleted the routing iinformation of many normal operations by mistake.
Therefore, among the application, for taking into account the PE equipment of present two class manufacturer production, before obtaining private network tags, must guarantee that described private network tags does not have other forwarding equivalence class FEC to use, therefore, as preferred embodiment, whether the private network tags that need to inquire about first down hop and be above-mentioned CE also has other forwarding equivalence class FEC to use, if have, just can not delete in batches VPNv4 or VPNv6 routing iinformation according to private network tags, but according to the method for cancelling VPNv4 or VPNv6 route in the prior art, namely a PE sends the route withdraw message to the 2nd PE, and described route withdraw message carries all VPNv4 or the VPNv6 routing iinformation that down hop is described CE, after the 2nd PE receives described route withdraw message, can only delete item by item according to a large amount of VPNv4 that carry in the described route withdraw message or VPNv6 routing iinformation.
Step 401 is corresponding to the step 201 of embodiment one.
Step 402: PE encapsulation contains the route withdraw message of this private network tags and sends it to the 2nd PE, described route withdraw message is used for triggering described the 2nd PE according to the private network tags of described route withdraw message, and deletion is with whole VPNv4s or the VPNv6 route of described private network tags as outgoing label in VPNv4 or VPNv6 routing table.
Be that described route withdraw message is resolved described route withdraw message for triggering the 2nd PE, extract the private network tags in the described route withdraw message, with the private network tags extracted as index, in VPNv4 or VPNv6 routing table, deletion is with whole VPNv4s or the VPNv6 route of described private network tags as outgoing label.
After the one PE gets access to private network tags, encapsulate VPNv4 or a VPNv6 route withdraw message that contains described private network tags, here take VPNv4 route withdraw message as example, the processing of VPNv6 route withdraw message is similar, VPNv4 route withdraw message is as shown in table 1, described VPNv4 route withdraw message is sent to the 2nd PE, and the 2nd PE resolves it after receiving described VPNv4 route withdraw message, judges namely whether the VPNv4 address is 0:0255.255.255.255:
If so, then extract the private network tags in the described VPNv4 route withdraw message, as index, in the VPNv4 routing table, deletion is with the whole VPNv4 routes of described private network tags as outgoing label with the private network tags extracted;
If not, then according to the prior art deletion, namely according to the deletion of the IPv4 route prefix in described VPNv4 route withdraw message VPNv4 route.
Step 202, the step 203 of the corresponding embodiment one of step 402.
Preferably, before step 401, a PE is identical with embodiment one with the process that the 2nd PE carries out capability negotiation.
The method flow of the embodiment of the present application three may further comprise the steps as shown in Figure 5:
Step 501: when the BGP VPNv4 between a PE and the 3rd PE or VPNv6 Routing Protocol broke, a PE obtained private network tags, and described private network tags is for entering one to one label with outgoing label from the 3rd PE; Wherein, a PE can carry out the private network tags exchange, and the 3rd PE is BGP VPNv4 or the VPNv6 neighbours of a PE and is different from the 2nd PE.
Step 501 is corresponding to the step 201 of embodiment one.Illustrate as follows:
In the cross-domain networking of OptionB class as shown in Figure 6, ASBR-PE is Autonomous System Boundary Router, AS Boundary Router, it also is provider edge router, ASBR-PE1(the one PE) can carry out the private network tags exchange, thereby the BGP LSP(label switched path of ASBR-PE1) can have one or more outlabel(outgoing label in the private network list item) enter label with inlabel() list item one to one, wherein the outlabel on the ASBR-PE1 is by downstream PE 1(the 3rd PE) distribute, inlabel is that ASBR-PE1 distributes to upstream AS BR-PE2(the 2nd PE) use, when ASBR-PE1 and PE1 and between BGP VPNv4 or VPNv6 Routing Protocol when breaking, ASBR-PE1 is one or more at the upstream private network tags outlabel(that cancels from PE1) in, according to the corresponding list item of outlabel with inlabel, obtain that private network tags inlabel(is one or more one to one with described upstream private network tags outlabel from PE1).
Step 502: a PE is for each private network tags in the described private network tags, encapsulation contains the route withdraw message of this private network tags and sends it to the 2nd PE, described route withdraw message is used for triggering described the 2nd PE according to the private network tags of described route withdraw message, and deletion is with whole VPNv4s or the VPNv6 route of described private network tags as outgoing label in VPNv4 or VPNv6 routing table.
After the one PE gets access to private network tags inlabel, all inlabel are packaged into VPNv4 or the VPNv6 route withdraw message that contains described private network tags inlabel according to table 1 or table 2, be sent to the 2nd PE, after the 2nd PE receives the route withdraw message, resolve described route withdraw message, extract the private network tags inlabel in the route withdraw message, according to described private network tags, delete in batches VPNv4 or VPNv6 route, the processing that the 2nd PE receives behind the route withdraw message is identical with embodiment one, does not repeat them here.
Step 502 is corresponding to step 202, the step 203 of embodiment one.
Preferably, before step 501, a PE is identical with embodiment one with the process that the 2nd PE carries out capability negotiation.
The method flow of the embodiment of the present application four may further comprise the steps as shown in Figure 7:
Step 701: when a PE local deletion VPN route forwarding table (VRF), obtain all private network tags that described VRF distributes.
When the local deletion of PE VRF table, a PE is when cancelling the private network tags inlabel of all these VRF distribution, and all private network tags inlabel(that obtain described VRF distribution are one or more).
Step 701 is corresponding to the step 201 of embodiment one.
Step 702: a PE is for each private network tags in the described private network tags, encapsulation contains the route withdraw message of this private network tags and sends it to the 2nd PE, described route withdraw message is used for triggering described the 2nd PE according to the private network tags of described route withdraw message, and deletion is with whole VPNv4s or the VPNv6 route of described private network tags as outgoing label in VPNv4 or VPNv6 routing table.
The one PE is packaged into VPNv4 or the VPNv6 route withdraw message that contains described private network tags inlabel with all private network tags inlabel that obtain according to table 1 or table 2, be sent to the 2nd PE, the 2nd PE is BGP VPNv4 or the VPNv6 routing neighbor of a PE, the processing that the 2nd PE receives behind the route withdraw message is identical with embodiment one, does not repeat them here.
Step 702 is corresponding to step 202, the step 203 of embodiment one.
Preferably, before step 701, a PE is identical with embodiment one with the process that the 2nd PE carries out capability negotiation.
The PE functions of the equipments structural representation of the embodiment of the present application as shown in Figure 8, a kind of provider edge router (PE) comprising: label acquisition module, message package module and packet sending and receiving module; Wherein,
The label acquisition module is used for obtaining at least one private network tags;
The message package module is used for each private network tags for described private network tags, and encapsulation contains the route withdraw message of this private network tags;
The packet sending and receiving module, the route withdraw message after being used for encapsulating is sent to the 2nd PE, and the 2nd PE is VPNv4 or the VPNv6 neighbours of the Border Gateway Protocol (BGP) of described provider edge router PE; Described route withdraw message is used for triggering described the 2nd PE according to the private network tags of described route withdraw message, and deletion is with whole VPNv4s or the VPNv6 route of described private network tags as outgoing label in VPNv4 or VPNv6 routing table.
Preferably, described provider edge router also comprises the capability negotiation module, also be used for adding the optional capability class parameter of supporting to delete in batches with private network tags VPNv4 or VPNv6 route at BGP OPEN message, before described provider edge router PE and the 2nd PE set up BGP VPNv4 or VPNv6 neighbours, the BGPOPEN message is sent to the 2nd PE, and the optional capability class of supporting according to the optional capability class parameter of carrying in the described OPEN message that receives and a PE this locality carries out capability negotiation.
Preferably, described label acquisition module, also be used for when the link communication between described provider edge router PE and the Customer Edge router CE breaks down, do not have other forwarding equivalence class FEC application if down hop is the private network tags of described CE, then obtain described private network tags;
Perhaps,
When the BGP VPNv4 between described provider edge router PE and the 3rd PE or VPNv6 Routing Protocol break, obtain private network tags, described private network tags is for entering one to one label with outgoing label from the 3rd PE; Wherein, described provider edge router PE can carry out the private network tags exchange, and the 3rd PE is BGP VPNv4 or the VPNv6 neighbours of described provider edge router PE and is different from the 2nd PE;
Perhaps,
When this locality deletion VPN route forwarding table VRF, obtain all private network tags that described VRF distributes.
Preferably, described label acquisition module also is used for the described private network tags of obtaining as index, in the VPNv4 or VPNv6 routing table of this locality, deletion with described private network tags as the whole VPNv4 that enter label or VPNv6 route.
Described optional capability class parameter comprises following field: capability class, parameter length; Wherein, the capability class value be described provider edge router PE with its BGP VPNv4 or VPNv6 routing neighbor between consensus self-defining value and not with bgp protocol in arbitrary capability class value of stipulating identical, the parameter length value is 0.
Preferably, described label acquisition module, whether the private network tags that also is used for the inquiry down hop and is described CE has other forwarding equivalence class FEC to use, if, then notify the packet sending and receiving module to send the route withdraw message to the 2nd PE, described route withdraw message carries all VPNv4 or the VPNv6 routing iinformation that down hop is described CE;
The packet sending and receiving module is also for the message processing module (MPM) that sends described route withdraw message to the two PE according to the above-mentioned notice of label acquisition module.
The described route withdraw message that contains this private network tags comprises following field: prefix length, label stack, Route Distinguisher, IPv4 or IPv6 route prefix;
If described route withdraw message is VPNv4 route withdraw message, then the value of label stack is described private network tags, and the IPv4 route prefix is 255.255.255.255, and prefix length is 120, and Route Distinguisher is self-defining value;
If described route withdraw message is VPNv6 route withdraw message, then the value of label stack is described private network tags, and the IPv6 route prefix is FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF, and prefix length is 216, and Route Distinguisher is self-defining value.
Described the 2nd PE is behind the route withdraw message that receives from described provider edge router PE, for VPNv4 route withdraw message, judge that whether the VPNv4 address is: Route Distinguisher 255.255.255.255, if so, then extract the private network tags in the described VPNv4 route withdraw message;
For VPNv6 route withdraw message, judge that whether the VPNv6 address is: Route Distinguisher FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF, if so, then extract the private network tags in the described VPNv6 route withdraw message.
Described the 2nd PE is behind the route withdraw message that receives from described provider edge router PE, the VPNv4 address of judging VPNv4 route withdraw message is not: Route Distinguisher 255.255.255.255, or the VPNv6 address of VPNv6 route withdraw message is not: during Route Distinguisher FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF, according to the IPv4 in the route withdraw message or IPv6 route prefix deletion VPNv4 or VPNv6 route;
Adopt the application's scheme, when the private network interface communication break down or PE between BGP VPNv4 or the VPNv6 agreement is broken or during the local deletion of PE VRF, by utilizing private network tags deletion VPNv4 or VPNv6 route, only need encapsulation and send a route withdraw message or a small amount of route withdraw message, just can delete in batches a large amount of VPNv4 or VPNv6 route, with respect to prior art, can greatly alleviate the burden of PE equipment and network, improve network performance.
The above only is preferred embodiment of the present invention, and is in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of making, is equal to replacement, improvement etc., all should be included within the scope of protection of the invention.