SlideShare a Scribd company logo
Computer Networks: TCP 1
TCPTCP
Congestion ControlCongestion Control
Lecture material taken from
“Computer Networks A Systems Approach”,
Third Ed.,Peterson and Davie,
Morgan Kaufmann, 2003.
Computer Networks: TCP 2
TCP Congestion ControlTCP Congestion Control
• Essential strategy :: The TCP host sends
packets into the network without a reservation
and then the host reacts to observable events.
• Originally TCP assumed FIFO queuing.
• Basic idea :: each source determines how
much capacity is available to a given flow in the
network.
• ACKs are used to ‘pace’ the transmission of
packets such that TCP is “self-clocking”.
Computer Networks: TCP 3
AIMDAIMD
(Additive Increase / Multiplicative(Additive Increase / Multiplicative
Decrease)Decrease)
• CongestionWindow (cwnd) is a variable held by
the TCP source for each connection.
• cwnd is set based on the perceived level of
congestion. The Host receives implicit (packet
drop) or explicit (packet mark) indications of
internal congestion.
MaxWindow :: min (CongestionWindow , AdvertisedWindow)
EffectiveWindow = MaxWindow – (LastByteSent -LastByteAcked)
Computer Networks: TCP 4
Additive IncreaseAdditive Increase
• Additive Increase is a reaction to perceived
available capacity.
• Linear Increase basic idea:: For each “cwnd’s
worth” of packets sent, increase cwnd by 1
packet.
• In practice, cwnd is incremented fractionally for
each arriving ACK.
increment = MSS x (MSS /cwnd)
cwnd = cwnd + increment
Computer Networks: TCP 5
Figure 6.8 Additive IncreaseFigure 6.8 Additive Increase
Source Destination
Add one packet
each RTT
Computer Networks: TCP 6
Multiplicative DecreaseMultiplicative Decrease
* The key assumption is that a dropped packet and the
resultant timeout are due to congestion at a router or
a switch.
Multiplicate Decrease:: TCP reacts to a timeout by
halving cwnd.
• Although cwnd is defined in bytes, the literature often
discusses congestion control in terms of packets (or
more formally in MSS == Maximum Segment Size).
• cwnd is not allowed below the size of a single packet.
Computer Networks: TCP 7
AIMDAIMD
(Additive Increase / Multiplicative(Additive Increase / Multiplicative
Decrease)Decrease)
• It has been shown that AIMD is a necessary
condition for TCP congestion control to be stable.
• Because the simple CC mechanism involves
timeouts that cause retransmissions, it is important
that hosts have an accurate timeout mechanism.
• Timeouts set as a function of average RTT and
standard deviation of RTT.
• However, TCP hosts only sample round-trip time
once per RTT using coarse-grained clock.
Computer Networks: TCP 8
Figure 6.9 Typical TCPFigure 6.9 Typical TCP
Sawtooth PatternSawtooth Pattern
60
20
1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0
Time (seconds)
70
30
40
50
10
10.0
Computer Networks: TCP 9
Slow StartSlow Start
• Linear additive increase takes too long to
ramp up a new TCP connection from cold
start.
• Beginning with TCP Tahoe, the slow start
mechanism was added to provide an initial
exponential increase in the size of cwnd.
Remember mechanism by: slow start
prevents a slow start. Moreover, slow start
is slower than sending a full advertised
window’s worth of packets all at once.
Computer Networks: TCP 10
SloSloww StartStart
• The source starts with cwnd = 1.
• Every time an ACK arrives, cwnd is
incremented.
cwnd is effectively doubled per RTT “epoch”.
• Two slow start situations:
 At the very beginning of a connection {cold start}.
 When the connection goes dead waiting for a
