Escolar Documentos
Profissional Documentos
Cultura Documentos
Distance-vector Routing"
CSE 123: Computer Networks
Alex C. Snoeren
HW 3 due now!
Lecture 13 Overview"
Distance vector
◆ Assume each router knows its own address and cost to reach
each of its directly connected neighbors
Bellman-Ford algorithm
◆ Distributed route computation using only neighbor’s info
Mitigating loops
◆ Split horizon and posion reverse
v! 2 y!
3 1
1
u!
x! 4 z!
2 1
5 t! du(z) = min{c(u,v) + dv(z),
w! 4 3 c(u,w) + dw(z)}
s!
Distance to Node
Info at
B 1 C
node A B C D E
7
A 0 7 ∞ ∞ 1
A 8 2 B 7 0 1 ∞ 8
C ∞ 1 0 2 ∞
1
2
E D D ∞ ∞ 2 0 2
E 1 8 ∞ 2 0
Distance to Node
Info at
B 1 C
node A B C D E
7
A 0 7 8 ∞ 1
A 8 2 B 7 0 1 ∞ 8
C ∞ 1 0 2 ∞
1
2
E D D ∞ ∞ 2 0 2
B is 7 away, 1+7< ∞ so
E 1 8 4 2 0
best path to C is 8
CSE 123 – Lecture 13: Distance-vector Routing 8
E sends vector to A!
E is 1 away, 4+1<8
so C is 5 away, 1+2<
∞ so D is 3 away
Distance to Node
Info at
B 1 C
node A B C D E
7
A 0 7 5 3 1
A 8 2 B 7 0 1 ∞ 8
C ∞ 1 0 2 ∞
1
2
E D D ∞ ∞ 2 0 2
E 1 8 4 2 0
I m 1 from A, 8 from B, 4
from C, 2 from D & 0 from E
CSE 123 – Lecture 13: Distance-vector Routing 9
…until Convergence"
Distance to Node
Info at
B 1 C
node A B C D E
7
A 0 6 5 3 1
A 8 2 B 6 0 1 3 5
C 5 1 0 2 4
1
2
E D D 3 3 2 0 2
E 1 5 4 2 0
Next hop
Dest A E C
B 1 C
7 A 7 9 6
C 12 12 1
A 8 2
D 10 10 3
1 E 8 8 5
E 2 D
3 4
1
A B C
Update 3
5 4
1
A B C
Update 4
Etc…
D Etc…
protocols
But the Internet is a network of networks
◆ How to stitch the many networks together?