Chapter 4 Distance Vector Problems, and Link-State Routing - PowerPoint PPT Presentation

About This Presentation
Title:

Chapter 4 Distance Vector Problems, and Link-State Routing

Description:

Chapter 4 Distance Vector Problems, and Link-State Routing Professor Rick Han University of Colorado at Boulder rhan_at_cs.colorado.edu Announcements Recap of Previous ... – PowerPoint PPT presentation

Number of Views:213
Avg rating:3.0/5.0
Slides: 36
Provided by: prof48
Category:

less

Transcript and Presenter's Notes

Title: Chapter 4 Distance Vector Problems, and Link-State Routing


1
Chapter 4Distance Vector Problems,
andLink-State Routing
  • Professor Rick Han
  • University of Colorado at Boulder
  • rhan_at_cs.colorado.edu

2
Announcements
  • Handing back HW 1, TA OH, solutions online later
    today
  • Homework 2 available on Web site, due Feb. 26
  • Last weeks lectures are now on Web site
  • Midterm for the week of March 12
  • Next, Distance vector problems, and link-state
    routing,

3
Recap of Previous Lecture
  • Distributed Bellman-Ford Distance Vector
  • Bellman-Ford Equation
  • D(i,j) min d(i,k) D(k,j) for all iltgtj
  • k neighbors
  • Bellman-Ford Algorithm Ford Fulkerson
  • D(i,j)h1 min d(i,k) D(k,j)h for all
    iltgtj, h0,1,
  • k neighbors
  • Distributed Bellman-Ford Algorithm
  • Physically distribute the calculation of
    D(i,j)h to router i only, and
  • Exchange the results of your D(i,j)h with
    neighboring routers at each iteration h

4
RIP is simple
  1. At each step, exchange distance vectors with each
    neighbor
  2. Update distance table with new distance vector,
    adding one (all link costs are one)
  3. Calculate minimum hop path to each destination by
    looking at minimum in the row

Distance table at B
A a
B b
C c
A
B
Via Port/Link
Dest A B C
A a --- a
B b --- b
C c --- c
A a
B b
C c
C
5
Link Failure Causes Bouncing Effect
dest
cost
dest
cost
via
via
1
X
A
B
B
A
1
1
B
A
C
2
C
1
B
C
1
25
C
dest
cost
via
A
2
B
B
1
B
6
B Notices A-B Link Failure
dest
cost
dest
cost
via
via
A
B
B
A
26
1
B
C
C
2
C
1
B
C
1
25
C
dest
cost
via
A
2
B
B
1
B
7
C Sends Dist. Vector to B
dest
cost
dest
cost
via
via
A
B
B
A
3
1
B
C
C
2
C
1
B
C
1
25
C
dest
cost
via
A
2
B
B
1
B
8
B Updates Distance to A
dest
cost
dest
cost
via
via
A
B
B
A
3
C
1
B
C
2
C
1
B
C
Packet sent from C to A bounces between C and
B until TTL0!
1
25
C
dest
cost
via
A
2
B
B
1
B
9
B Sends Dist. Vector to C
dest
cost
dest
cost
via
via
A
B
B
A
3
C
1
B
C
2
C
1
B
C
C adds one to Bs advertised distance to A. (Why
does C override its stored distance of 2 to A
with 4, larger value?)
1
25
C
dest
cost
via
A
4
B
B
1
B
10
C Sends Dist. Vector to B
dest
cost
dest
cost
via
via
A
B
B
A
5
C
1
B
C
2
C
1
B
C
B adds one to Cs advertised distance to A.
(overrides its stored distance of 3 to A with
5, larger value)
1
25
C
dest
cost
via
A
4
B
B
1
B
11
Link Failure Bad News Travels Slowly
dest
cost
dest
cost
via
via
A
B
B
A
25
C
26
C
C
25
C
1
C
C
After 20 exchanges, routing tables look like
this
1
25
Assume A has advertised its link cost of 25 to C
during Blt-gtC exchanges. C stores this cost in
its distance table (not shown)
C
dest
cost
via
A
24
B
B
1
B
12
Bad News Travels Slowly (2)
dest
cost
dest
cost
via
via
A
B
B
A
25
C
26
C
C
25
C
1
C
C
C increments Bs update by 1, and chooses 25 via
A to A, instead of 26 Via B to A
1
25
C
dest
cost
via
A
25
A
B
1
B
13
Bad News Travels Slowly (3)
dest
cost
dest
cost
via
via
A
B
B
A
26
C
26
C
C
25
C
1
C
C
After 25 B-C exchanges, finally converge
to stable routing
1
25
C
dest
cost
via
A
25
A
B
1
B
14
Link Failure Causes Counting to Infinity Effect
dest
cost
dest
cost
via
via
1
X
A
B
B
A
1
1
B
A
C
2
C
1
B
C
1
25
C
dest
cost
via
A
2
B
B
1
B
15
B Notices A-B Link Failure
dest
cost
dest
cost
via
via
A
B
B
A
26
1
B
C
C
2
C
1
B
C
1
25
C
dest
cost
via
A
2
B
B
1
B
16
C Sends Dist. Vector to B
dest
cost
dest
cost
via
via
A
B
B
A
3
C
1
B
C
2
C
1
B
C
1
25
C
dest
cost
via
A
2
B
B
1
B
17
A-C Link Fails
dest
cost
via
A
B
A
3
C
C
1
C
1
C detects link to A has failed, but no change in
Cs routing table (why?)
C
dest
cost
via
A
2
B
B
1
B
18
Now, B and C Count to Infinity
dest
cost
via
A
B
A
3
C
C
1
C
1
C
dest
cost
via
A
4
B
B
1
B
19
B and C Count to Infinity (2)
dest
cost
via
A
B
A
5
C
C
1
C
1
C
dest
cost
via
A
4
B
B
1
B
20
Some Solutions
  • Split horizon
  • C does not advertise route to B when it sends its
    distance vector
  • Poisoned reverse
  • C advertises route to B with infinite distance in
    its distance vector
  • Works for two node loops
  • Does not work for loops with more nodes