timeout to occur (i.e, the advertized window goes
to zero!)
Computer Networks: TCP 11
Figure 6.10 Slow StartFigure 6.10 Slow Start
Source Destination
Slow Start
Add one packet
per ACK
Computer Networks: TCP 12
Slow StartSlow Start
• However, in the second case the source
has more information. The current value
of cwnd can be saved as a congestion
threshold.
• This is also known as the “slow start
threshold” ssthresh.
Computer Networks: TCP 13
Figure 6.11 Behavior of TCPFigure 6.11 Behavior of TCP
Congestion ControlCongestion Control
60
20
1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0
Time (seconds)
70
30
40
50
10
Computer Networks: TCP 14
Fast RetransmitFast Retransmit
• Coarse timeouts remained a problem, and Fast
retransmit was added with TCP Tahoe.
• Since the receiver responds every time a packet
arrives, this implies the sender will see duplicate
ACKs.
Basic Idea:: use duplicate ACKs to signal lost packet.
Fast Retransmit
Upon receipt of three duplicate ACKs, the TCP Sender
retransmits the lost packet.
Computer Networks: TCP 15
Fast RetransmitFast Retransmit
• Generally, fast retransmit eliminates about half
the coarse-grain timeouts.
• This yields roughly a 20% improvement in
throughput.
• Note – fast retransmit does not eliminate all
the timeouts due to small window sizes at the
source.
Computer Networks: TCP 16
Figure 6.12 Fast RetransmitFigure 6.12 Fast Retransmit
Packet 1
Packet 2
Packet 3
Packet 4
Packet 5
Packet 6
Retransmit
packet 3
ACK 1
ACK 2
ACK 2
ACK 2
ACK 6
ACK 2
Sender Receiver
Fast Retransmit
Based on three
duplicate ACKs
Computer Networks: TCP 17
Figure 6.13 TCP Fast Retransmit TraceFigure 6.13 TCP Fast Retransmit Trace
60
20
1.0 2.0 3.0 4.0 5.0 6.0 7.0
Time (seconds)
70
30
40
50
10
Computer Networks: TCP 18
Congestion
window
10
5
15
20
0
Round-trip times
Slow
start
Congestion
avoidance
Congestion occurs
Threshold
Figure 7.63Leon-Garcia & Widjaja: Communication Networks
Copyright ©2000 The McGraw Hill Companies
TCP Congestion Control
Computer Networks: TCP 19
Fast RecoveryFast Recovery
• Fast recovery was added with TCP Reno.
• Basic idea:: When fast retransmit detects
three duplicate ACKs, start the recovery
process from congestion avoidance region
and use ACKs in the pipe to pace the
sending of packets.
Fast Recovery
After Fast Retransmit, half cwnd and commence
recovery from this point using linear additive increase
‘primed’ by left over ACKs in pipe.
Computer Networks: TCP 20
ModifiedModified Slow StartSlow Start
• With fast recovery, slow start only
occurs:
–At cold start
–After a coarse-grain timeout
• This is the difference between
TCP Tahoe and TCP Reno!!
Computer Networks: TCP 21
Congestion
window
10
5
15
20
0
Round-trip times
Slow
start
Congestion
avoidance
Congestion occurs
Threshold
Figure 7.63Leon-Garcia & Widjaja: Communication Networks
Copyright ©2000 The McGraw Hill Companies
TCP Congestion Control
Fast recovery
would cause a
change here.
Computer Networks: TCP 22
Adaptive RetransmissionsAdaptive Retransmissions
RTT:: Round Trip Time between a pair of
hosts on the Internet.
• How to set the TimeOut value?
– The timeout value is set as a function of
the expected RTT.
– Consequences of a bad choice?
Computer Networks: TCP 23
Original AlgorithmOriginal Algorithm
• Keep a running average of RTT and
compute TimeOut as a function of this
RTT.
– Send packet and keep timestamp ts .
– When ACK arrives, record timestamp ta .
SampleRTT = ta - ts
Computer Networks: TCP 24
Original AlgorithmOriginal Algorithm
Compute a weighted average:
EstimatedRTT =EstimatedRTT = αα xx EstimatedRTT +EstimatedRTT +
((1-1- αα) x SampleRTT) x SampleRTT
Original TCP spec: αα in range (0.8,0.9)in range (0.8,0.9)
TimeOut = 2 xTimeOut = 2 x EstimatedRTTEstimatedRTT
Computer Networks: TCP 25
Karn/Partidge AlgorithmKarn/Partidge Algorithm
An obvious flaw in the original algorithm:
Whenever there is a retransmission it is
impossible to know whether to associate
the ACK with the original packet or the
retransmitted packet.
Computer Networks: TCP 26
Figure 5.10Figure 5.10
Associating the ACK?Associating the ACK?
Sender Receiver
Original transmission
ACK
Retransmission
Sender Receiver
Original transmission
ACK
Retransmission
(a) (b)
Computer Networks: TCP 27
Karn/Partidge AlgorithmKarn/Partidge Algorithm
1. Do not measure SampleRTTSampleRTT when
sending packet more than once.
2. For each retransmission, set TimeOutTimeOut
to double the last TimeOutTimeOut.
{ Note – this is a form of exponential
backoff based on the believe that the
lost packet is due to congestion.}
Computer Networks: TCP 28
Jaconson/Karels AlgorithmJaconson/Karels Algorithm
The problem with the original algorithm is that it did not
take into account the variance of SampleRTT.
Difference = SampleRTT – EstimatedRTTDifference = SampleRTT – EstimatedRTT
EstimatedRTT = EstimatedRTT +EstimatedRTT = EstimatedRTT +
((δδ x Difference)x Difference)
Deviation =Deviation = δδ (|Difference| - Deviation)(|Difference| - Deviation)
where δδ is a fraction between 0 and 1.
Computer Networks: TCP 29
Jaconson/Karels AlgorithmJaconson/Karels Algorithm
TCP computes timeout using both the mean
and variance of RTT
TimeOut =TimeOut = µµ x EstimatedRTTx EstimatedRTT
++ ΦΦ x Deviationx Deviation
where based on experience µ = 1µ = 1 and ΦΦ = 4= 4.

More Related Content

What's hot

ATM Networking Concept
ATM Networking ConceptATM Networking Concept
ATM Networking Concept
Tushar Ranjan
 
Delay , Loss & Throughput
Delay , Loss & ThroughputDelay , Loss & Throughput
Delay , Loss & Throughput
Tutor in Tuition Classes
 
