Vous êtes sur la page 1sur 30

Routing Algorithm

2004. 11. 3
Ahn Kook Jin
Contents
 Routing Protocol and Algorithm
 Classifications
 Link State Routing Algorithm
 Distance Vector Routing Algorithm
 LS Algorithm vs. DV Algorithm
 Hierarchical Routing
Routing Protocol and
Algorithm
 Determining the path(route)
first-hop router destination router
default router destination host
5
source host
3
2 B D 5

2 3 1 F
A

1 1 2
C E

least-cost path
source router
Classifications
 Global vs. decentralized
 global(link state algorithm) : complete
information about connectivity and link costs
 Static vs. dynamic
 static : routes change very slowly
 Load-sensitive vs. load-insensitive
 load-sensitive : link costs reflect congestion
 Typical used
 Dynamic link state routing algorithm
 Dynamic distance vector routing algorithm
Link State Routing Algorithm
 Each node broadcasts the identities and c
osts to its directly attached neighbors
 Dijkstra’s algorithm
Link State Routing Algorithm
 Oscillation(page 307)

2+e
1
0 A 0
00 1+e
2+e
0

1 D B 1

01+e 1
0
00
1 C e
0
1+e

e
Distance Vector Routing
Algorithm
 Iterative, asynchronous, distributed
 Distance table
 DX(Y,Z) : cost of the direct link from X to Z +
Z’s currently known minmum-cost path to Y
 DX(Y,Z)=c(X,Z)+minw{Dz(Y,w)}
Distance Vector Routing
Algorithm
 Initialization:
 DX(*,v) = inifinite, DX(v,v)=c(x,v)
 Send minwDX(y,w) to each neighbor when t
hey changes
 C(X,V) changes
 Neighbor node send its update
Distance Vector Routing
Algorithm
DY X Z
X 2 ∞
Z ∞ 1

Y
2 1

X Z
7
DX Y Z Dz X Y

Y 2 ∞ X 7 ∞

Z ∞ 7 Y ∞ 1
Distance Vector Routing
Algorithm
DY X Z
X 2 8
Z 9 1

Y
2 1

X Z
7
DX Y Z Dz X Y

Y 2 8 X 7 3

Z 3 7 Y 9 1
Distance Vector Routing
Algorithm
DY X Z
X 2 4
Z 5 1

Y
2 1

X Z
7
DX Y Z Dz X Y

Y 2 8 X 7 3

Z 3 7 Y 9 1
Distance Vector Routing
Algorithm
 Decrease DY X Z
X 4 6

Y
1 4 1

X Z
50
Dz X Y
X 50 5
Distance Vector Routing
Algorithm
 Decrease DY X Z
X 1 6

Y
1 4 1

X Z
50
Dz X Y
X 50 5
Distance Vector Routing
Algorithm
 Decrease DY X Z
X 1 6

Y
1 4 1

X Z
50
Dz X Y
X 50 2
Distance Vector Routing
Algorithm
 Decrease DY X Z
X 1 6

Y
1 4 1

X Z
50
Dz X Y
X 50 2
Distance Vector Routing
Algorithm
 Increase DY X Z
X 4 6

Y
60 4 1

X Z
50
Dz X Y
X 50 5
Distance Vector Routing
Algorithm
 Increase DY X Z
X 60 6

Y
60 4 1 Routing loop

X Z
50
Dz X Y
X 50 5
Distance Vector Routing
Algorithm
 Increase DY X Z
X 60 6

Y
60 4 1

X Z
50
Dz X Y
X 50 7
Distance Vector Routing
Algorithm
 Increase DY X Z
X 60 8

Y
60 4 1

X Z
50
Dz X Y
X 50 7
Distance Vector Routing
Algorithm
 Increase DY X Z
X 60 8

Y
60 4 1 Too many iterations!
(count-to-infinity problem)

X Z
50
Dz X Y
X 50 9
Distance Vector Routing
Algorithm
 Poisoned DY X Z
reverse X 4 ∞

Y
60 4 1

X Z
50
Dz X Y
X 50 5
Distance Vector Routing
Algorithm
 Poisoned DY X Z
reverse X 60 ∞

Y
60 4 1

X Z
50
Dz X Y
X 50 5
Distance Vector Routing
Algorithm
 Poisoned DY X Z
reverse X 60 ∞

Y
60 4 1

X Z
50
Dz X Y
X 50 61
Distance Vector Routing
Algorithm
 Poisoned DY X Z
reverse X 60 51

Y
60 4 1

X Z
50
Dz X Y
X 50 61
Distance Vector Routing
Algorithm
 Poisoned
DY X Z
reverse X 60 51

Y
60 4 1

X Z
50
Dz X Y
X 50 ∞
 Cannot solve general count-to-infinity
problem
LS Algorithm vs. DV Algorithm
LS DV

Message O(nE) Maybe small


complexity

Speed of O(n2) algorithm Slow(count-to-


convergence infinity problem)

Robustness Good Bad


Hierarchical Routing
 View network as interconnected routers
 Scale
 Administrative autonomy
 Organize routers into autonomy
systems(AS)
Hierarchical Routing
C.c

B.a B.a C.a C.b

A.a
Host H1

A.d A.c Host H2

A.b Autonomy
system(AS)
Gateway router
Intra-AS
Inter-AS
Hierarchical Routing

B.a C.a

A.a

A.c

Topological view for inter-AS routing protocol


END

Vous aimerez peut-être aussi