Sie sind auf Seite 1von 6

A New Algorithm to Compute Alternate Paths in Reliable OSPF (ROSPF)

Jian Pu*, Eric Manning, Gholamali C. Shoja, Anand Srinivasan**

PANDA Group, Computer Science Department University of Victoria Victoria, BC, Canada

Abstract
Alternate paths may significantly improve reliability of routing protocols. We develop a fast alternate path-finding algorithm for our proposed Reliable OSPF (ROSPF) routing protocol. This algorithm is based on the Dijkstras shortest path algorithm and a logarithmic edge-increment procedure. Three partially disjoint paths can be calculated in time complexity O(N*logN*logW0), where N and W0 represent the number of nodes and the sum of the weights of all edges in a graph, respectively. We use simulation tests to compare the performance of our algorithm and the MPS K shortest paths algorithm that uses the deviation approach. Based on the results of simulation, our algorithm is proved to be an efficient alternate path-finding method with several advantages such as simpler implementation, faster execution time, better stability and fewer shared edges in a selected path set.

Key words: OSPF, network reliability

1. Overview of Reliable OSPF (ROSPF)


Open Shortest Path First (OSPF) [1, 13] is a widely used dynamic link-state routing protocol for TCP/IP. In OSPF, each router obtains an
* **

identical copy of a link-state database, which describes the global view of the network. Furthermore, every router runs the Dijkstras shortest path algorithm to calculate the shortest path tree (SPT) with itself as the root for data traffic. However, OSPF is not suitable for an unstable network, where routers or links may fail often, causing the Dijkstras algorithm to be constantly re-invoked. As a result, the convergence time of the network may become unacceptable. Deploying alternate paths in routing protocols may significantly improve network reliability. In our proposed Reliable OSPF (ROSPF), three paths are used for packet transmission: one is the primary path and two are alternate paths. Traditionally, the shortest path algorithms [6] are widely used to calculate primary paths in routing protocols. However, alternate paths are mainly calculated by two categories of algorithms in graph theory, e.g. the K shortest path algorithms [2, 7, 8, 9] and the disjoint path algorithms [3, 4, 10, 11, 12]. These algorithms have some drawbacks. For the K shortest path algorithms, after all paths are sorted, an additional path-checking procedure has to be performed to choose two alternate paths that satisfy the desired constraints for acceptable paths. Therefore, when the number of paths from a source to a destination is large, the K shortest path algorithms become very inefficient for selecting alternate paths. For the disjoint path algorithms, on the other hand, the alternate paths

Supported in part by funds from Nortel Networks Formerly at Nortel Networks

have to be determined by applying flow theorems. The final path set calculated by disjoint path algorithms is totally disjoint, but the primary shortest path of the network may not be included. To achieve a clearer and simpler calculation, a new algorithm, based on the Dijkstras shortest path algorithm [5] and a logarithmic edge weightincrement procedure, is proposed. The rest of this paper is organized as follows. Section 2 describes the path-selecting constraints used for alternative paths. Section 3 presents our new alternative path-finding algorithm. Section 4 shows the performance comparisons between our new algorithm and the K shortest path algorithms. Section 5 concludes this paper and proposes some future work.

edges, respectively. We use integer values MaxSEdbl and MaxSEtri to denote the related maximum acceptable number of double- and triple-shared edges. This constraint is essential in cases requiring high network reliability when multiple paths are used between two routers. In this paper, only edge sharing is considered, while node sharing is omitted.

d. maximum failure probability of three partially disjoint paths (MaxFailRate)


The network reliability decreases as the number of shared edges among multiple paths increase. MaxFailRate, a float value, represents the maximum acceptable failure probability of the selected path set, i.e. three paths in ROSPF. MaxFailRate is a comprehensive and upper level constraint in the procedure for selecting alternate paths [16]. Several parameters have to be used for calculating the overall failure probability F of three paths between a pair of nodes: failure probability of a single edge, the number of edges on each path, and the number of all edges shared among paths. For simplicity, the calculation for F only considers failure probability caused by edge failures. Node failures are omitted.

2. Alternate path calculation constraints


This section lists several typical constraints used to decide whether or not a calculated path is acceptable. These constraints may be placed by the final users, the network service providers, or the routing protocol itself. In practice, imposed constraints may be used individually or concurrently.

a. maximum path length (MaxLen)