Cs8591 u4
Cs8591 u4Cs8591 u4
Network layer tanenbaum
Network layer tanenbaumNetwork layer tanenbaum
Network layer tanenbaum
Mahesh Kumar Chelimilla
 
Congestion control in TCP
Congestion control in TCPCongestion control in TCP
Congestion control in TCP
selvakumar_b1985
 
IEEE 802.11 Architecture and Services
IEEE 802.11 Architecture and ServicesIEEE 802.11 Architecture and Services
IEEE 802.11 Architecture and Services
Sayed Chhattan Shah
 
Application Layer
Application LayerApplication Layer
Application Layer
ushabarad142
 
CoAP - Web Protocol for IoT
CoAP - Web Protocol for IoTCoAP - Web Protocol for IoT
CoAP - Web Protocol for IoT
Aniruddha Chakrabarti
 
HIGH SPEED NETWORKS
HIGH SPEED NETWORKSHIGH SPEED NETWORKS
HIGH SPEED NETWORKS
Kathirvel Ayyaswamy
 
MicroC/OS-II
MicroC/OS-IIMicroC/OS-II
HIGH SPEED NETWORKS
HIGH SPEED NETWORKSHIGH SPEED NETWORKS
HIGH SPEED NETWORKS
Kathirvel Ayyaswamy
 
TCP congestion control
TCP congestion controlTCP congestion control
TCP congestion control
Shubham Jain
 
Chapter 1 - Computer Networking a top-down Approach 7th
Chapter 1 - Computer Networking a top-down Approach 7thChapter 1 - Computer Networking a top-down Approach 7th
Chapter 1 - Computer Networking a top-down Approach 7th
Andy Juan Sarango Veliz
 
TCP - Transmission Control Protocol
TCP - Transmission Control ProtocolTCP - Transmission Control Protocol
TCP - Transmission Control Protocol
Peter R. Egli
 
Adoptive retransmission in TCP
Adoptive retransmission in TCPAdoptive retransmission in TCP
Adoptive retransmission in TCP
selvakumar_b1985
 
Leaky bucket A
Leaky bucket ALeaky bucket A
Leaky bucket A
Syed Shaheer Gilani
 
Network layer u3
Network  layer u3Network  layer u3
Network layer u3
IndrajaMeghavathula
 
2.communcation in distributed system
2.communcation in distributed system2.communcation in distributed system
2.communcation in distributed system
Gd Goenka University
 
Congetion Control.pptx
Congetion Control.pptxCongetion Control.pptx
Congetion Control.pptx
Naveen Dubey
 

What's hot (20)

ATM Networking Concept
ATM Networking ConceptATM Networking Concept
ATM Networking Concept
 
Delay , Loss & Throughput
Delay , Loss & ThroughputDelay , Loss & Throughput
Delay , Loss & Throughput
 
Cs8591 u4
Cs8591 u4Cs8591 u4
Cs8591 u4
 
csma ca
 csma ca csma ca
csma ca
 
Network layer tanenbaum
Network layer tanenbaumNetwork layer tanenbaum
Network layer tanenbaum
 
Congestion control in TCP
Congestion control in TCPCongestion control in TCP
Congestion control in TCP
 
IEEE 802.11 Architecture and Services
IEEE 802.11 Architecture and ServicesIEEE 802.11 Architecture and Services
IEEE 802.11 Architecture and Services
 
Application Layer
Application LayerApplication Layer
Application Layer
 
CoAP - Web Protocol for IoT
CoAP - Web Protocol for IoTCoAP - Web Protocol for IoT
CoAP - Web Protocol for IoT
 
HIGH SPEED NETWORKS
HIGH SPEED NETWORKSHIGH SPEED NETWORKS
HIGH SPEED NETWORKS
 
MicroC/OS-II
MicroC/OS-IIMicroC/OS-II
MicroC/OS-II
 
HIGH SPEED NETWORKS
HIGH SPEED NETWORKSHIGH SPEED NETWORKS
HIGH SPEED NETWORKS
 
TCP congestion control
TCP congestion controlTCP congestion control
TCP congestion control
 
Chapter 1 - Computer Networking a top-down Approach 7th
Chapter 1 - Computer Networking a top-down Approach 7thChapter 1 - Computer Networking a top-down Approach 7th
Chapter 1 - Computer Networking a top-down Approach 7th
 
TCP - Transmission Control Protocol
TCP - Transmission Control ProtocolTCP - Transmission Control Protocol
TCP - Transmission Control Protocol
 
Adoptive retransmission in TCP
Adoptive retransmission in TCPAdoptive retransmission in TCP
Adoptive retransmission in TCP
 
Leaky bucket A
Leaky bucket ALeaky bucket A
Leaky bucket A
 
Network layer u3
Network  layer u3Network  layer u3
Network layer u3
 
2.communcation in distributed system
2.communcation in distributed system2.communcation in distributed system
2.communcation in distributed system
 
Congetion Control.pptx
Congetion Control.pptxCongetion Control.pptx
Congetion Control.pptx
 

Viewers also liked

