1 / 40

Fundamentals of Computer Networks ECE 478/578

Fundamentals of Computer Networks ECE 478/578. Lecture #16: Routing Instructor: Loukas Lazos Dept of Electrical and Computer Engineering University of Arizona. What is Routing?. Construct directions from starting point to destination. Forwarding vs. Routing. Forwarding: data plane

yestin
Télécharger la présentation

Fundamentals of Computer Networks ECE 478/578

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Fundamentals of Computer NetworksECE 478/578 Lecture #16: Routing Instructor: LoukasLazos Dept of Electrical and Computer Engineering University of Arizona

  2. What is Routing? Construct directions from starting point to destination

  3. Forwarding vs. Routing • Forwarding: data plane • Directing a data packet to an outgoing link • Individual router using a forwarding table • Routing: control plane • Computing paths the packets will follow • Routers talking amongst themselves • Individual router creating a forwarding table

  4. Why Does Routing Matter? • End-to-end performance • Quality of the path affects user performance • Propagation delay, throughput, and packet loss • Use of network resources • Balance of the traffic over the routers and links • Avoiding congestion by directing traffic to lightly-loaded links • Transient disruptions during changes • Failures, maintenance, and load balancing • Limiting packet loss and delay during changes

  5. Different Types of Routing Routing in a GPS device Routing in computer networks Shortest path Smallest delay Highest reliability Avoid congested nodes

  6. Routing as a Graph Problem Network is mapped into a graph G(V,E), where each link has an associated cost Cost: delay, financial cost, probability of failure, etc.

  7. Distance Vector Algorithm Construct a one-dimensional array (vector) of distances to all other nodes Exchange info with immediate neighbors Update distances based on received information Stop sending updates as soon as no change occurs Example: Assume unit cost for each link

  8. Distance Vector – Global View Global view of the network

  9. Distance Vector – Local View

  10. Distance Vector – 1st Update

  11. Distance Vector – 2nd Update

  12. Failure of F – G Link

  13. Failure of F – G Link Step 1

  14. Failure of F – G Link Step 2

  15. Failure of F – G Link Step 3

  16. Failure of F – G Link Step 4

  17. Count-to-Infinity Problem A advertises a distance of infty to E and updates its neighbors C advertises a distance of 2 to E via A B advertises a distance of 3 to E via C A updates its table and advertises a distance of 4 via B C updates its table and advertises a distance of 5 via A…

  18. Solutions for Count-to-Infinity Problem Sol A: Use a maximum hop count instead of infinity Sol B: Split Horizon Do not send updates on the neighbor that provided the info for a particular route. E.g.: B does not send an update for E to A, since it learned about E from A Sol C: Split Horizon with Poison Reverse B advertises a route of cost infinity to E to ensure that A does not use B to get to E Solutions do not always work for loops with more than 3 nodes

  19. Routing Information Protocol (RIP) Distance-vector algorithm where vertices are networks and not hosts Valid hop count (distances) 1-15, with 16 representing infinity Limited to fairly small networks

  20. Link-State Routing • Path-selection model • Destination-based • Flood information regarding immediate neighbors to all nodes • Each node obtains a complete map of the network 2 1 3 1 4 2 1 5 4 3

  21. Shortest-Path Problem • Given: network topology with link costs • c(x,y): link cost from node x to node y • Infinity if x and y are not direct neighbors • Compute: least-cost paths to all nodes • From a given source u to all other nodes • p(v): predecessor node along path from source to v 2 1 3 1 4 u 2 1 5 p(v) 4 3 v

  22. Dijkstra’s Shortest-Path Algorithm • Iterative algorithm • After k iterations, know least-cost path to k nodes • S: nodes whose least-cost path definitively known • Initially, S = {u} where u is the source node • Add one node to S in each iteration • D(v): current cost of path from source to node v • Initially, D(v) = c(u, v) for all nodes v adjacent to u • … and D(v) = ∞ for all other nodes v • Continuously update D(v) as shorter paths are learned

  23. Dijsktra’s Algorithm 1 Initialization: 2 S = {u} 3 for all nodes v 4 if v adjacent to u { 5 D(v) = c(u,v) 6 else D(v) = ∞ 7 8 Loop 9 find w not in S with the smallest D(w) 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)} 13 until all nodes in S

  24. Dijkstra’s Algorithm Example 2 2 1 1 3 3 1 1 4 4 2 2 1 1 5 5 4 4 3 3 2 2 1 1 3 3 1 1 4 4 2 2 1 1 5 5 4 4 3 3

  25. Dijkstra’s Algorithm Example 2 2 1 1 3 3 1 1 4 4 2 2 1 1 5 5 4 4 3 3 2 2 1 1 3 3 1 1 4 4 2 2 1 1 5 5 4 4 3 3

  26. Shortest-path tree from u Forwarding table at u 2 v y 1 3 1 4 x z u 2 v (u,v) 1 5 w (u,w) t w 4 3 x (u,w) s y (u,v) z (u,v) s (u,w) (u,w) t Shortest-Path Tree link

  27. Dijkstra Table

  28. Link-State Routing • Each router keeps track of the state of its incident links • Link-state: working or non-working • Cost (delay, throughput) • Each router floods the link state in the entire network • Every router gets a complete view of the network • Each router runs Dijkstra’s algorithm to obtain shortest paths to all other destinations • Link-state protocols • Open Shortest Path First (OSPF) • Intermediate System – Intermediate System (IS-IS)

  29. Determining the State of a Link • Beaconing • Periodically exchange “hello” messages with neighbors • Detect a failure after a threshold number of unanswered “hellos” HELLOB A HELLOB HELLOA HELLOC B C

  30. Distributing Link-State Info Flood the entire network Every node forwards link-state packet on all links but the incoming one

  31. Link-State Packets Packets to be distributed Sequence number prevents nodes from using old messages Age determines a time to live for the packet (why do we need this?)

  32. When to Initiate Flooding • Topology change • Link or node failure • Link or node recovery • Configuration change • Link cost change • Periodically • Refresh the link-state information • Typically (say) 30 minutes • Corrects for possible corruption of the data

  33. Link State vs. Distance Vector Link State Tell every node in the network about your immediate neighbors Distance Vector Tell only to your neighbors about every node in the network

  34. Open Shortest Path First Protocol Format of an OSPF message Version: 1-4, 1:Hello msg, 2: request, 3:send, 4: Ack Area Id: area where node is connected in case of hierarchical routing Authentication type: 0:none, 1:simple pswd, 2: MAC

  35. Link State Advertisements (LSA) Type 1: cost of links Type 2: networks connected Other types: Hierarchy info LS Age: TTL Link-state ID, Advertising router: 32-bit address of router Length: length in bytes of the LSA Link ID, data, type: identify the link Type of Service (TOS): Allows assignment of different metrics for different services for the same link

  36. Link Metrics Hop count: Assign a metric of one at every hop Least-cost route  Least-hops route Delay: Delay= Tack – Tarr = (Td – Tarr) + Tt + 2 Tp Weight assigned to each link = average delay for packets passing through Problems with simply using delay Instability: A heavily loaded link would oscillate between busy and idle states Wide value range: a link could look hundreds of time more expensive than another – may cause very long routes

  37. Suppression of the Dynamic Range New metric based on link utilization Highly loaded link never shows a cost more than three times its idle cost The most expensive link is only seven times the cost of the least expensive A high–speed satellite link is more attractive than a low speed terrestrial link Cost is a function of link utilization only at moderate to high loads

  38. Link Metrics in the Real World For the most part metrics are static No dynamic adjustment, but hardcoded by network administrators Avoids route oscillation problems Most commonly used metric w = c/B, where c is a constant and B is the link bandwidth

  39. Hierarchical Routing A scalable solution for very large networks Cluster routers into areas or regions

  40. Hierarchical Routing Reduction in table size comes at a cost The route between a particular node pair may not necessarily be the shortest For large networks, how many levels should the hierarchy have? Example: Network with 720 nodes 1 level: 720 entries 2 levels: 24 regions and 30 nodes per region 29 (local) + 23 (region) = 52 entries 3 levels: 8 clusters; 9 regions/cluster; 10 routers/region 9 (local) + 8 (region) + 7 (cluster) = 24 entries

More Related