Presentation is loading. Please wait.

Presentation is loading. Please wait.

Transport Layer3-1 Chapter 3 outline r 3.1 Transport-layer services r 3.2 Multiplexing and demultiplexing r 3.3 Connectionless transport: UDP r 3.4 Principles.

Similar presentations


Presentation on theme: "Transport Layer3-1 Chapter 3 outline r 3.1 Transport-layer services r 3.2 Multiplexing and demultiplexing r 3.3 Connectionless transport: UDP r 3.4 Principles."— Presentation transcript:

1 Transport Layer3-1 Chapter 3 outline r 3.1 Transport-layer services r 3.2 Multiplexing and demultiplexing r 3.3 Connectionless transport: UDP r 3.4 Principles of reliable data transfer r 3.5 Connection-oriented transport: TCP m segment structure m reliable data transfer m flow control m connection management r 3.6 Principles of congestion control r 3.7 TCP congestion control

2 Transport Layer3-2 Principles of Congestion Control Congestion: r informally: “too many sources sending too much data too fast for network to handle” r different from flow control! r manifestations: m lost packets (buffer overflow at routers) m long delays (queueing in router buffers) r a top-10 problem!

3 Transport Layer3-3 Close look at the congested node(1) r Congestion in a network will occur if the load on the network(the number of packets sent to the network) is greater than the capacity of the network(the number of packets the network can process). r A router(switch) have buffers(queues) that hold packets before processing them.

4 Transport Layer3-4 Close look at the congested node(2) r If packets arrive faster than being processed at a router, they will be held in the buffers. So there will be a queuing delay while they stay in the buffer. r If packets arrive too much faster than a router can process, then the buffer will be overflowed, consequently causing the loss of packets. r Such state of a network is said to be in a congestion.

5 Transport Layer3-5 Close look at the congested node(3) r The packets that are lost at a router can not reach the receiver. So the sender cannot receive any ACKs for the lost packets. r Then the sender retransmits the packets and it aggregates the situation in the network.

6 Transport Layer3-6 Congestion Control r There are two approaches to the congestion control. m Proactive(preventive) congestion control m Reactive congestion control r proactive congestion control m It keeps the network load(input to a network) below the network capacity so that it prevents the network from being in a state of congestion. m This can be done by admission control and traffic policy control.

7 Transport Layer3-7 Reactive Congestion Control r Reactive congestion control m There is no strict admission control. But when a network is in an early stage of congestion, network load(input to a network) should be decreased enough for a network not getting into the serious congested state. m So generally there are two steps in the reactive congestion control. Congestion detection and notification Congestion avoidance: input-rate control

8 Transport Layer3-8 Who acts the congestion control End-end congestion control: r no explicit feedback from network r congestion inferred from end-system observed loss, delay r approach taken by TCP Network-assisted congestion control: r routers provide feedback to end systems m single bit indicating congestion (SNA, DECbit, TCP/IP ECN, ATM) m explicit rate sender should send at

9 Transport Layer3-9 Chapter 3 outline r 3.1 Transport-layer services r 3.2 Multiplexing and demultiplexing r 3.3 Connectionless transport: UDP r 3.4 Principles of reliable data transfer r 3.5 Connection-oriented transport: TCP m segment structure m reliable data transfer m flow control m connection management r 3.6 Principles of congestion control r 3.7 TCP congestion control

10 Transport Layer3-10 TCP Congestion Control r end-end control (no network assistance) r sender limits transmission: LastByteSent-LastByteAcked  CongWin r Roughly,  CongWin is dynamic, function of perceived network congestion How does sender perceive congestion? r loss event = timeout or 3 duplicate acks  TCP sender reduces rate ( CongWin ) after loss event rate = CongWin RTT Bytes/sec

11 Transport Layer3-11 Slow Start r Control parameters m awnd (advertised window by receiver) At the connection establishment, the receiver notifies the sender of its window size. Whenever the receiver sends ACKs, it advertises the sender of the window size. m cwnd (congestion window) It is the actual window size by which the sender can send segments without acknowledgement. r Slow Start initialize: cwnd = 1 (one maximum segment size); For each segment that is acknowleged cwnd = cwnd + 1 until min(cwnd, awnd) /* exponential growth */

12 Transport Layer3-12 Slow Start (more)  When connection begins, CongWin = 1 MSS m Example: MSS = 500 bytes & RTT = 200 msec m initial rate = 20 kbps r available bandwidth may be >> MSS/RTT m desirable to quickly ramp up to respectable rate r When connection begins, increase rate exponentially fast until first loss event

13 Transport Layer3-13 Slow Start (more) r When connection begins, increase rate exponentially until first loss event:  double CongWin every RTT  done by incrementing CongWin for every ACK received r Summary: initial rate is slow but ramps up exponentially fast Host A one segment RTT Host B time two segments four segments

14 Transport Layer3-14 Congestion Avoidance r When no ACK arrives until timeout, TCP enters “the congestion avoidance.” r Congestion Avoidance Algorithm If (segment timeout) 1. Set threshold = cwnd/2 2. Set cwnd = 1 and restart “slow-start” until (cwnd = threshold) 3. If (cwnd  threshold) cwnd = cwnd + 1 every roundtrip time

15 Transport Layer3-15 cwnd Round-trip times 15 20 5 21 10 435126981071311151614 Time out occurs Threshold Slow Start and Congestion Avoidance

16 Transport Layer3-16 TCP AIMD (additive-increase multiplicative-decrease) multiplicative decrease: cut CongWin in half after loss event additive increase: increase CongWin by 1 MSS every RTT in the absence of loss events: probing Long-lived TCP connection

17 Transport Layer3-17 Refinement r After 3 dup ACKs:  CongWin is cut in half m window then grows linearly r But after timeout event:  CongWin instead set to 1 MSS; m window then grows exponentially m to a threshold, then grows linearly 3 dup ACKs indicates network capable of delivering some segments timeout before 3 dup ACKs is “more alarming” Philosophy:

18 Transport Layer3-18 Summary: TCP Congestion Control  When CongWin is below Threshold, sender in slow-start phase, window grows exponentially.  When CongWin is above Threshold, sender is in congestion-avoidance phase, window grows linearly.  When a triple duplicate ACK occurs, Threshold set to CongWin/2 and CongWin set to Threshold.  When timeout occurs, Threshold set to CongWin/2 and CongWin is set to 1 MSS.


Download ppt "Transport Layer3-1 Chapter 3 outline r 3.1 Transport-layer services r 3.2 Multiplexing and demultiplexing r 3.3 Connectionless transport: UDP r 3.4 Principles."

Similar presentations


Ads by Google