Congestion Control in Computer Networks - ATM and TCP
Congestion Control in Computer Networks - ATM and TCPCongestion Control in Computer Networks - ATM and TCP
Congestion Control in Computer Networks - ATM and TCPAttila Balazs
 
Riverbed White Paper - Simulated Packet Loss
Riverbed White Paper - Simulated Packet LossRiverbed White Paper - Simulated Packet Loss
Riverbed White Paper - Simulated Packet Loss
Mohd Syafiq Ramlee
 
Exposing and Fixing Common App Performance Problems
Exposing and Fixing Common App Performance ProblemsExposing and Fixing Common App Performance Problems
Exposing and Fixing Common App Performance Problems
Riverbed Technology
 
Congestion control
Congestion controlCongestion control
Congestion control
Nithin Raj
 
Enhancing and Operating Video Collaboration with your Network
Enhancing and Operating Video Collaboration with your NetworkEnhancing and Operating Video Collaboration with your Network
Enhancing and Operating Video Collaboration with your Network
Cisco Canada
 
Steelhead DX for Datacenter-to-Datacenter optimization
Steelhead DX for Datacenter-to-Datacenter optimizationSteelhead DX for Datacenter-to-Datacenter optimization
Steelhead DX for Datacenter-to-Datacenter optimization
Riverbed Technology
 
Modernizing Edge IT with Riverbed SteelFusion
Modernizing Edge IT with Riverbed SteelFusionModernizing Edge IT with Riverbed SteelFusion
Modernizing Edge IT with Riverbed SteelFusion
Riverbed Technology
 
Presentation riverbed steelhead appliance main 2010
Presentation   riverbed steelhead appliance main 2010Presentation   riverbed steelhead appliance main 2010
Presentation riverbed steelhead appliance main 2010chanwitcs
 
XPDS13: On Paravirualizing TCP - Congestion Control on Xen VMs - Luwei Cheng,...
XPDS13: On Paravirualizing TCP - Congestion Control on Xen VMs - Luwei Cheng,...XPDS13: On Paravirualizing TCP - Congestion Control on Xen VMs - Luwei Cheng,...
XPDS13: On Paravirualizing TCP - Congestion Control on Xen VMs - Luwei Cheng,...
The Linux Foundation
 
F5 Solutions for Service Providers
F5 Solutions for Service ProvidersF5 Solutions for Service Providers
F5 Solutions for Service Providers
BAKOTECH
 
Riverbed and HPE Services for Office 365
Riverbed and HPE Services for Office 365Riverbed and HPE Services for Office 365
Riverbed and HPE Services for Office 365
Riverbed Technology
 
Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP)Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP)
k33a
 
Congestion control in tcp
Congestion control in tcpCongestion control in tcp
Congestion control in tcp
samarai_apoc
 
Leaky Bucket & Tocken Bucket - Traffic shaping
Leaky Bucket & Tocken Bucket - Traffic shapingLeaky Bucket & Tocken Bucket - Traffic shaping
Leaky Bucket & Tocken Bucket - Traffic shaping
Vimal Dewangan
 
TCP/IP Network ppt
TCP/IP Network pptTCP/IP Network ppt
TCP/IP Network pptextraganesh
 

Viewers also liked (17)

Congestion Control in Computer Networks - ATM and TCP
Congestion Control in Computer Networks - ATM and TCPCongestion Control in Computer Networks - ATM and TCP
Congestion Control in Computer Networks - ATM and TCP
 
Riverbed White Paper - Simulated Packet Loss
Riverbed White Paper - Simulated Packet LossRiverbed White Paper - Simulated Packet Loss
Riverbed White Paper - Simulated Packet Loss
 
Exposing and Fixing Common App Performance Problems
Exposing and Fixing Common App Performance ProblemsExposing and Fixing Common App Performance Problems
Exposing and Fixing Common App Performance Problems
 
Congestion control
Congestion controlCongestion control
Congestion control
 
Enhancing and Operating Video Collaboration with your Network
Enhancing and Operating Video Collaboration with your NetworkEnhancing and Operating Video Collaboration with your Network
Enhancing and Operating Video Collaboration with your Network
 
Steelhead DX for Datacenter-to-Datacenter optimization
Steelhead DX for Datacenter-to-Datacenter optimizationSteelhead DX for Datacenter-to-Datacenter optimization
Steelhead DX for Datacenter-to-Datacenter optimization
 
Modernizing Edge IT with Riverbed SteelFusion
Modernizing Edge IT with Riverbed SteelFusionModernizing Edge IT with Riverbed SteelFusion
Modernizing Edge IT with Riverbed SteelFusion
 
Presentation riverbed steelhead appliance main 2010
Presentation   riverbed steelhead appliance main 2010Presentation   riverbed steelhead appliance main 2010
Presentation riverbed steelhead appliance main 2010
 
XPDS13: On Paravirualizing TCP - Congestion Control on Xen VMs - Luwei Cheng,...
XPDS13: On Paravirualizing TCP - Congestion Control on Xen VMs - Luwei Cheng,...XPDS13: On Paravirualizing TCP - Congestion Control on Xen VMs - Luwei Cheng,...
XPDS13: On Paravirualizing TCP - Congestion Control on Xen VMs - Luwei Cheng,...
 
