Unit 3
Unit 3
Unit 3
Name: K.SUDHA
Designation: Lecturer
Department: Electrical and Electronics Engineering
• Possible solutions
– End-to-end versus link-by-link control
– Rate-Based versus Credit-Based control
– The rate-based traffic-flow technique constantly
– Integrated congestion control
• Integrated congestion control
Principles of Congestion Control
Congestion:
• informally: “too many sources sending too much data too fast
for network to handle”
• different from flow control!
• manifestations:
– lost packets (buffer overflow at routers)
– long delays (queueing in router buffers)
• a top-10 problem!
Scenario 1: Queuing Delays
Host A
in : original data out
• two senders, two
receivers
Host B unlimited shared
• one router, infinite output link buffers
buffers
• no retransmission
Host B
Approaches towards congestion control
Two broad approaches towards congestion control:
2 4 K b y te s
1 6 K b y te s
8 K b y te s
tim e
RTT
– double CongWin every RTT
– done by incrementing two segm
ents
CongWin for every ACK
received
• Summary: initial rate is slow but four segm
ents
ramps up exponentially fast
time
Refinement (more)
Implementation:
• Variable Threshold
• At loss event, Threshold is set to
1/2 of CongWin just before loss
event
TCP sender congestion control
Event State TCP Sender Action Commentary
ACK receipt Slow Start CongWin = CongWin + Resulting in a doubling
for (SS) MSS, of CongWin every RTT
previously If (CongWin > Threshold)
unacked set state to
data “Congestion
Avoidance”
ACK receipt Congestio CongWin = CongWin+MSS Additive increase,
for n * (MSS/CongWin) resulting in increase of
previously Avoidance CongWin by 1 MSS
unacked (CA) every RTT
data
Loss event SS or CA Threshold = CongWin/2, Fast recovery,
detected by CongWin = Threshold, implementing
triple Set state to “Congestion multiplicative decrease.
duplicate Avoidance” CongWin will not drop
ACK below 1 MSS.
Timeout SS or CA Threshold = CongWin/2, Enter slow start
CongWin = 1 MSS,
Set state to “Slow Start”
Duplicate SS or CA Increment duplicate ACK CongWin and Threshold
ACK count for segment being not changed
Congestion Avoidance Mechanisms
• Helps to avoid congestion
• Additional functionality into the router to assist in anticipation of
congestion
• to control congestion once it happens
•
DECbit
• End Hosts
• destination echos bit back to source
• if less than 50% of last window's worth had bit set, then increase
CongestionWindow by 1 packet
• if 50% or more of last window's worth had bit set, then decrease
CongestionWindow by 0.875 times
UDP—User Datagram Protocol
• An unreliable, connectionless transport layer protocol
• UDP format. See picture
• Two additional functions beyond IP:
– Demultiplexing: deliver to different upper layer entities such as
DNS, RTP, SNMP based on the destination port # in the header. i.e.,
UDP can support multiple applications in the same end systems.
– (Optionally) check the integrity of entire UDP. (recall IP only checks
the integrity of IP header.)
• If source does not want to compute checksum, fill checksum with all 0s.
• If compute checksum and the checksum happens to be 0s, then fill all 1s.
• UDP checksum computation is similar to IP checksum, with two more:
– Add extra 0s to entire datagram if not multiple of 16 bits.
– Add pseudoheader to the beginning of datagram. UDP pseudoheader
29
UDP datagram
0 16 31
Data
UDP pseudoheader
0 8 16 31
Source IP Address
Destination IP Address
31
Figure 8.17
Thank u