Download presentation
Presentation is loading. Please wait.
1
Intradomain Routing EECS 122: Lecture 10 Department of Electrical Engineering and Computer Sciences University of California Berkeley
2
February 20, 2003 Abhay Parekh: EECS 122 Lecture 10 2 What is Routing? Routing is the core function of a network It ensures that information accepted for transfer at a source node is delivered to the correct set of destination nodes, at reasonable levels of performance.
3
February 20, 2003 Abhay Parekh: EECS 122 Lecture 10 3 Datagram v/s Virtual Circuit Datagram routing Each packet to be forwarded independently Virtual Circuit Each packet from same o-d uses same route More state (pick the “right” granularity) QoS sensitive networks use VC’s and signaling Find a route that has the resources available for the connection. “Reserve” the resources before sending data packets
4
February 20, 2003 Abhay Parekh: EECS 122 Lecture 10 4 Many Kinds of Routing Driven by… Destination set IP point-to-point Multicast Physical Characteristics Optical mobile wireless Diffusion (sensor networks) Interconnection network routing Geographic (wireless) Network Function P2P Content Distribution Networks
5
February 20, 2003 Abhay Parekh: EECS 122 Lecture 10 5 A Graph Model 6 7 8 5 4 3 1 2 12 10 13 11 Nodes are Routers/Hosts Edges are undirected
6
February 20, 2003 Abhay Parekh: EECS 122 Lecture 10 6 Walks 6 7 8 5 4 3 1 2 12 10 13 11 A Walk from 1 to 11 Cycle 4-8-7-5-4
7
February 20, 2003 Abhay Parekh: EECS 122 Lecture 10 7 Paths 6 7 8 5 4 3 1 2 12 10 13 11 Routes are Paths A Path is a Walk with no cycles There are 24 paths from 1 to 11
8
February 20, 2003 Abhay Parekh: EECS 122 Lecture 10 8 Routes 6 7 8 5 4 3 1 2 12 10 13 11 12 2 3 21 2 8 11 15 12 2 1 2 2 7 2 2 Routes are Paths A Path is a Walk with no cycles There are 24 paths from 1 to 11 Edges have weights
9
February 20, 2003 Abhay Parekh: EECS 122 Lecture 10 9 Routing 6 7 8 5 4 3 1 2 12 10 13 11 12 2 3 21 2 8 11 15 12 2 1 2 2 7 2 2 Routes are Paths A Path is a Walk with no cycles There are 24 paths from 1 to 11 Edges have weights Select the shortest path route Many ways to do this
10
February 20, 2003 Abhay Parekh: EECS 122 Lecture 10 10 Routing affects Flow Control Any function that “paces” the flow of bits into or within the network is flow control Example: All links have capacity 1 A D B 1 C A D B 1 C 1 Nothing admitted F E F E
11
February 20, 2003 Abhay Parekh: EECS 122 Lecture 10 11 What is going on? Routing and flow intimately related Link congestion metrics for routing depends on flow control Flow control feedback delay depends on routing Optimizing them jointly is nice in theory but intractable in practice. Separating flow control and routing makes both extremely difficult to implement with high performance
12
February 20, 2003 Abhay Parekh: EECS 122 Lecture 10 12 The internet has many Administrative Domains A B C 3 1 2 12 10 13 11 6 7 8 5 4
13
February 20, 2003 Abhay Parekh: EECS 122 Lecture 10 13 Border Routers 6 4 3 2 13 A B C 2 4 3 6 7 8 5 1 12 10 11 OSPF RIP IGRP BGP
14
February 20, 2003 Abhay Parekh: EECS 122 Lecture 10 14 Hierarchical Routing A B C 6 7 8 5 4 3 1 2 12 10 13 11 6 4 3 2 13 B 2 4 3 6 OSPF RIP IGRP BGP InterDomain IntraDomain
15
February 20, 2003 Abhay Parekh: EECS 122 Lecture 10 15 Routing Sub-Functions Topology Update: Characterize and maintain connectivity Discover neighbors Measure “distance” (one or more metric) Disseminate Route Computation: Kind of path: Multicast, Unicast Centralized or Distributed Algorithm Policy Hierarchy Switching: Forward the packets at each node
16
February 20, 2003 Abhay Parekh: EECS 122 Lecture 10 16 Routing Sub-Functions Topology Update: Characterize and maintain connectivity Discover neighbors Measure “distance” (one or more metric) Disseminate Route Computation: Kind of path: Multicast, Unicast Centralized or Distributed Algorithm Policy Hierarchy Switching: Forward the packets at each node
17
February 20, 2003 Abhay Parekh: EECS 122 Lecture 10 17 Three types of Routing Protocols Topology changes can be detected by nearby nodes These changes must be reflected in the routes Mechanisms for disseminating information Link State: Communicate the names and costs of neighbors. Each node maintains the entire topology. E.g. used in OSPF Distance Vector: Communicate current distance estimates of node to every other node. E.g. used in RIP Path Vector: Communicate current estimates of preferred paths from node to every other node. E.g. used in BGP
18
February 20, 2003 Abhay Parekh: EECS 122 Lecture 10 18 Link State Protocols 1. Every node learns the topology of the network Flooding of Link State Packets (LSP) 2. An efficient shortest path algorithm computes routes to every other node 3. Node updates Forwarding Table
19
February 20, 2003 Abhay Parekh: EECS 122 Lecture 10 19 Flooding Link State Information Every router sends Link State Packets (LSPs) to all of its neighbors LSPs arrive and wait in buffers to be “accepted” If node j receives a LSP from node k it compares the sequence numbers. If this is the most recent one from k, send to N(j)-{k}. This way each router can send its LSP to all other routers Age starts out at 7. At any router, value is decremented every 8 seconds. At 0 discard. As long as sequence don’t wrap this works Otherwise things can get ugly Source Sequence Number Age List of Neighbors
20
February 20, 2003 Abhay Parekh: EECS 122 Lecture 10 20 Example Network 6 7 8 5 4 3 1 2 12 10 13 11
21
February 20, 2003 Abhay Parekh: EECS 122 Lecture 10 21 Example Network 6 7 8 5 4 3 1 2 12 10 13 11
22
February 20, 2003 Abhay Parekh: EECS 122 Lecture 10 22 Example Network 6 7 8 5 4 3 1 2 12 10 13 11
23
February 20, 2003 Abhay Parekh: EECS 122 Lecture 10 23 Example Network 6 7 8 5 4 3 1 2 12 10 13 11
24
October 9, 2002 Abhay K. Parekh: Topics in Routing 24 Real story… Sequence numbers from some router, s, wrapped around A < B < C < A Router, t, has a buffer with LSPs from s of all three values in order: A, B, C Store and flood A Replace A with B and flood B Replace B with C and flood C Router u receives the LSPs in order ABC and goes through the same cycle and sends to v The entire Arpanet was sending these LSPs and crashed LSPs did not wait in buffers long enough to age…
25
February 20, 2003 Abhay Parekh: EECS 122 Lecture 10 25 Some Issues What happens if some routers are much faster at transmitting LSPs? What happens if sequence numbers wrap? What happens when a partitioned network is reconstituted? What about security? Etc., etc. Many lines of code
26
February 20, 2003 Abhay Parekh: EECS 122 Lecture 10 26 Route Computation: Dijkstra Every node knows the graph All link weights are >= 0 Goal at node 1: Find the shortest paths from 1 to all the other nodes. Each node computes the same shortest paths so they all agree on the routes Strategy at node 1: Find the shortest paths in order of increasing path length 1 3 4 6 2 5 1 4 1 1 4 1 2 3 1
27
February 20, 2003 Abhay Parekh: EECS 122 Lecture 10 27 Dijkstra: Shortest Path 1 3 4 6 2 5 1 4 1 1 4 1 2 3 1 D(1,5)=2 D(1,6,5)=5 P(2)={1,2} Notation c(i,j) >=0 :cost of link from (I,j) D(1,i): Shortest path from 1 to i. D(1,x,i): Shortest path from 1 to i via x Let P(k) be the set of nodes k-closest to 1 IDEA: Given P(k) we can find P(k+1) efficiently: To get P(k+1), observe that 1. This node cannot be in P(k) 2. It must be one hop away from some node in P(k) Suppose 2 were false. We picked i Node i has no edge into P(k) There must be a node x, not in P(k) such that x is one hop away from P(k) and D(1,i)=D(1,x)+D(x,i) But then, D(1,x) < D(1,i) and we would have picked x instead. Pick node(s) that is one hop away from P(k) that is closest to 1. Keep iterating until all nodes are in P
28
February 20, 2003 Abhay Parekh: EECS 122 Lecture 10 28 Dijkstra: Shortest Path 1 3 6 2 5 1 1 4 42 P(2)={1,2} D(1,2)=1 1 3 4 6 2 5 1 1 32 3 6 P(3)={1,2,5} D(1,5)=2 1 3 4 6 2 5 1 1 32 3 5 P(4)={1,2,3,5,6} D(1,3)=3 D(1,6)=3 1 3 4 6 2 5 1 4 1 1 4 1 2 1
29
February 20, 2003 Abhay Parekh: EECS 122 Lecture 10 29 Dijkstra: Forwarding Table 1 3 4 6 2 5 1 4 1 1 4 1 2 3 1 OutgoingCost 122 221 331 433 661 At node 5
30
February 20, 2003 Abhay Parekh: EECS 122 Lecture 10 30 Distance Vector Protocols Communicate current distance estimates of node to every other node This is called its distance vector: D i = (D(i,1),D(i,2),…,D(i,n)) Initially, assume that all distance estimates are c(i,j) The nodes do not need to learn the entire topology Just the distance estimates (vectors) of their neighbors Periodically each node sends its distance vector to all of its neighbors 1 3 4 6 2 5 1 4 1 1 4 1 2 3 1 At node 1: D 1 : (0,1, ∞, ∞, ∞,4) Neighbor estimates 2: (1,0, ∞, ∞,∞,∞) 6: (4, ∞,∞,∞,∞,0) At node 6: D 6 : (4, ∞,∞,∞,1,0) Neighbor estimates 1: (0, ∞,∞,∞,∞,4) 5: ( ∞,∞,∞,∞,0,1)
31
February 20, 2003 Abhay Parekh: EECS 122 Lecture 10 31 Distance Vector Protocols Upon receiving a more recent distance vector from its neighbors, a node, i, stores it and revises D i : New D(i,d): The total cost to send it via neighbor j is the sum of The link cost c(i,j) The stored estimate to reach d from j Pick the lowest sum over all the neighbors D(i,d) = min jεN(i) {c(i,j) + D(j,d)} 1 3 4 6 2 5 1 4 1 1 4 1 2 3 1 Old Info: DV: (4, ∞,∞,∞, 1,0) Neighbor estimates: 1: (0, ∞,∞,∞,∞,4) 5: ( ∞,∞,∞,∞,0,1) Revised: DV: (4,2,2,5,1,0) Neighbor estimates: 1: (0,1, ∞,∞, ∞,4) 5: (∞,1,1,4,0,1) Node 6 receives (0,1,∞, ∞,∞,∞,4) from 1 (∞,1,1,4,0,1) from 5 Send all packets to 2 via 1.
32
February 20, 2003 Abhay Parekh: EECS 122 Lecture 10 32 Distance Vector Protocols Forwarding Table at 6 1 3 4 6 2 5 1 4 1 1 4 1 2 3 1 Estimates DV: (3,2,2,4,1,0) Neighbor estimates: 1: (0,1,3,5,2,3) 5: (2,1,1,3,0,1) NodeCost 1 53 2 52 3 52 4 54 5 51
33
February 20, 2003 Abhay Parekh: EECS 122 Lecture 10 33 Why does this compute shortest paths? Suppose in every tick each node sends its distance vector. Assume that initial distances are ∞ At time h, node i has as an estimate of the shortest path to node j that has <= h+1 hops! D h+1 (i,j) = min kεN(i) {D h (k) + c(i,k)} 1 3 4 6 2 5 1 32 3 5 1 3 6 2 5 1 42 4 1 6 2 1 4 1 3 4 6 2 5 1 4 1 1 4 1 2 3 1 1 3 4 6 2 5 1 32 3 6
34
February 20, 2003 Abhay Parekh: EECS 122 Lecture 10 34 Counting to Infinity ABC 0 12 ABC 0 34 ABC 0 56 Ping-Pong to Eternity All links cost 1
35
February 20, 2003 Abhay Parekh: EECS 122 Lecture 10 35 Bad News Travels Slowly… 43 2 1 1 1 1 M 1 D(2,1)=2, D(3,1)=1, D(4,1)=2
36
February 20, 2003 Abhay Parekh: EECS 122 Lecture 10 36 Bad News Travels Slowly… 43 2 1 1 1 1 M 1 Node 2 takes about M Iterations to figure out that D(2,1)=M Fundamental Cause: After a network change, think of the network protocol running from time 0. The initial conditions are arbitrary… Tricks exist to get around these problems but not fool proof
37
February 20, 2003 Abhay Parekh: EECS 122 Lecture 10 37 Asynchronous Bellman Ford In general, nodes are using different and possibly inconsistent estimates If no link changes after some time t, the algorithm will eventually converge to the shortest path No synchronization required at all…
38
February 20, 2003 Abhay Parekh: EECS 122 Lecture 10 38 Oscillations Link costs must reflect link speed AND congestion Under both LSP and DV routing occurs over a tree The costs of the links of this tree will increase The other links will not be congested Their costs will drop Routing protocol will shift traffic and create a new tree This process of shifting and reshifting can be severe Way out: Change congestion costs slowly (exponential averaging) – Route dampening
39
February 20, 2003 Abhay Parekh: EECS 122 Lecture 10 39 Link State vs. Distance Vector No clear winner LS is robust since it each node computes its own routes independently Suffers from the weaknesses of the topology update protocol. Inconsistency etc. Excellent choice for a well engineered network within one administrative domain E. g. OSPF DV works well when the network is large since it requires no synchronization and has a trivial topology update algorithm Suffers from convergence delays Very simple to implement at each node Excellent choice for large networks E.g. RIP
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.