* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Chapter 2 - William Stallings, Data and Computer
Backpressure routing wikipedia , lookup
Computer network wikipedia , lookup
Multiprotocol Label Switching wikipedia , lookup
Distributed firewall wikipedia , lookup
Asynchronous Transfer Mode wikipedia , lookup
Drift plus penalty wikipedia , lookup
Wake-on-LAN wikipedia , lookup
Recursive InterNetwork Architecture (RINA) wikipedia , lookup
Cracking of wireless networks wikipedia , lookup
EEE449 Computer Networks Congestion En. Mohd Nazri Mahmud MPhil (Cambridge, UK) BEng (Essex, UK) [email protected] Room 2.14 Semester 1 2009-2010 Copyright USM What Is Congestion? • congestion occurs when the no of packets being transmitted through the network approaches the packet handling capacity of the network • congestion control aims to keep no of packets below a level at which performance falls off dramatically • a data network is a network of queues • generally 80% utilization is critical • finite queues mean data may be lost Semester 1 2009-2010 Copyright USM Queues at a Node Semester 1 2009-2010 Copyright USM Interaction of Queues Semester 1 2009-2010 Copyright USM Ideal Network Utilization Semester 1 2009-2010 Copyright USM Effects of Congestion No Control Semester 1 2009-2010 Copyright USM Mechanisms for Congestion Control Semester 1 2009-2010 Copyright USM Backpressure • if node becomes congested it can slow down or halt flow of packets from other nodes – cf. backpressure in blocked fluid pipe – may mean that other nodes have to apply control on incoming packet rates – propagates back to source • can restrict to high traffic logical connections • used in connection oriented nets that allow hop by hop congestion control Semester 1 2009-2010 Copyright USM Choke Packet • a control packet – generated at congested node – sent to source node – eg. ICMP source quench • from router or destination • source cuts back until no more source quench message • sent for every discarded packet, or anticipated • is a rather crude mechanism Semester 1 2009-2010 Copyright USM Implicit Congestion Signaling • transmission delay increases with congestion • hence a packet may be discarded • source detects this implicit congestion indication • useful on connectionless (datagram) networks – eg. IP based Semester 1 2009-2010 Copyright USM Explicit Congestion Signaling • network alerts end systems of increasing congestion • end systems take steps to reduce offered load • Backwards – congestion avoidance notification in opposite direction to packet required • Forwards – congestion avoidance notification in same direction as packet required Semester 1 2009-2010 Copyright USM Explicit Signaling Categories • Binary – a bit set in a packet indicates congestion • Credit based – indicates how many packets source may send – common for end to end flow control • Rate based – supply explicit data rate limit – nodes along path may request rate reduction Semester 1 2009-2010 Copyright USM Traffic Management • fairness – provide equal treatment of various flows • quality of service – different treatment for different connections • reservations – traffic contract between user and network – carry best-effort or discard excess traffic Semester 1 2009-2010 Copyright USM Congestion Control in Packet Switched Networks • send control packet to some or all source nodes – requires additional traffic during congestion • rely on routing information – may react too quickly • end to end probe packets – adds to overhead • add congestion info to packets in transit – either backwards or forwards Semester 1 2009-2010 Copyright USM Congestion Control in TCP/IP networks • Credit-based flow control also used for congestion control – recognize increased transit times & dropped packets – react by reducing flow of data • Three categories – retransmission timer management – window management – Active queue management Semester 1 2009-2010 Copyright USM Retransmission Timer Management • static timer likely too long or too short • estimate round trip delay by observing pattern of delay for recent segments • set time to value a bit greater than estimate • simple average over a number of segments • exponential average using time series • RTT Variance Estimation Semester 1 2009-2010 Copyright USM Window Management • slow start – larger windows cause problem on connection created – at start limit TCP to 1 segment – increase when data ACK, exponential growth • dynamic windows sizing on congestion – when a timeout occurs perhaps due to congestion – set slow start threshold to half current congestion window – set window to 1 and slow start until threshold – beyond threshold, increase window by 1 for each RTT Semester 1 2009-2010 Copyright USM Slow start • TCP transmission is constrained by awnd = MIN [credit,cwnd] – awnd = allowed window (the number of segments that TCP is currently allowed to send without receiving acknowledgement – Cwnd = congestion window used during startup and to reduce flow during period of congestion – Credit = the amount of unused credit granted in the most recent acknowledgement • When a new connection is opened, TCP initialises cwnd=1 • Each time an ACK is received, the value of cwnd is increased by 1. • Cwnd increases exponentially; may be too agressive Semester 1 2009-2010 Copyright USM Dynamic window sizing on congestion • Begins with a slow start, followed by a linear growth in cwnd • When time out occurs – Set a slow-start threshold equal to half the current congestion window; ssthresh = cwnd/2 – Set cwnd =1 and perform slow start process until cwnd = ssthreshold. – For cwnd >= ssthresh, increase cwnd by one for each round trip time. Semester 1 2009-2010 Copyright USM Window Management Semester 1 2009-2010 Copyright USM Fast Retransmit Fast Recovery • retransmit timer rather longer than RTT • if segment lost TCP slow to retransmit • fast retransmit – if receive 4 ACKs for same segment (ie 3 duplicate ACKs) then immediately retransmit since likely lost • fast recovery – lost segment means some congestion – halve window then increase linearly – avoids slow-start Semester 1 2009-2010 Copyright USM Active Queue Management • Dropping packets is inefficient • Burst are inevitable. Keeping queue size small and actively managing queues improves a router's ability to absorb bursts without dropping excessive packets • useful to detect impending congestion conditions and actively manage congestion before it gets out of hand. • technique in which routers actively drop packets from queues as a signal to senders that they should slow down Semester 1 2009-2010 Copyright USM Active Queue Management • Recovering from many dropped packets is more difficult than recovering from a single dropped packet • Large queue can translate into delay. Active queue management allows queues to be smaller, which improves throughput • Lock-out occurs when a host fills a queue and prevents other hosts from using the queue. Active queue management can prevent this condition. Semester 1 2009-2010 Copyright USM Random Early Drop (RED) • uses statistical methods to drop packets in a probabilistic way before queues overflow • slows a source down enough to keep the queue steady and reduces the number of packets that would be lost when a queue overflows • makes two important decisions- when to drop packets and what packets to drop • keeps track of an average queue size and drops packets when the average queue size grows beyond a defined threshold • The average size is recalculated every time a new packet arrives at the queue • RED makes packet-drop decisions based on two parameters: – Minimum threshold (minth) Specifies the average queue size below which no packets will be dropped. – Maximum threshold (maxth) Specifies the average queue size above which all packets will be dropped Semester 1 2009-2010 Copyright USM Explicit Congestion Notification in TCP/IP network • Explicit Congestion Notification is an extension proposed to RED which marks a packet instead of dropping it when the average queue size is between minth and maxth • Upon receipt of a congestion marked packet, the TCP receiver informs the sender (in the subsequent ACK) about incipient congestion which will in turn trigger the congestion avoidance algorithm at the sender • the sender triggers its congestion avoidance algorithm by halving its congestion window, cwnd, and updating its congestion window threshold value ssthresh. • Once it has taken these appropriate steps, the sender sets the CWR bit on the next data outgoing packet to tell the receiver that it has reacted to the (receiver's) notification of congestion. • The receiver reacts to the CWR by halting the sending of the congestion notifications, ECN-Echo (ECE) to the sender if there is no new congestion in the network Semester 1 2009-2010 Copyright USM