SlideShare a Scribd company logo
1 of 19
Congestion Control in TCP
Transport Layer: 3-1
Slides credits: https://gaia.cs.umass.edu/kurose_ross/ppt.php
▪ informally: “too many sources sending too much data too fast for
network to handle”
▪ Packets will be added to the router’s buffer (queue).
▪ different from flow control!
Congestion
congestion
control: too many
senders, sending too fast
flow control: one sender
too fast for one receiver
Transport Layer: 3-2
TCP’s reaction to congestion
▪ End-end congestion control approach
▪ TCP reacts to congestion by reducing the sender's data transfer
rate (aka sender window size).
▪ Sender window size (swnd) = minimum(congestion window size
(cwnd), Receiver window size (rwnd))
▪ cwnd - number of bytes the sender may have in the network at
any time.
▪ rwnd - number of bytes the receiver can handle.
Transport Layer: 3-3
TCP’s reaction to congestion
▪ TCP's general policy for handling congestion consists of following
three phases:
▪ Slow start
▪ Congestion Avoidance
▪ Congestion Detection
Transport Layer: 3-4
TCP slow start
▪ Initially, sender sets congestion
window size (cwnd) = 1
Maximum Segment Size (MSS).
▪ After receiving each
acknowledgment, sender
increases the cwnd by 1 MSS
(cwnd = cwnd + MSS).
Host A Host B
RTT
time
▪ summary: initial rate is
slow, but ramps up
exponentially fast
Transport Layer: 3-5
TCP slow start (contd.)
▪ In this phase, cwnd increases exponentially.
▪ This phase continues until cwnd reaches a threshold called slow
start threshold (ssthresh).
▪ ssthresh = Initially this value is set arbitrarily high, to the size of
the flow control window.
Transport Layer: 3-6
TCP Congestion Avoidance
▪ After cwnd reaches the ssthresh,
▪ Sender increases the cwnd linearly (instead of exponentially) to avoid
the congestion (Additive Increase)
▪ This phase continues until the cwnd becomes equal to the receiver
window size rwnd.
Transport Layer: 3-7
Source:
https://www.gatevidyalay.com/tcp-
congestion-control-tcp-protocol-tcp/
TCP Congestion avoidance
Host A Host B
RTT
Transport Layer: 3-8
RTT
TCP Congestion Detection
▪ TCP reacts in different ways
based on how the packet loss
is detected.
▪ Case-1: Detection on Time
Out
▪ Time Out occurs before the
sender receives the
acknowledgment for a segment.
▪ Reaction:
▪ Setting the ssthresh to half of
the current cwnd.
▪ Decreasing the cwnd to 1 MSS.
▪ Resuming the slow start phase.
Transport Layer: 3-9
X
TCP Congestion Detection (contd.)
▪ Case-02: Detection on receiving 3
Duplicate Acknowledgments
▪ Sender receives 3 duplicate
acknowledgments for a segment.
▪ This case suggests the weaker possibility of
congestion in the network.
▪ A segment has been dropped but few
segments sent later may have reached.
▪ Reaction:
▪ Setting the ssthresh to half of the current
cwnd. Retransmit the missing segment
(Fast retransmit)
▪ Decreasing the cwnd to:
▪ 1 MSS and resume the slow start phase (TCP
Tahoe).
▪ ssthresh and resume the congestion
avoidance phase: additive increase (TCP
Reno).
▪ Fast recovery (if the cwnd is decreased to
ssthresh instead of 1). Transport Layer: 3-10
X
TCP Tahoe: Fast Retransmit
TCP Reno: Fast Retransmit + Fast Recovery
TCP congestion control: AIMD
▪ approach: senders can increase sending rate until packet loss
(congestion) occurs, then decrease sending rate on loss event
AIMD sawtooth
behavior
TCP
sender
Sending
rate
time
increase sending rate by 1
maximum segment size every
RTT until loss detected
Additive Increase
cut sending rate in half at
each loss event
Multiplicative Decrease
Transport Layer: 3-11
TCP throughput
▪ avg. TCP throughput as function of window size, RTT?
• ignore slow start, assume there is always data to send
▪ W: window size (measured in bytes) where loss occurs
• avg. window size (# in-flight bytes) is ¾ W
• avg. thruput is 3/4W per RTT
W
W/2
avg TCP thruput =
3
4
W
RTT
bytes/sec
sourc
e
application
TCP
network
link
physical
destination
application
TCP
network
link
physical
Explicit congestion notification (ECN)
TCP deployments often implement network-assisted congestion control:
▪ two bits in IP header (ToS field) marked by network router to indicate congestion
• policy to determine marking chosen by network operator
▪ congestion indication carried to destination
▪ destination sets ECE bit on ACK segment to notify sender of congestion
▪ involves both IP (IP header ECN bit marking) and TCP (TCP header C,E bit marking)
ECN=10 ECN=11
ECE=1
IP datagram
TCP ACK segment
Transport Layer: 3-13
TCP fairness
Fairness goal: if K TCP sessions share same bottleneck link of
bandwidth R, each should have average rate of R/K
TCP connection 1
bottleneck
router
capacity R
TCP connection 2
Transport Layer: 3-14
Fairness: must all network apps be “fair”?
Fairness and UDP
▪ multimedia apps often do not
use TCP
• do not want rate throttled by
congestion control
▪ instead use UDP:
• send audio/video at constant rate,
tolerate packet loss
▪ there is no “Internet police”
policing use of congestion
control
Fairness, parallel TCP
connections
▪ application can open multiple
parallel connections between two
hosts
▪ web browsers do this, e.g., link of
rate R with 10 existing
connections:
• new app asks for 1 TCP, gets rate
R/11
• new app asks for 10 TCPs, gets R/2
Transport Layer: 3-15
Problem-1
Consider the below figure. Assuming TCP Reno is the protocol
experiencing the behavior, answer the following questions. In all cases,
you should provide a short discussion justifying your answer.
Transport Layer: 3-16
Problem-1 (contd.)
1. Identify the intervals of time when TCP slow start is operating.
2. Identify the intervals of time when TCP congestion avoidance is operating.
3. After the 16th transmission round, is segment loss detected by a triple duplicate ACK or by a timeout?
4. After the 22nd transmission round, is segment loss detected by a triple duplicate ACK or by a timeout?
5. What is the initial value of ssthresh at the first transmission round?
6. What is the value of ssthresh at the 18th transmission round?
7. What is the value of ssthresh at the 24th transmission round?
8. During what transmission round is the 70th segment sent?
9. Assuming a packet loss is detected after the 26th round by the receipt of a triple duplicate ACK, what will be
the values of the congestion window size at 29th round and of ssthresh?
10. Suppose TCP Tahoe is used (instead of TCP Reno), and assume that triple duplicate ACKs are received at the
16th round. What are the ssthresh and the congestion window size at the 19th round?
11. Again suppose TCP Tahoe is used, and there is a timeout event at 22nd round. How many packets have
been sent out from 17th round till 22nd round, inclusive?
Transport Layer: 3-17
Solutions
1. TCP slow start is operating in the intervals [1,6] and [23,26]
2. TCP congestion avoidance is operating in the intervals [6,16] and [17,22]
3. After the 16th transmission round, packet loss is recognized by a triple duplicate ACK. If there was a
timeout, the congestion window size would have dropped to 1.
4. After the 22nd transmission round, segment loss is detected due to timeout, and hence the congestion
window size is set to 1.
5. The threshold is initially 32, since it is at this window size that slow start stops and congestion avoidance
begins.
6. The threshold is set to half the value of the congestion window when packet loss is detected. When loss is
detected during transmission round 16, the congestion windows size is 42. Hence the threshold is 21 during
the 18th transmission round.
7. The threshold is set to half the value of the congestion window when packet loss is detected. When loss is
detected during transmission round 22, the congestion windows size is 29. Hence the threshold is 14
(taking lower floor of 14.5) during the 24th transmission round.
8. During the 1st transmission round, packet 1 is sent; packet 2-3 are sent in the 2nd transmission round;
packets 4-7 are sent in the 3rd transmission round; packets 8-15 are sent in the 4th transmission round;
packets 16-31 are sent in the 5th transmission round; packets 32-63 are sent in the 6th transmission round;
packets 64 – 96 are sent in the 7th transmission round. Thus packet 70 is sent in the 7th transmission
round. Transport Layer: 3-18
Solutions
9. The threshold will be set to half the current value of the congestion window (8) when the loss occurred and
the congestion window will be set to the new threshold value + 3 MSS. Thus the new values of the
threshold and window will be 4 and 7 respectively.
10. threshold is 21, and congestion window size is 4.
11. round 17, 1 packet; round 18, 2 packets; round 19, 4 packets; round 20, 8 packets; round 21, 16 packets;
round 22, 21 packets. So, the total number is 52.
Transport Layer: 3-19

More Related Content

Similar to Congestion control in TCP.pptx

Comparison of TCP congestion control mechanisms Tahoe, Newreno and Vegas
Comparison of TCP congestion control mechanisms Tahoe, Newreno and VegasComparison of TCP congestion control mechanisms Tahoe, Newreno and Vegas
Comparison of TCP congestion control mechanisms Tahoe, Newreno and VegasIOSR Journals
 
Comparison of TCP congestion control mechanisms Tahoe, Newreno and Vegas
Comparison of TCP congestion control mechanisms Tahoe, Newreno and VegasComparison of TCP congestion control mechanisms Tahoe, Newreno and Vegas
Comparison of TCP congestion control mechanisms Tahoe, Newreno and VegasIOSR Journals
 
Computer network (13)
Computer network (13)Computer network (13)
Computer network (13)NYversity
 
Congestion control in tcp
Congestion control in tcpCongestion control in tcp
Congestion control in tcpsamarai_apoc
 
transport layer pptxdkididkdkdkddjjdjffkfif
transport layer pptxdkididkdkdkddjjdjffkfiftransport layer pptxdkididkdkdkddjjdjffkfif
transport layer pptxdkididkdkdkddjjdjffkfifMujtabaFarooq5
 
Computer network (11)
Computer network (11)Computer network (11)
Computer network (11)NYversity
 
Tcp congestion control
Tcp congestion controlTcp congestion control
Tcp congestion controlAbdo sayed
 
Tcp congestion control (1)
Tcp congestion control (1)Tcp congestion control (1)
Tcp congestion control (1)Abdo sayed
 
TCP Theory
TCP TheoryTCP Theory
TCP Theorysoohyunc
 
High Performance Networking with Advanced TCP
High Performance Networking with Advanced TCPHigh Performance Networking with Advanced TCP
High Performance Networking with Advanced TCPDilum Bandara
 
Transport Layer
Transport LayerTransport Layer
Transport LayerAmin Omi
 
Ch3 transport layer Network
Ch3 transport layer NetworkCh3 transport layer Network
Ch3 transport layer Networkcairo university
 
congestion control data communication.pdf
congestion control data communication.pdfcongestion control data communication.pdf
congestion control data communication.pdfnqck82120b
 
KandR_TCP (1).ppt notes for congestion control
KandR_TCP (1).ppt    notes for congestion controlKandR_TCP (1).ppt    notes for congestion control
KandR_TCP (1).ppt notes for congestion controlGOKULKANNANMMECLECTC
 

Similar to Congestion control in TCP.pptx (20)

Mcseminar
McseminarMcseminar
Mcseminar
 
Comparison of TCP congestion control mechanisms Tahoe, Newreno and Vegas
Comparison of TCP congestion control mechanisms Tahoe, Newreno and VegasComparison of TCP congestion control mechanisms Tahoe, Newreno and Vegas
Comparison of TCP congestion control mechanisms Tahoe, Newreno and Vegas
 
Comparison of TCP congestion control mechanisms Tahoe, Newreno and Vegas
Comparison of TCP congestion control mechanisms Tahoe, Newreno and VegasComparison of TCP congestion control mechanisms Tahoe, Newreno and Vegas
Comparison of TCP congestion control mechanisms Tahoe, Newreno and Vegas
 
Computer network (13)
Computer network (13)Computer network (13)
Computer network (13)
 
TCP_Congestion_Control.ppt
TCP_Congestion_Control.pptTCP_Congestion_Control.ppt
TCP_Congestion_Control.ppt
 
Congestion control in tcp
Congestion control in tcpCongestion control in tcp
Congestion control in tcp
 
transport layer pptxdkididkdkdkddjjdjffkfif
transport layer pptxdkididkdkdkddjjdjffkfiftransport layer pptxdkididkdkdkddjjdjffkfif
transport layer pptxdkididkdkdkddjjdjffkfif
 
Computer network (11)
Computer network (11)Computer network (11)
Computer network (11)
 
Tcp congestion control
Tcp congestion controlTcp congestion control
Tcp congestion control
 
Tcp congestion control (1)
Tcp congestion control (1)Tcp congestion control (1)
Tcp congestion control (1)
 
TCP Theory
TCP TheoryTCP Theory
TCP Theory
 
A Performance Comparison of TCP Protocols
A Performance Comparison of TCP Protocols A Performance Comparison of TCP Protocols
A Performance Comparison of TCP Protocols
 
6610-l14.pptx
6610-l14.pptx6610-l14.pptx
6610-l14.pptx
 
High Performance Networking with Advanced TCP
High Performance Networking with Advanced TCPHigh Performance Networking with Advanced TCP
High Performance Networking with Advanced TCP
 
Transport Layer
Transport LayerTransport Layer
Transport Layer
 
Ch3 transport layer Network
Ch3 transport layer NetworkCh3 transport layer Network
Ch3 transport layer Network
 
CONGESTION AVOIDANCE.pptx
CONGESTION AVOIDANCE.pptxCONGESTION AVOIDANCE.pptx
CONGESTION AVOIDANCE.pptx
 
congestion control data communication.pdf
congestion control data communication.pdfcongestion control data communication.pdf
congestion control data communication.pdf
 
Mobile comn.pptx
Mobile comn.pptxMobile comn.pptx
Mobile comn.pptx
 
KandR_TCP (1).ppt notes for congestion control
KandR_TCP (1).ppt    notes for congestion controlKandR_TCP (1).ppt    notes for congestion control
KandR_TCP (1).ppt notes for congestion control
 

Recently uploaded

Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZTE
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 

Recently uploaded (20)

Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 

Congestion control in TCP.pptx

  • 1. Congestion Control in TCP Transport Layer: 3-1 Slides credits: https://gaia.cs.umass.edu/kurose_ross/ppt.php
  • 2. ▪ informally: “too many sources sending too much data too fast for network to handle” ▪ Packets will be added to the router’s buffer (queue). ▪ different from flow control! Congestion congestion control: too many senders, sending too fast flow control: one sender too fast for one receiver Transport Layer: 3-2
  • 3. TCP’s reaction to congestion ▪ End-end congestion control approach ▪ TCP reacts to congestion by reducing the sender's data transfer rate (aka sender window size). ▪ Sender window size (swnd) = minimum(congestion window size (cwnd), Receiver window size (rwnd)) ▪ cwnd - number of bytes the sender may have in the network at any time. ▪ rwnd - number of bytes the receiver can handle. Transport Layer: 3-3
  • 4. TCP’s reaction to congestion ▪ TCP's general policy for handling congestion consists of following three phases: ▪ Slow start ▪ Congestion Avoidance ▪ Congestion Detection Transport Layer: 3-4
  • 5. TCP slow start ▪ Initially, sender sets congestion window size (cwnd) = 1 Maximum Segment Size (MSS). ▪ After receiving each acknowledgment, sender increases the cwnd by 1 MSS (cwnd = cwnd + MSS). Host A Host B RTT time ▪ summary: initial rate is slow, but ramps up exponentially fast Transport Layer: 3-5
  • 6. TCP slow start (contd.) ▪ In this phase, cwnd increases exponentially. ▪ This phase continues until cwnd reaches a threshold called slow start threshold (ssthresh). ▪ ssthresh = Initially this value is set arbitrarily high, to the size of the flow control window. Transport Layer: 3-6
  • 7. TCP Congestion Avoidance ▪ After cwnd reaches the ssthresh, ▪ Sender increases the cwnd linearly (instead of exponentially) to avoid the congestion (Additive Increase) ▪ This phase continues until the cwnd becomes equal to the receiver window size rwnd. Transport Layer: 3-7 Source: https://www.gatevidyalay.com/tcp- congestion-control-tcp-protocol-tcp/
  • 8. TCP Congestion avoidance Host A Host B RTT Transport Layer: 3-8 RTT
  • 9. TCP Congestion Detection ▪ TCP reacts in different ways based on how the packet loss is detected. ▪ Case-1: Detection on Time Out ▪ Time Out occurs before the sender receives the acknowledgment for a segment. ▪ Reaction: ▪ Setting the ssthresh to half of the current cwnd. ▪ Decreasing the cwnd to 1 MSS. ▪ Resuming the slow start phase. Transport Layer: 3-9 X
  • 10. TCP Congestion Detection (contd.) ▪ Case-02: Detection on receiving 3 Duplicate Acknowledgments ▪ Sender receives 3 duplicate acknowledgments for a segment. ▪ This case suggests the weaker possibility of congestion in the network. ▪ A segment has been dropped but few segments sent later may have reached. ▪ Reaction: ▪ Setting the ssthresh to half of the current cwnd. Retransmit the missing segment (Fast retransmit) ▪ Decreasing the cwnd to: ▪ 1 MSS and resume the slow start phase (TCP Tahoe). ▪ ssthresh and resume the congestion avoidance phase: additive increase (TCP Reno). ▪ Fast recovery (if the cwnd is decreased to ssthresh instead of 1). Transport Layer: 3-10 X TCP Tahoe: Fast Retransmit TCP Reno: Fast Retransmit + Fast Recovery
  • 11. TCP congestion control: AIMD ▪ approach: senders can increase sending rate until packet loss (congestion) occurs, then decrease sending rate on loss event AIMD sawtooth behavior TCP sender Sending rate time increase sending rate by 1 maximum segment size every RTT until loss detected Additive Increase cut sending rate in half at each loss event Multiplicative Decrease Transport Layer: 3-11
  • 12. TCP throughput ▪ avg. TCP throughput as function of window size, RTT? • ignore slow start, assume there is always data to send ▪ W: window size (measured in bytes) where loss occurs • avg. window size (# in-flight bytes) is ¾ W • avg. thruput is 3/4W per RTT W W/2 avg TCP thruput = 3 4 W RTT bytes/sec
  • 13. sourc e application TCP network link physical destination application TCP network link physical Explicit congestion notification (ECN) TCP deployments often implement network-assisted congestion control: ▪ two bits in IP header (ToS field) marked by network router to indicate congestion • policy to determine marking chosen by network operator ▪ congestion indication carried to destination ▪ destination sets ECE bit on ACK segment to notify sender of congestion ▪ involves both IP (IP header ECN bit marking) and TCP (TCP header C,E bit marking) ECN=10 ECN=11 ECE=1 IP datagram TCP ACK segment Transport Layer: 3-13
  • 14. TCP fairness Fairness goal: if K TCP sessions share same bottleneck link of bandwidth R, each should have average rate of R/K TCP connection 1 bottleneck router capacity R TCP connection 2 Transport Layer: 3-14
  • 15. Fairness: must all network apps be “fair”? Fairness and UDP ▪ multimedia apps often do not use TCP • do not want rate throttled by congestion control ▪ instead use UDP: • send audio/video at constant rate, tolerate packet loss ▪ there is no “Internet police” policing use of congestion control Fairness, parallel TCP connections ▪ application can open multiple parallel connections between two hosts ▪ web browsers do this, e.g., link of rate R with 10 existing connections: • new app asks for 1 TCP, gets rate R/11 • new app asks for 10 TCPs, gets R/2 Transport Layer: 3-15
  • 16. Problem-1 Consider the below figure. Assuming TCP Reno is the protocol experiencing the behavior, answer the following questions. In all cases, you should provide a short discussion justifying your answer. Transport Layer: 3-16
  • 17. Problem-1 (contd.) 1. Identify the intervals of time when TCP slow start is operating. 2. Identify the intervals of time when TCP congestion avoidance is operating. 3. After the 16th transmission round, is segment loss detected by a triple duplicate ACK or by a timeout? 4. After the 22nd transmission round, is segment loss detected by a triple duplicate ACK or by a timeout? 5. What is the initial value of ssthresh at the first transmission round? 6. What is the value of ssthresh at the 18th transmission round? 7. What is the value of ssthresh at the 24th transmission round? 8. During what transmission round is the 70th segment sent? 9. Assuming a packet loss is detected after the 26th round by the receipt of a triple duplicate ACK, what will be the values of the congestion window size at 29th round and of ssthresh? 10. Suppose TCP Tahoe is used (instead of TCP Reno), and assume that triple duplicate ACKs are received at the 16th round. What are the ssthresh and the congestion window size at the 19th round? 11. Again suppose TCP Tahoe is used, and there is a timeout event at 22nd round. How many packets have been sent out from 17th round till 22nd round, inclusive? Transport Layer: 3-17
  • 18. Solutions 1. TCP slow start is operating in the intervals [1,6] and [23,26] 2. TCP congestion avoidance is operating in the intervals [6,16] and [17,22] 3. After the 16th transmission round, packet loss is recognized by a triple duplicate ACK. If there was a timeout, the congestion window size would have dropped to 1. 4. After the 22nd transmission round, segment loss is detected due to timeout, and hence the congestion window size is set to 1. 5. The threshold is initially 32, since it is at this window size that slow start stops and congestion avoidance begins. 6. The threshold is set to half the value of the congestion window when packet loss is detected. When loss is detected during transmission round 16, the congestion windows size is 42. Hence the threshold is 21 during the 18th transmission round. 7. The threshold is set to half the value of the congestion window when packet loss is detected. When loss is detected during transmission round 22, the congestion windows size is 29. Hence the threshold is 14 (taking lower floor of 14.5) during the 24th transmission round. 8. During the 1st transmission round, packet 1 is sent; packet 2-3 are sent in the 2nd transmission round; packets 4-7 are sent in the 3rd transmission round; packets 8-15 are sent in the 4th transmission round; packets 16-31 are sent in the 5th transmission round; packets 32-63 are sent in the 6th transmission round; packets 64 – 96 are sent in the 7th transmission round. Thus packet 70 is sent in the 7th transmission round. Transport Layer: 3-18
  • 19. Solutions 9. The threshold will be set to half the current value of the congestion window (8) when the loss occurred and the congestion window will be set to the new threshold value + 3 MSS. Thus the new values of the threshold and window will be 4 and 7 respectively. 10. threshold is 21, and congestion window size is 4. 11. round 17, 1 packet; round 18, 2 packets; round 19, 4 packets; round 20, 8 packets; round 21, 16 packets; round 22, 21 packets. So, the total number is 52. Transport Layer: 3-19