F5 Solutions for Service Providers
F5 Solutions for Service ProvidersF5 Solutions for Service Providers
F5 Solutions for Service Providers
 
Riverbed and HPE Services for Office 365
Riverbed and HPE Services for Office 365Riverbed and HPE Services for Office 365
Riverbed and HPE Services for Office 365
 
Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP)Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP)
 
Congestion control in tcp
Congestion control in tcpCongestion control in tcp
Congestion control in tcp
 
CCNA TCP/IP
CCNA TCP/IPCCNA TCP/IP
CCNA TCP/IP
 
Leaky Bucket & Tocken Bucket - Traffic shaping
Leaky Bucket & Tocken Bucket - Traffic shapingLeaky Bucket & Tocken Bucket - Traffic shaping
Leaky Bucket & Tocken Bucket - Traffic shaping
 
TCP/IP Network ppt
TCP/IP Network pptTCP/IP Network ppt
TCP/IP Network ppt
 
Congestion control
Congestion controlCongestion control
Congestion control
 

Similar to Tcp congestion control

TCP_Congestion_Control.ppt
TCP_Congestion_Control.pptTCP_Congestion_Control.ppt
TCP_Congestion_Control.ppt
19UCSA032ASANJAYKUMA
 
NE #1.pptx
NE #1.pptxNE #1.pptx
NE #1.pptx
tahaniali27
 
Tcp congestion avoidance
Tcp congestion avoidanceTcp congestion avoidance
Tcp congestion avoidance
Ahmed Kamel Taha
 
Lecture 19 22. transport protocol for ad-hoc
Lecture 19 22. transport protocol for ad-hoc Lecture 19 22. transport protocol for ad-hoc
Lecture 19 22. transport protocol for ad-hoc Chandra Meena
 
chapter 3.2 TCP.pptx
chapter 3.2 TCP.pptxchapter 3.2 TCP.pptx
chapter 3.2 TCP.pptx
Tekle12
 
Mobile Transpot Layer
Mobile Transpot LayerMobile Transpot Layer
Mobile Transpot Layer
Maulik Patel
 
Tcp Congestion Avoidance
Tcp Congestion AvoidanceTcp Congestion Avoidance
Tcp Congestion Avoidance
Ram Dutt Shukla
 
Computer network (13)
Computer network (13)Computer network (13)
Computer network (13)
NYversity
 
tcp congestion .pptx
tcp congestion .pptxtcp congestion .pptx
tcp congestion .pptx
ECE01AJAYS
 
Congestion control avoidance
Congestion control avoidanceCongestion control avoidance
Congestion control avoidance
Anthony-Claret Onwutalobi
 
Troubleshooting TCP/IP
Troubleshooting TCP/IPTroubleshooting TCP/IP
Troubleshooting TCP/IP
vijai s
 
Unit III IPV6 UDP
Unit III IPV6 UDPUnit III IPV6 UDP
Unit III IPV6 UDPsangusajjan
 
TCP Traffic Control Chapter12
TCP Traffic Control Chapter12TCP Traffic Control Chapter12
TCP Traffic Control Chapter12
daniel ayalew
 
Performance Evaluation of High Speed Congestion Control Protocols
Performance Evaluation of High Speed Congestion Control  ProtocolsPerformance Evaluation of High Speed Congestion Control  Protocols
Performance Evaluation of High Speed Congestion Control Protocols
IOSR Journals
 
High Performance Networking with Advanced TCP
High Performance Networking with Advanced TCPHigh Performance Networking with Advanced TCP
High Performance Networking with Advanced TCP
Dilum Bandara
 
TCP Theory
TCP TheoryTCP Theory
TCP Theory
soohyunc
 
Mobile transport layer
 Mobile transport layer Mobile transport layer
Mobile transport layer
SonaliAjankar
 
Mobile comn.pptx
Mobile comn.pptxMobile comn.pptx
Mobile comn.pptx
DAMANDEEPSINGH61
 
Designing TCP-Friendly Window-based Congestion Control
Designing TCP-Friendly Window-based Congestion ControlDesigning TCP-Friendly Window-based Congestion Control
Designing TCP-Friendly Window-based Congestion Control
soohyunc
 

Similar to Tcp congestion control (20)

TCP_Congestion_Control.ppt
TCP_Congestion_Control.pptTCP_Congestion_Control.ppt
TCP_Congestion_Control.ppt
 
NE #1.pptx
NE #1.pptxNE #1.pptx
NE #1.pptx
 
Tcp congestion avoidance
Tcp congestion avoidanceTcp congestion avoidance
Tcp congestion avoidance
 
Lecture 19 22. transport protocol for ad-hoc
Lecture 19 22. transport protocol for ad-hoc Lecture 19 22. transport protocol for ad-hoc
Lecture 19 22. transport protocol for ad-hoc
 
chapter 3.2 TCP.pptx
chapter 3.2 TCP.pptxchapter 3.2 TCP.pptx
chapter 3.2 TCP.pptx
 
Mobile Transpot Layer
Mobile Transpot LayerMobile Transpot Layer
Mobile Transpot Layer
 
