1 / 84

CMPE 252: Computer Networks SET 6

CMPE 252: Computer Networks SET 6. Routing Protocols. Network Layer. The main functions at the network layer are addressing, routing, congestion control, and admission control. Addressing consists of identifying where a destination is with respect to the network topology.

anahid
Download Presentation

CMPE 252: Computer Networks SET 6

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. CMPE 252: Computer NetworksSET 6 Routing Protocols

  2. Network Layer • The main functions at the network layer are addressing, routing, congestion control, and admission control. • Addressing consists of identifying where a destination is with respect to the network topology. • Routing consists of (a) computing paths from sources to destinations and (b) forwarding packets along such paths. • Congestion control consists of limiting the amount of data a source can sent into the network. • Admission control consists of limiting the number of sources allowed to send data into the network, and in a way is part of system-wide congestion control.

  3. Routing • Algorithms used to compute paths from sources to destinations can be: • Static or adaptive: Routers compute paths off-line or dynamically in response to changes in topology or even traffic. • Hierarchical or flat (heterarchical): Routers and hosts are organized into clusters of nodes or all destinations and routers are treated as peers. • On-demand or table-driven: Routers maintain routing information for only those destinations for which need to forward data, or for all destinations. • You will also see routing algorithms classified according to the type of information they use.

  4. Routing Algorithms • Most books and papers classify routing algorithms into distance-vector and link-state algorithms. • Distance-Vector Algorithm: Routers exchange their distances to known destinations; a router uses the distance vectors received from its neighbors to compute its own distances. Computation is distributed. • Link-State Algorithm: Routers exchange information about the state of the links in the network; a router uses this information to compute its distances to destinations. Computation is local. • Doesn’t this sound a bit like the “Tastes Great/Less Filling” argument?

  5. So What Does This have to Do with Routing Algorithms? • A routing algorithm is not solely defined by the type of information maintained at routers. • Some information must be disseminated throughout the network, which necessarily involves a distributed computation.

  6. Towards a Theory of Routing • What is routing in the broadest sense? • How it has been done focusing on what is good and bad about routing today. • How would we design routing if we could start from scratch?

  7. What Is Routing? • Correct routing ⇒ forward to node “closer” to destination • “Closer” relationship ⇒ Total or Partial Ordering of nodes with respect to each intended destination. • Algebraic structures for path problems in graphs have been proposed since the 1960s. • Carre* proposed a semi-ring structure in 1971 • A set S and two binary operations, ⊕ (the generalized addition) and ⊗ (the generalized product) • A partial order ≼ over the semi-ring such that a≼b ↔ a ⊕ b = a • Many routing algebras have been proposed inspired by Carre’s work to reason about policy-based and shortest-path routing in the Internet (e.g., Sobrino’s algebra, Brad & JJ’s algebra ). * B. A. Carre, “An Algebra for Network Routing Problems,” IMA Journal of Applied Mathematics Volume 7, Number 3 Pp. 273-294.

  8. Is There a Unifying Routing Algebra?A Long-Term Quest in Routing • MANET or Internet • A labeled graph G is a 3-tuple (V,E,ℓV) • V is a finite set of vertices, • E⊆V×ΣE×V is the set of labeled edges, • ℓV:V→ΣV is a function that maps vertices to labels and, • ΣV and ΣE are alphabets of the labels that can be assigned to vertices and edges, respectively • Problem formulation • ΣE={0}, ΣV=ℕ, and ℓV:V→ΣV is injective • The image of ℓV is I • The only restriction over paths is that they must be simple • Minimum structure • Semigroup (S, ⊗b) where the set S is the image of I under some function f. • What we gain: • Proofs are well structured and simpler; start of a sound taxonomy! • Show that condition(s) for path selection are correct and that signaling satisfied conditions at any time.

  9. From Routing Algebra(s) to Algorithms • The minimum we need is “simple” paths, and our algorithm must search for such paths • Two extremes: • Breath-first search (BFS): Traditional approach (on-demand, proactive, epidemic routing); network-wide dissemination must be used [flooding or incremental dissemination] • Depth-first search (DFS): No network-wide dissemination of information; search packets establish walks in the network • Research directions: • BFS: Reduce signaling by establishing areas of interest where signaling disseminates. • DFS: Eliminate flooding completely with “ordered walking plus learning” (OWL) to improve over random walking.

  10. Routing Algorithms • Routing algorithms should be classified according to: • The type of search they support • The mechanism(s) used to detect that the operations executed in the search complete successfully or not. • The entities for which routes are built • The identifiers used to denote such entities. • Routing algorithms (protocols) today assume BFS, nodes/networks as destinations, globally unique pre-defined identifiers. • We first address the mechanisms used to detect the completion of operations supporting such a search.

  11. Routing Algorithms • A routing algorithm always carries out a distributed computation to obtain correct paths from each source to its desired destinations. • Some indication that at least some aspect of this computation has ended must be available to routers. • The end of any distributed computation can be detected in three known ways (and combinations of them): • Termination detection over a tree • Termination detection using sequence numbers (time stamps) • Termination detection over a ring • Distances or link states can be used in each of these three types of algorithms! A good read: Nancy Lynch, “Distributed Algorithms,” Morgan Kaufman, 96

  12. How Routing Has Been Done in the Internet and MANETs

  13. h2 k …. hx (i, k) i j q p Shortest-Path Routing • Problem: Compute the path of minimum length from each router to each destination • Notation: G(N, E) is the network of |N| nodes and |E| links

  14. A 10 C 1 2 2 E 2 10 S 5 5 B D 1 Bellman-Ford Algorithm Step 1: Initialize source node S with a 0 distance to itself and all other nodes with an infinite distance. Step 2: Set H = 1 Step 3: Label all nodes H hops away from S with the smallest distance from S to the nodes. Step 4: Stop if all nodes have been covered and no label can be reduced by increasing H. Else, set H = H+1 and repeat Step 3 • BF iterates on the number of hops away from a node. 0 Link costs are the same in both link directions

  15. 1 A 10 C 1 2 1 2 E 2 10 S 5 1 5 B D 1 5 Bellman-Ford Algorithm H = 1: 0 Only A and B can be reached within one hop

  16. A 10 C 2 1 2 2 2 E 2 10 S 5 5 B D 1 5 3 Bellman-Ford Algorithm H = 2: 11 1 0

  17. 11 5 A 10 C 1 2 2 E 2 10 S 3 5 5 B D 3 1 4 Bellman-Ford Algorithm H = 3: 1 0 Only E cannot be reached within three hops 3

  18. 1 5 A 10 C 1 4 2 2 E 2 10 S 7 0 5 5 B D 1 3 4 Bellman-Ford Algorithm H = 4: No more nodes can be reached and no label can be reduced

  19. Distributed Bellman-Ford Algorithm (DBF) • The objective of DBF is to have a distributed implementation of BF, so that routers can compute distances to destinations distributedly. • To accomplish this, the computation of a distance to a destination starts at the destination itself. • The iteration of DBF is on the number of hops away from a destination. • DBF operates independently for each destination. • Destination starts by stating the distance to itself is 0 • The neighbors of the destination receive this information, process it and send their own updates. • Distances propagate throughout the network.

  20. k successor for j: i j (i, k) p q Notation Node i must compute the shortest distance to j, which we show to be through neighbor k

  21. DBF • Information maintained at each router: • Distance Table: Distance to each destination reported by each neighbor • Link-Cost Table: Cost of link to each adjacent node • Routing Table: Distance and successor (next hop) to each destination • Information exchanged among routers: • Vector of one or more entries, each entry stating the distance to a destination • Services assumed: • Update messages are exchanged reliably, a node knows who its neighbors are

  22. (i, k) k i j p q is computed with the Bellman-Ford Equation: DBF The next hop for j is a neighbor that provides the minimum distance according to the Bellman-Ford equation. Router I computes every time it receives an input event (link change or update message) and sends an update message to its neighbors.

  23. 4 3 2 1 d c b a j 1 1 1 1 0 1 3 2 4 1 3 2 4 time Example of DBF Operation • For simplicity, we will assume “synchronous operation” in all cases!

  24. 4 3 2 1 d c b a j 3 = 2+1 4 = 3+1 7 5 5 6 7 6 5 5 6 6 7 7 4 time Counting to Infinity in DBF • The problem with DBF is that it does not have a termination detection mechanism! X …. etc

  25. 1 5 partition A 10 C 1 2 2 E 2 10 S 6 0 2 5 B D 1 3 4 Correctness of DBF Step 1: Initialize source node S with a 0 distance to itself and all other nodes with an infinite distance. Step 2: Set H = 1 Step 3: Label all nodes H hops away from S with the smallest distance from S to the nodes. Step 4: Stop if all nodes have been covered and no label can be reduced by increasing H. Else, set H = H+1 and repeat Step 3 • Note that BF converges because H is finite! After partition, the max H from S to E is infinity! S can keep max number of nodes in the network (N), and the distance and hop count for each destination. S can stop when hop count = N, because longest path must be N-1 hops.

  26. Ad Hoc Solutions (do not work) Counting to N takes too long! Alternatives include: • Split horizon: Tell successor distance to destination is infinity. • Hold-down timer: After distance to destination increases, send update stating new distance through current successor, wait for a long period of time before computing new successor and shortest distance and then act as in DBF. • Poisoned reverse: After distance increase, report an infinite distance and then correct the distance. • Next-hop information: Communicate the distance and next hop to each destination (used in RIP v2)

  27. DBF Correctness • Liveness: • Each node updates its routing table independently of others. • The only possibility of deadlock occurs in the reliable exchange of update messages (the equivalent of a point-to-multipoint ARQ) • Safety: • We must show that, in the absence of deadlocks and after an arbitrary sequence of topology changes, the protocol produces correct routing tables and stops sending updates.

  28. DBF Correctness Assumptions: • We focus on the min-hop routing case. • G is connected (max hop count is finite). • No more topology changes occur after time t. • No deadlocks occur in the exchange of correct update messages. We can show that the exchange of messages does not produce a deadlock.

  29. DBF Correctness: DBF Obtains Correct Routing Tables • Proof is by simple induction on the number of hops away from a destination j. • Because of the underlying service, a neighbor of j knows that j is a neighbor within a finite time, and sets its distance to j equal to 1 by some time T0 >= t • Assume that DBF is correct for h-1 hops away from j.

  30. DBF Obtains Correct Routing Tables • By time T1 > T0, each router h-1 hops away from j must send an update message reliably to each neighbor stating that its distance to j is h-1. • Consider router x, which is h hops away from j; this router must know all its neighbors within a finite time, and must receive the update from all its neighbors at h-1 hops from j by time T1. • Whatever the distance to j for node x (at h hops from j) is, using the BF equation, node x must choose a neighbor h-1 hops from j as its next hop to j by some finite time T2 > T1. Q.E.D.

  31. DBF Correctness: DBF Stops • A router updates the distance to a destination only after topology changes or update messages are received, and no more topology changes occur after time t. • A router sends an update message only if its distance changes. • After node i that is h hops away from j sends its update stating that its distance to j is h, it does not send more updates (this requires that a router must continue using the same next hop unless its distance changes!) • Therefore, DBF stops.

  32. 5, B 2, j A 10 C 1 2 2 j 2 10 S 6, A 2 5 B D 1 3, D 2, j Looping in DBF X 0, j

  33. 5, B 5,B A 10 C 5 1 2 2 10 S 6, A 5 B D 4 1 3, D 4, B Looping in DBF

  34. 5, B 5,B A 10 C 1 2 2 10 S 6, A 5 B D 5 1 3, D 4, B Looping in DBF Erroneous paths persist as long as they appear to be the shortest paths. Similar looping could occur if the cost of the links to j increased drastically (e.g., to 20). DBF cannot be used with link costs that have a large variance! … etc

  35. Examples of DBF Use • First routing protocol of the ARPANET. • Routing protocol of MERIT network. • DARPA packet radio network. • Routing Information Protocol (RIP) • RIPv2 • Cisco’s IGRP (DBF with split horizon, poison reverse, hold downs, and a complex link-cost metric).

  36. Termination Detection Using Sequence Numbers • Examples using link-state information are the traditional link-state routing protocols: • OSPF, IS-IS, new ARPANET routing protocol. • Examples using distance information: • DSDV (Destination Sequenced Distance Vector protocol, ACM SIGCOMM 94). • AODV (Ad-hoc On Demand Distance Vector protocol, IETF Draft).

  37. Termination Detection Using Sequence Numbers Approach: • An update source is defined • Source of update increments sequence number with each update it originates. • Update is flooded reliably throughout the network. • A node trusts an update it receives if it has a higher sequence number than the node’s local copy. • Mechanisms needed to account for node faults and network partitions.

  38. Traditional Link-State Algorithm (LSA) • Developed as a result of DBF’s looping and non-termination problems. • Two components: • Topology map distribution • Local shortest path computation • Each router runs a local shortest-path algorithm (Dijkstra’s) using the topology stored locally. • Flooding is used to replicate the topology map at every router. • Each router is responsible for reporting the state of outgoing links to the rest of the network. • Two link-state updates per link reach every router.

  39. Shortest-Path First (SPF) Algorithm Step 1: Initialize Set SPF = { root }, where root is router running SPF Distance to root = 0 and distance to other node = cost of link or infinity Step 2: Find next node for SPF set: Find a node x not in SPF set such that: distance to/from root = Min{distance to node outside of SPF set} Augment SPF set with x Stop if SPF set contains all nodes Step 3: Change minimum distance: For each node y outside SPF set do: dist. to y = Min{ dist. to y, dist. to z in SPF + cost of (z, y) } Repeat Step 2

  40. 1 A 10 C 1 2 2 E 2 10 S 0 2 5 B D 1 5 SPF Example SPF ={S}

  41. 1 11 A 10 C 1 2 2 E 2 10 S 0 2 5 B D 1 3 SPF Example SPF ={S, A}

  42. 1 5 A 10 C 1 2 2 E 2 10 S 0 2 5 B D 1 4 SPF Example SPF ={S, A, B} 3

  43. 5 1 A 10 C 1 2 2 E 6 2 10 S 0 2 5 B D 1 3 4 SPF Example SPF ={S, A, B, D} Note that iteration is on the next node that can be covered with the next shortest path; hence complete topology must be known by router. Labels do not change as we continue to expand SPF set SPF ={S, A, B, D, C} then SPF ={S, A, B, D, C, E} Stop after covering E since all nodes are covered by SPF set.

  44. Flooding of Link States • Information Stored at Routers: • Each router maintains all the nodes and all the links in the network in a topology graph. • Each link in the graph has a cost, a sequence number, and an age. • Information Exchanged: • Each router is responsible for communicating the latest state of each adjacent outgoing link. • The router sends a link state update (LSU) to report changes on an adjacent outgoing link. • A sequence number is used to identify the latest LSU. • An LSU also specified the age of the LSU, and the age of an LSU is decremented each time it is forwarded and while it is in storage. We assume that LSUs are exchanged reliably between any two routers and that a router knows who its neighbors are!

  45. Link-State Flooding Example A 10 C 1 2 2 E 2 10 S 2 5 B D 1

  46. Link-State Flooding Example A 10 C Each link has a cost in each direction. 2 1 2 E 2 10 S 2 5 B D 1

  47. Link-State Flooding Example A 10 C Node S is responsible for reporting changes in the state of its outgoing links 2 1 2 E 2 10 S 2 7 B D 1

  48. A 10 C 1 2 2 E 2 10 S 2 7 B D 1 Link-State Flooding Example LSU: l(S,B) = 7 SN = 1 AGE = max

  49. A 10 C 1 2 2 E 2 10 S 2 7 B D 1 Link-State Flooding Example LSU: l(S,B) = 7 SN = 1 AGE = max - 1 LSU: l(S,B) = 7 SN = 1 AGE = max - 1

More Related