MaxLen represents the maximum acceptable length of a path, defined as the sum of edge weights wi in the path. The path length may represent various physical properties, such as distance, cost, delay, or failure probability. It can be represented by an integer or a float value. If wi = 1 is true for all edges, then the path length is the hop number from a source to a destination.

3. A new algorithm to calculate alternate paths


For backward compatibility with OSPF, the shortest path in a network is deployed as the primary path for traffic transmission in ROSPF. Under the assumption of equally likely failure probability of every edge in the network, the shortest path has the highest reliability. There are two main considerations in calculating alternate paths in ROSPF. One is that alternate paths should be as short as possible. Another is that an alternate path should have the minimum number of double- and triple-shared edges with other obtained paths. These two points are the main goals of our algorithm. We do not pursue three totally disjoint paths in our new algorithm. A calculated path will be accepted as an alternate path if it satisfies constraints predefined in section 2.

b. maximum number of hops on the path (MaxHop)


MaxHop represents the maximum acceptable number of hops on a path. If a path contains k nodes, then its hop number is k-1. MaxHop is an integer value.

c. maximum (MaxSE)

number

of

shared

edges

Shared edges among three paths, also called common edges, include two types of edge sharing: double- and triple-shared

In the Dijkstras algorithm [5], an edge (i, j) with heavier weight w(i, j) will have less probability to be chosen in the calculated shortest path Pst from node s to node t. If we set w(i, j) = INFINITY, then w(i, j) will never show up in Pst. Heuristically, a new shortest path Pst will have fewer common edges with the previous shortest path Pst if Pst is re-calculated after incrementing all edge-weights of Pst by a large value W. Reference [14] indicates that alternate paths may be obtained by deleting all edges of path Pst and re-calculating path Pst by re-invoking the Dijkstras algorithm. This is equivalent to setting W = INFINITY. Rouphail [15] developed a pretrip route planning scheme by providing the tourists alternate routes using similar ideas. After the shortest path P0 was calculated, he increased each edges weight in P0 by 20%, 50% and 100% of its original weight. The best alternate route for tourists could then be chosen from the candidate paths as re-calculated by the Dijkstras algorithm. Our new algorithm extends Rouphails algorithm, and is based on a logarithmic edge weight-increment method and recursive invocation of the Dijkstras algorithm. We start with a large W on P0 to ensure the minimum number of shared edges between the new calculated shortest path P1 and P0. If P1 fails the tests of the other desired constraints, W is decreased, and then a new P1 can be calculated. W may also be increased logarithmically to calculate a better P1 with fewer shared edges. Such increase and decrease operation is similar to a binary-search-tree. By the same steps, the second alternate path P2 can be calculated based on the calculated P1 and P0.
b 2 a 1 3 c

W = 3, the next shortest path P1 will still be ac. Therefore, W has to be much bigger. If edge (a, c) increases its weight by W = W0 = 6,

as the maximum edge weight in the graph, i.e.

then we can get the desired P1 (abc). Obviously, if we choose W >> W0, the calculation for P1 is exactly as same as choosing W = W0. Our new algorithm calculates alternate paths in a series of phases. In every phase, we keep probing one valid path by the edge weightincrement procedure in which W logarithmically dithers between W0 and 0. Every path calculated by the Dijkstras algorithm is tested by the desired constraints to determine whether it is acceptable. At most one alternate path is generated within each phase. When there are multiple acceptable paths in a phase, the path calculated by the larger value of W is preferred. Therefore, the final path set (three paths) will include minimum common edges. Figure 2 illustrates how the new algorithm works. Node s and t are the source and the sink. The total weight of all arcs in the graph is W0 = wi = 20. Assume that the only constraint on alternate paths is the maximum number of hops on a calculated path, i.e. MaxHop < 4. Other constraints, such as path length, the number of shared edges and failure probability are all omitted for simplicity. Step 1. In case A, the primary shortest path P0 (sadt) is calculated and it is selected as the first acceptable path. The length of P0 is 4. Step 2. In case B, every edge on P0 has its weight increased by W = W0 = 20, e.g. wi = wi + W0. Then, we re-invoke the Dijkstras algorithm to obtain the 2nd path P1 (scabt). The length of P1 is 9. However, P1 has 4 hops, which violates the constraint: MaxHop < 4. Therefore, path P1 has to be discarded, although it has 0 common edges with P0. Step 3. In case C, we now try to logarithmically reduce W on path P0 and re-calculate the next shortest path. When W = 2, the second acceptable path P2 (scdt) can be obtained. P2 has 3 hops and has the length 6. Because no other acceptable

