Embodiment
In order to solve in prior art, when local router go out strategy or agreement introduce (introducing the route that other Routing Protocols find) change and trigger routing update time, local router still need by routing iinformations all for this locality and routing property thereof through new go out policy filtering after, resend to the peer-to-peer of opposite end, take the problem compared with large bandwidth, following examples of the present invention provide the routing forwarding equipment of a kind of route processing method and application the method.In following examples of the present invention, the routing iinformation (being called the first routing iinformation) that local routing forwarding unit has been issued before preserving in (can be called that the first via is by forwarding unit) and introduce and change because go out strategy or agreement and trigger the routing iinformation (being called secondary route information) that when route (route namely will issued) upgrades, needs are updated to, the first via (is called secondary route forwarding unit by the bgp peer of forwarding unit, can be one or more routing forwarding equipment) this locality preserves the first routing iinformation, the first via by forwarding unit before will carrying out routing update, first routing iinformation of first more local preservation and secondary route information, the difference with described secondary route information in local the first routing iinformation preserved of secondary route forwarding unit renewal is indicated again according to comparative result, thus identical part does not just need to send to bgp peer, therefore, the present invention effectively can reduce the quantity or length that need the message sent, decrease the bandwidth needing to take.
Embodiment one
Fig. 1 is the process chart of the route processing method according to embodiments of the invention one, and this method can be applied in BGP, comprising: BGP-4 and IPv6BGP.This method can be performed by any one the routing forwarding equipment (hereinafter referred to as the first via by forwarding unit) supported in the network of BGP, and this routing forwarding equipment can be the equipment such as router, and the present invention does not limit this.As shown in Figure 1, the method comprises the following steps:
Step S102, when needing to upgrade the routing iinformation self issued, the first via is by the first routing iinformation of the more local preservation of forwarding unit and secondary route information, wherein, first routing iinformation is the routing iinformation being distributed to bgp peer and secondary route forwarding unit, and secondary route information is the routing iinformation that will be updated to;
Such as, the first via by forwarding unit go out strategy or agreement introduce there occurs change and need to upgrade issue routing iinformation time, the routing iinformation that the first via is updated to by routing iinformation i.e. the first routing iinformation issued before the more local preservation of forwarding unit and this time needing and secondary route information.Obviously, the first via is needed to preserve the first routing iinformation and secondary route information in this locality by forwarding unit, and, first routing iinformation is through the routing iinformation gone out after policy filtering of this locality, secondary route information be also through local current go out strategy (change if go out strategy, then current go out strategy namely for a change after newly go out strategy) filter after routing iinformation.At least one route can be included in first routing iinformation and secondary route information.
Because a route has route prefix and routing property, therefore, when comparing the first routing iinformation and secondary route information, prefix and the property value of the route that both comprise can be compared, thus the identical and difference both judging.
Wherein, route prefix is the prefix of the IP address of route.Such as, the route prefix of route can be 128.97.0.0/16.
Routing property follows one group of parameter that route sends together, and it is further described specific route, makes route recipient to filter route according to routing property value and to select.Routing property can be divided into following four classes:
(1) generally acknowledge must follow (Well-known mandatory): all bgp routers all must can identify this attribute, and must be present in Update message.If lack this attribute, routing iinformation will be made mistakes.
(2) optional (Well-known discretionary) is generally acknowledged: all bgp routers can identify, but do not require to be present in Update message, can select as the case may be.
(3) optional transition (Optional transitive): the attribute between AS with transferability.Bgp router can not support this attribute, but it still can receive the route with this attribute, and is advertised to other peer-to-peers.
(4) optional non-transition (Optional non-transitive): if bgp router does not support this attribute, this attribute is left in the basket, and can not be advertised to other peer-to-peers.
Several main routing property comprises: source (ORIGIN) attribute, AS path (AS_PATH) attribute, down hop (NEXT_HOP) attribute, MED(MULTI_EXIT_DISC) attribute, local first (LOCAL_PREF) attribute and group (COMMUNITY) attribute.
Step S104, the first via is by forwarding unit according to the comparative result in step S102, and instruction secondary route forwarding unit upgrades the difference with secondary route information in local the first routing iinformation preserved.
In the embodiment of the present invention, secondary route forwarding unit this locality need to preserve the first via by forwarding unit before routing iinformation i.e. the first routing iinformation of having issued, like this, the first via can only indicate secondary route forwarding unit to upgrade the difference of the first routing iinformation and secondary route information by forwarding unit, first updating route information that secondary route forwarding unit can be made to be preserved this locality is secondary route information, thus the first via is not needed whole secondary route information to send to all peer-to-peers again by forwarding unit, reach the transmission reducing message, reduce the object taken of bandwidth.Especially more in the quantity of peer-to-peer, when routing property value is longer, effect is more obvious.
Embodiment two
Be described in detail the method for embodiment one below, as shown in Figure 2, concrete handling process comprises the following steps S202 ~ S206:
Step S202, the first via before being preserved by forwarding unit through going out policy filtering and being distributed to routing iinformation i.e. first routing iinformation (being equal to the primary routing information received by forwarding unit from first via secondary route forwarding unit configuring peer keep-all-routes order and preserve in this locality) of bgp peer (being referred to as secondary route forwarding unit), be designated as Send1, one or more route (including route prefix and property value) can be included in Send1, when this locality go out strategy or agreement introduce change and need to upgrade the routing iinformation issued time, preservation to be updated to through current go out strategy (if go out strategy to there occurs change, then current go out strategy namely for a change after newly go out strategy) filter after routing iinformation and secondary route information, be designated as Send2, one or more route can be included in Send2,
By configuring the peerkeep-all-routes order of the first via by forwarding unit on secondary route forwarding unit, save the first routing iinformation Send1 that the first via has been issued by forwarding unit in this locality.
Step S204, the first via is compared each route in Send1 and Send2 by forwarding unit;
Above-mentioned steps S202 ~ S204 corresponds to the step S102 in embodiment one.
Step S206, the first via, by the comparative result of forwarding unit according to following 4 kinds of situations, sends different messages for different situations and upgrades places different from Send2 in the Send1 preserved secondary route forwarding unit this locality to indicate secondary route forwarding unit:
Situation 1: if one or more routes in Send1 are identical with Send2, namely, each route in these routes is all identical with property value with the route prefix of the route of in Send2, then the first via does not process these routes by forwarding unit, that is, no longer these identical routes are issued to secondary route forwarding unit; That is, the some routes in Send1 if (can be called the first via by) all identical with property value with the route prefix of the some routes in Send2 (now these two routes are identical), then the first via by forwarding unit no longer to secondary route forwarding unit issue this first via by.
Still these the identical routes in the local Send1 preserved can be retained in secondary route forwarding unit.
Situation 2: if the prefix of the route of Send1 and Send2 is different, and to include in Send2 non-existent route prefix in Send1 (namely, for the prefix of one or more routes in Send1, route in Send2 does not have these prefixes), then the first via cancels i.e. Withdraw message (namely only comprising the Update message of prefix and mask) by forwarding unit to the transmission of secondary route forwarding unit, and instruction secondary route forwarding unit cancels the route in Send2 corresponding to non-existent route prefix from the Send1 that this locality is preserved; That is, do not exist in the route prefix of the some routes (can secondary route be called) in the Send1 route in Send2, then the first via sends Withdraw message by forwarding unit to secondary route forwarding unit, and instruction secondary route forwarding unit cancels this secondary route from the Send1 that this locality is preserved.
After secondary route forwarding unit receives this Withdraw message, from the Send1 that this locality is preserved, cancel the route matched with the prefix of carrying in this message.
Situation 3: if the route prefix of Send1 and Send2 is different, and to include in Send1 non-existent route prefix in Send2 (namely, for the prefix of one or more routes in Send2, route in Send1 does not have these prefixes), then the first via sends renewals and Update message (including the property value of non-existent route prefix and correspondence in these Send1) by forwarding unit to secondary route forwarding unit, adds the route in Send1 corresponding to non-existent route prefix in the Send1 indicating secondary route forwarding unit to preserve in this locality; That is, do not exist in the route prefix of the some routes (the 3rd route can be called) in the Send2 route in Send1, then the first via sends Update message by forwarding unit to secondary route forwarding unit, and instruction secondary route forwarding unit adds the 3rd route from the Send1 that this locality is preserved.
After secondary route forwarding unit receives this Update message, in the Send1 that this locality is preserved, increase the property value of route prefix and the correspondence of carrying in this message.
Situation 4: if one or more routes in Send1 are identical from the route prefix in Send2 but property value is different, namely, each route in these routes is identical from the route prefix of the route of in Send2 but property value is different, then the first via sends amendment and Modify message by forwarding unit to secondary route forwarding unit, revises the property value of these routes in the Send1 indicating secondary route forwarding unit to preserve in this locality.That is, if the some routes in Send1 (can be called the 4th route) are identical from the route prefix of the some routes in Send2 but property value is different, then the first via sends Modify message by forwarding unit to secondary route forwarding unit, revises the property value of the 4th route in the Send1 that instruction secondary route forwarding unit is preserved in this locality.
After secondary route forwarding unit receives this Modify message, the property value that amendment is corresponding with the prefix of carrying in this message in the Send1 that this locality is preserved.
Concrete, in actual implementation process, the route refresh of the existing ORF of carrying information and Route-refresh message can be utilized to realize Modify message.ORF is a kind of critical function in bgp protocol, ORF is the abbreviation of Outbound Route Filters, it is the meaning of route filtering (or outgoing direction route filtering) of popping, the major function that it realizes is: the entrance routing policy (or input routing policy) of this locality initiatively pushes away to the bgp peer of oneself by the Route-refresh message carrying ORF information by local router, and this peer-to-peer it can be used as local output routing policy to use.When this peer-to-peer needs to send Update message to local router, by also needing to filter according to this output routing policy after the routing policy of peer-to-peer this locality (i.e. peer-to-peer this locality go out strategy), only have and just can issue local router by the routing iinformation of ORF, to reduce the mutual of Update message between bgp peer, save Internet resources.
Carry the form of the Route-refresh message of ORF information as shown in Figure 3, (specifically can see RFC5291) be briefly introduced to each field in this message below:
AFI(Address Family Identifier, address race field) and SAFI(Subsequent AddressFamily Identifier, subaddressing race field), be used to specify the ORF information of carrying in message and for which address race arrange;
Reserved is reserved field;
When When-to-refresh(refreshes) field, be used to specify and when send Update message, if the content of this field is DEFER(0x02, postpone), represent the ORF list item in the only complete message of dissection process, filtration and (again) of not carrying out route are issued; If the content of this field is IMMEDIATE(0x01, immediately), after representing all ORF list items in dissection process this message complete, filtration and (again) of carrying out route are at once issued; If set up from neighbours or receive the Route-refresh start of heading timing that this field contents is the ORF information that carries of DEFER, exceed section sometime and also do not receive the Route-refresh message that this field contents is the ORF information that carries of IMMEDIATE, then initiatively carry out filtration and (again) issue of route according to the ORF list item received;
ORF type(type) field, for illustration of follow-up ORF information (i.e. one or more ORF list items) of carrying be strategy (policing type has ACL(Access Control List, Access Control List (ACL)) according to which kind of type, address prefix (Address Prefix), AS-Path(autonomous system path), group attribute (Community) and extended community attribute (Ex-Community) etc.) produce;
Length of ORF entries is the total length of follow-up ORF entry field;
ORF entry(list item) field, for carrying detailed ORF filtering rule, according to dissimilar strategy, the content that this field is filled in is not identical yet, the form of this field as shown in Figure 4, wherein:
The action type of Action: peer-to-peer control treatment ORF list item, comprise ADD, REMOVE, REMOVE-ALL operation, ADD represents that this ORF list item of interpolation is to local ORF, REMOVE represents deletion ORF list item, and REMOVE-ALL represents all list items of deletion ORF, and the Action in ORF entry field is the field of 2bit position, wherein, define in agreement when Action is set to 00 and represented ADD, represented REMOVE when being set to 01, when being set to 10, represent REMOVE-ALL;
Match: comparison ORF list item, allows or forbids that peer-to-peer sends routing update;
Reserved: be reserved field, when sending and being set to 0 when ignoring reception;
Type specific part(specified type part): the length of this field is variable, usually can carry Prefix length(route prefix length in the field) and Prefix(route prefix field) etc.
In the embodiment of the present invention, based on the Modify message that the Route-refresh message of the existing ORF of carrying information defines, not for carrying out policy filtering prefix, but for being revised the property value corresponding to the route prefix that matches by coupling route prefix.Above-mentioned implication is indicated in order to the Route-refresh message carrying ORF information can be made, by being used for, the embodiment of the present invention can illustrate that the ORF type Field Definition carrying out filtering according to the attribute of which kind of type is: when ORF type field is set to the first value, first value is for representing according to route prefix coupling and the property value of the route prefix of amendment coupling, this first value can use 81, obviously, according to the actual requirements, also can use other value, untappedly be worth as long as existing.
In addition, in Modify message in the embodiment of the present invention, as shown in Figure 5, 3 fields are added: ORF attribute type field in Type specific part field in ORF entry field, ORF attribute(attribute) length(length) field and ORF attribute field, wherein, ORFattribute field is for carrying the property value (value) required modification to, the form of ORF attribute field is with the Path attributes field in BGP Update message, ORF attribute length field represents the length of ORF attribute field, ORF attribute type field represents the type of routing property, namely, the routing property type belonging to property value of filling in ORF attribute field, such as, AS_PATH(AS path) attribute, ORIGIN(source) attribute, NEXT_HOP(down hop) attribute, MED attribute and LOCAL PREF(local first) attribute etc.Further, Modify is represented, operation of modifying when definition Action is set to the second value (can be such as 11).
For the situation that the property value required modification to is empty, that is, a route in above-mentioned situation 4 in Send1 is identical from the prefix of the route of in Send2 but property value is different, and the property value of this route in Send2 is empty, use null attribute value, delete the property value of corresponding prefix.
Above-mentioned steps S206 corresponds to the step S 104 in embodiment one.
When reality is implemented, be similar to ORF ability, can use peer keep-send order come the enable first via by forwarding unit have can perform said method new ability (for convenience of description, the ability being revised routing iinformation by ORF can be called), by configuration peer keep-send order, preserved a after going out policy filtering by forwarding unit this locality in the first via, send to peer-to-peer: the route of secondary route forwarding unit and the initial data (being equal to the data that secondary route forwarding unit uses peerkeep-all-routes order to preserve) of attribute, thus when second time is because going out strategy or agreement introducing change triggering routing update, only need the routing iinformation that relatively this time need to be updated to and the front routing iinformation once preserved, the transmission Update that prefix is not identical or WithDraw message are to indicate secondary route forwarding unit to increase or to cancel corresponding route, prefix is identical but property value is different, sends Modify message, makes the operation of amendment with the property value indicating the prefix of carrying in secondary route forwarding unit pair and this message to match.Object is only to indicate secondary route forwarding unit to modify to different places voluntarily, reduces the transmission of message, reduces taking of bandwidth.
Obviously, the prerequisite that the method for the embodiment of the present invention can be implemented is: secondary route forwarding unit this locality saves the primary routing information that the first via is issued by forwarding unit.Can by configuring the preservation realizing the primary routing information that the first via is issued by forwarding unit by the peer keep-all-routes order of forwarding unit to the first via on secondary route forwarding unit.The method of the above embodiment of the present invention, make use of existing BGP characteristic, and upgrading that can be more level and smooth when realizing, does not support, ignore and do not process.
After BGP has above-mentioned new ability by the configuration peer keep-send order enable first via by forwarding unit, and before the first via can perform above-mentioned method by forwarding unit, the first via is needed to consult this new ability by forwarding unit and secondary route forwarding unit, certainly, the use of this new ability needs the support of Route-refresh ability simultaneously.
During by this new ability of Open message negotiation, the value of the ORF type field in Open message changes 129 into, represents that local terminal BGP can process this new ability.The configuration of tranceive type can be: if local terminal is configured with peer keep-all-routes order, then put 1 expression local terminal and have receiving ability, if do not configure peer keep-all-routes order, then puts 2 expression local terminals and only has transmitting capacity.
After current BGP is configured with peer keep-all-routes order, common Route-refresh message can be sent to peer-to-peer immediately, and then preserve the primary routing information received from peer-to-peer.And when BGP subsequent configuration peer keep-all-routes order, this new ability can be processed to allow peer awareness local terminal, when then local terminal is to peer-to-peer configuration peer keep-all-routes order, the retention position of 1 byte in the Route-refresh message of peer-to-peer can be sent to be 129, to represent that local terminal BGP can process this new ability.After peer-to-peer receives this Route-refresh message, send renewal next time and can use this new ability.
Embodiment three
For the method in embodiment one and two, embodiments provide a kind of routing forwarding equipment, this routing forwarding equipment can support BGP, and can be the equipment such as router, the present invention limit this.
As shown in Figure 6, this routing forwarding equipment comprises with lower module: comparison module 10 and sending module 20, wherein:
Comparison module 10 is for when needing the routing iinformation upgrading the issue of this routing forwarding equipment, first routing iinformation of more local preservation and secondary route information, wherein, first routing iinformation has been distributed to the bgp peer of this routing forwarding equipment and the routing iinformation of secondary route forwarding unit, and secondary route information is the routing iinformation that will be updated to;
Sending module 20 is for the comparative result according to comparison module 10, and instruction secondary route forwarding unit upgrades the difference with secondary route information in the first routing iinformation preserved secondary route forwarding unit this locality.
Wherein, sending module 20, at the comparative result according to comparison module 10, when instruction secondary route forwarding unit upgrades the difference with secondary route information in the first routing iinformation preserved secondary route forwarding unit this locality, specifically carries out according to following several situation:
Situation 1: the route prefix of the some routes in the first routing iinformation and the some routes in secondary route information and property value homogeneous phase simultaneously, no longer send this identical route to secondary route forwarding unit.
Situation 2: when the first routing iinformation is different from the route prefix of secondary route information, when including non-existent route prefix in secondary route information in the first routing iinformation, send to secondary route forwarding unit and cancel Withdraw message, instruction secondary route forwarding unit cancels the route in secondary route information corresponding to non-existent route prefix from the first routing iinformation that this locality is preserved.
Situation 3: when the first routing iinformation is different from the route prefix of secondary route information, when including non-existent route prefix in the first routing iinformation in secondary route information, send to secondary route forwarding unit and upgrade Update message, in the first routing iinformation that instruction secondary route forwarding unit is preserved in this locality, add the route in the first routing iinformation corresponding to non-existent route prefix.
Situation 4: the some routes in the first routing iinformation are identical from the route prefix of the some routes in secondary route information but property value is different time, send amendment Modify message to secondary route forwarding unit, instruction secondary route forwarding unit revises the property value of this route in the first routing iinformation.
Wherein, Modify message is the Route-refresh message carrying ORF information, wherein, when ORF type field in this Route-refresh message is set to the first value, represent according to route prefix coupling and the property value of the route prefix of amendment coupling, and, in Type specific part field in ORFentry field in this Route-refresh message, add 3 fields: ORF attribute type field, ORF attribute length field and ORF attribute field, wherein, ORF attribute type field represents the type of routing property, ORF attribute field is for carrying the property value required modification to, ORF attribute length field is filled to the length of ORF attribute field, Action field in ORF entry field represents operation of modifying when being set to the second value.
Method and apparatus more than the present invention is in IPv6 technology and L3VPN technology, the RT(Route Target of route, route target) attribute, as_path attribute, BGP4+ route next jump attribute value larger, and BGP route needs the scene that separately group bag sends to apply.
To sum up, the above embodiment of the present invention can reach following technique effect:
The routing iinformation (being called the first routing iinformation) that local routing forwarding unit has been issued before preserving in (can be called that the first via is by forwarding unit) and introduce and change because go out strategy or agreement and trigger the routing iinformation (being called secondary route information) that when route (route namely will issued) upgrades, needs are updated to, the first via (is called secondary route forwarding unit by the bgp peer of forwarding unit, can be one or more routing forwarding equipment) this locality preserves the first routing iinformation, first routing iinformation is before will carrying out routing update, first routing iinformation of first more local preservation and secondary route information, the difference with described secondary route information in local the first routing iinformation preserved of secondary route forwarding unit renewal is indicated again according to comparative result.Because secondary route forwarding unit has preserved the first routing iinformation in this locality, like this, the first via can only indicate secondary route forwarding unit to upgrade the difference of the first routing iinformation and secondary route information by forwarding unit, first updating route information that secondary route forwarding unit can be made to be preserved this locality is secondary route information, thus the first via is not needed whole secondary route information to send to all peer-to-peers again by forwarding unit, reach the transmission reducing message, reduce the object taken of bandwidth.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment made, equivalent replacement, improvement etc., all should be included within the scope of protection of the invention.