Embodiment
Under the scene to a plurality of ASBR issue same external routes in the prior art; Router one needs get all neighbor routers of this router ready a jumping as the candidate when jumping calculating getting ready of outside route; Thereby causing the big problem of computing cost, the embodiment of the invention is dwindled the range of choice that the candidate gets a jumping ready through optimizing the set that the outside route candidate of many issue sources gets a jumping ready; Thereby the minimizing amount of calculation, and then reach the purpose of accelerating routing convergence.
Be example with the OSPF autonomous system below, and in conjunction with the accompanying drawings the embodiment of the invention be described in detail.
In the OSPF autonomous system framework of the embodiment of the invention, has the outer router of 2 routers and OSPF autonomous system at least through other Routing Protocol (like BGP, ISIS etc.) exchanging routing information.Router in OSPF autonomous system is through BGP (Border Gateway Protocol; Border Gateway Protocol) or after the ISIS Routing Protocol obtains OSPF autonomous system external routing information (hereinafter to be referred as outside route); Generate ASE LSA; Wherein having introduced should the outside route, through ospf protocol this ASE LSA is issued in OSPF autonomous system then.The router of issue ASE LSA is ASBR.
After the router in the OSPF autonomous system receives the ASE LSA of ASBR issue; Carrying out route according to this LSA calculates; Calculate this router and arrive next jumping of master of this outside route and get a jumping ready, then according to the routing update local routing table that calculates.
Wherein, router can adopt existing mode to calculate next jumping of master that this router arrives outside route.Concrete, outside route is the ASBR issue, ASBR might be positioned at and calculate zone of router; Also maybe be in other zone; Next jumping of master of outside route is from next jumping of master of ASBR, to inherit, if ASBR in the zone, so just can inherit from corresponding SPT (shortest path tree) node; Otherwise also need calculate the ASBR route in other zone through the tree of the SPT in the zone, obtain corresponding next jumping of outside route master then.
Get one ready when jumping what router calculated that this router arrives outside route,, then calculate the jumping of getting ready that arrives this outside route according to existing mode if judge the outside route to be single issue source.Concrete, get one ready and jump the jumping of getting ready of directly inheriting issue source ASBR; For the outside route of Dan Buyuan band FA, get one ready and jump the jumping of getting ready of inheriting this FA.That is to say; This router (being expressed as S) is to the route process issue source ASBR of outside route (being expressed as route D); S one jump to inherit the get jumping of S to the issue source ASBR of D to getting ready of D, promptly S to D to get a jumping ready be exactly the get jumping of S to this issue source ASBR.In like manner, for the outside route of single issue source band FA, S is equal to active and standby next jumping of FA equally to active and standby next jumping of the route of D.If judge that outside route is many issue sources, the method that then provides according to the embodiment of the invention is confirmed the candidate, and next jumps set, and therefrom optimizes the jumping of getting ready of outside route.
Referring to Fig. 3, get a flow process of jumping for what the embodiment of the invention provided ready for outside Route Selection, this flow process can comprise:
Step 301~302 after router (following table is shown router S) receives ASE LSA, judge whether the outside route (following table is shown outside route D) of this LSA issue is the outside routes of many issue sources, if the outside route of many issue sources then gets into step 303; If the outside route of single issue source then gets into step 306, calculate according to existing mode this list issue source outside route next jumping of master and get a jumping ready.
Step 303, router S calculates next jumping of master to outside route D of this equipment.This step can adopt existing mode to realize.
Wherein, it also can be a plurality of that router S can be one to next jumping of master of outside route D, if a plurality of, then these main next jumpings are of equal value.Such as, router S has 10 links to outside route D, and the cost that 5 links are wherein arranged is 1, and the cost of other link is greater than 1, and router S just has 5 (i.e. next jumping of 5 cost=1) to next jumping of master of outside route D so.In general next jumping of equal value does not have the number restriction.
Step 304, router S confirms that the candidate gets one ready and jumps set.Wherein, if FA does not all carry among the outside route D that active ASBR issued in institute, then this candidate get ready one jump set by router S to next jumping of master of each source ASBR with get a jumping ready and form; If FA all carries among the outside route D that active ASBR issued in institute, then this candidate get ready one jump set by router S to next jumping of master of each FA with get a jumping ready and form; If carry FA among the outside route D that has part A SBR to issue among the issue source ASBR of the outside route D of issue; Do not carry FA among the outside route D of part A SBR issue; Then this candidate gets one ready and jumps set and is made up of following element: router S is to next jumping of master of each FA and get a jumping ready, and router S is to next jumping of master of other each ASBR with get a jumping (said other ASBR be meant issued outside route D but do not carry FA among the route D) ready.
In the specific implementation, router S can adopt existing mode to calculate next jumping of master of own source ASBR to the outside route D of issue and get a jumping ready, and next jumping of master of the FA that carries in the outside route D of calculating oneself and get a jumping ready.
Step 305, it is router S selects this next jumping of master to next jumping of master of outside route D the jumping of getting ready that router S gets ready the jumping set from the candidate.
Wherein, next is jumped to a plurality of if router S is to the master of outside route D, then for each main next jumping, all need get one ready from this candidate and jump the set and get a jumping ready for its selection.When selecting to get ready a jumping, can get a jumping ready as its candidate with leading next other next jumping of master of jumping in the set for each main next jumping.But active and standby next jumping can not be identical, i.e. each main next jumping get a jumping ready, be the candidate next jump and remove this master in the set next jumps self next jumping of other candidate in addition.
The concrete realization of the step 305 of above-mentioned flow process can be adopted existing mode, selects to get ready a jumping as adopting the LFA algorithm to get ready the jumping set from the candidate.
Be example with following scene below; The concrete implementation procedure of step 305 in the above-mentioned flow process is described: router S is E to next jumping of master of outside route D; PN is the dummy node that radio network takes out between S and the E, and next jumping set of candidate of determining through step 304 is { H_1...H_j}, D_opt (N_i; N_j) expression node N_i is to the beeline of N_j, and next jumps set with { P_1...P_p} representes the master of the router type route from S to outside route D.
To each main next jumping P_i, the algorithm below using obtains next jumping of acyclic backup:
At first, the attribute information of a jumping is got in initialization ready:
Be provided with and be equipped with next hop address: P_i.alt_next_hop=NONE
Setting is got one ready and is jumped type: P_i.alt_type=NONE
Setting is got one ready and is jumped link protection attribute: P_i.alt_link-protect=FALSE
Hop node protection attribute: P_i.alt_node-protect=FALSE is got in setting ready
Wherein, If link protection refers to next this link fault of jumping of master of purpose route D, can arrive this purpose route through getting a jumping link ready so, i.e. the outgoing interface of active and standby next jumping is not same link; Main like this link failure, the link that is equipped with can work on.When Node Protection is meant the next-hop node fault, gets a jumping ready and can take over main next jumping, for example; S connects (can S be abstracted into a dummy node PN to the whole network between the E1/E2) through a radio network interface and E1, E2, and E1, E2 are connected to purpose route D, supposes that S--E1 is main next jumping; When the E1 fault, can arrive D so, so just think that the link of S--E2 provides Node Protection through S--E2; If but S is to the radio network fault between E1 and the E2; PN fault just, S--E2 is unreachable too so, so S-E2 can not provide link protection.If but S connects through two interfaces and E1/E2, suppose main next jump and be S--E1, so no matter be that the link between the S--E1 breaks down; Or E1 node failure; Next jumping of the backup of S--E2 can provide protection, and promptly S--E2 both had been link protection, also was Node Protection.
Then, to each alternative next jumping H_h, the algorithm below carrying out:
(1) initializing variable
cand_type=NONE
cand_link-protect=FALSE
cand_node-protect=FALSE
(2) if H_h meets the following conditions:
I.H_h is not P_i, i.e. the getting ready to jump be not next jumping of current master of current selection is to guarantee that active and standby next jumping can not be identical;
Ii.D_opt (H_h.neighbor, D)<D_opt (H_h.neighbor, S)+D_opt (S, D), expression H_h is acyclic;
Then continue to carry out following steps (3)~(6), otherwise, skip this node, select next alternative next jump into row and handle.
(3) the type attribute of H_h is set:
If H_h is next jumping of master to outside route D, cand_type=PRIMARY is set then; Otherwise cand_type=LOOP-FREE is set, representes that this node is acyclic;
(4) the link protection attribute of H_h is set:
If the link P_i.link at main next jumping P_i place is broadcast (broadcasting) or NBMA (Non-Broadcast Multiple Access; Non-broadcast multipath access network) link, the network segment that note P_i.link connects is PN, if then H_h place link H_h.link is not equal to P_i.link and H_h satisfies D_opt (H_h.neighbor; D)<D_opt (H_h.neighbor; PN)+(PN D), then is provided with cand_link-protect=TRUE to D_opt;
If P_i.link is not broadcast or NBMA_link, and H_h.link is not equal to P_i.link, and cand_link-protect=TRUE then is set;
(5) the Node Protection attribute of H_h is set:
If satisfy D_opt (H_h.neighbor, D)<D_opt (H_h.neighbor, P_i.neighbor)+(P_i.neighbor D), then is provided with cand_node-protect=TRUE to D_opt;
(6) whether can be selected as according to this node of determined property of H_h and get a jumping ready:
If cand_type=PRIMARY, and P_i.alt_type is not PRIMARY, then with H_h as getting a jumping ready, and, continue to handle next alternative next jumping then with the attribute replacement P_i.alt attribute of H_h;
If cand_node-protect=TRUE, and P_i.alt_node-protect=FALSE, then with H_h as getting a jumping ready, and, continue to handle next alternative next jumping then with the attribute replacement P_i.alt attribute of H_h;
If cand_link-protect=TRUE, and P_i.alt_ink-protect=FALSE, then with H_h as getting a jumping ready, and, continue to handle next alternative next jumping then with the attribute replacement P_i.alt attribute of H_h;
If D_opt (H_h.neighbor, D)<D_opt (P_i.neighbor, D); And D_opt (P_i.alt_next_hop, D)>=D_opt (P_i.neighbor, D); Then H_h is alternative next jumping of path downstream, and P_i.alt_next_hop is simple next jumping of acyclic backup, with H_h as getting a jumping ready; And, continue to handle next alternative next jumping then with the attribute of H_h replacement P_i.alt attribute;
If the cost of cost<P_i.alt_next_hop of H_h.link, then with H_h as getting a jumping ready, and, continue to handle next alternative next jumping then with the attribute replacement P_i.alt attribute of H_h; Otherwise,, continue to handle next alternative next jumping if the cost of cost>P_i.alt_next_hop of H_h.link skips H_h;
If the IP address of IP address<P_i.alt_next_hop of H_h, then with H_h as getting a jumping ready, and, continue to handle next alternative next jumping then with the attribute replacement P_i.alt attribute of H_h; Otherwise, skip H_h, continue to handle next alternative next jumping;
In the above-mentioned flow process, the operation of replacing the P_i.alt attribute with the attribute of H_h comprises:
P_i.alt_next_hops=H_h
P_i.alt_type=cand_type
P_i.alt_link-protect=cand_link-protect
P_i.alt_node-protect=cand_node-protect
Getting the flow process of a jumping ready can find out through above-mentioned selection; Be that the main next-hop node P_i priority when selecting to get a hop node ready is: be different from next jumping of master of P_i; Next of node-protect=TRUE jumped, and next of link-protect=TRUE jumped, next nearest jumping of the outside route D of distance; To next minimum jumping of the cost value (cost value) of outside route D, next jumping that the IP address is minimum.Based on above priority, be main next jump P_i and select to get ready one when jumping:
Preferentially get one ready and jump next jumping of master of selecting to be different from P_i the set, if such node only has one, then with its jumping of getting ready as P_i from the candidate; If it is a plurality of that such node has, then from these a plurality of nodes, continue in the node of node-protect=TRUE to select; If select less than, then get one ready and jump in the node of node-protect=TRUE the set and select from the candidate;
When from the node of node-protect=TRUE, selecting, if the node of node-protect=TRUE only has one, then with its jumping of getting ready as P_i; If it is a plurality of that such node has, then from these a plurality of nodes, continue in the node of link-protect=TRUE to select; If select less than, then get one ready and jump in the node of link-protect=TRUE the set and select from the candidate;
When from the node of link-protect=TRUE, selecting, if the node of link-protect=TRUE only has one, then with its jumping of getting ready as P_i; If it is a plurality of that such node has, then from the nearest next-hop node of the outside route D of these a plurality of node middle distances, continue to select; If select less than, then get one ready and jump the nearest next-hop node of the outside route D of set middle distance and select from the candidate;
When from the nearest next-hop node of the outside route D of distance, selecting, if the nearest next-hop node of the outside route D of distance only has one, then with its jumping of getting ready as P_i; If it is a plurality of that such node has, then from these a plurality of nodes, in the minimum next-hop node of the cost of outside route D, continue to select; If select less than, then get one ready and jump the set in the minimum next-hop node of the cost of outside route D and select from the candidate;
When from the next-hop node minimum, selecting, if only have one, then with its jumping of getting ready as P_i to the minimum next-hop node of the cost of outside route D to the cost of outside route D; If it is a plurality of that such node has, then from these a plurality of nodes, select of the get jumping of the minimum next-hop node in IP address as P_i.
For clarity sake, be example with OSPF framework shown in Figure 4 below, the concrete implementation procedure of the step 305 in the flow process shown in Figure 3 is described.
In the framework shown in Figure 4, S is a source node, also is root node; A1, A2 have issued outside route D, A1 then, and A2 is ASBR.S has calculated the interior shortest path tree (SPT) in zone oneself to be root; And calculate oneself active and standby path (promptly calculating S active and standby next jumping) to A1 and A2 to A1 and A2; Wherein, Next jumps to E1, gets one ready and jump and be N1 S to the master of A1, and next jumps to E2 S to the master of A2, getting one ready, to jump be N2.S has also calculated oneself main path (promptly calculating S master next jumping to outside route D) to outside route D, this main next jump and be E1.If A1 is or/and A2 band forwarding address FA when issuing outside route D, then S also calculates the active and standby path (be active and standby next jumping) of S to forwarding address FA.
If all do not carry FA among the outside route D of A1 and A2 issue, then the candidate gets a set of jumping ready and is made up of following element: next jumps E1 and gets one ready and jump N1 S to A1 master, and S is to next jumping E2 of master of A2 with get a jumping N2 ready, and this set can be expressed as:
Candidate next-hop={S is to next jumping of master of A1, and S is to the jumping of getting ready of A1, and S is to next jumping of master of A2, and S is to the jumping of getting ready of A2 }
If carry FA among the outside route D of A1 issue; Do not carry FA among the outside route D of A2 issue; Then S comprises to getting ready in the candidate collection of jumping of outside route D: S is to next jumping of master of the FA that A1 issued and get a jumping ready, and S is to next jumping of master of A2 and get a jumping ready.In like manner; If carry FA among the outside route D of A2 issue; Do not carry FA among the outside route D of A1 issue, then S comprises to getting ready in the candidate collection of jumping of outside route D: S is to next jumping of master of the FA that A2 issued and get a jumping ready, and S is to next jumping of master of A1 and get a jumping ready.
If all carry FA among the outside route D of A1 and A2 issue, then S comprises to getting ready in the candidate collection of jumping of outside route D: S is to next jumping of master of the FA that A1 issued and get a jumping ready, and S is to next jumping of master of the FA that A2 issued and get a jumping ready.
Get one ready with the candidate afterwards and jump set, and through moving the above-mentioned optimization algorithm of jumping of getting ready, optimize the get jumping of S to the optimum of D.
Briefly prove the reasonability of getting a jumping selection algorithm ready that the embodiment of the invention provided below, prove that promptly S gets a jumping meeting ready in the set of active and standby next jumping of all issue sources to the optimum of outside route D.For framework shown in Figure 5,, can not that the optimum of outside route D is got a jumping ready too if only need proof N ' not in active and standby next jumping of A1, A2.Method of proof is following:
Next jumps the master of case of external route D through A1, and next is jumped and is E1 with the master of A1, and getting ready of A1 one jumped and be N1, and next jumps the master of A2 and be E2, gets one ready and jumps and be N2, and then N ' satisfies like lower inequality with N1, N2 under optimal situation simultaneously:
(1) if N ', N1, N2 are acyclic, and is link protection (Link protect), then
D_opt(N1,A1)<D_opt(N1,S)+D_opt(S,A1)
D_opt(N2,A2)<D_opt(N2,S)+D_opt(S,A2)
D_opt(N′,A1)<D_opt(N′,A1)+D_opt(N′,A1)
(2) if N ', N1, N2 are acyclic, and be Node Protection (Node protect), then
D_opt(N1,A1)<D_opt(N1,E1)+D_opt(E1,A1)
D_opt(N2,A2)<D_opt(N2,E2)+D_opt(E2,A2)
D_opt(N′,A1)<D_opt(N′,E)+D_opt(E,A1)
(3) if be radio network PN between S and the E1, then also need satisfy inequality:
D_opt(N1,A1)<D_opt(N1,PN)+D_opt(PN,A1)
D_opt(N′,A1)<D_opt(N′,PN)+D_opt(PN,A1)
(4) do not become the jumping of getting ready of A1 and A2 by N ', can get inequality:
D_opt(S,N1)+D_opt(N1,A1)<D_opt(S,N′)+D_opt(N′,A1)
D_opt(S,N2)+D_opt(N2,A1)<D_opt(S,N′)+D_opt(N′,A2)
Get one ready when jumping what calculate D, suppose D_opt (N ', A1)+D_opt (A1, D)<D_opt (N ', A2)+D_opt (A2 D), can get:
D_opt(N′,D)=D_opt(N′,A1)+D_opt(A1,D)
Add simultaneously on (4) group inequality both sides D_opt (A1 D) can get:
D_opt(S,N1)+D_opt(N1,A1)+D_opt(A1,D)<D_opt(S,N′)+D_opt(N′,A1)+D_opt(A1,D)
Because D_opt (N1, D)≤D_opt (N1, A1)+D_opt (A1 D), can get:
D_opt(S,N1)+D_opt(N1,D)<D_opt(S,N′)+D_opt(N′,D)
And this moment, N1 satisfied above-mentioned (1), (2), (3) group inequality equally, get final product:
When D_opt (N ', A1)+D_opt (A1, D)<D_opt (N ', A2)+(in the time of D), there be getting ready to jump N1 more excellent than N ' of A1 in A2 to D_opt.In like manner can demonstrate,prove proper D_opt (N ', A1)+D_opt (A1, D)>D_opt (N '; A2)+(in the time of D), there is next jumping E2 of master of A2 in A2 or gets a jumping N2 ready more excellent than N ' D_opt; If provable thus N ' during next jumps, can not be that the optimum of D is got a jumping ready at A1, A2 active and standby too, the optimum that calculates D so gets one ready when jumping; Only need that next is preferred in jumping at A1, A2 active and standby, in the time of in like manner also can demonstrate,proving proper outside route band FA, this algorithm also is rational.
Can find out through above description; The embodiment of the invention is for the outside route of many issue sources; Do not need to adopt again traditional optimization algorithm, promptly to all candidates of S next to jump into row preferred, next jumping of master that only needs from issue source, to have calculated, get one ready and optimize optimum next jumping of backup in jumping.Next is jumped to suppose 100 candidates are arranged router self, for the outside route that 2 issue sources are arranged, if adopt traditional algorithm; Need to carry out 100 less preferred algorithms, and adopt the embodiment of the invention, then only need to carry out 4 less preferred algorithms; Reduce amount of calculation, improved routing convergence speed.
Based on identical technical conceive, the embodiment of the invention also provides a kind of router.
Referring to Fig. 5, the structural representation of the router that provides for the embodiment of the invention, as shown in the figure, this equipment can comprise: receiver module 51 and routing calculation module 52, receiver module 51 can receive the outside route of ASBR issue, and routing calculation module 52 can comprise:
Main next jumping computing unit 521 is used to calculate next jumping of master to said outside route of said router;
The candidate gets one ready and jump to confirm unit 522, is used for confirming that said router gets one ready to the candidate of said outside route and jump and gather; Wherein, said candidate get ready one jump set by said router to next jumping of master of the ASBR of the said outside route of issue with get a jumping ready, or/and, next jumping of master of the FA that said router carries in the said outside route and get ready and jump composition;
Get one ready and jump selected cell 523, be used for getting one ready and jump set, select the jumping of getting ready of this next jumping of master for said router to next jumping of master of said outside route from said candidate.
Concrete, the candidate gets one ready and jumps and confirm that unit 522 specifically is used for: if the said outside route of each ASBR issue is not all carried FA, then with said router to next jumping of master of each ASBR with get a jumping ready, get a jumping set member ready as the candidate; If all carry FA in the said outside route of each ASBR issue, then with said router to next jumping of master of each FA with get a jumping ready, get a jumping set member ready as the candidate; If carry FA in the said outside route of part A SBR issue; Do not carry FA in the said outside route of part A SBR issue; Then with said router to next jumping of master of each FA with get a jumping ready; And said router is got one ready as the candidate and is jumped the set member to next jumping of master of other ASBR with get a jumping ready; Wherein, do not carry FA in the said outside route that said other ASBR issued.
Concrete, get one ready and jump selected cell 523 and specifically be used for:,, get one ready from said candidate and jump the set and get a jumping ready for next jumping selection of this master then for wherein each main next jumping if next jumps to a plurality of said router to the master of said outside route.
Get one ready and jump principle and concrete realization that selected cell 523 selects to get ready a jumping, ditto said, repeat no more at this.
Need to prove that the router of indication has been represented router in the general sense in the embodiment of the invention, and the three-tier switch that has moved Routing Protocol.
Through the description of above execution mode, those skilled in the art can be well understood to the present invention and can realize by the mode that software adds essential general hardware platform, can certainly pass through hardware, but the former is better execution mode under a lot of situation.Based on such understanding; The part that technical scheme of the present invention contributes to prior art in essence in other words can be come out with the embodied of software product; This computer software product is stored in the storage medium, comprise some instructions with so that a station terminal equipment (can be mobile phone, personal computer; Server, the perhaps network equipment etc.) carry out the described method of each embodiment of the present invention.
The above only is a preferred implementation of the present invention; Should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; Can also make some improvement and retouching, these improvement and retouching also should be looked protection scope of the present invention.