Figure 1, Choose the appropriate initial value W

The initial value of W is set to W0 = wi, the sum of the weights of all edges in an undirected graph (or arcs in a directed graph). For example in Figure 1, the primary shortest path P0 between node a and c is ac. If we choose W

paths can be found for any W > 2, P2 is chosen as the first alternate path, although it has 1 common edges with P0. Step 4. In case D, we have already found two valid paths P0 and P2. Thus, the edge weight-increment procedure is performed on both paths. By invoking the Dijkstras algorithm again, the third acceptable path P3 is obtained. It has 1 common edge with P0 and no common edge with P2. The length of P3 (sabt) is 7, and P3 also satisfies the constraint on hop number.

comparison with our new alternate path-finding algorithm. Both implementations of these two algorithms were written in C. Furthermore, a random graph generator was developed for our simulation tests. For every graph size, 100 different graphs of that size are randomly generated. The MPS algorithm is used to solve the unconstrained K shortest path problem, i.e. no other constraints for shortest path calculation except path length are considered. However, our problem is actually a constrained problem, in which additional constraints concerning common

1 s 2 2

a 1 c

2 2 3 1

b 1 d

4 t 1 s

21 2 2

a 1 c

2 22 3 1

b 1 d

4 t

21

A). P0: sadt, path length = 4 P0 is deployed as the primary path

B). P1: scabt, path length = 9 (Increase all edges in P0 by W = W0 = 20, and then recalculate path). P1violates MaxHop < 4 and it has to be discarded. 2 21 c 22 23 1 d

3 s 2 2

a 1 c

2 4 3 1

b 1 d

4 t 3 s

21 2 22

b 1

4 t

41

C). P2: scdt, path length = 8 the real path length = 6. (Increase P0 by W = 2, and then re-calculate path)

D). P3: sabt, path length = 27 the real path length = 7. (Increase P0 and P2 by W = W0 = 20, and then re-calculate paths)

Figure 2, Major steps to calculate the alternate paths (W0 =wi =20)

4. Experimental testing
Martins MPS algorithm [8] uses a deviation approach to the K shortest path algorithms. It calculates and ranks deviation paths between two nodes based on the primary shortest path in O(mlogN + Kn) time, where m is the edge number and N is the node number in a graph. We implemented the MPS algorithm for purpose of

edges have to be considered. A typical solution is to compute K shortest paths, then choose the acceptable ones among them by considering the additional path selection constraints. Therefore, a new part, which is a procedure to select acceptable paths among candidate paths by applying the constraints described in section 2, has to be appended after the path ranking

procedure in the MPS algorithm. This part is called the path-checking procedure in our extended version of MPS implementation. In all of the following tests, we set the additional constraints of the maximum number of doubleshared edges MaxSEdbl = 4, and the maximum number of triple-shared edges MaxSEtri = 1.

800 execution time (ms) 600 400 200 0 0 100 200 300 400 500 600 # of nodes in the graph
Our new algorithm Extended MPS algorithm

Figure 3, Comparison of execution time between the extended MPS K shortest paths algorithm and our algorithm for different graph sizes.

algorithm versus the extended MPS algorithm when a graph is sparse. As the number of nodes and edges increase in the graph, the difference between the two algorithms grows. Our algorithm is about two times faster when the number of node is 20, and about four times faster when the number of node is 550. Moreover, the execution time of our algorithm increases more slowly and smoothly. Besides running faster, our new algorithm has the advantage of using fewer shared edges than the extended MPS algorithm. The predefined constraints for path selection are MaxSEdbl = 4 and MaxSEtri = 1. Three paths calculated by the extended MPS algorithm may have smaller variation in path length but more shared edges, because the extended MPS algorithm searches sequentially for an acceptable path among the ranked paths. On the contrary, our new algorithm may obtain three paths that have bigger variation of path length but fewer shared edges. This feature of fewer shared edges is of course what we require for our ROSPF protocol. We observe that the length of the 1st alternate path calculated by our algorithm is no more than 20% greater than the path calculated

Table 1: Comparisons of number of edges shared by two paths and three paths

number of double-shared edges