21
B Notices A-B Link Failure
dest
cost
dest
cost
via
via
A
B
B
A
26
1
B
C
C
2
C
1
B
C
1
25
C
dest
cost
via
A
2
B
B
1
B
22
Split Horizon
dest
cost
dest
cost
via
via
A
B
B
A
26
C
1
B
C
2
C
1
B
C
1
25
dest
cost
C
dest
cost
via
B
1
A
2
B
B
1
B
No need to send dest A via B, since B
should already know this
23
Split Horizon With Poisoned Reverse
dest
cost
dest
cost
via
via
A
B
B
A

--
1
B
C
2
C
1
B
C
1
25
dest
cost
C
dest
cost
via
A

A
2
B
B
1
B
1
B
If lowest cost path is via B, then when updating
B send infinite cost
24
Example Where Split Horizon Fails
  • When link breaks, C marks D as unreachable and
    reports that to A and B
  • Suppose A learns it first
  • A now thinks best path to D is through B
  • A reports D unreachable to B and a route of
    cost3 to C
  • C thinks D is reachable through A at cost 4 and
    reports that to B
  • B reports a cost 5 to A who reports new cost to C
  • etc...

1
A
B
1
1
C
X
1
D
25
Alternative Shortest Path Calc.
  • Compute a shortest path tree
  • Observation
  • shortest path to nodes further from the root must
    go through a branch of the shortest path tree
    closer to the root
  • Strategy expand outwards, calculating the
    shortest path tree from the root (B)

26
Dijkstras Shortest Path Algorithm
  • Let N set of nodes in graph
  • l(i,j) link cost between i,j ( infinity if not
    neighbors)
  • SPT set of nodes in shortest path tree thus far
  • S source node
  • C(n) cost of path from
  • S to node n

27
Dijkstras Shortest Path Algorithm (2)
  • Initialize shortest path tree SPT S
  • For each n not in SPT, C(n) l(s,n)
  • While (SPTltgtN)
  • SPT SPT U w such that C(w) is minimum for all
    w in (N-SPT)
  • For each n in (N-SPT)
  • C(n) MIN (C(n), C(w) l(w,n))

28
Dijkstras Shortest Path Algorithm (3)
  • Initialize shortest path tree SPT B
  • For each n not in SPT, C(n) l(s,n)
  • C(E) 1, C(A) 3, C(C) 4, C(others)
    infinity
  • Add closest node to the tree SPT SPT U E
    since C(E) is minimum for all w not in SPT.
  • No shorter path to E can ever be found via some
    other roundabout path.
  • Shortest path tree SPT B, E

29
Dijkstras Shortest Path Algorithm (4)
  • Recalculate C(n) MIN (C(n), C(E) l(E,n)) for
    all nodes n not yet in SPT
  • C(A) MIN( C(A)3, 1 1) MIN(3,2) 2
  • C(D) MIN( infinity, 1 1) 2
  • C(F) MIN( infinity, 1 2) 3
  • C(C ) MIN( 4, 1 infinity) 4
  • Each new node in tree, could create a lower cost
    path, so redo costs

30
Dijkstras Shortest Path Algorithm (5)
  • Loop again, select node with the lowest cost
    path
  • C(A) 2, C(D) 2, C(F) 3, C(C ) 4
  • SPT SPT U A B, E, A
  • No shorter path can be found from B to A,
    regardless of any new nodes added to tree
  • Recalc C(n) MIN (C(n), C(A) l(A,n)) for all
    n not yet in SPT
  • C(D) MIN(2, 2inf) 2
  • C(F) 3, C(C) 4

31
Dijkstras Shortest Path Algorithm (6)
  • Continue to loop, adding lowest cost node at each
    step and updating costs
  • SPT crawls outward
  • Remember to store the links in SPT as they are
    added (each nodes predecessor is stored)
  • Each node has to store the entire topology, or
    database of link costs

32
Link-State Routing Reliable Flooding Dijkstra
SPT
  • Start condition
  • Each node assumed to know state of links to its
    neighbors
  • Step 1
  • Each node broadcasts its state to all other nodes
  • Reliable flooding mechanism
  • Step 2
  • Each node locally computes shortest paths to all
    other nodes from global state
  • Dijkstras shortest path tree (SPT) algorithm

33
Link State Packets (LSPs)
  • Periodically, each node creates a link state
    packet containing
  • Node ID
  • List of neighbors and link cost
  • Sequence number
  • Needed to avoid stale information from flood
  • Time to live (TTL)
  • Node outputs LSP on all its links

34
Reliable Flooding of LSPs
  • When node J receives LSP from node K
  • If LSP is the most recent LSP from K that J has
    seen so far, J saves it in database and forwards
    a copy on all links except link LSP was received
    on
  • Otherwise, discard LSP
  • How to tell more recent
  • Use sequence numbers
  • Same method as sliding window protocols

35
OSPF Open Shortest Path First
  • A particular realization of link-state routing,
    used for intra-domain routing in the Internet
  • Additional support for
  • Authentication of routing updates
  • Support for broadcast networks
  • Different cost metrics
  • Periodic and event-triggered flooding of LSP
    routing updates, like RIP
Write a Comment
User Comments (0)
About PowerShow.com