Summary of the invention
Therefore, the method that needs a kind of establishing protective tunnel route at present.
In order one of to address the above problem, the present invention proposes a kind of method of establishing protective tunnel route, this method may further comprise the steps: obtaining with first router node is first path tree of root router node; With the secondary route device node in said first path tree is root router joint structure second path tree, and in said second path tree, said first router node and downstream router node thereof is made marks; Confirm the tunnel intermediate transit point of said secondary route device node according to said first path tree and said mark; And the protection tunnel route of constructing said secondary route device node according to said tunnel intermediate transit point.
According to embodiments of the invention, this method also comprises: after obtaining said first path tree, start backup path and calculate timer; If variation has taken place topology of networks before the said timer expired, then obtain said first path tree again; And if said timer expired, then start the structure of said second path tree.
According to embodiments of the invention, said first path tree and/or said second path tree are through the OSPF structure.
According to embodiments of the invention, comprise: use OSPF according to said tunnel intermediate transit point establishing protective tunnel route according to the step of said tunnel intermediate transit point establishing protective tunnel route.
According to embodiments of the invention; The step of constructing said second path tree also comprises: judge whether the router node that does not calculate is as yet arranged in said first path tree; If the router node that does not calculate is arranged as yet, then select in the said router node that does not calculate as yet one as said secondary route device node.
According to embodiments of the invention, said method also comprises: after the protecting tunnel route of the said secondary route device node of structure, continue to judge whether the router node that does not calculate is as yet arranged in said first path tree.
According to embodiments of the invention; The step of confirming said tunnel intermediate transit point comprises: search in said first path tree and the said secondary route device node router node in same branch not, with wherein do not make marks and router node that routing metric is minimum as said tunnel intermediate transit point.
According to embodiments of the invention, confirm that the step of said tunnel intermediate transit point comprises: with tunnel intermediate transit point assignment is null value; Judge in said first path tree whether unchecked router node is arranged; If unchecked router node is arranged; Then at said unchecked router node and said secondary route device node not in same branch; Said unchecked router node is not marked in said second path tree; And said tunnel intermediate transit point is that the routing metric of null value or said unchecked router node is during less than the routing metric of said tunnel intermediate transit point; Give said tunnel intermediate transit point with said unchecked router node assignment, otherwise, continue to judge in the said root router node path tree whether unchecked router node is arranged; If there is not unchecked router node; Judge then whether said tunnel intermediate transit point is null value; If be not null value; Then search the interface IP address that said first router node links to each other with said tunnel intermediate transit point, the tunnel intermediate transit point of the prefix of said secondary route device node bulletin is set to said interface IP address, the establishing protective tunnel route; If said tunnel intermediate transit point is a null value, establishing protective tunnel route not then.
The method of calculating protecting tunnel route proposed by the invention has the characteristics simple, that computing cost is little that realize.
In addition; The method of calculating protecting tunnel route of the present invention can be utilized the IP address prefix of tunnel style protection destination for each apace and calculate the intermediate transit point and the establishing protective tunnel route in protection tunnel; Promote the inner technology of heavy-route fast of autonomous system, and effectively improved the fault-resistant ability of network.
Embodiment
Describe embodiments of the invention below in detail, the example of said embodiment is shown in the drawings.Be exemplary through the embodiment that is described with reference to the drawings below, only be used to explain the present invention, and can not be interpreted as limitation of the present invention.
The method that it should be noted that establishing protective tunnel route proposed by the invention can be applied in the multiple Routing Protocol, and for clear and simple purpose, embodiments of the invention only describe with OSPF as an example.
As one embodiment of the present of invention, the method for establishing protective tunnel route may further comprise the steps:
Obtain with first router node is first path tree of root router node;
With the secondary route device node in first path tree is root router joint structure second path tree; And in second path tree, first router node and downstream router node thereof are made marks, wherein the downstream router node of certain router node A is meant such node: the root router node must pass through this router node A to the shortest path of this downstream router node;
Confirm the tunnel intermediate transit point of secondary route device node according to first path tree and said mark; And
Protection tunnel route according to tunnel intermediate transit point structure secondary route device node.
Be illustrated in figure 1 as the flow chart of the method for establishing protective tunnel route according to an embodiment of the invention.As one embodiment of the present of invention, the router S of this method operation OSPF accomplishes and preserves with S after route is calculated is the shortest path tree SPT (S) of root router node; Calculate a shortest path tree for each the router node D among the SPT (S), and the downstream router node of mark S and S therein; In visit SPT (S) with the D node in same branch not, seek wherein do not make marks and node that routing metric is minimum as the tunnel intermediate transit point, and based on the address architecture protection tunnel route of tunnel intermediate transit point.As one embodiment of the present of invention, be meant such node with D at the node in the same branch among the SPT (S): node S is identical to first node on the shortest path of node D to first node and the node S on the shortest path of this node.As one embodiment of the present of invention, routing metric is meant all link metric sums on this route, and link metric can comprise greater than 0 and less than 65535 integer, is identifying the expense when using this link to send packet.
As one embodiment of the present of invention, the router S of operation OSPF starts the calculating that timer is controlled backup path after accomplishing route calculating.If variation has taken place topology of networks before the timer expired, then OSPF recomputates route, otherwise begins the process of following calculating backup path.
As shown in Figure 1, this method may further comprise the steps:
After the router S of operation OSPF accomplished route calculating, preserving with S was the shortest path tree SPT (S) of root node, and the startup backup path calculates timer;
If timer expired is then done following operation for each the router node D among the SPT (S):
Calculating is the shortest path tree SPT (D) of root node with D, and in SPT (D), the downstream router node of S and S is made marks;
With the D not mark and the routing metric of the router node in same branch, note that such router node T:T is not made marks and the routing metric of T minimum in SPT (D) in inspection SPT (S), judge whether to exist the node that does not make marks;
If there is the node do not make marks, then with the prefix of D bulletin as destination address, the address of T is as the address of the tunnel transit node of these destination addresses, establishing protective tunnel route in this way;
If there is not the node that does not make marks, then be not configured to the protection tunnel route of D.
The router node that more than selection does not make marks and routing metric is minimum only is one embodiment of the present of invention as the tunnel intermediate transit point, in the practical implementation process, also can consider other conditions, like node power consumption or the like.
Be illustrated in figure 2 as the flow chart of the method for establishing protective tunnel route according to an embodiment of the invention.This method may further comprise the steps:
After the router of use OSPF had calculated route, preserving with this router S was the shortest path tree SPT (S) of root node, and started timer;
Judge whether the router node that does not calculate is arranged among the SPT (S) as yet: if the router node D that does not calculate is as yet arranged among the SPT (S), then calculating with D is the shortest path tree SPT (D) of root node, in SPT (D), the downstream router node of S and S is made marks then; Be null value then, begin to judge among the SPT (S) whether unchecked router node is arranged the T assignment;
If unchecked router node A is arranged among the SPT (S); Then work as A and D and in S, do not belong to same branch; And A does not make marks in SPT (D); And T is the routing metric of null value or A during less than the routing metric of T, gives T with the A assignment, continues to judge among the SPT (S) whether unchecked router node is arranged then.Otherwise continue to judge among the SPT (S) whether unchecked router node is arranged;
If do not have unchecked router node among the SPT (S), judge then whether T is null value.If T is not a null value; Then search the interface IP address Addr_T that S links to each other with T to the shortest path of T; The tunnel intermediate transit point of all prefixs of D bulletin is set to Addr_T then, and the establishing protective tunnel route continues to judge whether the router node that does not calculate is as yet arranged among the SPT (S) then;
If there is not as yet the router node that do not calculate among the SPT (S), then computational process finishes.
Be illustrated in figure 3 as the sketch map of the method for establishing protective tunnel route according to an embodiment of the invention.As shown in Figure 3, router one 0.0.0.1 preserves with 10.0.0.1 after OSPF has calculated route to be the shortest path tree SPT (10.0.0.1) of root node and to start timer.In the time of timer expired, begin to calculate backup path.
For router node 10.0.0.3, calculating with 10.0.0.3 is the shortest path tree SPT (10.0.0.3) of root node, and node 10.0.0.1 is made marks.Check the node among the SPT (10.0.0.1) then, find with 10.0.0.3 not at same branch and the node 10.0.0.2 that in SPT (10.0.0.3), do not make marks.Then search the interface IP address 192.168.1.2 that 10.0.0.1 links to each other with 10.0.0.2 to the shortest path of 10.0.0.2; The tunnel intermediate transit point of the prefix 192.168.5.0/24 of 10.0.0.3 bulletin is set to 192.168.1.2 then, constructs a protection tunnel route.
10.0.0.1 computational process and said process for router node 10.0.0.2 are similar.The process and the 10.0.0.1 of two other router node 10.0.0.2 and 10.0.0.3 establishing protective tunnel route are similar in the network.The protection tunnel route of having calculated is used when breaking down backup path to transmit transmission of data to divide into groups to lay the foundation fast.When the link occurs fault between 192.168.2.1 and the 192.168.2.2; Router one 0.0.0.1 just can send to 192.168.1.2 with the grouping of mailing to 192.168.5.1 from main frame 192.168.4.1 through the tunnel immediately; Utilize 10.0.0.2 that the destination is sent in grouping; And do not use common forwarding interface 192.168.2.1, thereby avoided the link of packet through breaking down.
The method of the establishing protective tunnel route that embodiments of the invention proposed has the characteristics simple, that computing cost is little that realize; Can operation well apace on adopting based on the router of the resist technology of IP tunnel, and can well be used in the route protection situation under the various topological structures.Embodiments of the invention can utilize the IP address prefix of tunnel style protection destination for each apace and calculate the intermediate transit point and the establishing protective tunnel route in protection tunnel; Promote the inner technical development of heavy-route fast of autonomous system, effectively improved the fault-resistant ability of network.The method of the establishing protective tunnel route that embodiments of the invention proposed can be used in the various routers of present existence, also can be applicable to the next generation network construction.
Although illustrated and described embodiments of the invention; For those of ordinary skill in the art; Be appreciated that under the situation that does not break away from principle of the present invention and spirit and can carry out multiple variation, modification, replacement and modification that scope of the present invention is accompanying claims and be equal to and limit to these embodiment.