Presentation is loading. Please wait.

Presentation is loading. Please wait.

Network Layer Chapter 5 Design Issues Routing Algorithms

Similar presentations


Presentation on theme: "Network Layer Chapter 5 Design Issues Routing Algorithms"— Presentation transcript:

1 Network Layer Chapter 5 Design Issues Routing Algorithms
Congestion Control Quality of Service Internetworking Network Layer of the Internet Gray units can be optionally omitted without causing later gaps Revised: August 2011 CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

2 The Network Layer Physical Link Network Transport Application Responsible for delivering packets between endpoints over multiple links CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

3 Congestion Control (1) Handling congestion is the responsibility of the Network and Transport layers working together We look at the Network portion here Traffic-aware routing » Admission control » Traffic throttling » Load shedding » CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

4 Congestion Control (2) Congestion results when too much traffic is offered; performance degrades due to loss/retransmissions Goodput (=useful packets) trails offered load As offered load increases, goodput should increase correspondingly until the capacity of the network is reached. Goodput will trail offered load because the load is bursty and queues will occasionally be too full and a packet will be discarded inside the network. Congestion collapse can occur if the protocols are not carefully designed when nodes retransmit packets many times, believing that they have been lost, when copies of the packet are still in the network (in queues at routers) pending delivery. While throughput at a receiver may be high, goodput falls because multiple copies of the same packet are being received and after the first copy the bandwidth is wasted. This really happened in the late 1980s as the Internet grew, and it lead to the design of modern TCP that includes congestion control mechanisms. CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

5 Factors causing congestion
Streams of packets simultaneously begin arriving on several input lines that are headed for the same output line Slow processors Low-bandwidth lines Mismatch between parts of the system Feeding congestion upon itself Retransmission of lost packets TUNALI Computer Networks 1

6 Congestion Control versus Flow Control
Making sure that the net is able to carry the offered traffic Flow control Related to point-to-point traffic between the sender and the receiver Making sure that a fast sender can not continually transmit data faster than the receiver can absorb it A sender may receive a ‘slow down’ message either due to congestion in the subnet or due to receiver not being able to handle the load TUNALI Computer Networks 1

7 Congestion Control (3) – Approaches
Network must do its best with the offered load Different approaches at different timescales Nodes should also reduce offered load (Transport) Provisioning is simply sizing the network to fit the offered load, i.e., don’t build it too small, or with little West-to-East capacity if there is much West-to-East traffic. CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

8 Congestion Control (4) – Approaches
Network Provisioning: Build the network well matching traffic needs Traffic-aware routing: Routes may be changed dynamically by changing the shortest path weights Admission control: Refuse requests that would overload the network Load shedding: Discard packets CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

9 Traffic-Aware Routing
Choose routes depending on traffic, not just topology E.g., use EI for West-to-East traffic if CF is loaded But take care to avoid oscillations Our previous routes only considered topology; this approach can get more traffic through the network. If not careful, then routing can notice CF is busy and switch traffic over to use EI, only to later notice that EI is busy and switch traffic back to CF. There are various techniques to avoid this: 1) change routes only slowly, e.g., traffic engineering in which an external system sets weights and the routing system does not otherwise adapt; and 2) using multiple paths at once, e.g., both CF and EI. CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

10 Traffic-Aware Routing 2
Choose weights to be a function of Bandwith (fixed) Delay (fixed) Load (variable) The parameters must be crafted carefully to avoid oscillations due to changing load. CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

11 Admission Control Admission control allows a new traffic load only if the network has sufficient capacity, e.g., with virtual circuits Can combine with looking for an uncongested route Network with some congested nodes Uncongested portion and route AB around congestion CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

12 Admission Control 2 To carry out admission control, one needs to characterize the network traffic. Two measures are used to do this: Average data rate Instantaneous burst size CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

13 Traffic Throttling 1 Congested routers signal hosts to slow down traffic ECN (Explicit Congestion Notification) marks packets and receiver returns signal to sender There are other designs, but this is the main one under deployment in the Internet. By marking existing packets using bits in the IP header, routers avoid sending additional packets at a time of congestion. Signal from receiver to sender is carried using a Transport protocol like TCP. CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