Tcp Congestion Avoidance
Tcp Congestion AvoidanceTcp Congestion Avoidance
Tcp Congestion Avoidance
 
Computer network (13)
Computer network (13)Computer network (13)
Computer network (13)
 
tcp congestion .pptx
tcp congestion .pptxtcp congestion .pptx
tcp congestion .pptx
 
Congestion control avoidance
Congestion control avoidanceCongestion control avoidance
Congestion control avoidance
 
Troubleshooting TCP/IP
Troubleshooting TCP/IPTroubleshooting TCP/IP
Troubleshooting TCP/IP
 
Unit III IPV6 UDP
Unit III IPV6 UDPUnit III IPV6 UDP
Unit III IPV6 UDP
 
TCP Traffic Control Chapter12
TCP Traffic Control Chapter12TCP Traffic Control Chapter12
TCP Traffic Control Chapter12
 
Performance Evaluation of High Speed Congestion Control Protocols
Performance Evaluation of High Speed Congestion Control  ProtocolsPerformance Evaluation of High Speed Congestion Control  Protocols
Performance Evaluation of High Speed Congestion Control Protocols
 
High Performance Networking with Advanced TCP
High Performance Networking with Advanced TCPHigh Performance Networking with Advanced TCP
High Performance Networking with Advanced TCP
 
Tcp traffic control and red ecn
Tcp traffic control and red ecnTcp traffic control and red ecn
Tcp traffic control and red ecn
 
TCP Theory
TCP TheoryTCP Theory
TCP Theory
 
Mobile transport layer
 Mobile transport layer Mobile transport layer
Mobile transport layer
 
Mobile comn.pptx
Mobile comn.pptxMobile comn.pptx
Mobile comn.pptx
 
Designing TCP-Friendly Window-based Congestion Control
Designing TCP-Friendly Window-based Congestion ControlDesigning TCP-Friendly Window-based Congestion Control
Designing TCP-Friendly Window-based Congestion Control
 

More from Abdo sayed

Tmo ipv6-feb-2013 1361827441
Tmo ipv6-feb-2013 1361827441Tmo ipv6-feb-2013 1361827441
Tmo ipv6-feb-2013 1361827441
Abdo sayed
 
I pv6 migration_strategies_for_mobile_networks_whitepaper
I pv6 migration_strategies_for_mobile_networks_whitepaperI pv6 migration_strategies_for_mobile_networks_whitepaper
I pv6 migration_strategies_for_mobile_networks_whitepaper
Abdo sayed
 
Lect9
Lect9Lect9
Lect9
Abdo sayed
 
Fast020702
Fast020702Fast020702
Fast020702
Abdo sayed
 
Tcp (1)
Tcp (1)Tcp (1)
Tcp (1)
Abdo sayed
 
Tcp congestion control (1)
Tcp congestion control (1)Tcp congestion control (1)
Tcp congestion control (1)
Abdo sayed
 
Lect9 (1)
Lect9 (1)Lect9 (1)
Lect9 (1)
Abdo sayed
 

More from Abdo sayed (8)

Tmo ipv6-feb-2013 1361827441
Tmo ipv6-feb-2013 1361827441Tmo ipv6-feb-2013 1361827441
Tmo ipv6-feb-2013 1361827441
 
I pv6 migration_strategies_for_mobile_networks_whitepaper
I pv6 migration_strategies_for_mobile_networks_whitepaperI pv6 migration_strategies_for_mobile_networks_whitepaper
I pv6 migration_strategies_for_mobile_networks_whitepaper
 
Lect9
Lect9Lect9
Lect9
 
Fast020702
Fast020702Fast020702
Fast020702
 
Tcp
TcpTcp
Tcp
 
Tcp (1)
Tcp (1)Tcp (1)
Tcp (1)
 
Tcp congestion control (1)
Tcp congestion control (1)Tcp congestion control (1)
Tcp congestion control (1)
 
Lect9 (1)
Lect9 (1)Lect9 (1)
Lect9 (1)
 

Recently uploaded

Latest trends in computer networking.pptx
Latest trends in computer networking.pptxLatest trends in computer networking.pptx
Latest trends in computer networking.pptx
JungkooksNonexistent
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
Arif0071
 
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptxLiving-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
TristanJasperRamos
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
3ipehhoa
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
3ipehhoa
 
BASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptxBASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptx
natyesu
 
The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptx
laozhuseo02
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
JeyaPerumal1
 
Output determination SAP S4 HANA SAP SD CC
Output determination SAP S4 HANA SAP SD CCOutput determination SAP S4 HANA SAP SD CC
Output determination SAP S4 HANA SAP SD CC
ShahulHameed54211
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
laozhuseo02
 
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesMulti-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Sanjeev Rampal
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
3ipehhoa
 
This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!
nirahealhty
 
ER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAEER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAE
Himani415946
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
Rogerio Filho
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
Gal Baras
 

Recently uploaded (16)

Latest trends in computer networking.pptx
Latest trends in computer networking.pptxLatest trends in computer networking.pptx
Latest trends in computer networking.pptx
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
 
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptxLiving-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
 
BASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptxBASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptx
 
The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptx
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
 
Output determination SAP S4 HANA SAP SD CC
Output determination SAP S4 HANA SAP SD CCOutput determination SAP S4 HANA SAP SD CC
Output determination SAP S4 HANA SAP SD CC
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
 
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesMulti-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
 
This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!
 
ER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAEER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAE
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
 

Tcp congestion control

  • 1. Computer Networks: TCP 1 TCPTCP Congestion ControlCongestion Control Lecture material taken from “Computer Networks A Systems Approach”, Third Ed.,Peterson and Davie, Morgan Kaufmann, 2003.
  • 2. Computer Networks: TCP 2 TCP Congestion ControlTCP Congestion Control • Essential strategy :: The TCP host sends packets into the network without a reservation and then the host reacts to observable events. • Originally TCP assumed FIFO queuing. • Basic idea :: each source determines how much capacity is available to a given flow in the network. • ACKs are used to ‘pace’ the transmission of packets such that TCP is “self-clocking”.
  • 3. Computer Networks: TCP 3 AIMDAIMD (Additive Increase / Multiplicative(Additive Increase / Multiplicative Decrease)Decrease) • CongestionWindow (cwnd) is a variable held by the TCP source for each connection. • cwnd is set based on the perceived level of congestion. The Host receives implicit (packet drop) or explicit (packet mark) indications of internal congestion. MaxWindow :: min (CongestionWindow , AdvertisedWindow) EffectiveWindow = MaxWindow – (LastByteSent -LastByteAcked)
  • 4. Computer Networks: TCP 4 Additive IncreaseAdditive Increase • Additive Increase is a reaction to perceived available capacity. • Linear Increase basic idea:: For each “cwnd’s worth” of packets sent, increase cwnd by 1 packet. • In practice, cwnd is incremented fractionally for each arriving ACK. increment = MSS x (MSS /cwnd) cwnd = cwnd + increment
  • 5. Computer Networks: TCP 5 Figure 6.8 Additive IncreaseFigure 6.8 Additive Increase Source Destination Add one packet each RTT
  • 6. Computer Networks: TCP 6 Multiplicative DecreaseMultiplicative Decrease * The key assumption is that a dropped packet and the resultant timeout are due to congestion at a router or a switch. Multiplicate Decrease:: TCP reacts to a timeout by halving cwnd. • Although cwnd is defined in bytes, the literature often discusses congestion control in terms of packets (or more formally in MSS == Maximum Segment Size). • cwnd is not allowed below the size of a single packet.
  • 7. Computer Networks: TCP 7 AIMDAIMD (Additive Increase / Multiplicative(Additive Increase / Multiplicative Decrease)Decrease) • It has been shown that AIMD is a necessary condition for TCP congestion control to be stable. • Because the simple CC mechanism involves timeouts that cause retransmissions, it is important that hosts have an accurate timeout mechanism. • Timeouts set as a function of average RTT and standard deviation of RTT. • However, TCP hosts only sample round-trip time once per RTT using coarse-grained clock.
  • 8. Computer Networks: TCP 8 Figure 6.9 Typical TCPFigure 6.9 Typical TCP Sawtooth PatternSawtooth Pattern 60 20 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 Time (seconds) 70 30 40 50 10 10.0
  • 9. Computer Networks: TCP 9 Slow StartSlow Start • Linear additive increase takes too long to ramp up a new TCP connection from cold start. • Beginning with TCP Tahoe, the slow start mechanism was added to provide an initial exponential increase in the size of cwnd. Remember mechanism by: slow start prevents a slow start. Moreover, slow start is slower than sending a full advertised window’s worth of packets all at once.
  • 10. Computer Networks: TCP 10 SloSloww StartStart • The source starts with cwnd = 1. • Every time an ACK arrives, cwnd is incremented. cwnd is effectively doubled per RTT “epoch”. • Two slow start situations:  At the very beginning of a connection {cold start}.  When the connection goes dead waiting for a timeout to occur (i.e, the advertized window goes to zero!)
  • 11. Computer Networks: TCP 11 Figure 6.10 Slow StartFigure 6.10 Slow Start Source Destination Slow Start Add one packet per ACK
  • 12. Computer Networks: TCP 12 Slow StartSlow Start • However, in the second case the source has more information. The current value of cwnd can be saved as a congestion threshold. • This is also known as the “slow start threshold” ssthresh.
  • 13. Computer Networks: TCP 13 Figure 6.11 Behavior of TCPFigure 6.11 Behavior of TCP Congestion ControlCongestion Control 60 20 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 Time (seconds) 70 30 40 50 10
  • 14. Computer Networks: TCP 14 Fast RetransmitFast Retransmit • Coarse timeouts remained a problem, and Fast retransmit was added with TCP Tahoe. • Since the receiver responds every time a packet arrives, this implies the sender will see duplicate ACKs. Basic Idea:: use duplicate ACKs to signal lost packet. Fast Retransmit Upon receipt of three duplicate ACKs, the TCP Sender retransmits the lost packet.
  • 15. Computer Networks: TCP 15 Fast RetransmitFast Retransmit • Generally, fast retransmit eliminates about half the coarse-grain timeouts. • This yields roughly a 20% improvement in throughput. • Note – fast retransmit does not eliminate all the timeouts due to small window sizes at the source.
  • 16. Computer Networks: TCP 16 Figure 6.12 Fast RetransmitFigure 6.12 Fast Retransmit Packet 1 Packet 2 Packet 3 Packet 4 Packet 5 Packet 6 Retransmit packet 3 ACK 1 ACK 2 ACK 2 ACK 2 ACK 6 ACK 2 Sender Receiver Fast Retransmit Based on three duplicate ACKs
  • 17. Computer Networks: TCP 17 Figure 6.13 TCP Fast Retransmit TraceFigure 6.13 TCP Fast Retransmit Trace 60 20 1.0 2.0 3.0 4.0 5.0 6.0 7.0 Time (seconds) 70 30 40 50 10
  • 18. Computer Networks: TCP 18 Congestion window 10 5 15 20 0 Round-trip times Slow start Congestion avoidance Congestion occurs Threshold Figure 7.63Leon-Garcia & Widjaja: Communication Networks Copyright ©2000 The McGraw Hill Companies TCP Congestion Control
  • 19. Computer Networks: TCP 19 Fast RecoveryFast Recovery • Fast recovery was added with TCP Reno. • Basic idea:: When fast retransmit detects three duplicate ACKs, start the recovery process from congestion avoidance region and use ACKs in the pipe to pace the sending of packets. Fast Recovery After Fast Retransmit, half cwnd and commence recovery from this point using linear additive increase ‘primed’ by left over ACKs in pipe.
  • 20. Computer Networks: TCP 20 ModifiedModified Slow StartSlow Start • With fast recovery, slow start only occurs: –At cold start –After a coarse-grain timeout • This is the difference between TCP Tahoe and TCP Reno!!
  • 21. Computer Networks: TCP 21 Congestion window 10 5 15 20 0 Round-trip times Slow start Congestion avoidance Congestion occurs Threshold Figure 7.63Leon-Garcia & Widjaja: Communication Networks Copyright ©2000 The McGraw Hill Companies TCP Congestion Control Fast recovery would cause a change here.
  • 22. Computer Networks: TCP 22 Adaptive RetransmissionsAdaptive Retransmissions RTT:: Round Trip Time between a pair of hosts on the Internet. • How to set the TimeOut value? – The timeout value is set as a function of the expected RTT. – Consequences of a bad choice?
  • 23. Computer Networks: TCP 23 Original AlgorithmOriginal Algorithm • Keep a running average of RTT and compute TimeOut as a function of this RTT. – Send packet and keep timestamp ts . – When ACK arrives, record timestamp ta . SampleRTT = ta - ts
  • 24. Computer Networks: TCP 24 Original AlgorithmOriginal Algorithm Compute a weighted average: EstimatedRTT =EstimatedRTT = αα xx EstimatedRTT +EstimatedRTT + ((1-1- αα) x SampleRTT) x SampleRTT Original TCP spec: αα in range (0.8,0.9)in range (0.8,0.9) TimeOut = 2 xTimeOut = 2 x EstimatedRTTEstimatedRTT
  • 25. Computer Networks: TCP 25 Karn/Partidge AlgorithmKarn/Partidge Algorithm An obvious flaw in the original algorithm: Whenever there is a retransmission it is impossible to know whether to associate the ACK with the original packet or the retransmitted packet.
  • 26. Computer Networks: TCP 26 Figure 5.10Figure 5.10 Associating the ACK?Associating the ACK? Sender Receiver Original transmission ACK Retransmission Sender Receiver Original transmission ACK Retransmission (a) (b)
  • 27. Computer Networks: TCP 27 Karn/Partidge AlgorithmKarn/Partidge Algorithm 1. Do not measure SampleRTTSampleRTT when sending packet more than once. 2. For each retransmission, set TimeOutTimeOut to double the last TimeOutTimeOut. { Note – this is a form of exponential backoff based on the believe that the lost packet is due to congestion.}
  • 28. Computer Networks: TCP 28 Jaconson/Karels AlgorithmJaconson/Karels Algorithm The problem with the original algorithm is that it did not take into account the variance of SampleRTT. Difference = SampleRTT – EstimatedRTTDifference = SampleRTT – EstimatedRTT EstimatedRTT = EstimatedRTT +EstimatedRTT = EstimatedRTT + ((δδ x Difference)x Difference) Deviation =Deviation = δδ (|Difference| - Deviation)(|Difference| - Deviation) where δδ is a fraction between 0 and 1.
  • 29. Computer Networks: TCP 29 Jaconson/Karels AlgorithmJaconson/Karels Algorithm TCP computes timeout using both the mean and variance of RTT TimeOut =TimeOut = µµ x EstimatedRTTx EstimatedRTT ++ ΦΦ x Deviationx Deviation where based on experience µ = 1µ = 1 and ΦΦ = 4= 4.

Editor's Notes

  1. <number>
  2. <number>