On Solvability of an OSPF Routing Problem
A.Jüttner
a
,
Á
.Szentesi
a
, J.Harmatos
a
, M.Pióro
b
Ericsson Traffic Laboratory, Budapest, Hungary
a
Department of Communication Systems, Lund Institute of Technology, Sweden
b
address:Alpar Jüttner, Ericsson Traffic Laboratory, Budapest, P.O.B 107, H1300, Hungary,
Alpar.Juttner@eth.ericsson.se
Abstract
This concise paper deals with a basic routing optimisation problem associated with the Open
Shortest Path First (OSPF) protocol. With OSPF, all the packets arriving at a node and
destined to some other node are directed along the shortest paths between the nodes,
regardless of the packets originating nodes. The shortest paths to destinations are identified
at the network nodes on the basis of the fixed links weight system. The main purpose of the
paper is to present a proof that a flow allocation problem corresponding to the OSPF routing
is NPcomplete. This suggest that one has to use heuristic methods for solving the problem.
In the paper we also give a short survey of such methods.
Keywords:
IP traffic routing, OSPF, flow networks, flow allocation problems, NPcompleteness
1. Introduction
The paper deals with a basic routing optimisation problem associated with the Open Shortest
Path First (OSPF) protocol. The OSPF packet routing protocol [1] is one of the most
commonly used Interior Gateway Protocols in todays IP networks. The OSPF packet routing
rule, called the ECMP (EqualCost Multipath) rule, is essentially as follows: all the packets
arriving at node t and destined for node u are directed along the shortest paths from t to u,
regardless of the packets originating nodes. If there are more than one links outgoing from
node t and belonging to the shortest paths from t to u, then the packets are distributed evenly
among these links. The shortest paths to destinations are identified at the network nodes on
the basis of the links weight system w: each link e is assigned a positive number w
e
(weight)
and each node is aware of the weights w=(w
1
,w
2
,...,w
E
) of all links.
The main question dealt with in the paper is the existence of a feasible OSPF link weight
system for a given demands matrix and links capacities. In other words, we ask whether
there exists a system of weights that generates flows realising the demands such that the
resulting links loads do not ex ceed the given links capacities. We consider the following
OSPF Flow Allocation Problem (FAP).
FAP:
indices:
d=1,2,...,D demands
j=0,1,...,m(d) paths for flows realising demand d
e=1,2,...,Elinks
constants:
h
d
volume of demand d to be realised
a
edj
= 1 if link e belongs to path j realising demand d, 0 otherwise
y
e
capacity of link e
variables:
w
e
weight of link e (positive continuous variable), w = (w
1
,w
2
,...,w
E
)
constraints:
j
x
dj
(
w
)
=
h
d
d
=1,2,...,
D
(1)
d
j
a
edj
x
dj
(
w
)
y
e
e=1,2,...,E.(2)
Above, x
dj
(w) denotes the flow realising demand d on path j, implied by the links weight
system w. For a given weight system w, the flows x
dj
(w) are computed according to the ECMP
rule. The rule is illustrated in Figure 1: the shortest paths sact and sadt realise 0.25 of the
total demand volume between nodes s and t, whilst the
shortest path sbet realises the remaining 0.5 of the
volume. Note that the flow functions x
dj
(w) are not given
explicitly. In order to make the ECMP flow splitting
procedure consistent, OSPF assumes that the link weights
are positive, so there can be no loops in the shortest paths.
Consequently, constraints (1) in FAP guarantee that all of
the demands are realised, and constraints (2)  that links
loads do not exceed their capacities.
The main result of the paper, presented in Section 2, is an
original, simple proof showing that the above formulated OSPF flow allocation problem is
NPcomplete [2]. It should be emphasised here that a certain NPcompleteness result for an
uncapacitated counterpart of FAP (in which links capacities are not strictly fixed  they are
taken into account through the use of penalty functions) has been announced in [3].
Because of the NPcompleteness of FAP one is forced to use heuristic methods for solving
the problem. In Section 3 we give a survey of such methods. In particular we discuss a
promising twophase approach [4,5] in which in, Phase 1, the demands are allocated to single
paths and then, in Phase 2, we try to find a corresponding weight system w generating the set
of single demand allocation paths obtained in Phase 1 (this means that the paths found in
Phase 1 must be the unique shortest paths with respect to the weight system w). For Phase 1
we use an approach based on a metaheuristic called Simulated Allocation [6]. The paths
obtained in Phase 1 satisfy the necessary shortest paths uniqueness condition which requires
that if two paths meet at a certain node, they should share a common sequence of links until
they split for good. This condition is rather powerful and in most cases is also sufficient
(cf.[7,8]). For Phase 2 we use Linear Programming, as proposed in [7,8,4]. Concluding
remarks are given in Section 4.
2. The NPcompleteness result
Below we shall demonstrate that FAP is an NPcomplete problem. To do this we shall show
that the so called X3C Problem (Exact Cover by 3Sets) ([SP2], p.221 in [2]) can be
transformed to (a simplified version of) FAP. X3C is known to be NPcomplete and is as
follows:
instance
set X={x
1
,x
2
,...,x
p
} of p=3q elements (
X
=p) and a family C of n 3subsets of X
(C={C
1
,C
2
,...,C
n
}, C
i
X,
C
i
=3, i=1,2,...,n), n
q
question
does C contain a subfamily C
C, of q (
C
=q) pairwise disjoint subsets of X?
Consider the directed singlecommodity flow graph depicted in Figure 2. Vertex s is the
source, vertex t is the sink. The vertices in the upper row correspond to the 3sets of family
C, whilst the vertices in the lower row correspond to the elements of set X. The edges between
the two rows reflect the incidence relation between family C and set X: vertex C
i
is connected
to vertex x
k
if, and only if, x
k
C
i
(in the considered example C
1
={x
1
,x
2
,x
3
}, C
2
={x
2
,x
4
,x
k
} and
C
n
={x
k1
,x
k+1
,x
p
}). In the sequel we shall assume that X
F
C, i.e. that family C covers set X
(otherwise the X3C problem is trivial).
It is easy to see that for the particular edges capacity values assumed in the considered
graph, the value of the maximal flow from s to t is equal to q+1. To see this we first note that
the flow cannot be greater than q+1, since no more flow than q+1 can be received by the sink.
On the other hand, we can saturate all the edges incoming to vertex u and hence achieve the
maximal flow. To do this, for each element of X we select one 3subset from C that contains
the considered element and assign flow 1/3 to the corresponding edge. This operation
determines how much flow must be assigned to each edge from the source to the first row of
vertices. The maximal flow from s to t can be easily found in the described way in polynomial
time.
Now let us constraint the admissible flows in the considered graph to the so called equal
split flows (ESflows). A flow f is an ESflow if for each vertex v the flows assigned to the
edges outgoing from v are either equal to 0 or to some fixed, vertexdependent positive value.
In other words, for any fixed vertex v and each edge of the form (v,w), there exists a number
z(v) such that f(v,w)=0 or f(v,w)=z(v). The basic observation leading to our NPcompleteness
result is that the answer to the question in X3C is positive if and only if the maximal ESflow
in the considered graph is equal to q+1.
Suppose the subfamily C
={C
i(1)
,C
i(2)
,...,C
i(q)
} exactly covers set X. We assign flow equal
1 to all edges (s,C
i(j)
) for j=1,2,...,q (i.e. f(s,C
i(j)
)=1, j=1,2,...,q), and flow equal 0 to the rest of
the edges of the form (s,C
l
). This assignment will force f(x
k
,u)=1/3 for k=1,2,...,p. Finally,
assigning f(s,t)=1 we arrive at an ESflow with value q+1. Conversely, if the maximal ESflow
is equal to q+1 then, due to the equalsplit assumption, this can be achieved only in one way:
flow equal to 1 is assigned to edge ( s,t) and to exactly q out of p edges of the form (s,C
l
) (with
f(s,t)<1 the flow value q+1 could not be achieved because of the capacity q assigned to link
(u,t)). Note that this is the reason why edge ( s,t) is necessary: without it, it would be possible,
as illustrated in Figure 3, to find an ESflow with value q even if there would be no exact 3
cover.) The only possible way to maintain flow of value q down in the main part of the graph
(i.e. the left part, without edge (s,t)) is to saturate all edges incoming to vertex u. This implies
that the vertices C
l
with f(s,C
i(j)
)=1 define the family C
exactly covering set X.
Thus, we have proved our observation: the answer to the X3C question is positive if and
only if the maximal ESflow is equal to q+1. Hence, if we were able to find an ESflow equal
to q+1, or show that such a flow does not exist, in polynomial time, then we would give an
answer to the X3C question in polynomial time. This proves that the following ESflow
problem (ESF):
instance
integers p, q, n such that p=3q and n
q, and a graph of the structure depicted in Figure 1
question
does there exist an ESflow of value q+1?
is NPcomplete.
Note that any instance of ESF can be solved by solving a corresponding instance of FAP.
Such instances of FAP have only one demand d=1 (between s and t) with volume h
1
equal to
q+1, and the path structure and links capacities specified by the graph in Figure 1. The task
is to find a links (edges) weight system that combined with the ECMP rule defines an ES
flow f answering the question in ESF. Of course, every ESflow in the considered graph can
be generated by the weight system defined by assigning weights w=1 to all edges with positive
flows in the main part of the graph(these flows are either 1, 1/3 or q), weight w=4 to edge (s,t),
and weights w=
to all other edges.
Thus any algorithm solving FAP, solves also ESF, and hence X3C. This proves that FAP
is NPcomplete.
3. Heuristic methods for solving FAP
As AP is an NPcomplete problem., one cannot expect inventing any exact effective solution
methods for the networks of practical size, and is forced to use heuristics. Since the OSPF
routing problem is rather new, not many solution methods have been proposed so far. Below
we characterise some approaches to FAP known from the literature.
One such method, described in [4], has been devised for a version of FAP using a penalty
function instead of constraints (2). This means that instead of (2) an objective function is
introduced:
objective:
minimise C(w) =
e
F
e
(
d
j
a
edj
x
dj
(w)), (3)
where F
e
(
) is a linkdependent (more precisely, depending on the link capacity) piecewise
linear convex function, with the link load as the argument. The method is a specialised version
of Local Search. Starting from random weights, the neighbourhood search is performed using
two basic operations (i) an arbitrary change of a single weight and (ii) a special weight change
that distributes the flows more evenly in the network. The tabu list used for avoiding cycles
in the local search is implemented with hashing tables in order to improve performance.
Numerical results for realword and randomly generated network configurations show that
optimisation can improve network throughput by 50% to 110% compared to conventional
weight setting heuristics, in some cases even approaching the theoretical optimum. The
running times are within the range of one hour even for the largest problem instances tested.
Two other methods, one based on Local Search (called WA  Weights Adjustment) and
the other based on Simulated Annealing (called SAN) are discussed in [4]. Both methods,
similarly to [3] scan the weight systems space, trying to find a feasible solution to the pure
allocation task (1)(2).
WA starts with a random weight system and computes the flows and the resulting link
loads according to the ECMP rule. Next, the weights of the underloaded links are decreased
and the weights of the overloaded links increased, and the procedure is repeated. The weights
adjustments are performed according to certain simple rules which help avoiding cycling.
SAN also starts with a random system of (integer) weights. In one step it selects a link at
random and decrements or increments its weight by 1 (this choice is also random). Next the
algorithm computes the link loads according to the ECMP rule and accepts or rejects the new
solution using the standard Metropolis test of Simulated Annealing. Then the procedure is
repeated. The cost function used for the test depends on links overload values. In [4] it is
reported that for the considered examples both methods give similar nearoptimal solutions,
still SAN requires much longer time.
A somewhat different approach is described in [5]. Instead of using the links weights as
optimisation variables and solving AP directly, one can first route the demands on single
paths, hoping that the resulting set of paths is realisable with some OSPF system of weights.
The approach is called a TwoPhase Approach (TPA) and its two phases are follows.
Phase 1.
Solve the following problem (indices and constants are as in AP of Section 2):
variables:
dj
binary variables forcing the singlepath flow of demand d
constraints:
j
dj
= 1 d=1,2,...,D (4)
d
(
j
a
edj
dj
)h
d
)
y
e
e=1,2,...,E.(5)
Phase 2.
Find a system of positive link weights w according to which the unique demand
paths resulting from Phase 1 are also unique shortest paths according to w (this is the so called
Unique Inverse Shortest Path problem, UISP, cf.[7]).
Phase 2 can be solved with Linear Programming, as discussed in [7,8,4]. Phase 1 is more
troublesome. The problem in Phase 1 is a Mixed LinearInteger Programming (MIP) problem
and as such can in principle be solved by means of e.g. CPLEX or other MIP solvers.
However, exact methods for MIPs (i.e. branchandbound and the cuttingplane method) are
exponential and usually fail for large networks because of excessive time and memory
requirements. In such cases available heuristic methods can be considered; still there is one
fundamental difficulty: it is likely that a solution obtained in Phase 1 will not be feasible from
the Phase 2 viewpoint.
In order to increase the chance of obtaining a feasible set of single paths, we have devised
an application of the Simulated Allocation metaheuristic, called SAL+, described in [5].
In SAL+ any set of currently used paths fulfils a simple necessary uniqueness condition
illustrated in Figure 4. The condition (cf.[7,8]) requires that if two paths meet at a certain
node, they must continue their way along a common sequence of links until they split for good
(in Figure 4.1 the paths aceg and bcdf on the left side satisfy this condition, whilst the
paths aceg and bcdef to the right do not). The condition is known to be rather powerful
(cf.[7,8]). Note that for undirected graphs it is easy to
check the condition for a given pair of paths: if the paths
are not disjoint, the number of common nodes must be
exactly equal to the number of common links plus 1.
As reported in [5], for reasonably dimensioned
networks SAL+ performs very well. It is able to find the
feasible solutions to AP almost always and in a short
time, even for the large (above 50 nodes networks). In
some (rare) cases the solutions yielded by SAL+ are not
feasible from the UISP problem of Phase 2 viewpoint.
For such cases certain paths adjustment heuristics can
be applied for identifying a minimum set of paths P with the property that after deleting the
set P the rest of the paths are feasible. Then new paths corresponding to the demands realised
by the paths from P can reallocated in a feasible way.
4. Conclusions
5. References
1.OSPF Version 2, RFC2328 (www.ieft.org/rfc/rfc2328.txt), 1998
2.Garey, M.R., Johnson, D.S.: Computers and Intractability  A Guide to the Theory of NP
Completness, W.H.Freeman and Company, 1979
3.Fortz, B., Thorup, M.: Internet Traffic Engineering by Optimizing OSPF Weights, INFO
COM 2000, TelAviv, May 2000
4.Pióro, M., Szentesi, Á., Harmatos, J., Jüttner, A., Gajowniczek, P., Kozdrowski, S.: On
OSPF Related Network Optimisation Problems, IFIP ATM IP 2000, Ilkley, July 2000
5.Gajowniczek, P., Pióro, M., Szentesi, Á., Harmatos, J.: Solving an OSPF Routing Problem
with Simulated Allocation, 1
st
PolishGerman Teletraffic Symposium PGTS 2000,
Dresden, September 2000
6.Pióro, M.: Simulation Approach to the Optimisation of Multicommodity Integral Flow
Networks, Proc. International Conference on Optimization and Simulation, Singapore,
1997
7.Faragó, A., Szviatovszki, B., Szentesi, Á.: Allocation of Administrative Weights in PNNI,
Networks'98, Sorrento, 1998
8.Ameur, W. Ben., Gourdin, E., Liau, B.: Dimensioning of Internet Networks, DRCN 2000,
Munich, April 2000.
Enter the password to open this PDF file:
File name:

File size:

Title:

Author:

Subject:

Keywords:

Creation Date:

Modification Date:

Creator:

PDF Producer:

PDF Version:

Page Count:

Preparing document for printing…
0%
Σχόλια 0
Συνδεθείτε για να κοινοποιήσετε σχόλιο