Chap-3-Routing-Distance Vector - Link State
Chap-3-Routing-Distance Vector - Link State
1
Routing
2
Routing Algorithms
© Jörg Liebeherr,
Fairness vs. maximum throughput
A B C
D D
’
A B C
’ ’ ’
Stability vs. optimal delay
96 Kbps
A D
C
Elements of Routing Algorithms
• Optimization
Criteria: - “Cost”
- Number of - Throughp
Hops ut
- Delay
– Once per session (VCs)
• Decision
– Once perTime:
packet (datagram)
• Decision Place:
– Each node (distributed
routing)
– Central node (centralized
routing)
– Sending node (source
Shortest-Path Routing
• Parameters:
cost of link between node i and
dij
node j;
dij = , if nodes i and j are not
N connected; dii = 0
set of nodes
Approaches to Shortest Path Routing
11
Distance Vector Routing Algorithm
• Let dx(y) be the cost of the least-cost path from node x to node y.
• The least costs are related by Bellman-Ford equation, dx(y) =
minv{c(x,v) +
dv(y)}
• Where the minv is the equation taken for all x neighbors. After
traveling from x to v, if we consider the least-cost path from
v to y, the path cost will be c(x,v)+dv(y). The least cost from
x to y is the minimum of c(x,v)+dv(y) taken over all
neighbors.
• With the Distance Vector Routing algorithm, the node x contains the
following routing information:
• For each neighbor v, the cost c(x,v) is the path cost from x to
directly attached
neighbor, v.
• The distance vector x, i.e., Dx = [ Dx(y) :y in N ], containing its
cost to all destinations, y, in N.
14
Distance Vector Routing Algorithm
16
Distance Vector Routing Algorithm
17
Distance Vector Routing Algorithm
18
Creating the Table
20
Final Routing Tables
21
Discussion of Distance Vector Routing
A 1 B 1 C
A's Routing B's Routing
Table Table
to via cost to via cost
(next (next
hop) hop)
C B 2 C C 1
now link B-C goes
down
C B 2 C - oo
C 2 C oo
C - oo C A 3
C oo C 3
C B 4 C - oo
C 4 C oo
24
Count-to-Infinity
25
Count-to-Infinity
26
Count-to-Infinity
28
Distance Vector vs. Link State Routing
D E F D E F D E F
• If a node fails, A B C
each node can
calculate the
new route
of the network
D E F
D E F D E F
30
Link State Routing
33
Operation of a Link State Routing protocol
LSAs are
flooded to other
interfaces
34
Link State Routing
37
Link State Routing
38
Link State Routing
39
40
41
42
43
44
45
CONGESTION CONTROL ALGORITHMS
• What is congestion?
– A state occurring in network layer when the
message traffic
is so heavy that it slows down network response
time.
• Effects of Congestion
– As delay increases, performance decreases.
– If delay increases, retransmission occurs, making
situation worse.
46
Leaky Bucket Algorithm