1 / 51

Optimality Principle

Optimality Principle. Assume that “optimal” path is the shortest one OP indicates that any portion of any optimal path is also optimal Set of optimal paths from all sources to a given destination forms a tree that is routed at the destination. A B C . 2. 3.

ciel
Télécharger la présentation

Optimality Principle

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. Optimality Principle • Assume that “optimal” path is the shortest one • OP indicates that any portion of any optimal path is also optimal • Set of optimal paths from all sources to a given destination forms a tree that is routed at the destination A B C 2 3 • Optimal path between A and F is A-B-C-E-F 2 1 2 • Then, the optimal path between B and F is B-C-E-F 4 1 D E F ECE 478/578

  2. Shortest Path Algorithm • “Shortest” in the sense of distance (e.g., total delay) • Assume that distance is “additive” • Two approaches to computing the shortest path: • Dijkstra’s algorithm (basis for link-state routing) • Bellman-Ford algorithm (basis for distance-vector routing) ECE 478/578

  3. Dijkstra’s Algorithm • Goal: find the shortest path from a given source to all destinations • Network is represented by a graph G(V,E), where • V: set of nodes • E: set of links (edges) • Assume that each link is associated with a delay value • Starting from the source node, the algorithm “discovers” remaining node in the order of their distances from the source ECE 478/578

  4. Dijkstra’s Algorithm (Cont.) • Each node vV is associated with a label: • Current best distance from source s to v • Previous node from which distance was obtained • Initially, all labels are tentative • If the distance is not known yet, it is set to infinity • In each iteration, the algorithm chooses a working node from set of nodes with tentative nodes • Working node is one with smallest distance among tentatively labeled nodes • Its label now becomes permanent ECE 478/578

  5. Dijkstra’s Algorithm (Cont.) • Variables: • V: set of nodes in the graph • s: source node • dij: link cost from node i to node j (=  if i is not a neighbor of j) • M: set of permanently labeled nodes • Un: current distance from s to node n ECE 478/578

  6. Dijkstra’s Algorithm (Cont.) • Initialization: • M = {s}, Un = dsn , n  s (=  if n is not a neighbor of s) • Repeat until M = V: • Find working node v  V-M such that Uv = min Un • M = M  v (v is permanently labeled) • Un = min{Un, Uv+ dvn} for all n  V-M • Worst-case complexity is in the order of n2 (although, lower complexities can be achieved) ECE 478/578

  7. Example ECE 478/578

  8. Routing in the Internet • Two general types of routing algorithms 1. Distance-vector 2. Link-state • Common aspects • Each router knows the address of its neighbors • Each router knows the cost of reaching its neighbors • Router obtains global routing information by exchanging information with its neighbors only  distributed routing ECE 478/578

  9. Routing in the Internet (Cont.) • Fundamental difference • Distance-vector: a node informs its neighbors of its “distance” to every other node in the network • Link-state: a node tells every other node in the network of its “distance” to its neighbors • Distance can be interpreted in different ways ECE 478/578

  10. Distance-Vector Algorithm • Developed by Bellman and Ford • Each router maintains a distance vector • Distance vector: list of [destination,cost] pairs • Cost is the cost of the shortest path from the router to a given destination (initialized to ) • Router periodically broadcasts its distance vector • When a router receives the distance vector of a neighbor, it updates its own distance vector ECE 478/578

  11. Example B Computation at A when DV from B arrives 1 1 D A 1 4 4 AB=1 Cost to go to B from A C + Initial 1 0 1 1 Cost to destn from B A B C D = A 0 1 4  2 1 2 2 Cost to destn via B B 1 0 1 1 MIN C 4 1 0 2 0 1 4  Current cost from A D  1 2 0 0 1 2 2 Newcost = New DV for A Next Hop B B ECE 478/578

  12. Problem with Distance-Vector Routing • Formation of loops after a link goes down count-to-infinity problem A B C A  - 1 1 3 B 3 A EXCHANGE COST TO C NEXT HOP A 4 B 4 A 2 B Portion of the RT at A B  - EXCHANGE INITIAL B 1 C Portion of the RT at B 1 2 A 2 B Link BC GOES DOWN EXCHANGE A  - 5 B  - B  - STABLE ECE 478/578

  13. Variations of Distance-Vector Routing 1. Path-vector routing • Each entry in the distance vector is annotated with the path used to obtain the cost • Count-to-infinity problem is solved • Used in Border Gateway Protocol (BGP) • Drawback: large path vectors (overhead) ECE 478/578

  14. Variations of Distance-Vector Routing (Cont.) 2. Split-horizon routing • Router does not advertise the cost of a destination to a neighbor if that neighbor is the next hop to that destination • Solves count-to-infinity problem for two routers • Does not work when three or more routers count to infinity • Variant of split-horizon • split-horizon with poisonous reverse • used in Routing Information Protocol (RIP) ECE 478/578

  15. Variations of Distance-Vector Routing (Cont.) 3. Distance-vector with source tracing • In addition to cost to destination, distance vector includes the address of the router immediately preceding the destination • Router can construct entire path to destination • When router updates costs in its distance vector, it also updates preceding-router field ECE 478/578

  16. Example Table for Node 1 1 2 4 Compute path from Node 1 to Node 6 DESTN NEXT LAST 1 --- --- 2 2 1 3 3 1 4 2 2 5 2 4 6 2 5 3 5 6 Assume unit link costs Path = 1,2,4,5,6 ECE 478/578

  17. Link-State Routing • Principles • Each router discovers its neighbors (using “Hello” packets) • Each router learns the cost of all links in the network (using topology/state dissemination) • Each router computes the best path to every destination (using Dijkstra's shortest path algorithm) • Topology dissemination • Routers generate link-state packets (LSPs), which contain • Router's ID • Neighbor's ID • Cost of link to the neighbor ECE 478/578

  18. Link-State Routing (Cont.) • LSPs are distributed using controlled flooding • Routers send LSPs to neighboring routers • Routers maintain copies of LSPs • Duplicate LSPs are not forwarded ECE 478/578

  19. Example Two LSPs CREATED BY Node A B 1 A B 1 1 A 1 D 4 4 A’s B’s COST ID ID C A C 4 ECE 478/578

  20. Example (Cont.) • A creates two LSPs: A,B,1 and A,C,4 • Consider LSP A,B,1 • When B receives LSP, it forwards it to C and D • When C receives LSP from B, it forwards it to A and D • A does not forward the LSP any further • If D gets the LSP from B before it gets it from C, it only forwards it to C. Otherwise, it forwards it to B ECE 478/578

  21. Sequence Numbers in Topology Dissemination • LSP consistency problem when a link/router goes down • Solution: use a sequence number for every LSP • LSP with a higher sequence number overwrites an LSP with lower number • Wrap-around problem ECE 478/578

  22. Solutions to Wrap-Around Problem 1. Aging • LSP contains an “age” value • When LSP is first created, its age is set to MAX_AGE • When a router receives an LSP, it copies its current age to a per-LSP counter • Counter is periodically decremented at router • If age reaches zero, router discards the LSP 2. Lollipop sequence space ECE 478/578

  23. Link State Versus Distance Vector • Arguments in favor of link-state algorithms 1. Stability (no loops at steady state) 2. Multiple routing metrics can be used 3. Faster convergence than distance vector algorithms • Counter arguments 1. Transients loops can form 2. Modified distance-vector algorithms are also stable and can support multiple metrics ECE 478/578

  24. Link State Versus Distance Vector (Cont.) • Arguments in favor of distance-vector algorithms 1. Less overhead to maintain database consistency 2. Smaller routing tables • Counter arguments • These advantages disappear when using modified distance-vector algorithms (e.g., path vector approach) • Internet uses both approaches • OSPF: link-state protocol • BGP: path-vector protocol ECE 478/578

  25. Hierarchical Routing • For large networks, state dissemination poses a scalability problem • Solution: cluster routers hierarchically into several peer groups (domains) • Summarized reachability information is advertised outside a group • Grouping can be done at multiple levels ECE 478/578

  26. Example (ATM PNNI) PEER GROUP LEADER OF PG(A.2) PG(A.2) A.2.3 LOGICAL LINK PG(B.2) A.2.2 PG(B.1) B.2.1 A.2.1 B.1.1 B.1.2 B.2.2 PG(A.3) B.2.3 B.2.5 PG(A.1) B.1.3 A.3.4 A.3.1 A.4.1 A.1.3 B.2.4 PG(C) A.4.2 A.3.3 A.3.2 A.1.2 A.1.1 A.4.4 A.4.3 C.1 C.2 A.4.6 BORDER NODE LOGICAL NODE PG(A.4) A.4.5 ECE 478/578

  27. Traffic Management & Control • Goals: • Guarantee applications QoS requirements • Provide congestion control • Utilize resources efficiently • Above goals sometimes conflict with each other • Common approach to traffic management: • Map applications QoS into few service classes • Guarantee QoS associated with these classes ECE 478/578

  28. How Many Classes of Service? • One class • Based on the most demanding traffic • Simple traffic management • Poor bandwidth utilization • Many classes • Better utilization • Traffic management is more complicated ECE 478/578

  29. Types of Traffic Control 1. Reactive control • Action is taken after congestion is detected • Essentially, closed-loop flow control • Network instructs users to reduce their rates • end-to-end flow control (similar to TCP) • link-by-link flow control • Problems • Too slow in a high-speed switching environment • Overreaction to temporary congestion • Fairness issues ECE 478/578

  30. Types of Traffic Control (Cont.) 2. Preventive control • Prevent the occurrence of congestion by means of • call admission control (CAC) • traffic policing (usage parameter control) • Appropriate for real-time traffic (e.g., voice and video) ECE 478/578

  31. Traffic Control Functions 1. Connection admission control (CAC) 2. Traffic policing and shaping 3. Resource management • Scheduling • Buffer management • Priority mechanisms • Bandwidth allocation 4. Flow control ECE 478/578

  32. Traffic Policing • Also known as usage parameter control (UPC) • Goals of UPC: • Ensure compliance with traffic contract  protect QoS of ongoing connections • Traffic shaping (done by users and/or network) • User identity verification • Reasons for traffic violations: • Equipment malfunctioning • Economical advantage (greedy users) • Malicious behavior (degrade QoS of others) ECE 478/578

  33. Traffic Policing (Cont.) • Several levels of policing (VC, link, etc.) • Actions taken when violations are detected • Packet discarding, or • Packet tagging (marking packets with lower priority) • Other possible actions at the connection level • Punitive charging • Connection termination • Problems with connection-level actions • long reaction time • drastic penalty ECE 478/578

  34. Traffic Policing (Cont.) • Locations at which traffic policing takes place • Entry nodes (network side of user-network interface) • Boundaries between different networks • Commonly policed parameters: 1. Peak cell rate (PCR) 2. Sustained cell rate (SCR) 3. Maximum burst size (MBS) ECE 478/578

  35. Issues in Traffic Policing • Limitations of current set of traffic parameters • How do users estimate their traffic parameters? • Traffic parameters may change within CPE before reaching the policing function  tolerance levels are needed ECE 478/578

  36. Ideal Requirements in a Policing Mechanism • Availability • Online operation • High probability of detecting violations • Transparency to conforming connections  very low probability of a wrong decision • Short reaction time ECE 478/578

  37. Traffic Descriptor • Set of traffic parameters describing a source • Used as basis for traffic contract • Often based on a traffic envelope • Time-invariant bound on number of arrivals • Often, it represents the worst-case (deterministic) behavior • Also known as “traffic constraint function” • Examples: • peak rate • (, ) model • linear bounded arrival processes (LBAP) ECE 478/578

  38. (,) Traffic Envelope • Let A[t, t + ] = no. of arrivals in interval [t, t + ] • Traffic envelope is the function A*() s.t. A[t, t + ]  A*(),  t > 0 • In the (,) model, A*() =  +  •  : burstiness parameter •  : rate parameter ECE 478/578

  39. (, ) Traffic Envelope (Cont.) Cumulative Number of Arrivals slope =   Window Size ECE 478/578

  40. LBAP Envelope • Several, cascaded (,) envelopes Cumulative Number of Arrivals slope = 3 slope = 2 3 2 1 slope = 1 Window Size ECE 478/578

  41. Properties of a good traffic descriptor 1. Representativity 2. Verifiability 3. Preservability 4. Usability ECE 478/578

  42. Common Policing Mechanisms 1. Leaky bucket 2. Jumping window 3. Moving window 4. Triggered jumping window 5. Exponentially weighted moving average ECE 478/578

  43. Leaky Bucket Mechanism • Tokens are generated at rate r • Token pool of size b (for unused tokens) • Input buffer (optional) • For simplicity, assume that packets are of fixed size • A packet must obtain a token to enter the network • Output traffic conforms to (, ) envelope • Can be implemented using two counters ECE 478/578

  44. Leaky Bucket Mechanism (Cont.) buffer (optional) input traffic network token bank (size b) token generator (rate r) ECE 478/578

  45. Jumping Window Mechanism • Time is divided into fixed-length windows • Number of packets per window less than or equal N • Worst-case burst length = 2N • Can be implemented using two counters ECE 478/578

  46. Moving Window Mechanism • Time window is continuously sliding • Number of packets per window at any time  N • Each packet is remembered for exactly one window • Worst-case burst length = N • Higher implementation complexity than JW ECE 478/578

  47. Composite Policing Mechanisms • Previous mechanisms enforce simple envelopes • To enforce more representative traffic envelopes, composite policing mechanisms can be used • A composite mechanism consists of several basic policing mechanisms connected in cascade • Example: Composite Leaky Bucket (i.e., LBAP) ECE 478/578

  48. Composite Leaky Bucket LB2 LB3 LB1 Accumulated No. of Packets compliance region Window size ECE 478/578

  49. Generic Cell Rate Algorithm (GCRA) • Adopted by ATM Forum for traffic policing • Based on continuous-state leaky bucket • Characterized by two parameters • Increment (I) • Limit (L) ECE 478/578

  50. Implementation of GCRA T(k): arrival time of kth packet LCT: last compliance time Initial conditions: X = 0 LCT = T(1) Y = X - (T(k) - LCT) Yes Y< 0 ? No Y = 0 Yes Non-conforming packet Y> L ? No X = Y + I LCT = T(k) Packet conforming ECE 478/578

More Related