14 Traffic Throttling 2 The main ide is congestion avoidance. Routers diagnose upcoming congestion by monitoring: Queue lengths in buffers Compute queuing delay by using exponentially weighted moving average (EWMA) formula Utilization of the output links Number of packets lost CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

15 Choke Packets If a newly arrived packet’s output line is in warning state, a CHOKE PACKET is sent back to the source The packet is forwarded to the destination The source receiving the choke packet is expected to reduce its traffic accordingly TUNALI Computer Networks 1

16 Explicit Congestion Notification
No extra packet generated Router tags the packet and forwards it to the destination Destination reading the tag informa the source about the problem CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

17 Hop-by-Hop Backpressure
At high speeds, choke packet reaction is slow Alternative: Hop-by-Hop choke packets Choke packets take effect at every hop it passes through TUNALI Computer Networks 1

18 Hop-by-Hop Choke Packets
(a) A choke packet that affects only the source. (b) A choke packet that affects each hop it passes through. TUNALI Computer Networks 1

19 Load Shedding (1) When all else fails, network will drop packets (shed load) Can be done end-to-end or link-by-link Link-by-link (right) produces rapid relief 1 4 5 2 3 CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

20 Load Shedding (2) 1 End-to-end (right) takes longer to have an effect, but can better target the cause of congestion 5 2 6 3 7 4 CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

21 Load Shedding 3 Random dropping can be done but there are better policies Wine policy Old is better than new More efficient in go back n Milk policy New is better than old More efficient in multimedia streaming Priority policy MPEG uses compression that has some frames carrying more important information TUNALI Computer Networks 1

22 Random Early Detection
Discard packets before all the buffer space is really exhausted This would be a message to TCP to slow down Maintain a buffer threshold and when average queue length exceeds the threshold, action is taken TUNALI Computer Networks 1

23 Quality of Service Application requirements » Traffic shaping »
Packet scheduling » Admission control » Integrated services » Differentiated services » CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

24 Overprovisioning Provide the necessary router capacity, buffer space and bandwidth to smoothly send the packets Expensive TUNALI Computer Networks 1

25 Application Requirements (1)
Different applications care about different properties We want all applications to get what they need . “High” means a demanding requirement, e.g., low delay CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

26 Application Requirements (2)
Network provides service with different kinds of QoS (Quality of Service) to meet application requirements Network Service Application Constant bit rate Telephony Real-time variable bit rate Videoconferencing Non-real-time variable bit rate Streaming a movie Available bit rate File transfer Video conferencing is variable bit rate because video is normally compressed, so the bit rate varies over time. Telephony is typically carried at a lower, fixed rate. Example of QoS categories from ATM networks CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

27 Traffic Shaping 1 Bursty traffic is often the cause of congestion
Traffic shaping regulates the average rate (and burstiness) of data transmission This is an open loop method to prevent congestion. When virtual circuit is set up, the user an d the subnet agree on certain traffic pattern. As long as the user fulfills its contract, the carrier live up to its promise Traffic policing is the monitoring of user’s rate Carrier discards packets if the user breaks the contract TUNALI Computer Networks 1

28 Traffic Shaping (2) Traffic shaping regulates the average rate and burstiness of data entering the network Lets us make guarantees Shape traffic here CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

29 (need some water to send)
Traffic Shaping (3) Token/Leaky bucket limits both the average rate (R) and short-term burst (B) of traffic For token, bucket size is B, water enters at rate R and is removed to send; opposite for leaky. to send to send Leaky bucket (need not full to send) Token bucket (need some water to send) CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

30 The Leaky Bucket Algorithm
Packets enter a finite queue at a random rate Packets leave the queue at a constant rate If the buffer is full, the incoming packets are discarded If packets are of variable length, then the algorithm is defined in terms of bytes per unit time TUNALI Computer Networks 1

31 The Token Bucket Algorithm
A leaky bucket holds tokens that are generated at rate of 1 token in T sec. For a packet to be transmitted, it must capture and destroy one token. This algorithm allows output bursts of up to bucket capacity. This algorithm discards tokens if the bucket is full, but it never discards packets, hence needs a large buffer for incoming packets A variant of the algorithm running on bytes rather than packets is possible TUNALI Computer Networks 1

