OSPF
OSPF
1
Agenda
Introduction
Node-Arc Model
Arc-Path Model
Conclusion
2
Introduction
OSPF – Open Shortest Path First
Interior Gateway Protocol
Routing Information in an autonomous system
3
Routing using OSPF
Routers maintain database with link state
information, weights computed using link state, IP
address etc.
This database in each router is updated by
transmitting Link State Advertisements throughout
the autonomous system
A shortest path tree is constructed by each router
with itself as the root node and based on weights in
the database.
4
Illustration of OSPF
a
Traffic from a to z =1200
[Weight, Flow]
Router 1
[1, 600]
[1, 600]
Router 2 OC-12, 622 Mbps
[1, 300] [1, 300]
Router 3
Router 4 Router 5
[2,300] [3,600]
[2,300]
Router 6
z
5
Disadvantages
Lack of prior knowledge of point to point demands
may result in congestion as seen in link OC-12
6
Node-Arc Weight Setting
Problem
The weight-setting problem as defined by Pioro and
Medhi is as follows:
Given: the network topology, the link capacities, and a set of
point-to-point demands
Find: Weights and flows for each link
Constraints: the demands must be satisfied, the capacities
cannot be violated, and at each node the total entering flow to a
given destination is split equally among all out-going links that lie
on the shortest paths to that destination.
7
Illustration of Node-Arc Model
Routing 30 units from Node 2 to Node 7
Routing 10 units from Node 4 to 7
3 15 5 15 +5+7.5 7
1
1 1
15 5+7.5 5+7.5
1 1 1
2
15 4 5+7.5 6 8
1 1
30 10
fij lij =0
i j
wij cij=50
8
Illustration of Node-Arc Model
Routing 50 units from Node 2 to 7
1 3 25 5 50 7
1 1
25 25
1 1 2, 5
2
25 4 6 8
1 1
50
fij lij =0
i j
Wij, cij cij=50
9
Node-Arc Model Formulation
Definition of sets, parameters and variables
N denotes the set of nodes (routers)
L denotes the set of links (unordered pairs of nodes)
E denotes the set of arcs
h od denotes the demand volume to be routed from origin o to
destination d
od
D denotes the set of (o, d ) pairs such that h > 0
H is the sum of demand volumes (i.e.)
H h od
( o , d )D
10
Node-Arc Model Formulation
Set D d : (o, d ) D
cij denotes the capacity of arc (i, j ) E
The requirement for commodity d D at node i , denoted by
g id is defined below:
h
( s , d )D
sd
, i d , d D
g id hid , (i, d ) D, d D
0 , otherwise
11
Node-Arc Model Formulation
wij denotes the weight on arc (i, j ) E
xijd denotes the flow on arc with destination d D
rid denotes the distance from node i to node d on the
shortest path to node d D
y id denotes the common value of the flow assigned to arcs
originating at i and contained in shortest paths from i to
dD
d
The binary decision variable u ij = 1 if arc (i, j ) belongs to the
shortest path to node d ; else 0
12
Illustration of Node-Arc Model
Routing 30 units from Node 2 to Node 7
Routing 10 units from Node 4 to 7
15 15 +5+7.5
1 3 5 7
1 1
15 5+7.5 5+7.5
1 1 1
15 5+7.5
2 4 6 8
1 1
30 10
7
7
y27 15 u 23 1
x 15
23 r27 3
7
y47 12.5 u 45 1
x 12.5 r47 2
7
45
7
u68 0
fij lij =0
i j
wij, cij cij=50
13
Formulation of Node-Arc
Problem
Objective:
w
minimize
ij
Constraints: ( i , j )E
The first set of constraints ensures that demand at node is
satisfied and ensures the conservation of flow at each node
( k , j )E
x kjd ik k
x d
g
( i , k )E
d
k N , d D
ij cij
x d
(i, j ) E
d D
14
Formulation of Node-Arc
Problem (contd.)
The third set of constraints ensures that flows on shortest paths
for each (o, d ) pair are equal.
0 y id xijd (1 u ijd ) H d D , (i, j ) E
The fourth set of constraints prevents flow on any arc that is not
in a shortest path for demand node d .
xijd u ijd H d D, (i, j ) E
wij 1 (i, j ) E
xijd 0 d D , (i, j ) E
rid 0 i N , d D
y id 0 i N , d D
16
Arc-Path Weight Setting
Problem
The objective is to split the flow equally on limited paths
of an (o, d ) demand pair
By limiting the candidate paths, all possible flow
combinations can be enumerated
A unique pattern number is assigned to a possible flow
distribution in the paths
The selection of a pattern suggests if there is a single or
multiple shortest paths for a (o, d ) pair
The weights on the arcs can be computed based on the
pattern selection subject to capacity constraints
17
Illustration of Arc-Path Model
Routing 30 units from Node 2 to Node 7
Routing 10 units from Node 4 to 7
1 3 5 7
2 4 6 8
18
Flow Distribution Pattern for 2
(o,d) Pairs
Candidate Paths Demand (2,7) Demand (4,7)
p1 - 2->3->5->7 Path p1 p2 p3 p4 p5
Pattern
p2 - 2->4->5->7 v1 30 0 0
v2 0 30 0
p3 - 2->4->6->7 v3 0 0 30
v4 15 15 0
p 4 - 4>5->7 v5 0 15 15
v6 15 0 15
p5 - 4->6->7 v7 10 10 10
v8 10 0
Patterns v7 and v10 are v9 0 10
selected v 10 5 5
19
Illustration of Arc-Path Model
Routing 30 units from Node 2 to Node 7
Candidate Paths – 2->3->5->7; 2->4->5->7;2->4->6->7
Routing 10 units from Node 4 to 7
Candidate Paths – 4->5->7; 4->6->7
3 10 5 10 +10 +5 7
1
1 1
10 10+5 10+5
1 1 1
2
20 4 10 +5 6 8
1 1
30 10
fij lij =0
i j
wij cij=50
20
Arc-Path Model Formulation
Definition of sets, parameters and variables
Pod denotes the set of paths for demand pair (o, d ) D
P = ( o,
d )D
Pod denotes the denote the set of paths computed
using the least hops criterion.
J p denotes the arcs in path p P
Qij denotes the paths that include arc
(i, j ) E
Rod denotes the pattern numbers for each (o, d ) pair
Assumptions
The demand values for all (o, d ) D are equal
The number of candidate paths for each demand pair is 3 (i.e.)
Pod 3 (o, d ) D
21
Arc-Path Model Formulation
(contd.)
Definition of sets, parameters and variables
1
Set C od denote the set of patterns that are associated with a
single path for demand pair (o, d ) D
2
Set C od denote the set of patterns that are associated with two
paths for demand pair (o, d ) D
3
Set C od denote the set of patterns that are associated with three
paths for demand pair (o, d ) D
Let p be the path associated with pattern v C od and let set
1
1
Todv p
Let pa and p b be the paths associated with each v C od and let
2
2
Todv p a , pb
22
Arc-Path Model Formulation
(contd.)
Let pa , pb and pc be the paths associated with each v C od
3
and
let Todv p a , pb , p c
3
Demand (2,7) Demand (4,7)
Path p1 p2 p3 p4 p5
23
Arc-Path Model Formulation
(contd.)
Let V 1, 2, ,7 D be the set of patterns
The flow in path p P , pattern is stored in matrix bvp
Let V p v : v V , bvp 0
Let f p be the flow of path p P
Let l p be the length of path p P
The binary variable qv is 1 if pattern v V is selected; and 0,
otherwise
24
Formulation of Arc-Path
Problem
Objective:
wij
minimize
( i , j )E
Constraints:
The first set of constraints ensures that that only one
pattern is selected for each (o, d ) pair.
q
vRod
v 1 (o, d ) D
25
Formulation of Arc-Path
Problem (Contd.)
The third set of constraints calculates the length of each path
w
( i , j )J p
ij l p p P
26
Formulation of Arc-Path
Problem (Contd.)
The following sets of constraints ensure that if a pattern with flow
on two paths is chosen then the lengths of those two paths are
shortest
l p (lt 1) M (1 qv ) (o, d ) D, v Cod2 , p Todv
2 2
, t Pod \ Todv
3 3 3
l p lt M (1 qv ) (o, d ) D, v Codv , p Todv , t Todv , p t
27
Formulation of Arc-Path
Problem (Contd.)
The boundary conditions are given below:
28
Empirical Analysis
Comparison between node-arc and arc-path models
29
Summary and Conclusions
OSPF algorithm involves developing a shortest path tree
by each router with itself as the root node
Data packets to any other router are directed along this
shortest path tree.
In this approach the point-to-point demands are
disregarded
A node-arc based integer programming model to
determine the optimal weights for a given problem
instance was presented
The node-arc model balances flow by splitting the
incoming flow at a node equally among the outgoing arcs.
30
Summary and Conclusions
The node-arc model is very difficult to solve
An improved alternative model using an arc-path
approach was presented
The arc-path model splits the flow at origin node equally
among all the outgoing paths.
The arc-path approach allows the user to restrict the
number of candidate paths
Restricting the solution space allows much larger
problems to be solved using the arc-path approach
31