Routing in General Distance Vector Routing
Routing in General Distance Vector Routing
Routing in General Distance Vector Routing
1
Contents
1. Routing in General
2. Distance vector
Bellman-Ford
How it is used in practice
3. Protocols that implement Distance Vector
RIP
RIP v2
IGRP
4. More about routing in general
2
1. Introduction
Why were routing protocols invented
solution
3
Routing vs Packet Forwarding
Packet Forwarding
for every packet
done in real time
Routing
computation of routing tables or data structures for unicast and multicast
normally only between routers
non-real time: latency up to 2 minutes
uses dedicated protocols (RIP, OSPF, EIGRP (Cisco) for unicast
and DVMRP, M-OSPF, PIM)
ICMP-redirect may alter routing tables, but only in hosts
4
Interior Routing
Routing methods are of two types
Inside an administrative domain = Interior Routing
Between domains = Exterior Routing
5
Metrics
Distance vector and link state find paths that minimize a metric
Static metric - does not depend on the network state; for example:
number of hops
link capacity and static delay
cost
Dynamic metric- depend on the network state
link load
current delay
see end of section
6
Simple Routing Methods
How routing protocols work
static configuration
for toy networks only
flooding
each packet duplicated on each outgoing link; loops prevented by packet id
or other mechanism ; duplicate packets may be received at destination
simple and robust
no need for routing tables
robust - tolerates link or router failures
optimal in some sense
the first packet has found the shortest path to the destination
costly
many duplicated packets – little useful traffic
used as an ingredient by mobile ad-hoc routing methods (AODV, OLSR)
source routing
source writes route into packet header
router reads next hop from packet header, moves pointer
route discovered by flooding
7
Source Routing
SA DA RI data A B 2.2.4
A B 2.2.4 2 A B 2.2.4
1
IS 1
2 3
4 2 4 B
A 1 2 IS
IS
3 3
1 IS 3
solution
A route is described by a sequence of port numbers
8
Route Discovery in Token Rings
R3
B2
R2 B3 B6
B1
R5 R6 B
A R1
R4
B5
B4
DSR (Dynamic Source Routing) is a protocol for routing in ad-hoc networks that uses
the same mechanism, but with IP addresses instead of MAC addresses.
10
Other Methods
11
2. Distance Vector
What it does:
Computes best paths to all destinations
Fully distributed
Using as only information the distances from self to all destinations
How it works
uses distributed Bellman-Ford – see next slides
12
The Centralized Bellman-Ford Algorithm
What: Given a directed graph with links costs A(i,j), computes the best path from i to
j for any couple (i,j).
We assume A(i, j) > 0 and A(i,j) = when i and j are not connected.
How: Take for example j=1 and let p(i) be the cost of the best path from i to 1.
Define pk(i) as the cost of the best path from i to 1 in at most k hops. Let p 0(1) = 0, p0(i) = for i
1.
(Bellman Ford, BF1)
Theorem
1. If the network is fully connected, the algorithm stops at the latest for k=n and then
pk(i)=p(i) for all i
2. The shortest path from i 1 to 1 is defined by pred(i) = Argminji [A(i,j) + p(j)].
Idea of Proof: pk(i) is the distance from i to 1 in at most k hops.
Comment: recursion is equivalent to : p k(i) = min{ minji, j1 [A(i,j) + pk-1(j)] , A(i,1) }
13
Example
Apply the theorem: write pk(i), pred(i) and draw the shortest
paths to node 1.
3
6
1
2 1
1 3
3 1
5 4
1
solution
14
Impact of Initial Conditions
Example: Q. does the algorithm converge to the shortest path
with initial condition as shown ?
3 k\i 1 2 3 4 5 k\i 1 2 3 4 5
6
1 0 0 0 0 0 0 0 0 6 1 1 0
2 1 1 1
1 3 2 2
3 1 3 3
5 4 4 4
1
solution
15
Impact of Initial Condition
Theorem
The algorithm converges in a finite number of steps to the correct values
for all initial conditions such that p0(1)=0 and for every node i that is
connected to 1
If there is no path from i to 1, the algorithm lets pk(i) converge to 1
16
Proof
We do the proof assuming all nodes are connected.
1. Let pk be the vector pk[i], i=2,…. Let B be the mapping that transforms an array x[i] i=2…into the
array Bx defined for i 1 by
Bx[i]=min j i, j 1[A(i,j) + x(j)]
Let b be the array defined for i 1 by
b[i]= A(i,1)
The algorithm can be rewritten in vector form as
(1) pk = B pk-1 b
where is the pointwise minimum
2. Eq (1) is a min-plus linear equation and the operator B satisfies B(x y)= Bx By. Thus, Eq(1) can
be solved using min-plus algebra into
(2) pk = Bkp0 Bk-1b … Bb b
3. Define the array e for i 1 by e[i]= . Let p0=e. Eq (2) becomes
(3) pk = Bk-1b … Bb b. Now we have the Bellman Ford algorithm with classical initial
conditions, thus, by Theorem 1:
(4) for k n-1: Bk-1b … Bb b = q
where q[i] is the distance from i to 1.
4. We can rewrite Eq(2) for k n-1 as
(5) pk = Bkp0 q
5. Bkp0[i] can be written as A[i,i1]+ A[i1,i2]+ …+ A[ik-1,ik]+ p[ik] thus
(6) Bkp0[i] k a, where a is the minimum of all A[i,j]. Thus B kp0[i] tends to when k grows.
Thus for k large enough, Bkp0 is larger than q and can be ignored in Eq(5). In other words, for k
large enough :
(6) pk = q
17
Distributed Bellman Ford
BF1 can be used in a centralized algorithm to compute p(i) i.e. find the shortest path.
However, this is not its main interest, because there is a better algorithm (Dijkstra)
that can be used in a centralized method
But: it can be distributed, as follows.
Distributed
DistributedBellman-Ford
Bellman-FordAlgorithm
Algorithmv1, v1,BFD1
BFD1
every
every node, say i, maintains an estimate q(i)ofofthe
node, say i, maintains an estimate q(i) thedistance
distancep(i)p(i)totosome
somefixedfixednode
node1;1;
initial
initialconditions
conditionsarearearbitrary
arbitrarybut
butq(1)=0
q(1)=0atatall
allsteps
steps
from
from time to time, i sends the new value q(i) to allits
time to time, i sends the new value q(i) to all itsneighbours
neighbours
when
whennodenodei ireceives
receivesaavalue
valueq(j
q(j0)0)from
fromany
anyneighbour
neighbourj0j,0,ititsets
setsq(j
q(j0)0)totothe
thereceived
received
value
valueandandupdates
updatesq(i)q(i)by
byrecomputing
recomputing
eq
eq(1)
(1) q(i)
q(i):=:=min
minj neighbour (A(i,j)+q(j))
j neighbour (A(i,j)+q(j))
ififeq
eq(1)
(1)causes
causesq(i)
q(i)totobe
bemodified,
modified,pred(i)
pred(i)isisset
settotoaavalue
valueofofj jthat
thatachieves
achievesthe
themin
min
Theorem: if the time to reliably send a message is bounded by T, the algo converges
to the same result as the centralized version in at most nT time units (if the network
is fully connected)
18
Distributed Bellman-Ford v1
A possible run of algorithm v1. The
table shows the successive values of q(i)
i 1 2 3 4 5
0
3 1 -> 2 0 1
6 2 -> 5 0 1 4
1 2 -> 3 0 1 7 4
2 1 5 -> 4 0 1 7 5 4
1 3 2 -> 4 0 1 7 4 4
3 2 1 -> 4 0 1 7 2 4
4 -> 5 0 1 7 2 3
5 4 5 -> 2 0 1 7 2 3
1 5 -> 3 0 1 4 2 3
link breaks
Q: give a possible
scenario after link
4—5 breaks
solution
19
Naive Distributed Bellman-Ford
The previous distributed version requires a node to remember all previously
received estimates q(j) for all neighbours, even if they are not the best ones
In practice this is a problem if we need to compute the shortest paths to not
just one destination, but to a large number.
eq
eq(1a)
(1a) q(i)
q(i):=
:=min
min{{A(i,j)
A(i,j)++q(j),
q(j),q(i)
q(i)}}
solution
20
Distributed Bellman-Ford, cont’d
There is an alternative algorithm, that requires only to remember the best
neighbour (pred(i))
Distributed
DistributedBellman-Ford
Bellman-FordAlgorithm,
Algorithm,version
version22BFD2
BFD2
every
everynode,
node,say
sayi,i, maintains
maintainsananestimate
estimateq(i)
q(i)of
ofthe
thedistance
distancep(i)
p(i)totosome
somefixed
fixed
node
node1;1;initial
initialconditions
conditionsare
arearbitrary
arbitrarybut
butq(1)=0
q(1)=0atatall
allsteps
steps
from
fromtime
timetototime,
time,i isends
sendsits
itsvalue
valueq(i)
q(i)totoall
allits
itsneighbours
neighbours
when
whennode
nodei ireceives
receivesaavalue
valueq(j
q(j0)0)from
fromany
anyneighbour
neighbourj0j,0,ititsets
setsq(j
q(j0)0)totothe
the
received
receivedvalue
valueand
andupdates
updatesq(i)
q(i)bybyrecomputing
recomputing
eq
eq(2)
(2) ififj0j == pred(i)
0 == pred(i)
then
thenq(i)
q(i):=
:=A(i,j
A(i,j0)+q(j 0)
0)+q(j0)
else
else q(i)
q(i):=
:=min
min{{A(i,j
A(i,j0)0)++q(j
q(j0), q(i) }
0), q(i) }
ififeq
eq(2)
(2)causes
causesq(i)
q(i)totobe
bemodified,
modified,pred(i)
pred(i)isisset
settotoj 0j 0
21
Distributed Bellman-Ford v2
Theorem: If the time to reliably send a message to all neighbours and perform local
computations is bounded by T’, then the algorithm BFD2 converges to the correct values
in at most m (T+T’) time units, where m is the number of steps of convergence of the
centralized algorithm with same initial conditions
Comment: The main difference with version 1 is that eq(2) replaces eq(1). Assume we
use v2, and we start from a condition such that q(i) is indeed equal to the minimum
given by eq (1) (which is what, intuitively, is true most of the time).
When j is not equal to pred(i), both eq(1) and eq(2) have the same effect: the new value
of q(i) is the same in both cases. In contrast, if j == pred(i), then eq (2) sets q(i) to the
new value A(i,j)+q(j), whereas eq(1) sets it to minj neighbour (A(i,j)+q(j)). Eq(2) provides an
upper bound on eq(1), in this case. It turns out that the algorithm still works, by the
same mechanism that makes the algorithm work even when the initial conditions are
arbitrary. Indeed, node i will send its new value to all remaining neighbours, who will in
turn do an update and eventually, node i will receive values of q(j) that will correct the
problem. In other words, if the new value of q(i) is too high (compared to what would be
obtained with eq (1)), this is repaired in one round of exchanges with the neighbours.
22
Distributed Bellman-Ford v2
A possible run of algorithm v1:
i 1 2 3 4 5
0
1 -> 2 0 1
2 -> 5 0 1 4
2 -> 3 0 1 7 4
5 -> 4 0 1 7 5 4
3 2 -> 4 0 1 7 4 4
6 1 -> 4 0 1 7 2 4
1
2 1 4 -> 5 0 1 7 2 3
1 3
5 -> 2 0 1 7 2 3
5 -> 3 0 1 4 2 3
3 2 link breaks
5 4
1
Q: give a possible
scenario after link
4—5 breaks
solution
23
How it is used in practice
Node i computes shortest path and next hop for all network prefixes n that it heard
of.
Initially: D(i,n) = 0 if i directly connected to n and D(i,n) = + for any n that was
never heard of.
Node i receives from neighbour k latest values of D(k,n) for all n (this is the
distance vector). Node i computes the best estimates according to algorithm BFD2
This converges if network is stable
hello mechanism to reset computation after changes
if neighbour k is no longer present, node i will no longer receive hello messages, and after a
timeout, this has the same effect as if node i would receive the message from k: D(k,n)=1 for
all n. Then algorithm BFD2 is run
1
c(i,1) D(1,n)
i c(i,k) D(k,n)
k n
c(i,m)
m D(m,n)
24
Example 1
A B
net dist nxt net dist nxt
n1 0 n1,A n1 0 n1,B
n4 0 n4,A n2 0 n2,B
A B
n1
n4 n2
n3 m2
D C
D C
m3 m1
net dist nxt net dist nxt
n3 0 n3,D n2 0 n2,C
n4 0 n4,D n3 0 n3,C
m3 0 m3,D m1 0 m1,C
m2 0 m2,C
25
Example 1
A B
net dist nxt from A net dist nxt
n1 0
n1 0 n1,A n1 0 n1,B
n4 0
n4 0 n4,A n2 0 n2,B
n4 1 n1,A
A B
n1
n4 n2
n3 m2
D C
D C
m3 m1
net dist nxt net dist nxt
n3 0 n3,D n2 0 n2,C
from D
n4 0 n4,D n3 0 n3,C
n3 0
m3 0 m3,D m1 0 m1,C
n4 0
m2 0 m2,C
m3 0
n4 1 n3,D
m3 1 n3,D
26
Example 1
net dist nxt
B n1 0 n1,B
A
n2 0 n2,B
net dist nxt n3 1 n2,C
n1 0 n1,A n4 1 n1,A
n4 0 n4,A m1 1 n2,C
m2 1 n2,C
m3 2 n2,C
from C
A B n2 0
n1
n3 0
n4 n2 m1 0
n3 m2 m2 0
D C n4 1
D C m3 1
m3 m1
net dist nxt net dist nxt
n3 0 n3,D n2 0 n2,C
n4 0 n4,D n3 0 n3,C
m3 0 m3,D m1 0 m1,C
m2 0 m2,C
n4 1 n3,D
m3 1 n3,D
27
Example 1 - Final
net dist nxt
net dist nxt
A B n1 0 n1,B
n1 0 n1,A n2 0 n2,B
n2 1 n1,B n3 1 n2,C
n3 1 n4,D n4 1 n1,A
n4 0 n4,A m1 1 n2,C
m1 2 n4,D m2 1 n2,C
m2 2 n4,D m3 2 n2,C
m3 1 n4,D
A B
n1
n4 n2
n3 m2
net dist nxt
D D C net dist nxt
n1 1 n4,A m3 m1
n2 1 n3,C n1 1 n2,B
n3 0 n3,D n2 0 n2,C
n4 0 n4,D C n3 0 n3,C
m1 1 n3,C m1 0 m1,C
m2 1 n3,C m2 0 m2,C
m3 0 m3,D n4 1 n3,D
m3 1 n3,D
28
Example 1 - Failure
net dist nxt
B n1 0 B
n2 0 B
We show only the router in the next hop field n3 1 C
n4 1 A
m1 1 C
m2 1 C
m3 2 C
A B
n1
n4 n2
net dist nxt n3 m2
D D C net dist nxt
n1 1 A
n2 1 C m3 m1 n1 1 B
n3 0 D n2 0 C
n4 0 D C n3 0 C
m1 1 C m1 0 C
m2 1 C m2 0 C
m3 0 D n4 1 D
m3 1 D
29
Example 1 - Failure
net dist nxt
B n1 0 B
n2 0 B
n3 1 C
n4 1 A timeout
m1 1 C
m2 1 C
m3 2 C
A B
n1
n4 n2
net dist nxt n3 m2
D D C net dist nxt
timeout n1 1 A
n2 1 C m3 m1 n1 1 B
n3 0 D n2 0 C
n4 0 D C n3 0 C
m1 1 C m1 0 C
m2 1 C m2 0 C
m3 0 D n4 1 D
m3 1 D
30
Example 1 - Failure
net dist nxt
B n1 0 B
n2 0 B
n3 1 C
m1 1 C
m2 1 C
m3 2 C
A B
n1
n4 n2
net dist nxt n3 m2
D D C net dist nxt
n1 2 C
n2 1 C m3 m1 n1 1 B
n3 0 D From C: n2 0 C
n4 0 D n1 1 B
C n3 0 C
m1 1 C n2 0 C m1 0 C
m2 1 C n3 0 C m2 0 C
m1 0 C
m3 0 D n4 1 D
m2 0 C
n4 1 D m3 1 D
m3 1 D
31
Example 1 - After Failure
net dist nxt
B n1 0 B
n2 0 B
n3 1 C
n4 2 C
m1 1 C
m2 1 C
m3 2 C
A B
n1
n4 n2
net dist nxt n3 m2
D D C net dist nxt
n1 2 C
n2 1 C m3 m1 n1 1 B
n3 0 D n2 0 C
n4 0 D C n3 0 C
m1 1 C m1 0 C
m2 1 C m2 0 C
m3 0 D n4 1 D
m3 1 D
32
Example 1: conclusions
Example 1 illustrates
how Bellman Ford is mapped to the network concepts
how topology changes are taken into account
most recent announcement replaces previous ones
non refreshed announcements become obsolete
how distance vector carries reachability information
33
Example 2
To simplify, we identify destination with router
A Assume algorithm has converged B
dest link cost dest link cost
A local 0 B local 0
B l1 1 A l1 1
D l3 1 C l2 1
C l1 2 E l4 1
E l1 2 D l1 2 C
cost =1 dest link cost
A
l1
B cost =1
l2 C local 0
cost =1 l3 l4 C A l2 2
l5 B l2 1
l6
D E cost =5 D l2 3
D cost =1 E
E l2 2
dest link cost dest link cost
D local 0 E local 0
A l3 1 A l4 2
B l3 2 B l4 1
C l3 3 D l6 1
E l6 1 C l4 2
34
Example 2
we now show only table entries: to C
link 2 fails
B updates its table
C l1 2 C l2
A B
l1
l3 l4 C C local 0
l5
l6
D E
C l3 3 C l4 2
35
Example 2: Link failure
Just before B updates its table, A broadcasts its table with cost 2 to C
B updates
C l1 2 C l1 3
from A: C l1 2
A B
l1
l3 l4 C C local 0
l5
l6
D E
C l3 3 C l4 2
36
Example 2: Link failure
B sends update to A and E
A and E update
C l1 4 C l1 3
from B: C l1 3
A B
l1
l3 l4 C C local 0
l5
l6
D E
from B: C l1 3
C l3 3 C l4 4
37
Example 2: Link failure
C sends update
it is ignored by E because it it less good
C l1 4 C l1 3
A B
l1
l3 l4 C C local 0
l5
l6
D E
from C: C local 0
C l3 3 C l4 4
38
Example 2: Link failure
A broadcasts its table with cost 4 to C
B updates … we have a loop between A and C
cost is increase by 2 at every iteration
C l1 4 C l1 5
from A: C l1 4
A B
l1
l3 l4 C C local 0
l5
l6
D E
C l3 3 C l4 4
39
Example 2: Link failure
E now accepts announcement from C
C l1 6 C l1 7
A B
l1
l3 l4 C C local 0
l5
l6
D E
from C: C local 0
C l3 7 C l5 5
40
Example 2: Link failure
E sends announcements to D and B
B and D send announcements to A
the algorithm has converged – stable state
C l1 7 C l4 6
from B: C l4 6
from E: C l5 5
A B
l1
l3 l4 C C local 0
l5
l6
D E
from E: C l5 5
C l6 6 C l5 5
41
Conclusions from Example 2
the algorithm converges after modification of the topology, but
the convergence may be very slow
bounce effect
Q: during convergence time, how are routing tables ?
solution
42
Assume now all link costs are equal to 1
Example 3 Links l1 and l6 fail
D detects failure and sets costs to 1
A B
dest link cost dest link cost
A local 0 B local 0
B l3 3 A l4 3
D l3 1 C l2 1
C l3 3 E l4 1
E l3 2 D l4 2 C
45
Example 3: with Split Horizon
A B
dest link cost dest link cost
A local 0 B local 0
B l3 3 A l4 3
D l3 1 C l2 1
C l3 3 E l4 1
E l3 2 D l4 2 C
from A:
dest cost A
A 0
l3
D
D
dest link cost
D local 0
A l3 1
B l3
C l6
E l6
47
Split horizon
A
dest link cost Split horizon cuts the process of counting to
A local 0 infinity
B l3
D l3 1
C l3
E l3
from D:
dest cost A
D 0
B,C,E l3
D
D
dest link cost
D local 0
A l3 1
B l3
C l6
E l6
48
Split horizon may fail
B
52
3. Distance Vector Protocols
RIP
Distance vector protocol
Metric - hops
Network span limited to 15
= 16
Split horizon
Destination network identified by IP address
Netmasks in RIPv2
Encapsulated as UDP packets, port 520
Largely implemented (routed on Unix)
Broadcast every 30 seconds or when update detected
Route not announced during 3 minutes
cost becomes
Authentication in RIPv2 by MD5 (shared secret)
53
IGRP (Interior Gateway Routing
Protocol)
Proprietary protocol by CISCO
Metric that estimates the global delay
Maintains several routes of similar cost
load sharing
Takes into account netmasks
No limit of 15
number of routers included in messages
Broadcast every 90 sec
54
Metric example
Metric
Trans = 10000000/Bandwidth (time to send 10 Kb)
delay = (sum of Delay)/10
m = [K1*Trans + (K2*Trans )/(256-load) + K3*delay]
default: K1=1, K2=0, K3=1, K4=0, K5=0
if K5 0, m = m * [K5/(Reliability + K4)]
Bandwidth in Kb/s, Delay in s
At Venus: Route for 172.17/16: Metric = 10000000/784 + (20000+1000)/10 = 14855
At Saturn: Route for 12./8: Metric = 10000000/224 + (20000 + 1000)/10 = 46742
55
3. Load Dependent Routing
We come back in this section to what routing protocols do.
Instead of maximizing a “path quality” metric (nb hops, delay)
assume we want to maximize the total network utility
for example: total transported flows
see congestion control chapter for other definitions
how should routing be done ?
Q1: show an example where shortest path routing does not
provide the optimal total flow (where path cost is static)
solution
57
Braess Paradox (2)
Q: same question when we open link 5 with delay function:
Solution
58
Braess Paradox
With shortest delay routing, adding a new link may decrease
overall throughput
Thus shortest delay routing is not either a global optimum
59
Optimal Routing
One can change the objective of routing: instead of computing
shortest paths,one could solve a global optimization problem:
minimize total delay subject to flow constraints
this is a well posed optimization problem
the optimal solution depends on all flows
but it can be implemented in a distributed algorithm similar to TCP
congestion control ; see [BertsekasGallager92]
Q. Can you imagine a way to use classical routing (like distance
vector, which finds shortest paths) and still find the optimum
network utility ?
solution 60
Conclusion
61
Review Questions
Explain the following terms:
distance vector
bounce effect
count to infinity
split horizon
Bellman Ford
RIP, IGMP
source routing
Explain why shortest path routing is not necessarily a globally
optimum
What is the Braess paradox ?
62
Solutions
63
1. Introduction
Why were routing protocols invented
65
Example
Apply the theorem: write pk(i,1), pred(i) and draw the shortest
paths to node 1.
k\i 1 2 3 4 5
0 0
1 0 1 1
3 2 0 1 7 1 2
6
1 3 0 1 3 1 2
2 1
1 3
3 1 i 1 2 3 4 5
5 4 pred(i) 1 1 5 1 4
1
back
66
Impact of Initial Conditions
Example: Q. does the algorithm converge to the
shortest path with initial condition as shown ?
A. yes
3 k\i 1 2 3 4 5 k\i 1 2 3 4 5
6
1 0 0 0 0 0 0 0 0 6 1 1 0
2 1 1 0 1 1 1 1 1 0 1 1 1 2
1 3 2 0 1 2 1 2 2 0 1 3 1 2
3 1 3 0 1 3 1 2
5 4 4 0 1 3 1 2
1
back
67
Distributed Bellman-Ford v1
A possible run of algorithm v1:
i 1 2 3 4 5
0
3 1 -> 2 0 1
6 2 -> 5 0 1 4
1 2 -> 3 0 1 7 4
2 1 5 -> 4 0 1 7 5 4
1 3 2 -> 4 0 1 7 4 4
3 2 1 -> 4 0 1 7 2 4
4 -> 5 0 1 7 2 3
5 4 5 -> 2 0 1 7 2 3
1 5 -> 3 0 1 4 2 3
link breaks 4 does as if received from 5
Q: give a possible 5 does as if received from 4
and continue computations from
scenario after link there
4—5 breaks 0 1 4 2 4
back 5 -> 3 0 1 5 2 4
68
Naive Distributed Bellman-Ford
The previous distributed version requires a node to remember all previously
received estimates q(j) for all neighbours, even if they are not the best ones
In practice this is a problem if we need to compute the shortest paths to not
just one destination, but to a large number.
Distributed
DistributedBellman-Ford
Bellman-FordAlgorithm
Algorithmv1a,
v1a,BFD1a
BFD1a
when
whennode
nodei ireceives
receivesnew
newvalue
valueq(j)
q(j)from
fromnode
nodej jdo
do
eq
eq(1a)
(1a) q(i)
q(i):=
:=min
min{{A(i,j)
A(i,j)++q(j),
q(j),q(i)
q(i)}}
70
Conclusions from Example 2
Q: during convergence time, how are routing tables ?
A:
they are incorrect
there are loops – packets are discarded (TTL expires)
back
71
3. Load Dependent Routing
Q. show an example where shortest path routing does not provide the optimal
total flow (where path cost is static)
A. assume all data flow goes from B to E: Static shortest path routing will pick
the direct link BE only instead of distributing the load also on some of the
longer links (BADE and BCE)
cost =1
A
l1
B cost =1
l2
cost =1 l3 l4 C
l5
l6
D E cost =5
cost =1 E
back
72
Braess Paradox (1)
A. there are two paths
1: links 1, 3; 2: links 2,4
let bi be the traffic on path I
Delay equations:
50+ 11b1 = 50 + 11b2
Total flow
b1 + b2 = b0
equilibrium is for b1 = b2 = 3
delay is 83
back
73
Braess Paradox (2)
Q: same question when we open link 5 with delay function:
delay equations
50 + 11b1 + 10b3 = 50 + 11b2 + 10b3 = 10 + 10b1 + 10 b2 + 21 b3
total flow
b1 + b2 + b3 = b0
The total delay on all paths is the same, equal to 92 : larger than before!
back
74
Optimal Routing
One can change the objective of routing: instead of computing
shortest paths,one could solve a global optimization problem:
minimize total delay subject to flow constraints
this is a well posed optimization problem
the optimal solution depends on all flows
but it can be implemented in a distributed algorithm similar to TCP congestion
control ; see [BertsekasGallager92]
Q. Can you imagine a way to use classical routing (like distance
vector, which finds shortest paths) and still find the optimum
network utility ?
A.
Let a centralized network management procedure update the link costs (used by
distance vector routing).
given link costs ci and traffic matrix compute total throughput or average delay
( a hard optimization problem, solved with heuristics)
every few minutes, update the link costs in all routers – let the routing algorithm
compute new paths
back 75