32 Traffic Shaping (4) Host traffic R=200 Mbps B=16000 KB Shaped by R=200 Mbps B=9600 KB Shaped by R=200 Mbps B=0 KB For the host traffic the descriptor R=200 Mbps, B=16000KB is the smallest token bucket that can let the traffic pass unchanged. To compute this we work out R as the average rate over the time period, then given we find the smallest B such that the bucket size only just reaches zero at some point. Smaller bucket size delays traffic and reduces burstiness CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

33 Calculation of Maximum Burst Rate
Define Burst Length = S sec Token Bucket Capacity = B bytes Token Arrival rate = R bytes/sec Maximum Output Rate = M bytes/sec Then Maximum Output Burst = B + RS bytes Maximum Output Burst in S sec = MS bytes B + RS = MS  S = B / (M - R) TUNALI Computer Networks 1

34 Packet Scheduling (1) Packet scheduling divides router/link resources among traffic flows with alternatives to FIFO (First In First Out) 1 1 1 2 2 3 3 3 Example of round-robin queuing CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

35 Packet Scheduling (2) Resources reserved for different flows: Bandwidth Buffer space CPU cycles CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

36 Packet Scheduling (2) Fair Queueing approximates bit-level fairness with different packet sizes; weights change target levels Result is WFQ (Weighted Fair Queueing) Virtual times are measured in rounds, where a round lets each input queue send 1 bit for weight 1, or W bits for weight W. The time to send a packet of length L is thus L/W. The formula says that the finish virtual time for a packet is the larger of its arrival time plus the time to send it, or the finish time of the previous packet in the same queue plus the time to send it. Fi = max(Ai, Fi-1) + Li/W Packets may be sent out of arrival order Finish virtual times determine transmission order CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

37 Example flow specification
Admission Control (1) Admission control takes a traffic flow specification and decides whether the network can carry it Sets up packet scheduling to meet QoS Example flow specification CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

38 Admission Control (2) Construction to guarantee bandwidth B and delay D: Shape traffic source to a (R, B) token bucket Run WFQ with weight W / all weights > R/capacity Holds for all traffic patterns, all topologies Bandwidth is guaranteed at each router by setting a high enough weight on the flow; if this cannot be done then the flow must not be admitted. Delay guarantees are more subtle and the bound is not given here. Essentially a burst of traffic can arrive at one router and be delayed but then it will not be delayed at other routers because it has already been shaped to be less bursty. So the total delay is something like the propagation delay plus B/R. CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

39 Integrated Services (1)
Design with QoS for each flow; handles multicast traffic. Admission with RSVP (Resource reSerVation Protocol): Receiver sends a request back to the sender Each router along the way reserves resources Routers merge multiple requests for same flow Entire path is set up, or reservation not made CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

40 Integrated Services (2)
Merge R3 reserves flow from S1 R3 reserves flow from S2 R5 reserves flow from S1; merged with R3 at H CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

41 RSVP Resource Reservation Protocol
Allows multiple senders to transmit to multiple groups of receivers Uses multicast routing with spanning trees Allows dynamic change of bandwidth Allows change of source once bandwidth is reserved TUNALI Computer Networks 1

42 RSVP 2 Receivers send a reservation message up the tree to the sender
Message propagates by reverse path forwarding At each hop, the router reserves the necessary bandwidth If there is no available bandwidth, it reports back failure By the time message arrives to the source, bandwidth has already been reserved TUNALI Computer Networks 1

43 Differentiated Services
Managing thousands of flows is a difficult task Advance setup is required Differentiated services allow definition of a set of service classes Customers sign up for a particular class and receive the appropriate service No advance setup is required TUNALI Computer Networks 1

44 Expedited Forwarding 1 Two classes of service are available Regular
The routers could be programmed to have two output queues for each outgoing line to servive the above classes TUNALI Computer Networks 1

45 Expedited Forwarding (2)
Design with classes of QoS; customers buy what they want Expedited class is sent in preference to regular class Less expedited traffic but better quality for applications CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

46 Assured Forwarding 1 For priority classes each having its own resources For each class three discard probabilities are defined Low Medium High TUNALI Computer Networks 1

47 Assured Forwarding (2) Implementation of DiffServ:
Customers mark desired class on packet ISP shapes traffic to ensure markings are paid for Routers use WFQ to give different service levels CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

48 Reading CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

49 Homework CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011


Download ppt "Network Layer Chapter 5 Design Issues Routing Algorithms"

Similar presentations


Ads by Google