node number 20 50 100 150 200 250 300 350 400 450 500 550 extended MPS algorithm our algorithm 2.69 3.11 3.23 3.82 3.67 3.75 3.68 3.79 3.85 3.91 3.81 3.57 0.62 0.43 0.35 0.47 0.29 0.22 0.18 0.20 0.36 0.52 0.61 0.35

number of triple-shared edges


extended MPS algorithm our algorithm 0.33 0.53 0.72 0.64 0.56 0.62 0.66 0.59 0.69 0.81 0.67 0.64 0.06 0.09 0.10 0.12 0.09 0.04 0.04 0.06 0.06 0.15 0.11 0.13

Figure 3 compares the required execution time to obtain three acceptable paths by our new

by the extended MPS algorithm. For the 2nd alternate path, it is no more than 30% greater.

Table 1 lists the number of shared edges in both algorithms.

5. Conclusion and future work


In this paper, we have proposed a new alternate path-finding algorithm for our ROSPF (Reliable OSPF). The three paths calculated by our algorithm may be partially disjoint; however, they observe further constraints, e.g. maximum path length and number of allowable shared edges. We use simulation to compare the performance of our new algorithm and the MPS K shortest paths algorithm. Based on the results of simulation tests, our new algorithm is proved to be an efficient and fast alternate path-finding method. Compared with the MPS algorithm, our new algorithm has several advantages, such as simpler implementation, faster execution time, better stability and fewer shared-edges in the selected path set. In our performance comparison tests, effects of two parameters of a graph, the connectivity and diameter, are omitted. For further work, execution time analysis when the connectivity and the diameter of graphs change should be considered. Moreover, future tests in a real network environment should also be performed.

References
[1] J. Moy, OSPF Version 2, RFC2328, July 1997 [2] D. Eppstein, Finding the K shortest Paths, SIAM J. Computing, 28(2): 652-673, 1999 [3] S. Evevt and E. Tarjan, Network Flow and Testing Graph Connectivity, SIAM J. Comput., Vol.4, December 1975, pp. 507518 [4] E. A. Dinic, Algorithm for Solution of a Problem of Maximum Flow in a Network with Power Estimation, Soviet Math., Dokl., 11(1970), pp.248-264 [5] Dijkstra, E. W., A Note on Two Problems in Connexion with Graphs, Numerische Mathematik, 1959, pp.269-271 [6] G. Gallo and S. Pallottino, Shortest Path Methods: A Unifying Approach,

Mathematical Programming Study, NorthHolland, 26 (1986), pp.38-64 [7] E.Q.V. Martins, An Algorithm for Ranking Paths that May Contain Circles, European Journal of Operational Research, 18 (1984), pp.123-130 [8] E.Q.V. Martins, M.M.B. Pascoal, and J.L.E. Santos, Deviation Algorithms for Ranking Shortest Paths, International Journal of Foundations of Computer Science, Vol. 10, No. 3 (1999), pp247-261 [9] V.M. Jimenez and A. Marzal, Computing the K Shortest Paths: a New Algorithm and an Experimental Comparison, Springer-Verlag, Lecture Notes in Computer Science Series, Vol. 1688, pp.15-29, 1999 [10] L.R. Ford and D.R. Fulkerson, Maximum Flow Through a Network, Canadian Journal of Mathematics, 8 (1956), pp.399-404 [11] J. W. Suurballe, Disjoint Paths in a Network, Networks, 4 (1974), pp.125-145 [12] D. Torrieri, Algorithms for Finding an Optimal Set of Short Disjoint paths in a Communication Networks, IEEE Transactions on Communications, Vol. 11, Nov. 1992, pp.1698-1702 [13] J. Moy, OSPF - Anatomy of Internet Routing Protocol, Addison Wesley, 1998 [14] A. S. Tanenbaum, Computer Networks, 2nd edition, 1988 by Prentice-Hall, Inc. CHAP. 5, SEC. 5.2.2, pp.291-294 [15] N. M. Rouphail, et. al., A Decision Support System for Dynamic Pre-trip Route Planning, Proceedings of the 4th ASCE (American Society of Civil Engineers) International Conference on Application of Advanced Technologies in Transportation (AATT), New York, June 1995, pp.325-329 [16] Jian Pu, Eric Manning, G. C. Shoja, Routing Reliability Analysis of Partially Disjoint Paths, will appear in 2001 IEEE Pacific Rim Conference on Communications, Computers and Signal processing (PACRIM' 01), August, 2001, Victoria, British Columbia, Canada

Das könnte Ihnen auch gefallen