Chapter 4 LinkState Routing - PowerPoint PPT Presentation

1 / 31
About This Presentation
Title:

Chapter 4 LinkState Routing

Description:

Prof. Rick Han, University of Colorado at Boulder. Announcements ... in distance table, find min of (dik Dkj) over K neighbors, iterate until get ... – PowerPoint PPT presentation

Number of Views:63
Avg rating:3.0/5.0
Slides: 32
Provided by: profri
Category:

less

Transcript and Presenter's Notes

Title: Chapter 4 LinkState Routing


1
Chapter 4Link-State Routing
  • Professor Rick Han
  • University of Colorado at Boulder
  • rhan_at_cs.colorado.edu

2
Announcements
  • Should use sendto_(), not sendto()
  • This weeks lectures online by Saturday
  • HW4 online by Saturday
  • Updated PA 2 (small mods)
  • Server should exit cleanly
  • New library void()
  • recvfrom() at server instead of select()
  • Next, link-state routing,

3
Recap of Previous Lecture
  • Distance vector problems
  • Bouncing effect
  • Bad news travels slowly
  • Counting to infinity
  • Solutions
  • Holddown
  • Split horizon with poisoned reverse
  • Bellman-Ford Equation
  • D(i,j) min d(i,k) D(k,j) for all iltgtj
  • k neighbors

4
Recap of Previous Lecture (2)
  • 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 Distance
    Vector
  • 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

5
Routing Information Protocol (RIP)
  • RIP is a specific realization of the distance
    vector or distributed Bellman-Ford routing
    algorithm
  • Distance vectors are carried over UDP over IP
  • RIP uses hop count as its shortest path metric,
    so d(i,j)1
  • Distance vectors are sent every 30 seconds
  • When a routing table changes, a router can send
    triggered updates to neighbors before 30 sec
  • Can lead to network storms, so limit rate wait 5
    seconds between sending new routing update and
    the update that caused routing table to change

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

Distance table at B
A
B
Via Port/Link
C
7
RIP problems
  • N-hop loops
  • Metric of hop count doesnt capture Internet
    loading
  • Doesnt scale well
  • The neighbor information carried by distance
    vectors takes awhile to propagate to across of
    network
  • If your network diameter is 20 hops, then it can
    take 20(30 seconds) 10 minutes to propagate
    all neighbor info and converge to stable
    routing tables
  • How could we improve speed of convergence?
  • Flood distance vectors, except theyre large!

8
Alternative Routing Strategy
  • Instead, flood just your neighbor link costs and
    compute a shortest path tree
  • First flood your neighbor link costs to entire
    network
  • These are small packets
  • Each node receives entire topology
  • Second, each node computes the shortest path
    tree with itself at as the root
  • This is called Link-State Routing

9
Alternative Routing Strategy (2)
  • How is this shortest path tree calculated?
  • Dijkstras Observation shortest path to nodes
    further from the root must go through a branch of
    the shortest path tree closer to the root
  • Strategy calculating the shortest path tree from
    the root (B), add nodes to the tree
  • Add node closest to root
  • at each iteration

10
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

11
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))

12
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 root 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

13
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

14
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

15
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

16
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

17
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

18
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
  • Propagates most recent info avoids loops
  • Not truly reliable in that LSPs can be lost
  • Reliable due to periodic flooding
    retransmission
  • Transient loops can still occur

19
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

20
Link State vs. Distance Vector
  • Routing update size
  • LS small, contain only neighbors link costs
  • DV potentially long distance vectors (length N
    for N nodes in network)
  • Routing update communication overhead
  • LS flood to all nodes, overhead is O(NE), where
    N is nodes, and E is edges or links
  • In DV, send distance vector only to neighbors

21
Link State vs. Distance Vector(2)
  • Convergence speed
  • DV at each iteration, send to neighbor and
    recalculate
  • takes awhile to propagate changes to rest of
    network
  • Iterations are periodic, hence slow faster when
    triggered
  • LS faster dont need to recalculate LSPs
    before forwarding
  • may be key reason that LS beat out DV in
    intra-domain routing

