0% found this document useful (0 votes)
20 views

Lec 3 - Transport Layer - VIII - Congestion Control

The document outlines the transport layer and principles of congestion control in computer networks. It discusses how TCP uses additive increase multiplicative decrease and slow start to dynamically adjust the congestion window size in response to perceived network congestion or packet loss to determine the available bandwidth. It aims to maximize link utilization while minimizing queueing delays through end-to-end congestion control without explicit feedback from routers.

Uploaded by

Hamna Younis
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Lec 3 - Transport Layer - VIII - Congestion Control

The document outlines the transport layer and principles of congestion control in computer networks. It discusses how TCP uses additive increase multiplicative decrease and slow start to dynamically adjust the congestion window size in response to perceived network congestion or packet loss to determine the available bandwidth. It aims to maximize link utilization while minimizing queueing delays through end-to-end congestion control without explicit feedback from routers.

Uploaded by

Hamna Younis
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Computer and

Communication Networks
EE-357
By Dr Mir Yasir Umair
Associate Professor, MCS, NUST
Transport Layer
Congestion Control
Chapter 3 outline
3.1 transport-layer services 3.5 connection-oriented
3.2 multiplexing and demultiplexing transport: TCP
▪ segment structure
3.3 connectionless transport: UDP ▪ reliable data transfer
3.4 principles of reliable data transfer ▪ flow control
▪ connection management

3.6 principles of congestion


control
3.7 TCP congestion control

Transport Layer 3-3


Principles of congestion control
• Congestion: “too many sources sending too much data too fast
for network to handle”
• Sender can sense congestion through receipt of 3 duplicate acks or
timeout events.
• Congestion Window cwnd is dynamic, function of perceived
network congestion
o Max window size = min (cwnd, rwnd)
• Challenge
o Determine available capacity in the first place (slow start)
o Adjust to changes in the available capacity (AIMD)
Principles of congestion control
congestion:
• informally: “too many sources sending too
much data too fast for network to handle”
• different from flow control!
• manifestations:
o lost packets (buffer overflow at routers)
o long delays (queueing in router buffers)
• a top-10 problem!

Transport Layer 3-5


Approaches towards congestion control
two broad approaches towards congestion control:

end-end congestion network-assisted


control: congestion control:
❖ no explicit ❖routers provide
feedback from feedback to end
network
systems
❖ congestion inferred ▪ single bit indicating
from end-system congestion (SNA, DECbit,
TCP/IP ECN, ATM)
observed loss, delay
▪ explicit rate for sender to
❖ approach taken by send at
TCP

Transport Layer 3-6


Chapter 3 outline
3.1 transport-layer services 3.5 connection-oriented
3.2 multiplexing and demultiplexing transport: TCP
▪ segment structure
3.3 connectionless transport: UDP ▪ reliable data transfer
3.4 principles of reliable data transfer ▪ flow control
▪ connection management

3.6 principles of congestion


control
3.7 TCP congestion control

Transport Layer 3-7


TCP congestion control: additive increase multiplicative
decrease
❖ approach: sender increases transmission rate (window
size), probing for usable bandwidth, until loss occurs
▪ additive increase: increase cwnd by 1 MSS every
RTT until loss detected
▪ multiplicative decrease: cut cwnd in half after loss
additively increase window size …
…. until loss occurs (then cut window in half)

congestion window size


cwnd: TCP sender
AIMD saw tooth
behavior: probing
for bandwidth

time
Transport Layer 3-8
TCP Congestion Control: details
sender sequence number space
cwnd TCP sending rate:
❖ roughly: send cwnd
bytes, wait RTT for
last byte last byte ACKS, then send
ACKed sent, not-
yet ACKed
sent
more bytes
(“in-
flight”) cwnd
❖ sender limits transmission: ~
rate~ bytes/sec
RTT
LastByteSent- < cwnd
LastByteAcked
❖ cwnd is dynamic, function of
perceived network
congestion

Transport Layer 3-9


TCP Slow Start
Host A Host B
❖ when connection
begins, increase rate
exponentially until first

RTT
loss event:
▪ initially cwnd = 1 MSS
▪ double cwnd every RTT
▪ done by incrementing cwnd for
every ACK received

❖ summary: initial rate is


slow but ramps up
exponentially fast
time

Transport Layer 3-10


TCP: switching from slow start to CA
Q: when should the
exponential
increase switch to
linear?
A: when cwnd gets to
1/2 of its value
before timeout.

Implementation:
❖ variable ssthresh
❖ on loss event, ssthresh
is set to 1/2 of cwnd just
before loss event

Transport Layer 3-11


Fast Recovery
• Start with slow start until any loss occurs
• Then go back directly to half the last successful Cong Window
and continue with AIMD
TCP Flavours
TCP Tahoe
• Uses SS + AIMD + Fast retransmit
• For Loss indicated by
o timeout: set cwind to 1
o 3 duplicate ACKS: set cwind to 1
• Problem: Window size is set to minimum value after packet loss

TCP Reno:
• Uses SS + AIMD + Fast retransmit + Fast Recovery
• Loss indicated by
o timeout: set cwind to 1
o 3 duplicate ACKS: set cwind to 50% since network is
capable of sending packets
TCP Tahoe
If congestion window is
• below threshold: use SS
• above threshold: Use AIMD

If loss occurs, set


• Threshold = half of the
current congestion window
• congestion window = 1.
TCP Reno
If congestion window is
• below threshold: use SS
• above threshold: Use
AIMD

If timeout occurs, same as


TCP Tahoe

For dup acks, Threshold =


new congestion window =
half of the current
congestion window
Example – TCP Reno
• When SS is in use?
1-6, 23-26
• When AIMD is in use?
6-23
• Identify type of segment
loss at 16th round ?
(timeout, 3 dup ACKs) –
ans = dupAck
• Value of ssthreshold at 1st
trx round?
32
• Value of ssthreshold at
18th trx round?
21
Summary: TCP Congestion Control
New
New ACK!
ACK! new ACK
duplicate ACK
dupACKcount++ new ACK
.
cwnd = cwnd + MSS (MSS/cwnd)
dupACKcount = 0
cwnd = cwnd+MSS transmit new segment(s), as allowed
dupACKcount = 0
L transmit new segment(s), as allowed
cwnd = 1 MSS
ssthresh = 64 KB cwnd > ssthresh
dupACKcount = 0 slow L congestion
start timeout avoidance
ssthresh = cwnd/2
cwnd = 1 MSS duplicate ACK
timeout dupACKcount = 0 dupACKcount++
ssthresh = cwnd/2 retransmit missing segment
cwnd = 1 MSS
dupACKcount = 0
retransmit missing segment
timeout
New
ACK!
ssthresh = cwnd/2
cwnd = 1 New ACK
dupACKcount = 0
cwnd = ssthresh dupACKcount == 3
dupACKcount == 3 retransmit missing segment dupACKcount = 0
ssthresh= cwnd/2 ssthresh= cwnd/2
cwnd = ssthresh + 3 cwnd = ssthresh + 3
retransmit missing segment retransmit missing segment
fast
recovery
duplicate ACK
cwnd = cwnd + MSS
transmit new segment(s), as allowed

Transport Layer 3-17


Thank you

You might also like