1. Trang chủ
  2. » Công Nghệ Thông Tin

Tài liệu Congestion Avoidance pdf

53 339 2

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 53
Dung lượng 2,42 MB

Nội dung

5 Congestion Avoidance Overview This module describes the problems of congested networks. It introduces Random Early Detection (RED), WRED, and Flow-based WRED as mechanisms to prevent congestion on router interfaces. Objectives Upon completion of this module, you will be able to perform the following tasks: n Describe Random Early Detection (RED) n Describe and configure Weighted Random Early Detection (WRED) n Describe and configure Flow-based WRED 5-2 Congestion Avoidance Copyright  2001, Cisco Systems, Inc. Random Early Detection Overview The section describes the need for congestion avoidance in nearly-congested networks and explains the benefits of using RED on congested links. Objectives Upon completion of this lesson, you will be able to perform the following tasks: n Explain the need for congestion avoidance mechanisms. n Explain how RED works and how it can prevent congestion. n Describe the benefits and drawbacks of RED. Copyright  2001, Cisco Systems, Inc. Congestion Avoidance 5-3 © 2001, Cisco Systems, Inc. Congestion Avoidance-5 Router Interface Congestion Router Interface Congestion • Router interfaces congest when the output queue is full –Additional incoming packets are dropped –Dropped packets may cause significant application performance degradation –By default, routers perform tail-drop –Tail-drop has significant drawbacks –WFQ, if configured, has a more intelligent dropping scheme When an interface on a router cannot transmit a packet immediately, the packet is queued, either in an interface Tx ring, or the interface output hold queue, depending on the switching path used. Packets are then taken out of the queue and eventually transmitted on the interface. If the arrival rate of packets to the output interface exceeds the router’s capability to buffer and forward traffic, the queues increase to their maximum length and the interface becomes congested. Tail drop is the router’s default queuing response to congestion. When the output queue is full and tail drop is in effect, all packets trying to enter (at the tail of) the queue are dropped until the congestion is eliminated and the queue is no longer full. Congestion avoidance techniques monitor network traffic loads in an effort to anticipate and avoid congestion at common network bottleneck points. Congestion avoidance is achieved through packet dropping using more complex techniques than simple tail-drop. As mentioned, tail drop is the default queuing response to congestion. Tail drop treats all traffic equally and does not differentiate between classes of service. Weighted fair queuing, if configured on an interface, has a more elaborate scheme for dropping traffic, as it is able to punish the most aggressive flows via its Congestion Discard Threshold (CDT)-based dropping algorithm. Unfortunately, WFQ does not scale to backbone speeds. WFQ dropping is discussed in detail in its associated module. This module introduces Random Early Detection (RED) and its scalable dropping method, which is suitable for low and high-speed networks. 5-4 Congestion Avoidance Copyright  2001, Cisco Systems, Inc. © 2001, Cisco Systems, Inc. Congestion Avoidance-6 Tail-drop Flaws Tail-drop Flaws • Simple tail-drop has significant flaws –TCP synchronization –TCP starvation –High delay and jitter –No differentiated drop –Poor feedback to TCP The simple tail-dropping scheme unfortunately does not work very well in environments with a large number of TCP flows or in environments in which selective dropping is deserved. Understanding of the interaction between TCP stack intelligence and dropping in the network is required to implement a more efficient and fair dropping scheme, especially in SP environments. Tail drop has the following shortcomings: n When congestion occurs, dropping affects most of the TCP sessions, which simultaneously back-off and then restart again. This causes inefficient link utilization at the congestion point (TCP global synchronization) n TCP starvation, where all buffers are temporarily seized by aggressive flows, and normal TCP flows experience buffer starvation. n Buffering at the point of congestion can introduce delay and jitter, as packets are stuck waiting in queues. n There is no differentiated drop mechanism, and therefore premium traffic is dropped in the same way as best-effort traffic. n Even in the event of a single TCP stream across an interface, the presence of other non-TCP traffic can congest the interface and TCP traffic will also be dropped. In this scenario, the feedback to the TCP protocol is very poor and therefore it cannot adapt properly to a congested network. Copyright  2001, Cisco Systems, Inc. Congestion Avoidance 5-5 © 2001, Cisco Systems, Inc. Congestion Avoidance-7 TCP Synchronization TCP Synchronization • Multiple TCP sessions start at different times • TCP window sizes are increased • Tail-drops cause many packets of many sessions to be dropped at the same time • TCP sessions restart at the same time (synchronized) Flow A Flow B Flow C Average link utilization A router can handle multiple concurrent TCP sessions. There is a high probability that when traffic exceeds the queue limit at all, it vastly exceeds the limit due to the bursty nature of packet networks. However, there is also a high probability that excessive traffic depth caused by packet bursts is temporary and that traffic does not stay excessively deep except at points where traffic flows merge, or at edge routers. If the receiving router drops all traffic that exceeds the queue limit, as is done by default (with tail drop), many TCP sessions then simultaneously go into slow start. Consequently, traffic temporarily slows down to the extreme and then all flows slow-start again. This activity creates a condition called global synchronization. Global synchronization occurs as waves of congestion crest only to be followed by troughs during which the transmission link is not fully utilized. Global synchronization of Transmission Control Protocol (TCP) hosts, for example, can occur because packets are dropped all at once. Global synchronization manifests when multiple TCP hosts reduce their transmission rates in response to packet dropping, then increase their transmission rates once again when the congestion is reduced. The most important point is that the waves of transmission known as global synchronization result in significant link under-utilization. 5-6 Congestion Avoidance Copyright  2001, Cisco Systems, Inc. © 2001, Cisco Systems, Inc. Congestion Avoidance-8 TCP Starvation, Delay and Jitter TCP Starvation, Delay and Jitter • Constant high buffer usage (long queue) causes delay • More aggressive flows can cause other flows to starve • Variable buffer usage causes jitter • No differentiated dropping Prec. 0 Prec. 0 Prec. 0 Prec. 0 Prec. 3 Queue Packets of aggressive flows Prec. 3 Packets of starving flows Delay Packets experience long delay if interface is constantly congested Prec. 3 Prec. 3 TCP does not react well if multiple packets are dropped Tail-drop does not look at IP precedence Another TCP-related phenomenon, which reduces optimal throughput of network applications is TCP starvation. When multiple flows are established over a router, some of these flows may be much more aggressive as compared to others. For instance, when a file transfer application’s TCP transmit window increases, it can send a number of large packets to its destination. The packets immediately fill the queue on the router, and other, less aggressive flows can be starved, because they are tail-dropped at the output interface. During periods of congestion, packets are queued up to the full queue length, which also causes increased delay for packets already in the queue. In addition, queuing, being a probabilistic mechanism, introduces unequal delays for packets of the same flow, producing jitter. Copyright  2001, Cisco Systems, Inc. Congestion Avoidance 5-7 © 2001, Cisco Systems, Inc. Congestion Avoidance-9 Conclusion Conclusion • Tail-drop should be avoided • Tail-drop can be avoided if congestion is prevented • Congestion can be prevented if TCP sessions (that still make up more than 80 percent of average Internet traffic) can be slowed down • TCP sessions can be slowed down if some packets are occasionally dropped • Therefore: packets should be dropped when interface is nearing congestion Based on the knowledge of TCP behavior during periods of congestion, it can be concluded that tail-drop is not the optimal mechanism for congestion avoidance and therefore should not be used. Instead, more intelligent congestion avoidance mechanisms should be used, which would slow down traffic before actual congestion occurs. IP traffic can be “slowed down” only for traffic using an adaptive transmission protocol, such as TCP. Dropping packets of a TCP session indicates to the sender that it should lower its transmission rate to adapt to changing network conditions. UDP, on the other hand, has no built-in adaptive mechanisms – it sends packets out at a rate specified by the application. About 80% of Internet traffic today is carried over the TCP protocol. If TCP packets of aggressive flows are intelligently dropped, those sessions will slow down and congestion will be avoided. Therefore, to prevent congestion, the output queues should not be allowed to get full, and TCP can be controlled via packet dropping. The new dropping mechanisms should drop packets before congestion occurs, and drop them in such a way that primarily influences aggressive traffic flows. 5-8 Congestion Avoidance Copyright  2001, Cisco Systems, Inc. © 2001, Cisco Systems, Inc. Congestion Avoidance -10 Random Early Detection Random Early Detection • Random Early Detection (RED) is a mechanism that randomly drops packets even before a queue is full • RED drops packets with an increasing probability • RED result: – TCP sessions slow down to the approximate rate of output- link bandwidth – Average queue size is small (much less than the maximum queue size) • IP precedence can be used to drop lower- precedence packets more aggressively than higher- precedence packets Random Early Detection is a dropping mechanism that randomly drops packets before a queue is full. The dropping strategy is based primarily on the average queue length - that is, when the average queue gets longer (fuller), RED will be more likely to drop an incoming packet than when the queue is shorter. Because RED drops packets randomly, it has no per-flow intelligence. The rationale behind this is that an aggressive flow will represent most of the arriving traffic, therefore it is more probable that RED will drop a packet of an aggressive session. RED therefore punishes more aggressive sessions with higher statistical probability, and is therefore able to somewhat selectively slow down the most significant cause of congestion. Directing one TCP session at a time to slow down allows for full utilization of the bandwidth, rather than utilization that manifests itself as crests and troughs of traffic. As a result, the TCP global synchronization is much less likely to occur, and TCP can utilize the bandwidth more efficiently. The average queue size also decreases significantly, as the possibility of the queue filling up is very small. This is due to very aggressive dropping in the event of traffic bursts, when the queue is already quite full. RED distributes losses over time and maintains normally low queue depth while absorbing spikes. RED can also utilize precedence/DSCP bits in packets to establish different drop profiles for different classes of traffic. Copyright  2001, Cisco Systems, Inc. Congestion Avoidance 5-9 © 2001, Cisco Systems, Inc. Congestion Avoidance -11 RED Profile RED Profile Average Queue Size Drop Probability 10% 100% 20 40 Minimum Threshold Maximum Threshold Maximum Drop Probability No drop Random drop Full drop The probability of a packet being dropped is based on three configurable parameters: n Minimum threshold - When the average queue depth is above the minimum threshold, RED starts dropping packets. The rate of packet drop increases linearly as the average queue size increases, until the average queue size reaches the maximum threshold. n Maximum threshold - When the average queue size is above the maximum threshold, all packets are dropped. If the difference between the maximum threshold and the minimum threshold is too small, many packets might be dropped at once, resulting in global synchronization. n Mark probability denominator - This is the fraction of packets dropped when the average queue depth is at the maximum threshold. For example, if the denominator is 512, one out of every 512 packets is dropped when the average queue is at the maximum threshold. These parameters define the RED profile, which implements the packet dropping strategy, based on the average queue length. 5-10 Congestion Avoidance Copyright  2001, Cisco Systems, Inc. © 2001, Cisco Systems, Inc. Congestion Avoidance -12 RED Modes RED Modes • RED has three modes: –No drop – when the average queue size is between 0 and the minimum threshold –Random drop - when the average queue size is between the minimum and the maximum threshold –Full drop (tail-drop) – when the average queue size is at maximum threshold or above • Random drop should prevent congestion (prevent tail-drops) As seen in the previous figure, RED has three dropping modes, based on the average queue size: n When the average queue size is between 0 and the configured minimum threshold, no drops occur and all packets are queued. n When the average queue size is between the configured minimum threshold, and the configured maximum threshold, random drop occurs, which is linearly proportional to the average queue length. The maximum probability of drop (when the queue is almost completely full) is 15% in Cisco IOS software. n When the average queue size is at or higher than the maximum threshold, RED performs full (tail) drop in the queue. This event is unlikely, as RED should slow down TCP traffic ahead of congestion. If a lot of non-TCP traffic is present, RED cannot effectively drop traffic to reduce congestion, and tail- drops are likely to occur. [...]... implements a congestion avoidance PHB in agreement with the initial classification 5-20 Congestion Avoidance Copyright © 2001, Cisco Systems, Inc WRED Building Blocks Calculate Average Queue Size IP packet WRED IP precedence or DSCP Select WRED Profile © 2001, Cisco Systems, Inc Min threshold Max threshold Max prob denom Queue Full? No Current Queue Size FIFO Queue Yes Random Drop Tail Drop Congestion Avoidance. .. input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abo rt rest deleted rest deleted © 2001, Cisco Systems, Inc Congestion Avoidance -35 The show interface command will display whether or not WRED is the preferred congestion avoidance mechanism on the interface 5-32 Congestion Avoidance Copyright © 2001, Cisco Systems, Inc WRED Parameters and Statistics Router# show queueing random-detect • Displays... to be dropped very late, compared to other traffic classes, in the event of congestion Copyright © 2001, Cisco Systems, Inc Congestion Avoidance 5-19 DSCP-based WRED (Assured Forwarding) Drop Probability 100% AF Low Drop AF Medium Drop AF High Drop 10% 20 24 28 32 © 2001, Cisco Systems, Inc 40 Average Queue Size Congestion Avoidance -23 The Assured Forwarding PHB is identified based on the following... Copyright © 2001, Cisco Systems, Inc Congestion Avoidance 5-11 After RED Average link utilization Flow A Flow B Flow C • Average link utilization is much closer to link bandwidth • Random drops cause TCP sessions to reduce window sizes © 2001, Cisco Systems, Inc Congestion Avoidance -14 The figure shows TCP throughput behavior compared to link bandwidth in a scenario of congestion, and RED configured on... a time, before the interface reaches congestion Overall throughput of sessions is increased, as well as average link utilization Global synchronization is very unlikely to occur, as there is selective, but random dropping of adaptive traffic 5-12 Congestion Avoidance Copyright © 2001, Cisco Systems, Inc Summary n Tail-drop does not perform adequate congestion avoidance on router interfaces n RED randomly... UDP-based, and the network itself should not be designed to lose voice packets since lost voice packets result in reduced voice quality WRED controls congestion by impacting other prioritized traffic, and avoiding congestion helps to ensure voice quality 5-16 Congestion Avoidance Copyright © 2001, Cisco Systems, Inc WRED Profiles Drop Probability 100% 10% 10 20 40 Average Queue Size • WRED profiles can be manually... probability This enables differentiated dropping of AF traffic classes, which have different drop preference 5-18 Congestion Avoidance Copyright © 2001, Cisco Systems, Inc DSCP-based WRED (Expedited Forwarding) Drop Probability 100% 10% EF 20 © 2001, Cisco Systems, Inc 36 40 Average Queue Size Congestion Avoidance -22 The Expedited Forwarding PHB is identified based on the following parameters: n Ensures a... bandwidth • Tail-drops cause TCP sessions to go into slow-start © 2001, Cisco Systems, Inc Congestion Avoidance -13 The figure shows TCP throughput behavior compared to link bandwidth in a scenario of congestion, and simple tail-dropping on a router The global synchronization phenomenon causes all sessions to slow down when congestion occurs, as all sessions are penalized when tail-drop is used because it... flows n RED prevents interface congestion and prevents TCP global synchronization, but works well only in predominantly TCP-based environments Lesson Review 1 What are the main drawbacks of using tail-drop as a means of congestion control? 2 What does RED do to prevent TCP synchronization? 3 What are the three modes of RED? Copyright © 2001, Cisco Systems, Inc Congestion Avoidance 5-13 Weighted Random... Systems, Inc Congestion Avoidance 5-21 Configuring WRED and dWRED Router(config-if)# random-detect random-detect • Enables IP precedence based WRED • Default service profile is used • Non-distributed WRED cannot be combined with fancy queuing - FIFO queuing has to be used • WRED can run distributed on VIP-based interfaces (dWRED) • dWRED can be combined with dWFQ © 2001, Cisco Systems, Inc Congestion Avoidance . Cisco Systems, Inc. Congestion Avoidance 5-3 © 2001, Cisco Systems, Inc. Congestion Avoidance- 5 Router Interface Congestion Router Interface Congestion • Router. classes, in the event of congestion. 5-20 Congestion Avoidance Copyright  2001, Cisco Systems, Inc. © 2001, Cisco Systems, Inc. Congestion Avoidance -23 DSCP-based

Ngày đăng: 11/12/2013, 14:15

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w