Professional Documents
Culture Documents
Week 6 - Static Routing - Distance Vector Routing
Week 6 - Static Routing - Distance Vector Routing
Analogy:
– Routing: process of planning trip from source to destination
– Forwarding: process of getting through single interchange
application application
transport 1. send datagrams 2. receive datagrams transport
network network
data link data link
physical physical
value in arriving
packet’s header
0111 1
3 2
IP destination address in
arriving packet’s header
0111 1
3 2
high-seed
switching
fabric
• It is used for some “static” routes: e.g. only one way to reach a
upper layer router
With windows OS
route add 200.1.1.0 mask 255.255.255.0 200.2.2.1
130.111.4.128
130.111.4.132
255.255.255.252 .130
D6 D7 255.255.255.252
.129 s0/0/0 s0/0/1 .134
s0/1/0 .133 s0/0/0
.1 F0/0 .1
D1 F0/0 .1 D3
F0/1 .1
D4 F0/0 F0/1 D5
4
4 4 .1 4
4
5
5
5 5 5
D2
.2
.2
.2 .2
.2
130.111.4.128
130.111.4.132
255.255.255.252 .130
D6 D7 255.255.255.252
.129 s0/0/0 s0/0/1 .134
s0/1/0 .133 s0/0/0
.1 F0/0 .1
D1 F0/0 .1 D3
F0/1 .1
D4 F0/0 F0/1 D5
4
4 4 .1 4
4
5
5
5 5 5
D2
.2
.2
.2 .2
.2
130.111.4.128
130.111.4.132
255.255.255.252 .130
D6 D7 255.255.255.252
.129 s0/0/0 s0/0/1 .134
s0/1/0 .133 s0/0/0
.1 F0/0 .1
D1 F0/0 .1 D3
F0/1 .1
D4 F0/0 F0/1 D5
4
4 4 .1 4
4
5
5
5 5 5
D2
.2
.2
.2 .2
.2
130.111.4.128
130.111.4.132
255.255.255.252 .130
D6 D7 255.255.255.252
.129 s0/0/0 s0/0/1 .134
s0/1/0 .133 s0/0/0
.1 F0/0 .1
D1 F0/0 .1 D3
F0/1 .1
D4 F0/0 F0/1 D5
4
4 4 .1 4
4
5
5
5 5 5
D2
.2
.2
.2 .2
.2
• Each router only knows of its own routing table and does not
have a ‘network’ view. For networks with multiple routers,
and various paths between routers, there needs to be
mechanisms that ensure that one router knows what to do
with datagrams addressed to more distant networks.
• 2 main methods
– Distance vector routing (also
known as Bellman-Ford
routing)
– Link state routing
5
v 3 w
2 5
u z
2 1
3
1 2
x y
1
let
dx(y) := cost of least-cost path from x to y
then
dx(y) = minv {c(x,v) + dv(y) }
cost to neighbor v
min taken over all neighbors v of x
5
v 3 w
B-F equation says:
2 5 du(z) = min { c(u,v) + dv(z),
u 2 z
3 1 c(u,x) + dx(z),
1 x 2 c(u,w) + dw(z) }
y
1 = min {2 + 5,
1 + 3,
5 + 3} = 4
node achieving minimum is next
hop in shortest path, used in forwarding table
NIT5110 - Networking System, 2015 29
Distance Vector Routing
• Dx(y) = estimate of least cost from x to y
– x maintains distance vector Dx = [Dx(y): y є N ]
• node x:
– knows cost to each neighbor v: c(x,v)
– maintains its neighbors’ distance vectors. For
each neighbor v, x maintains
Dv = [Dv(y): y є N ]
2 4
R4
R1
1
4 2
NIT5110 - Networking System, 2015 R3 33
Problem solving illustration
• Distance vector routing only exchange info with neighbours
• R1 built initial knowledge of the network, forming a distance
vector
R2
2 4
R4
R1
1
2 4
R4
R1
1
• After that, routers will send their new distance vector to their
neighbours, thus another round of updates will start.
Next Week