22
Link State vs. Distance Vector (3)
  • Space requirements
  • LS maintains entire topology in a link database
  • DV maintains only neighbor state
  • If each of N routers has K neighbors,
  • LS O(NK) memory requirement
  • DV O(NK) also

23
Link State vs. Distance Vector (4)
  • Complexity (initializing from scratch)
  • DV O(NKDiameter)
  • for each of N rows in distance table, find min of
    (dikDkj) over K neighbors, iterate until get
    info via DVs of furthest nodes (a diameter away)
  • If sorted list kept, reduce complexity to
    O(Nlog(K)Diam.)
  • LS O(N(N-1)/2)) O(N2)
  • First iteration, find min cost node from N-1
    nodes not in SPT for 2nd iteration, find min
    cost node from N-2 nodes not in SPT,
  • If a sorted list kept, reduce complexity to
    O(Nlog(N))
  • After convergence, new routing updates may only
    spur partial recalculations for both DV LS

24
Link State vs. Distance Vector (5)
  • Robustness
  • Both LS and DV can be completely disabled by a
    single router advertising false/corrupt LSP or DV
  • LS can flood false/corrupt LSPs to all routers
  • DV can advertise false paths/costs to all
    neighbors
  • In ARPANET, malfunctioning routers have
    advertised zero cost, creating a black hole
  • In 1997, a bad router in a small ISP advertised a
    false cost, became flooded with traffic,
    disconnecting ISPs from most U.S. backbone
    providers for 3 hours

25
Link State vs. Distance Vector (5)
  • Bottom line
  • no clear winner in terms of complexity, space,
    robustness,
  • but LS is favored in the intra-domain Internet
    due to faster convergence

26
Link-State Cost Metric
  • Choice of link cost defines traffic load
  • Low cost high probability link belongs to SPT
    and will attract traffic, which increases cost
  • Choices for metric
  • hop count
  • queueing delay
  • Transmission delay
  • Propagation delay

27
Link-State Cost Metric (2)
  • Static metrics (e.g. hop count or another fixed
    cost)
  • Less overhead than dynamic metrics
  • flood LSPs once initially,
  • Thereafter, flood LSPs only if link fails
  • Dont have to deal with staleness
  • Dynamic metrics can be out of date by the time
    they arrive at a distant router

28
Link-State Cost Metric (3)
  • Dynamic metrics take into account
  • Changes in link delay (due to congestion)
  • Variations in link capacity (wireless BW)
  • Dynamic metrics should
  • Avoid oscillations
  • low cost attracts traffic gt increase cost gt
    less traffic gt low cost gt increase traffic gt
    increase cost
  • Achieve good network utilization
  • Use link BW efficiently
  • Limit overhead from flooding LSPs
  • Respond quickly, to avoid performing Dijkstra on
    stale info

29
Original LS ARPANET Metric
  • Cost proportional to queue size
  • Instantaneous queue length as delay estimator
  • Problems
  • Did not take into account link speed
  • Did not take into account propagation delay of a
    link
  • Poor indicator of expected delay due to rapid
    fluctuations
  • Moves packets toward smallest queue, rather than
    to destination
  • Does not achieve good network utilization

30
New LS ARPANET Metric
  • Delay (depart time - arrival time)
    transmission time link propagation delay
  • (Depart time - arrival time) captures queuing
  • Transmission time captures link capacity
  • Link propagation delay captures the physical
    length of the link
  • Measurements averaged over 10 seconds
  • Update sent if difference gt threshold, or every
    50 seconds
  • Achieves better network utilization

31
Problems With New Metric
  • Works well for light to moderate load
  • Static values dominate
  • Oscillates under heavy load
  • Queuing dominates
  • Congested link advertising high cost pushes
    traffic away gt some links temporarily
    underutilized during heavy load 50 given 2
    links between 2 nodes
  • Range is too wide
  • 9.6 Kbps highly loaded link can appear 127 times
    costlier than 56 Kbps lightly loaded link
  • Can make a 127-hop path look better than 1-hop
  • Satellite links penalized, though theyd better
    suit playback video (high BW, non-delay
    sensitive)
Write a Comment
User Comments (0)
About PowerShow.com