EE 122: Intra-domain routing: Link State - PowerPoint PPT Presentation

1 / 31
About This Presentation
Title:

EE 122: Intra-domain routing: Link State

Description:

Department of Electrical Engineering and Computer Science. University of California, Berkeley, ... 18 if (there is a new minimum for destination Y) 19 send D(X, ... – PowerPoint PPT presentation

Number of Views:26
Avg rating:3.0/5.0
Slides: 32
Provided by: sto2
Category:

less

Transcript and Presenter's Notes

Title: EE 122: Intra-domain routing: Link State


1
EE 122 Intra-domain routing Link State
  • Computer Science Division
  • Department of Electrical Engineering and Computer
    Science
  • University of California, Berkeley,
  • Berkeley, CA 94720-1776
  • September 21, 2004

2
Protocol Hourglass
Application
Transport
Network (IP)
Link
Physical
3
Forwarding Example
Host C
Host D
Host A
N2
N1
N3
N5
Host B
Host E
N4
N7
N6
4
Forwarding Examples
next
dst
next
dst
A
A
next
dst
N1
A
N4
B
N2
A
N1
B
N2
C
Host C
N5
B
C
C
N5
D
N2
C
Host D
N3
D
Host A
N5
E
D
D
N3
E
N7
E
N2
N1
next
dst
N1
A
N3
N4
B
N1
C
N5
next
dst
N3
D
N3
A
N3
E
N6
B
Host B
next
dst
Host E
N4
N3
C
N1
A
next
dst
N3
D
N7
N6
B
B
N4
A
E
E
N4
C
N4
B
N6
D
N4
C
N6
E
N7
D
N7
E
5
Forwarding Example
next
dst
next
dst
A
A
next
dst
N1
A
N4
B
N2
A
N1
B
N2
C
Host C
N5
B
C
C
N5
D
N2
C
Host D
N3
D
Host A
N5
E
D
D
N3
E
N7
E
N2
N1
next
dst
N1
A
N3
N4
B
N1
C
N5
next
dst
N3
D
N3
A
N3
E
N6
B
Host B
next
dst
Host E
N4
N3
C
N1
A
next
dst
N3
D
N7
N6
B
B
N4
A
E
E
N4
C
N4
B
N6
D
N4
C
N6
E
N7
D
N7
E
6
Forwarding Example
next
dst
next
dst
A
A
next
dst
N1
A
N4
B
N2
A
N1
B
N2
C
Host C
N5
B
C
C
N5
D
N2
C
Host D
N3
D
Host A
N5
E
D
D
N3
E
N7
E
N2
N1
next
dst
N1
A
N3
N4
B
N1
C
N5
next
dst
N3
D
N3
A
N3
E
N6
B
Host B
next
dst
Host E
N4
N3
C
N1
A
next
dst
N3
D
N7
N6
B
B
N4
A
E
E
N4
C
N4
B
N6
D
N4
C
N6
E
N7
D
N7
E
7
Forwarding Example
next
dst
next
dst
A
A
next
dst
N1
A
N4
B
N2
A
N1
B
N2
C
Host C
N5
B
C
C
N5
D
N2
C
Host D
N3
D
Host A
N5
E
D
D
N3
E
N7
E
N2
N1
next
dst
N1
A
N3
N4
B
N1
C
N5
next
dst
N3
D
N3
A
N3
E
N6
B
Host B
next
dst
Host E
N4
N3
C
N1
A
next
dst
N3
D
N7
N6
B
B
N4
A
E
E
N4
C
N4
B
N6
D
N4
C
N6
E
N7
D
N7
E
8
Forwarding Example
next
dst
next
dst
A
A
next
dst
N1
A
N4
B
N2
A
N1
B
N2
C
Host C
N5
B
C
C
N5
D
N2
C
Host D
N3
D
Host A
N5
E
D
D
N3
E
N7
E
N2
N1
next
dst
N1
A
N3
N4
B
N1
C
N5
next
dst
N3
D
N3
A
N3
E
N6
B
Host B
next
dst
Host E
N4
N3
C
N1
A
next
dst
N3
D
N7
N6
B
B
N4
A
E
E
N4
C
N4
B
N6
D
N4
C
N6
E
N7
D
N7
E
9
A More Realistic View
  • Forwarding table maintains
  • Destination prefixes instead of destination
    address
  • Next hop output interface instead of next hop
    address
  • Matching longest prefix match instead of exact
    match

10
Routing Protocols
  • Compute and maintain routing tables
  • Routing vs. forwarding tables
  • Routing table table containing all information
    required to compute the paths to every other node
  • Forwarding table table used to forward packets
  • Type of routing algorithms
  • Distance vector (see last lecture)
  • Path-vector like distance vector, but the route
    updates contain the entire path to the
    destination
  • Link state (this lecture)

11
Distance Vector Control Traffic
  • When the routing table of a node changes, the
    nodes send its table to the neighbors

12
Count-to-Infinity Problem
7 loop 8 wait (link cost update or update
message) 9 if (c(X,V) changes by d) 10
for all destinations Y through V do 11
D(X,Y) D(X,Y) d 12 else if (update D(V,
Y) received from V) 13 for all destinations
Y do 14 if (destination Y through V) 15
D(X,Y) D(X,V) D(V, Y) 16
else 17 D(X, Y) min(D(X, Y), D(X, V)
D(V, Y)) 18 if (there is a new minimum for
destination Y) 19 send D(X, Y) to all
neighbors 20 forever
1
4
50
D C N
A 4 A
C 1 C
Node B
D C N
A 6 C
C 1 C
D C N
A 6 C
C 1 C
bad news travels slowly
D C N
A 8 C
C 1 C
D C N
A 5 B
B 1 B
Node C
D C N
A 5 B
B 1 B
D C N
A 7 B
B 1 B
D C N
A 2 B
B 1 B

time
Link cost changes here recall that B also
maintains shortest distance to A through C,
which is 6. Thus D(B, A) becomes 6 !
13
Split Horizon
  • Dont send the routes learned from a neighbor
    back to that neighbor

D C N
A 4 A
C 1 C
D C N
A 60 A
C 1 C
D C N
A 51 C
C 1 C
D C N
A 51 C
C 1 C
Node B
D C N
A 60 A
C 1 C
D C N
A 5 B
B 1 B
Node C
D C N
A 5 B
B 1 B
D C N
A 50 A
B 1 B
D C N
A 50 A
B 1 B
D C N
A 50 A
B 1 B
time
Link cost changes here C wont sent to B, D(C,
A) 5 since C has learned about this path from B
itself. Thus D(B,A) becomes 60.
Algorithm terminates
14
Is Count To Infinity Solved?
60
  • No! Split horizon and poison reverse only work
    for loops involving two nodes.

1
4
1
2
50
Node B
N
C
D
A
4
A
C
1
C
D
1
D
Node D
N
C
D
B
5
A
B
1
B
C
2
C
time
Link cost changes here in a previous iteration D
told B that it can reach A through B with cost 7
(split-horizon is not invoked!) so B concludes
that it can reach A through D with cost 8!
15
Link State Control Traffic
  • Each node floods its local information to every
    other node in the network ? each node ends up
    knowing the entire network topology

16
Link State Node State
17
Link State Protocol
  • Each node computes shortest path to every other
    node using its local view of the network topology
  • When a node notices a link or another node
    failure, it floods this information in the
    network
  • Other nodes update their network view and
    recompute the shortest paths

18
A Link State Routing Algorithm
  • Dijkstras algorithm
  • Net topology, link costs known to all nodes
  • Accomplished via link state flooding
  • All nodes have same info
  • Each node computes least cost paths from itself
    to all other nodes
  • Iterative after k iterations, know least cost
    paths to k closest destinations
  • Notations
  • c(i,j) link cost from node i to j cost infinite
    if not direct neighbors
  • D(v) current value of cost of path from source
    to destination v
  • p(v) predecessor node along path from source to
    v, that is next to v
  • S set of nodes whose least cost path
    definitively known

19
Dijsktras Algorithm
1 Initialization 2 S A 3 for all
nodes v 4 if v adjacent to A 5 then
D(v) c(A,v) 6 else D(v) 7 8
Loop 9 find w not in S such that D(w) is a
minimum 10 add w to S 11 update D(v)
for all v adjacent to w and not in S 12
D(v) min( D(v), D(w) c(w,v) ) //
new cost to v is either old cost to v or known
// shortest path cost to w plus cost
from w to v 13 until all nodes in S
20
Example Dijkstras Algorithm
D(B),p(B) 2,A
D(D),p(D) 1,A
Step 0 1 2 3 4 5
D(C),p(C) 5,A
D(E),p(E)
start S A
D(F),p(F)
1 Initialization 2 S A 3 for all
nodes v 4 if v adjacent to A 5 then
D(v) c(A,v) 6 else D(v)
5
3
5
2
2
1
3
1
2
1
21
Example Dijkstras Algorithm
D(B),p(B) 2,A
D(D),p(D) 1,A
Step 0 1 2 3 4 5
D(C),p(C) 5,A 4,D
D(E),p(E) 2,D
start S A AD
D(F),p(F)
  • 8 Loop
  • 9 find w not in S s.t. D(w) is a minimum
  • 10 add w to S
  • update D(v) for all v adjacent
  • to w and not in S
  • 12 D(v) min( D(v), D(w) c(w,v) )
  • 13 until all nodes in S

5
3
5
2
2
1
3
1
2
1
22
Example Dijkstras Algorithm
D(B),p(B) 2,A
D(D),p(D) 1,A
Step 0 1 2 3 4 5
D(C),p(C) 5,A 4,D 3,E
D(E),p(E) 2,D
start S A AD ADE
D(F),p(F) 4,E
  • 8 Loop
  • 9 find w not in S s.t. D(w) is a minimum
  • 10 add w to S
  • update D(v) for all v adjacent
  • to w and not in S
  • 12 D(v) min( D(v), D(w) c(w,v) )
  • 13 until all nodes in S

5
3
5
2
2
1
3
1
2
1
23
Example Dijkstras Algorithm
D(B),p(B) 2,A
D(D),p(D) 1,A
Step 0 1 2 3 4 5
D(C),p(C) 5,A 4,D 3,E
D(E),p(E) 2,D
start S A AD ADE ADEB
D(F),p(F) 4,E
  • 8 Loop
  • 9 find w not in S s.t. D(w) is a minimum
  • 10 add w to S
  • update D(v) for all v adjacent
  • to w and not in S
  • 12 D(v) min( D(v), D(w) c(w,v) )
  • 13 until all nodes in S

5
3
5
2
2
1
3
1
2
1
24
Example Dijkstras Algorithm
D(B),p(B) 2,A
D(D),p(D) 1,A
Step 0 1 2 3 4 5
D(C),p(C) 5,A 4,D 3,E
D(E),p(E) 2,D
start S A AD ADE ADEB ADEBC
D(F),p(F) 4,E
  • 8 Loop
  • 9 find w not in S s.t. D(w) is a minimum
  • 10 add w to S
  • update D(v) for all v adjacent
  • to w and not in S
  • 12 D(v) min( D(v), D(w) c(w,v) )
  • 13 until all nodes in S

5
3
5
2
2
1
3
1
2
1
25
Example Dijkstras Algorithm
D(B),p(B) 2,A
D(D),p(D) 1,A
Step 0 1 2 3 4 5
D(C),p(C) 5,A 4,D 3,E
D(E),p(E) 2,D
start S A AD ADE ADEB ADEBC ADEBCF
D(F),p(F) 4,E
  • 8 Loop
  • 9 find w not in S s.t. D(w) is a minimum
  • 10 add w to S
  • update D(v) for all v adjacent
  • to w and not in S
  • 12 D(v) min( D(v), D(w) c(w,v) )
  • 13 until all nodes in S

5
3
5
2
2
1
3
1
2
1
26
Oscillations
  • Assume link cost amount of carried traffic

1
1e
1
0
0
e
0
0
1
1
initially
  • How can you avoid oscillations?

27
Distance Vector vs. Link State
  • Convergence
  • Message Computation complexity
  • Robustness

28
Convergence
  • How much does it take the algorithm to converge?
  • Link State dl c, where
  • d diameter of the network
  • l latency of a message along the link
  • c computation time to run Dijkstras algorithm
  • Distance Vector
  • Good news d(lc), where c is the time it
    takes a node to update rounding table
  • Band news varies (e.g., count to infinity
    problem)

29
Message Complexity
  • Link State (LS) every node needs to flood its
    local state nne messages, where
  • n number of nodes in the network
  • e average degree
  • ne number of messages per link to flood the
    network
  • Distance vector (DV) assume the algorithm
    executes in rounds dne messages, where
  • d diameter of the network it takes d rounds to
    converge
  • ne number of messages during a round ? each
    node sends its changes to all its neighbors
  • Note messages in DV are larger than in LS

30
Computation Complexity
  • Link State running time of Dijkstras algorithm
  • Each iteration need to check all nodes, w, not
    in S
  • n(n1)/2 comparisons O(n2)
  • More efficient implementations possible
    O(nlog(n))
  • Distance vector update routing table
  • n, assuming that it takes O(1) to find an entry
    in the table given the node otherwise it takes
    O(nlog(n))

31
Robustness
  • Link state
  • Node can advertise incorrect link cost
  • Each node computes only its own table
  • Distance vector
  • Node can advertise incorrect path cost
  • Each nodes table used by others error propagate
    through network
Write a Comment
User Comments (0)
About PowerShow.com