Embodiment
In order to solve in the prior art; When go out strategy or the agreement of local router are introduced (introducing the route that other Routing Protocols are found) and changed and when triggering routing update; Local router still need with local all routing iinformation and routing property thereof through new go out policy filtering after; Resend peer-to-peer, take the problem of big bandwidth, the routing forwarding equipment that following examples of the present invention provide a kind of route processing method and used this method to the opposite end.In following examples of the present invention; The routing iinformation of having issued before preserving in the local routing forwarding equipment (can be called the first via) (being called first routing iinformation) and introduce the routing iinformation (being called secondary route information) that changes and to be updated to when triggering route (route that promptly will issue) renewal because of going out strategy or agreement by forwarding unit; The first via (is called the secondary route forwarding unit by the bgp peer of forwarding unit; Can be one or more routing forwarding equipment) this locality preserves first routing iinformation; The first via by forwarding unit before will carrying out routing update; At first relatively more local first routing iinformation and secondary route information of preserving; Indicate the secondary route forwarding unit to upgrade in local first routing iinformation of preserving the difference with said secondary route information according to comparative result again, thereby identical part just need not send to bgp peer, therefore; The present invention can effectively reduce the quantity or the length of the message that needs transmission, has reduced the bandwidth that need take.
Embodiment one
Fig. 1 is the process chart according to the route processing method of embodiments of the invention one, and this method can be applied to comprise among the BGP: BGP-4 and IPv6BGP.This method can be carried out by any routing forwarding equipment in the network of supporting BGP (below be called the first via by forwarding unit), and this routing forwarding equipment can be equipment such as router, and the present invention does not do qualification to this.As shown in Figure 1, this method may further comprise the steps:
Step S102; When needs upgrade the routing iinformation of self issuing; The first via is by relatively more local first routing iinformation and the secondary route information of preserving of forwarding unit; Wherein, first routing iinformation is to be distributed to the routing iinformation that bgp peer is the secondary route forwarding unit, and secondary route information is the routing iinformation that will be updated to;
For example; Introduce and to have taken place to change and when needing to upgrade the issue routing iinformation by go out strategy or the agreement of forwarding unit in the first via, the first via by forwarding unit relatively more local preserve before the routing iinformation issued promptly first routing iinformation and the routing iinformation that this time need be updated to are secondary route information.Obviously; The first via need be preserved first routing iinformation and secondary route information in this locality by forwarding unit; And; First routing iinformation is through the local routing iinformation that goes out after the policy filtering, and secondary route information also is through the local current routing iinformation that goes out after strategy (change if go out strategy, then current go out strategy promptly newly go out strategy after for a change) filters.Can include at least one route in first routing iinformation and the secondary route information.
Because a route has route prefix and routing property, therefore, relatively when first routing iinformation and secondary route information, can compare the prefix and the property value of the route that both comprise, thereby judge both identical and differences.
Wherein, route prefix is the prefix of the IP address of route.For example, the route prefix of route can be 128.97.0.0/16.
Routing property is to follow one group of parameter that route sends together, and it has carried out further description to specific route, makes the route recipient to filter route and select according to the routing property value.Routing property can be divided into following four types:
(1) generally acknowledge and must follow (Well-known mandatory): all bgp routers all must can be discerned this attribute, and must be present in the Update message.If lack this attribute, routing iinformation will be made mistakes.
(2) generally acknowledge optional (Well-known discretionary): all bgp routers can be discerned, but do not require and must be present in the Update message, can select as the case may be.
(3) optional transition (Optional transitive): the attribute that between AS, has transferability.Bgp router can not supported this attribute, but it still can receive the route that has this attribute, and other peer-to-peers are given in announcement.
(4) optional non-transition (Optional non-transitive): if bgp router is not supported this attribute, this attribute is left in the basket, and can not announce to other peer-to-peers.
Several kinds of main routing properties comprise: source (ORIGIN) attribute, AS path (AS_PATH) attribute, next jumping (NEXT_HOP) attribute, MED (MULTI_EXIT_DISC) attribute, local first (LOCAL_PREF) attribute and group (COMMUNITY) attribute.
Step S104, according to the comparative result among the step S102, indication secondary route forwarding unit upgrades in local first routing iinformation of preserving the difference with secondary route information to the first via by forwarding unit.
In the embodiment of the invention; It is first routing iinformation in this locality by the routing iinformation of having issued before the forwarding unit that the secondary route forwarding unit need be preserved the first via; Like this; The first via can only indicate the secondary route forwarding unit to upgrade the difference of first routing iinformation and secondary route information by forwarding unit, and first updating route information that can make the secondary route forwarding unit that this locality is preserved is a secondary route information, thereby the first via need not redispatched whole secondary route information to all peer-to-peers by forwarding unit; Reach the transmission that reduces message, reduced the purpose that takies of bandwidth.Especially more in the quantity of peer-to-peer, the routing property value is than under the long situation, and effect is more obvious.
Embodiment two
Below the method for embodiment one is carried out detailed description, as shown in Figure 2, concrete handling process may further comprise the steps S202 ~ S206:
Step S202; Before the first via is preserved by forwarding unit through i.e. first routing iinformation (the primary routing information that receives by forwarding unit from the first via that is equal to that configuration peer keep-all-routes order is preserved in this locality on the secondary route forwarding unit) of the routing iinformation that goes out policy filtering and be distributed to bgp peer (being referred to as the secondary route forwarding unit); Be designated as Send1; Can include one or more routes (including route prefix and property value) among the Send1; When go out strategy or the agreement of this locality are introduced and to be changed and when needing to upgrade the routing iinformation of issue; The process that preservation will be updated to is current to be gone out strategy and (if go out strategy change has taken place; Then currently going out strategy and promptly newly go out strategy after for a change) routing iinformation after filtering is secondary route information, is designated as Send2, can include one or more routes among the Send2;
Through configuration the peer keep-all-routes of the first via by forwarding unit ordered on the secondary route forwarding unit, preserved the first routing iinformation Send1 that the first via has been issued by forwarding unit in this locality.
Step S204, the first via compares each route among Send1 and the Send2 by forwarding unit;
Above-mentioned steps S202 ~ S204 is corresponding to the step S102 among the embodiment one.
Step S206, the first via is sent different messages to condition of different and is upgraded the place different with Send2 among the local Send1 that preserves of secondary route forwarding unit with indication secondary route forwarding unit by the comparative result of forwarding unit according to following 4 kinds of situation:
Situation 1: if one or more routes among the Send1 are identical with Send2; Promptly; The route prefix and the property value of a route among each route in these routes and the Send2 are all identical; Then the first via is not handled these routes by forwarding unit, that is, and no longer to these identical routes of secondary route forwarding unit issue; That is to say; The route prefix all identical with property value (these two routes are identical at this moment) of the some routes if the some routes among the Send1 among (can be called the first via by) and the Send2, then the first via by forwarding unit no longer to the secondary route forwarding unit issue this first via by.
Still can keep these the identical routes among the local Send1 that preserves in the secondary route forwarding unit.
Situation 2: if Send1 is different with the prefix of the route of Send2; And include among the Send2 non-existent route prefix among the Send1 (promptly; Prefix for one or more routes among the Send1; Route among the Send2 does not have these prefixs); Then the first via is sent to the secondary route forwarding unit by forwarding unit that to cancel be Withdraw message (the Update message that promptly only comprises prefix and mask), and indication secondary route forwarding unit is cancelled the pairing route of non-existent route prefix among the Send2 from the Send1 of this locality preservation; That is to say; Do not exist in the route of route prefix in Send2 of the some routes among the Send1 (can be called secondary route); Then the first via is sent the Withdraw message by forwarding unit to the secondary route forwarding unit, and indication secondary route forwarding unit is cancelled this secondary route from the Send1 that preserve this locality.
After the secondary route forwarding unit is received this Withdraw message, from the Send1 that preserve this locality, cancel with this message in the route that is complementary of the prefix of carrying.
Situation 3: if Send1 is different with the route prefix of Send2; And include among the Send1 non-existent route prefix among the Send2 (promptly; Prefix for one or more routes among the Send2; Route among the Send1 does not have these prefixs); Then send to be upgraded to the secondary route forwarding unit by forwarding unit be Update message (including non-existent route prefix and corresponding property value among these Send1) to the first via, and indication secondary route forwarding unit adds the pairing route of non-existent route prefix among the Send1 in the Send1 that preserve this locality; That is to say; Do not exist in the route of route prefix in Send1 of the some routes among the Send2 (can be called Third Road by); Then the first via is sent the Update message by forwarding unit to the secondary route forwarding unit, indication secondary route forwarding unit from the Send1 that preserve this locality, add this Third Road by.
After the secondary route forwarding unit is received this Update message, in the Send1 that preserve this locality, increase the route prefix and the corresponding property value that carry in this message.
Situation 4: if one or more routes among the Send1 are identical with route prefix among the Send2 but property value is different; Promptly; The route prefix of a route among each route in these routes and the Send2 is identical but property value is different; Then the first via is the Modify message by forwarding unit to secondary route forwarding unit transmission modification, and indication secondary route forwarding unit is revised the property value of these routes in the Send1 that preserve this locality.That is to say; If the route prefix of the some routes among the some routes (can be called the 4th route) among the Send1 and the Send2 is identical but property value is different; Then the first via is sent the Modify message by forwarding unit to the secondary route forwarding unit, and indication secondary route forwarding unit is revised the property value of the 4th route in the Send1 that preserve this locality.
After the secondary route forwarding unit was received this Modify message, the corresponding property value of prefix that in the Send1 that preserve this locality, carries in modification and this message got final product.
Concrete, in actual implementation process, the route refresh that can utilize the existing ORF of carrying information is that the Route-refresh message is realized the Modify message.ORF is a kind of critical function in the 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 is realized is: local router initiatively pushes away the bgp peer to oneself with the inlet routing policy (or input routing policy) of this locality through the Route-refresh message that carries ORF information, and this peer-to-peer uses its output routing policy as this locality.When this peer-to-peer need be when local router sends the Update message; Filter through also exporting routing policy behind the local routing policy of peer-to-peer (being the strategy that of peer-to-peer this locality) according to this; Have only through the routing iinformation of ORF and just can issue local router; To reduce the mutual of Update message between the bgp peer, save Internet resources.
The form of Route-refresh message that carries ORF information is as shown in Figure 3, briefly introduces (specifically can referring to RFC5291) in the face of each field in this message down:
AFI (Address Family Identifier, address family field) and SAFI (Subsequent Address Family Identifier, subaddressing family field), the ORF information that is used for specifying message to carry to which address family is provided with;
Reserved is reserved field;
When-to-refresh (when refreshing) field; Be used for specifying when send the Update message, if the content of this field is DEFER (0x02 postpones); Represent that only dissection process is finished the ORF list item in the message, do not carry out the filtration and (again) issue of route; If the content of this field be IMMEDIATE (0x01, immediately), be illustrated in all the ORF list items in intact this message of dissection process after, carry out the filtration and (again) issue of route at once; If set up or receive that this field contents is the Route-refresh start of heading timing of the ORF information that carries of DEFER from neighbours; Surpass sometime that section does not also receive the Route-refresh message that this field contents is the ORF information that carries of IMMEDIATE, then initiatively carry out the filtration and (again) issue of route according to the ORF list item that has received;
ORF type (type) field; Be used to explain that follow-up ORF information of carrying (being one or more ORF list items) is that strategy (policing type has ACL (Access Control List, ACL), address prefix (Address Prefix), AS-Path (autonomous system path), group attribute (Community) and extended community attribute (Ex-Community) etc.) according to which kind of type produces;
Length of ORF entries is the total length of follow-up ORF entry field;
ORF entry (list item) field is used to carry detailed ORF filtering rule, and according to dissimilar strategies, the content that this field is filled in is also inequality, and the form of this field is as shown in Figure 4, wherein:
Action: the action type of peer-to-peer control and treatment ORF list item, comprise ADD, REMOVE, REMOVE-ALL operation, ADD representes to add this ORF list item to local ORF; REMOVE representes to delete the ORF list item, and REMOVE-ALL representes to delete all list items of ORF, and the Action in the ORF entry field is the field of 2bit position; Wherein, Defined Action in the agreement and be changed to and represented ADD at 00 o'clock, be changed to and represented REMOVE at 01 o'clock, be changed to and represented REMOVE-ALL at 10 o'clock;
Match: comparison ORF list item allows perhaps to forbid that peer-to-peer sends routing update;
Reserved: be reserved field, be changed to 0 when sending and ignoring when receiving;
Type specific part (specified type part): the length of this field is variable, in this field, can carry Prefix length (route prefix length) and Prefix (route prefix field) etc. usually.
In the embodiment of the invention; Based on the existing defined Modify message of Route-refresh message that carries ORF information; Not to be used to carry out the policy filtering prefix, but be used for revising the pairing property value of the route prefix that matches through the coupling route prefix.In order to make the Route-refresh message that carries ORF information express above-mentioned implication; The embodiment of the invention can be with the ORF type Field Definition that the attribute that is used for explaining according to which kind of type filters: when ORF type field is changed to first value, first value is used to represent according to the route prefix coupling and revises the property value of the route prefix of coupling that this first value can use 81; Obviously; According to the actual requirements, also can use other value, so long as existing untapped value gets final product.
In addition; In the Modify message in the embodiment of the invention; As shown in Figure 5, increased by 3 fields in the Type specific part field in ORF entry field: ORF attribute type field, ORF attribute (attribute) length (length) field and ORF attribute field, wherein; The ORFattribute field is used to carry the property value (value) that requires modification to; The form of ORF attribute field is with the Path attributes field in the BGP Update message, and ORF attribute length field is represented the length of ORF attribute field, and ORF attribute type field is represented the type of routing property; Promptly; Routing property type under the property value of filling in the ORF attribute field, for example, AS_PATH (AS path) attribute, ORIGIN (source) attribute, NEXT_HOP (next jumping) attribute, MED attribute and LOCAL PREF (local first) attribute etc.And definition Action representes Modify, the operation of making amendment when being changed to second value (for example can be 11).
Be empty situation for the property value that requires modification to; That is, the prefix of a route among route in the above-mentioned situation 4 among the Send1 and the Send2 is identical but property value is different, and the property value of this route among the Send2 is empty; Use the null attribute value, delete the property value of corresponding prefix.
Above-mentioned steps S206 is corresponding to the step S among the embodiment one 104.
When reality is implemented; Be similar to the ORF ability; Can use peer keep-send to order to enable the first via to have the new ability that can carry out said method by forwarding unit (describes for ease; Can be called the ability of revising routing iinformation through ORF); Through configuration peer keep-send order; Preserve portion through after going out policy filtering in the first via by forwarding unit this locality, send to peer-to-peer: the route of secondary route forwarding unit and the initial data of attribute (be equal to secondary route forwarding unit use peerkeep-all-routes and order the data of preserving), thereby when introducing change triggering routing update because of going out strategy or agreement the second time; Routing iinformation that only need relatively this time need be updated to and the preceding routing iinformation of once preserving, transmission Update that prefix is inequality or WithDraw message increase or cancel the route of correspondence with indication secondary route forwarding unit; Prefix is identical but property value is different, sends the Modify message, and the property value that is complementary with the prefix of carrying in indication secondary route forwarding unit pair and this message is made the operation of modification.Purpose is only to indicate the secondary route forwarding unit to be made amendment in different places voluntarily, reduces the transmission of message, reduces taking of bandwidth.
Obviously, the prerequisite that can implement of the method for the embodiment of the invention is: the primary routing information of the first via by the forwarding unit issue has been preserved in secondary route forwarding unit this locality.Can order by the peer keep-all-routes of forwarding unit the first via through configuration on the secondary route forwarding unit and realize the preservation of the first via by the primary routing information of forwarding unit issue.The method of the above embodiment of the present invention has been utilized existing BGP characteristic, and upgrading that can be more level and smooth during realization is not supported then to ignore and do not handled.
BGP enables the first via through configuration peer keep-send order to be had after the above-mentioned new ability by forwarding unit; And before the first via can be carried out above-mentioned method by forwarding unit; The first via need be consulted 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 through this new ability of Open message negotiation, the value of the ORF type field in the Open message changes 129 into, and expression local terminal BGP can handle this new ability.The configuration of transmitting-receiving type can for: if local terminal disposes peer keep-all-routes order, then put 1 expression local terminal and have receiving ability,, then put 2 expression local terminals and have only transmitting capacity if dispose peer keep-all-routes order.
Owing to after BGP has disposed peer keep-all-routes order at present, can send common Route-refresh message to peer-to-peer immediately, and then preserve the primary routing information that receives from peer-to-peer.And when BGP subsequent configuration peer keep-all-routes orders; In order to let the peer awareness local terminal can handle this new ability; When then local terminal is to peer-to-peer configuration peer keep-all-routes order; The retention position that can send to 1 byte in the Route-refresh message of peer-to-peer is 129, and expression local terminal BGP can handle this new ability.After peer-to-peer is received this Route-refresh message, send to upgrade next time and can use this new ability.
Embodiment three
To the method among embodiment one and two, the embodiment of the invention provides a kind of routing forwarding equipment, and this routing forwarding equipment can be supported BGP, can be equipment such as router, and the present invention does not do qualification to this.
As shown in Figure 6, comprise with lower module in this routing forwarding equipment: comparison module 10 and sending module 20, wherein:
Comparison module 10 is used for when needs upgrade the routing iinformation of this routing forwarding equipment issue; Relatively more local first routing iinformation and secondary route information of preserving; Wherein, First routing iinformation is that the bgp peer that has been distributed to this routing forwarding equipment is 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 used for the comparative result according to comparison module 10, and indication secondary route forwarding unit upgrades in local first routing iinformation of preserving of secondary route forwarding unit the difference with secondary route information.
Wherein, sending module 20 is at the comparative result according to comparison module 10, when indication secondary route forwarding unit upgrades in local first routing iinformation of preserving of secondary route forwarding unit the difference with secondary route information, specifically carries out according to following several kinds of situation:
Situation 1: the some routes in first routing iinformation and the route prefix of the some routes in the secondary route information and property value homogeneous phase no longer send this identical route to the secondary route forwarding unit simultaneously.
Situation 2: not simultaneously at the route prefix of first routing iinformation and secondary route information; In first routing iinformation, include under the situation of non-existent route prefix in the secondary route information; Cancel the Withdraw message to the transmission of secondary route forwarding unit, indication secondary route forwarding unit is cancelled the pairing route of non-existent route prefix in the secondary route information from first routing iinformation that preserve this locality.
Situation 3: not simultaneously at the route prefix of first routing iinformation and secondary route information; In secondary route information, include under the situation of non-existent route prefix in first routing iinformation; Send renewal Update message to the secondary route forwarding unit, indication secondary route forwarding unit adds the pairing route of non-existent route prefix in first routing iinformation in first routing iinformation that preserve this locality.
Situation 4: the identical but property value of the route prefix of the some routes in the some routes in first routing iinformation and the secondary route information is not simultaneously; Send modification Modify message to the secondary route forwarding unit, indication secondary route forwarding unit is revised the property value of this route in first routing iinformation.
Wherein, The Modify message is the Route-refresh message that carries ORF information; Wherein, when the ORF type field in this Route-refresh message was changed to first value, expression was according to the property value of the route prefix of route prefix coupling and modification coupling; And; In the Type specific part field in the ORFentry field in this Route-refresh message, increased by 3 fields: ORF attribute type field, ORF attribute length field and ORF attribute field, wherein; ORF attribute type field is represented the type of routing property; ORF attribute field is used to carry the property value that requires modification to, and ORF attribute length field is filled to the length of ORF attribute field, the operation of representing to make amendment when the Action field in the ORF entry field is changed to second value.
Method and apparatus more than the present invention is in IPv6 technology and L3VPN technology; The RT of route (Route Target; Route target) value of attribute, as_path attribute, BGP4+ route next jump attribute is bigger, and the BGP route needs the scene of group bag transmission separately to use.
To sum up, the above embodiment of the present invention can reach following technique effect:
The routing iinformation of having issued before preserving in the local routing forwarding equipment (can be called the first via) (being called first routing iinformation) and introduce the routing iinformation (being called secondary route information) that changes and to be updated to when triggering route (route that promptly will issue) renewal because of going out strategy or agreement by forwarding unit; The first via (is called the secondary route forwarding unit by the bgp peer of forwarding unit; Can be one or more routing forwarding equipment) this locality preserves first routing iinformation; First routing iinformation is before will carrying out routing update; At first relatively more local first routing iinformation and secondary route information of preserving indicates the secondary route forwarding unit to upgrade in first routing iinformation of local preservation the difference with said secondary route information according to comparative result again.Because the secondary route forwarding unit has been preserved first routing iinformation in this locality; Like this; The first via can only indicate the secondary route forwarding unit to upgrade the difference of first routing iinformation and secondary route information by forwarding unit; First updating route information that can make the secondary route forwarding unit that this locality is preserved is a secondary route information; Thereby the first via need not redispatched whole secondary route information to all peer-to-peers by forwarding unit, has reached the transmission that reduces message, reduces the purpose that takies of bandwidth.
The above is merely preferred embodiment of the present invention, and is in order to restriction the present invention, not all within spirit of the present invention and principle, any modification of being made, is equal to replacement, improvement etc., all should be included within the scope that the present invention protects.