Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
Congestion Control
TCP Congestion Control
 The idea of TCP congestion control is for each source to determine how
much capacity is available in the network, so that it knows how many
packets it can safely have in transit.
– Once a given source has this many packets in transit, it uses the arrival of an
ACK as a signal that one of its packets has left the network, and that it is
therefore safe to insert a new packet into the network without adding to the
level of congestion.
– By using ACKs to pace the transmission of packets, TCP is said to be self-
clocking.
Additive Increase/Multiplicative Decrease:
– TCP maintains a new state variable for each connection, called
CongestionWindow, which is used by the source to limit how much data it
is allowed to have in transit at a given time.
– The congestion window is congestion control’s counterpart to flow control’s
advertised window.
TCP Congestion Control
– TCP is modified such that the maximum number of bytes of
unacknowledged data allowed is now the minimum of the congestion
window and the advertised window.
MaxWindow = MIN(CongestionWindow, AdvertisedWindow)
EffectiveWindow = MaxWindow − (LastByteSent − LastByteAcked)
– That is, MaxWindow replaces AdvertisedWindow in the calculation of
EffectiveWindow.
– Thus, a TCP source is allowed to send no faster than the slowest
component—the network or the destination host—can accommodate.
– The problem, of course, is how TCP comes to learn an appropriate value for
CongestionWindow.
– Unlike the AdvertisedWindow, which is sent by the receiving side of the
connection, there is no one to send a suitable CongestionWindow to the
sending side of TCP.
TCP Congestion Control
 The answer is that the TCP source sets the CongestionWindow based on the
level of congestion it perceives to exist in the network.
 This involves decreasing the congestion window when the level of congestion
goes up and increasing the congestion window when the level of congestion
goes down. Taken together, the mechanism is commonly called additive
increase/multiplicative decrease (AIMD)
– How does the source determine that the network is congested and that it
should decrease the congestion window?
 Based on the observation that the main reason packets are not delivered, and a
timeout results, is that a packet was dropped due to congestion. It is rare that a
packet is dropped because of an error during transmission.
 Therefore, TCP interprets timeouts as a sign of congestion and reduces the rate
at which it is transmitting.
 Specifically, each time a timeout occurs, the source sets CongestionWindow to
half of its previous value. This halving of the CongestionWindow for each
timeout corresponds to the “multiplicative decrease” part of AIMD.
 For example, suppose the CongestionWindow is currently set to 16 packets. If a
loss is detected, CongestionWindow is set to 8.
 Additional losses cause CongestionWindow to be reduced to 4, then 2, and
finally to 1 packet.
TCP Congestion Control
 CongestionWindow is not allowed to fall below the size of a single packet, i.e.,
maximum segment size (MSS).
– Increase the congestion window to take advantage of newly available
capacity in the network.
– This is the “additive increase” part of AIMD, and it works as follows.
 Every time the source successfully sends a CongestionWindow’s worth of
packets—that is, each packet sent out during the last RTT has been ACKed—it
adds the equivalent of 1 packet to CongestionWindow.
TCP Congestion Control
– TCP does not wait for an entire window’s worth of ACKs to add 1 packet’s
worth to the congestion window, but instead increments CongestionWindow
by a little for each ACK that arrives.
– Specifically, the congestion window is incremented as follows each time an
ACK arrives:
• Increment = MSS × (MSS/CongestionWindow)
• CongestionWindow+= Increment
• That is, rather than incrementing CongestionWindow by an entire MSS bytes
each RTT, we increment it by a fraction of MSS every time an ACK is received.
• Assuming that each ACK acknowledges the receipt of MSS bytes, then that
fraction is MSS/CongestionWindow.
TCP Congestion Control
Slow Start
 Additive Increase / Multiplicative Decrease is only suitable for source,
that is operating close to the available capacity of the network, but it
takes too long to ramp up a connection when it is starting from scratch.
 slow start, that is used to increase the congestion window rapidly from a
cold start.
 Slow start effectively increases the congestion window exponentially,
rather than linearly.
– the source starts out by setting CongestionWindow to one packet.
– When the ACK for this packet arrives, TCP adds 1 to CongestionWindow
and then sends two packets.
– Upon receiving the corresponding two ACKs, TCP increments
CongestionWindow by 2—one for each ACK—and next sends four packets.
– The end result is that TCP effectively doubles the number of packets it has
in transit every RTT.
TCP Congestion Control
TCP Congestion Control
Two different situations in which slow start runs,
 The first is at the very beginning of a connection, at which time the source
has no idea how many packets it is going to be able to have in transit at a
given time.
− In this situation, slow start continues to double CongestionWindow each RTT
until there is a loss, at which time a timeout causes multiplicative decrease to
divide CongestionWindow by 2.
 The second situation in which slow start is used is a bit more subtle; it
occurs when the connection goes dead while waiting for a timeout to occur.
− the source then uses slow start to restart the flow of data.
 Specifically, the source has a current (and useful) value of
CongestionWindow; this is the value of CongestionWindow that
existed prior to the last packet loss, divided by 2 as a result of the
loss.
 This value used as the “target” congestion window also called as
CongestionThreshold.
TCP Congestion Control
 Slow start is used to rapidly increase the sending rate up to this
value, and then additive increase is used beyond this point.
i.e., assume congestion window size is x at the time of timeout
 A time out happens, causing the congestion window to be divided by 2,
dropping the CongestionWindow size x to x/2 and CongestionThreshold
is set to this amount (x/2).
 CongestionWindow is reset to one packet, as the sender enters slow start.
 Slow start increases the congestion window exponentially until it reaches
CongestionThreshold .
 CongestionWindow then grows linearly (i.e., it uses additive increase)
TCP Congestion Control
Fast Retrasnmit and Fast Recovery
– The idea of fast retransmit is straightforward. Every time a data packet
arrives at the receiving side, the receiver responds with an acknowledgment,
even if this sequence number has already been acknowledged.
– Thus, when a packet arrives out of order— that is, TCP cannot yet
acknowledge the data the packet contains because earlier data has not yet
arrived—TCP resends the same acknowledgment it sent the last time.
– This second transmission of the same acknowledgment is called a duplicate
ACK.
– When the sending side sees a duplicate ACK, it knows that the other side
must have received a packet out of order, which suggests that an earlier
packet might have been lost.
– Since it is also possible that the earlier packet has only been delayed rather
than lost, the sender waits until it sees some number of duplicate ACKs and
then retransmits the missing packet. In practice, TCP waits until it has seen
three duplicate ACKs before retransmitting the packet.
TCP Congestion Control
– When the fast retransmit mechanism signals congestion, rather than drop the
congestion window all the way back to one packet and run slow start, it is
possible to use the ACKs that are still in the pipe to clock the sending of
packets.
– This mechanism, which is called fast recovery, effectively removes the slow
start phase that happens between when fast retransmit detects a lost packet
and additive increase begins.

More Related Content

What's hot

Multiple access protocol
Multiple access protocolMultiple access protocol
Multiple access protocol
Merlin Florrence
 
Congestion on computer network
Congestion on computer networkCongestion on computer network
Congestion on computer network
Disi Dc
 
Transport layer
Transport layer Transport layer
Transport layer
Mukesh Chinta
 
Distance Vector Routing Protocols
Distance Vector Routing ProtocolsDistance Vector Routing Protocols
Distance Vector Routing Protocols
KABILESH RAMAR
 
Unit 2 data link control
Unit 2 data link controlUnit 2 data link control
Unit 2 data link control
Vishal kakade
 
Computer networks - Channelization
Computer networks - ChannelizationComputer networks - Channelization
Computer networks - Channelization
Elambaruthi Elambaruthi
 
Multiple access control protocol
Multiple access control protocol Multiple access control protocol
Multiple access control protocol
meenamunesh
 
data-link layer protocols
data-link layer protocols  data-link layer protocols
data-link layer protocols
BE Smârt
 
Quality of Service
Quality of ServiceQuality of Service
Quality of Service
Abhishek Wadhwa
 
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
 
Flow control and error control
Flow control and error controlFlow control and error control
Flow control and error control
BHUVIJAYAVELU
 
The medium access sublayer
 The medium  access sublayer The medium  access sublayer
The medium access sublayer
Lal Bahadur Gehlot
 
Tcp
TcpTcp
Flow & Error Control
Flow & Error ControlFlow & Error Control
Flow & Error Control
tameemyousaf
 
Quality of Service
Quality  of  ServiceQuality  of  Service
Quality of Service
S. M. Shakib Limon
 
Mobile Network Layer
Mobile Network LayerMobile Network Layer
Mobile Network Layer
Rahul Hada
 
RANDOM ACCESS PROTOCOL IN COMMUNICATION
RANDOM ACCESS PROTOCOL IN COMMUNICATION           RANDOM ACCESS PROTOCOL IN COMMUNICATION
RANDOM ACCESS PROTOCOL IN COMMUNICATION
AMOGHA A K
 
Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP)Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP)
k33a
 
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESSComputer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Dr. SELVAGANESAN S
 
Congestion avoidance in TCP
Congestion avoidance in TCPCongestion avoidance in TCP
Congestion avoidance in TCP
selvakumar_b1985
 

What's hot (20)

Multiple access protocol
Multiple access protocolMultiple access protocol
Multiple access protocol
 
Congestion on computer network
Congestion on computer networkCongestion on computer network
Congestion on computer network
 
Transport layer
Transport layer Transport layer
Transport layer
 
Distance Vector Routing Protocols
Distance Vector Routing ProtocolsDistance Vector Routing Protocols
Distance Vector Routing Protocols
 
Unit 2 data link control
Unit 2 data link controlUnit 2 data link control
Unit 2 data link control
 
Computer networks - Channelization
Computer networks - ChannelizationComputer networks - Channelization
Computer networks - Channelization
 
Multiple access control protocol
Multiple access control protocol Multiple access control protocol
Multiple access control protocol
 
data-link layer protocols
data-link layer protocols  data-link layer protocols
data-link layer protocols
 
Quality of Service
Quality of ServiceQuality of Service
Quality of Service
 
Leaky Bucket & Tocken Bucket - Traffic shaping
Leaky Bucket & Tocken Bucket - Traffic shapingLeaky Bucket & Tocken Bucket - Traffic shaping
Leaky Bucket & Tocken Bucket - Traffic shaping
 
Flow control and error control
Flow control and error controlFlow control and error control
Flow control and error control
 
The medium access sublayer
 The medium  access sublayer The medium  access sublayer
The medium access sublayer
 
Tcp
TcpTcp
Tcp
 
Flow & Error Control
Flow & Error ControlFlow & Error Control
Flow & Error Control
 
Quality of Service
Quality  of  ServiceQuality  of  Service
Quality of Service
 
Mobile Network Layer
Mobile Network LayerMobile Network Layer
Mobile Network Layer
 
RANDOM ACCESS PROTOCOL IN COMMUNICATION
RANDOM ACCESS PROTOCOL IN COMMUNICATION           RANDOM ACCESS PROTOCOL IN COMMUNICATION
RANDOM ACCESS PROTOCOL IN COMMUNICATION
 
Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP)Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP)
 
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESSComputer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
 
Congestion avoidance in TCP
Congestion avoidance in TCPCongestion avoidance in TCP
Congestion avoidance in TCP
 

Viewers also liked

Socket System Calls
Socket System CallsSocket System Calls
Socket System Calls
Avinash Varma Kalidindi
 
Java Input Output and File Handling
Java Input Output and File HandlingJava Input Output and File Handling
Java Input Output and File Handling
Sunil OS
 
basics of file handling
basics of file handlingbasics of file handling
basics of file handling
pinkpreet_kaur
 
14 file handling
14 file handling14 file handling
14 file handling
APU
 
Routing Protocols and Concepts - Chapter 1
Routing Protocols and Concepts - Chapter 1Routing Protocols and Concepts - Chapter 1
Routing Protocols and Concepts - Chapter 1
CAVC
 
Java Course 8: I/O, Files and Streams
Java Course 8: I/O, Files and StreamsJava Course 8: I/O, Files and Streams
Java Course 8: I/O, Files and Streams
Anton Keks
 
Socket programming
Socket programmingSocket programming
Socket programming
chandramouligunnemeda
 

Viewers also liked (7)

Socket System Calls
Socket System CallsSocket System Calls
Socket System Calls
 
Java Input Output and File Handling
Java Input Output and File HandlingJava Input Output and File Handling
Java Input Output and File Handling
 
basics of file handling
basics of file handlingbasics of file handling
basics of file handling
 
14 file handling
14 file handling14 file handling
14 file handling
 
Routing Protocols and Concepts - Chapter 1
Routing Protocols and Concepts - Chapter 1Routing Protocols and Concepts - Chapter 1
Routing Protocols and Concepts - Chapter 1
 
Java Course 8: I/O, Files and Streams
Java Course 8: I/O, Files and StreamsJava Course 8: I/O, Files and Streams
Java Course 8: I/O, Files and Streams
 
Socket programming
Socket programmingSocket programming
Socket programming
 

Similar to Congestion control in TCP

Congestion Control
Congestion ControlCongestion Control
Congestion Control
Ram Dutt Shukla
 
Tcp Congestion Avoidance
Tcp Congestion AvoidanceTcp Congestion Avoidance
Tcp Congestion Avoidance
Ram Dutt Shukla
 
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
IOSR 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 Vegas
IOSR Journals
 
Tcp congestion avoidance
Tcp congestion avoidanceTcp congestion avoidance
Tcp congestion avoidance
Ahmed Kamel Taha
 
Mobile Transpot Layer
Mobile Transpot LayerMobile Transpot Layer
Mobile Transpot Layer
Maulik Patel
 
tcp congestion .pptx
tcp congestion .pptxtcp congestion .pptx
tcp congestion .pptx
ECE01AJAYS
 
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
 
Congestion control
Congestion controlCongestion control
Congestion control
Madhusudhan G
 
NetWork Design Question2.) How does TCP prevent Congestion Dicuss.pdf
NetWork Design Question2.) How does TCP prevent Congestion Dicuss.pdfNetWork Design Question2.) How does TCP prevent Congestion Dicuss.pdf
NetWork Design Question2.) How does TCP prevent Congestion Dicuss.pdf
optokunal1
 
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
ijceronline
 
Congestion control avoidance
Congestion control avoidanceCongestion control avoidance
Congestion control avoidance
Anthony-Claret Onwutalobi
 
Tcp performance simulationsusingns2
Tcp performance simulationsusingns2Tcp performance simulationsusingns2
Tcp performance simulationsusingns2
Justin Frankel
 
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
 
TCP_Congestion_Control.ppt
TCP_Congestion_Control.pptTCP_Congestion_Control.ppt
TCP_Congestion_Control.ppt
19UCSA032ASANJAYKUMA
 
Ch 18 intro to network layer - section 3
Ch 18   intro to network layer - section 3Ch 18   intro to network layer - section 3
Ch 18 intro to network layer - section 3
Hossam El-Deen Osama
 
Analysis of TCP variants
Analysis of TCP variantsAnalysis of TCP variants
Analytical Research of TCP Variants in Terms of Maximum Throughput
Analytical Research of TCP Variants in Terms of Maximum ThroughputAnalytical Research of TCP Variants in Terms of Maximum Throughput
Analytical Research of TCP Variants in Terms of Maximum Throughput
IJLT EMAS
 
Mcseminar
McseminarMcseminar
Mcseminar
Ankit Anand
 

Similar to Congestion control in TCP (20)

Congestion Control
Congestion ControlCongestion Control
Congestion Control
 
Tcp Congestion Avoidance
Tcp Congestion AvoidanceTcp Congestion Avoidance
Tcp Congestion Avoidance
 
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
 
Tcp congestion avoidance
Tcp congestion avoidanceTcp congestion avoidance
Tcp congestion avoidance
 
Mobile Transpot Layer
Mobile Transpot LayerMobile Transpot Layer
Mobile Transpot Layer
 
tcp congestion .pptx
tcp congestion .pptxtcp congestion .pptx
tcp congestion .pptx
 
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
 
Congestion control
Congestion controlCongestion control
Congestion control
 
NetWork Design Question2.) How does TCP prevent Congestion Dicuss.pdf
NetWork Design Question2.) How does TCP prevent Congestion Dicuss.pdfNetWork Design Question2.) How does TCP prevent Congestion Dicuss.pdf
NetWork Design Question2.) How does TCP prevent Congestion Dicuss.pdf
 
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
 
Congestion control avoidance
Congestion control avoidanceCongestion control avoidance
Congestion control avoidance
 
Tcp performance simulationsusingns2
Tcp performance simulationsusingns2Tcp performance simulationsusingns2
Tcp performance simulationsusingns2
 
High Performance Networking with Advanced TCP
High Performance Networking with Advanced TCPHigh Performance Networking with Advanced TCP
High Performance Networking with Advanced TCP
 
TCP Theory
TCP TheoryTCP Theory
TCP Theory
 
TCP_Congestion_Control.ppt
TCP_Congestion_Control.pptTCP_Congestion_Control.ppt
TCP_Congestion_Control.ppt
 
Ch 18 intro to network layer - section 3
Ch 18   intro to network layer - section 3Ch 18   intro to network layer - section 3
Ch 18 intro to network layer - section 3
 
Analysis of TCP variants
Analysis of TCP variantsAnalysis of TCP variants
Analysis of TCP variants
 
Analytical Research of TCP Variants in Terms of Maximum Throughput
Analytical Research of TCP Variants in Terms of Maximum ThroughputAnalytical Research of TCP Variants in Terms of Maximum Throughput
Analytical Research of TCP Variants in Terms of Maximum Throughput
 
Mcseminar
McseminarMcseminar
Mcseminar
 

More from selvakumar_b1985

Triggering transmission
Triggering transmissionTriggering transmission
Triggering transmission
selvakumar_b1985
 
Token ring
Token ringToken ring
Token ring
selvakumar_b1985
 
Subnetting
SubnettingSubnetting
Subnetting
selvakumar_b1985
 
Email Security
Email SecurityEmail Security
Email Security
selvakumar_b1985
 
RIP - Routing Information Protocol
RIP - Routing Information ProtocolRIP - Routing Information Protocol
RIP - Routing Information Protocol
selvakumar_b1985
 
Physical Mediums
Physical MediumsPhysical Mediums
Physical Mediums
selvakumar_b1985
 
OSPF - Routing Protocol
OSPF - Routing ProtocolOSPF - Routing Protocol
OSPF - Routing Protocol
selvakumar_b1985
 
Layering and Architecture
Layering and ArchitectureLayering and Architecture
Layering and Architecture
selvakumar_b1985
 
Issues in Data Link Layer
Issues in Data Link LayerIssues in Data Link Layer
Issues in Data Link Layer
selvakumar_b1985
 
Internetworking - IP
Internetworking - IPInternetworking - IP
Internetworking - IP
selvakumar_b1985
 
ICMP
ICMPICMP
Hybrid Channel Access Link
Hybrid Channel Access LinkHybrid Channel Access Link
Hybrid Channel Access Link
selvakumar_b1985
 
Hypertext Transfer Protocol
Hypertext Transfer ProtocolHypertext Transfer Protocol
Hypertext Transfer Protocol
selvakumar_b1985
 
Addressing Scheme IPv4
Addressing Scheme IPv4Addressing Scheme IPv4
Addressing Scheme IPv4
selvakumar_b1985
 
File Transfer Protocol
File Transfer ProtocolFile Transfer Protocol
File Transfer Protocol
selvakumar_b1985
 
Framing Protocols
Framing ProtocolsFraming Protocols
Framing Protocols
selvakumar_b1985
 
Flow Control
Flow ControlFlow Control
Flow Control
selvakumar_b1985
 
FDDI
FDDIFDDI
Ethernet
EthernetEthernet
Error control
Error controlError control
Error control
selvakumar_b1985
 

More from selvakumar_b1985 (20)

Triggering transmission
Triggering transmissionTriggering transmission
Triggering transmission
 
Token ring
Token ringToken ring
Token ring
 
Subnetting
SubnettingSubnetting
Subnetting
 
Email Security
Email SecurityEmail Security
Email Security
 
RIP - Routing Information Protocol
RIP - Routing Information ProtocolRIP - Routing Information Protocol
RIP - Routing Information Protocol
 
Physical Mediums
Physical MediumsPhysical Mediums
Physical Mediums
 
OSPF - Routing Protocol
OSPF - Routing ProtocolOSPF - Routing Protocol
OSPF - Routing Protocol
 
Layering and Architecture
Layering and ArchitectureLayering and Architecture
Layering and Architecture
 
Issues in Data Link Layer
Issues in Data Link LayerIssues in Data Link Layer
Issues in Data Link Layer
 
Internetworking - IP
Internetworking - IPInternetworking - IP
Internetworking - IP
 
ICMP
ICMPICMP
ICMP
 
Hybrid Channel Access Link
Hybrid Channel Access LinkHybrid Channel Access Link
Hybrid Channel Access Link
 
Hypertext Transfer Protocol
Hypertext Transfer ProtocolHypertext Transfer Protocol
Hypertext Transfer Protocol
 
Addressing Scheme IPv4
Addressing Scheme IPv4Addressing Scheme IPv4
Addressing Scheme IPv4
 
File Transfer Protocol
File Transfer ProtocolFile Transfer Protocol
File Transfer Protocol
 
Framing Protocols
Framing ProtocolsFraming Protocols
Framing Protocols
 
Flow Control
Flow ControlFlow Control
Flow Control
 
FDDI
FDDIFDDI
FDDI
 
Ethernet
EthernetEthernet
Ethernet
 
Error control
Error controlError control
Error control
 

Recently uploaded

Analysis and Design of Algorithm Lab Manual (BCSL404)
Analysis and Design of Algorithm Lab Manual (BCSL404)Analysis and Design of Algorithm Lab Manual (BCSL404)
Analysis and Design of Algorithm Lab Manual (BCSL404)
VishalMore197390
 
( Call  ) Girls Vasant Kunj Just 9873940964 High Class Model Shneha Patil
( Call  ) Girls Vasant Kunj Just 9873940964 High Class Model Shneha Patil( Call  ) Girls Vasant Kunj Just 9873940964 High Class Model Shneha Patil
( Call  ) Girls Vasant Kunj Just 9873940964 High Class Model Shneha Patil
kinni singh$A17
 
L-3536-Cost Benifit Analysis in ESIA.pptx
L-3536-Cost Benifit Analysis in ESIA.pptxL-3536-Cost Benifit Analysis in ESIA.pptx
L-3536-Cost Benifit Analysis in ESIA.pptx
naseki5964
 
Research Experience during my undergraduate study.pptx
Research Experience during my undergraduate study.pptxResearch Experience during my undergraduate study.pptx
Research Experience during my undergraduate study.pptx
gxz1691543945
 
Trends in Computer Aided Design and MFG.
Trends in Computer Aided Design and MFG.Trends in Computer Aided Design and MFG.
Trends in Computer Aided Design and MFG.
Tool and Die Tech
 
this slide shows husien hanafy portfolio 6-2024
this slide shows husien hanafy portfolio 6-2024this slide shows husien hanafy portfolio 6-2024
this slide shows husien hanafy portfolio 6-2024
hessenhanafy1
 
Press Tool and It's Primary Components.pdf
Press Tool and It's Primary Components.pdfPress Tool and It's Primary Components.pdf
Press Tool and It's Primary Components.pdf
Tool and Die Tech
 
UNIT I INCEPTION OF INFORMATION DESIGN 20CDE09-ID
UNIT I INCEPTION OF INFORMATION DESIGN 20CDE09-IDUNIT I INCEPTION OF INFORMATION DESIGN 20CDE09-ID
UNIT I INCEPTION OF INFORMATION DESIGN 20CDE09-ID
GOWSIKRAJA PALANISAMY
 
Lecture 3 Biomass energy...............ppt
Lecture 3 Biomass energy...............pptLecture 3 Biomass energy...............ppt
Lecture 3 Biomass energy...............ppt
RujanTimsina1
 
一比一原版(skku毕业证)韩国成均馆大学毕业证如何办理
一比一原版(skku毕业证)韩国成均馆大学毕业证如何办理一比一原版(skku毕业证)韩国成均馆大学毕业证如何办理
一比一原版(skku毕业证)韩国成均馆大学毕业证如何办理
hahehot
 
Social media management system project report.pdf
Social media management system project report.pdfSocial media management system project report.pdf
Social media management system project report.pdf
Kamal Acharya
 
Citrix Workspace - Diagrams and Icons.pptx
Citrix Workspace - Diagrams and Icons.pptxCitrix Workspace - Diagrams and Icons.pptx
Citrix Workspace - Diagrams and Icons.pptx
kriangkb1
 
system structure in operating systems.pdf
system structure in operating systems.pdfsystem structure in operating systems.pdf
system structure in operating systems.pdf
zyroxsunny
 
IWISS Catalog 2024
IWISS Catalog 2024IWISS Catalog 2024
IWISS Catalog 2024
Iwiss Tools Co.,Ltd
 
OCS Training - Rig Equipment Inspection - Advanced 5 Days_IADC.pdf
OCS Training - Rig Equipment Inspection - Advanced 5 Days_IADC.pdfOCS Training - Rig Equipment Inspection - Advanced 5 Days_IADC.pdf
OCS Training - Rig Equipment Inspection - Advanced 5 Days_IADC.pdf
Muanisa Waras
 
Enhancing Security with Multi-Factor Authentication in Privileged Access Mana...
Enhancing Security with Multi-Factor Authentication in Privileged Access Mana...Enhancing Security with Multi-Factor Authentication in Privileged Access Mana...
Enhancing Security with Multi-Factor Authentication in Privileged Access Mana...
Bert Blevins
 
Response & Safe AI at Summer School of AI at IIITH
Response & Safe AI at Summer School of AI at IIITHResponse & Safe AI at Summer School of AI at IIITH
Response & Safe AI at Summer School of AI at IIITH
IIIT Hyderabad
 
Development of Chatbot Using AI/ML Technologies
Development of  Chatbot Using AI/ML TechnologiesDevelopment of  Chatbot Using AI/ML Technologies
Development of Chatbot Using AI/ML Technologies
maisnampibarel
 
Coroutines Flow & Channels Workshop Slides
Coroutines Flow & Channels Workshop SlidesCoroutines Flow & Channels Workshop Slides
Coroutines Flow & Channels Workshop Slides
Morteza Nedaei
 
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
IJAEMSJORNAL
 

Recently uploaded (20)

Analysis and Design of Algorithm Lab Manual (BCSL404)
Analysis and Design of Algorithm Lab Manual (BCSL404)Analysis and Design of Algorithm Lab Manual (BCSL404)
Analysis and Design of Algorithm Lab Manual (BCSL404)
 
( Call  ) Girls Vasant Kunj Just 9873940964 High Class Model Shneha Patil
( Call  ) Girls Vasant Kunj Just 9873940964 High Class Model Shneha Patil( Call  ) Girls Vasant Kunj Just 9873940964 High Class Model Shneha Patil
( Call  ) Girls Vasant Kunj Just 9873940964 High Class Model Shneha Patil
 
L-3536-Cost Benifit Analysis in ESIA.pptx
L-3536-Cost Benifit Analysis in ESIA.pptxL-3536-Cost Benifit Analysis in ESIA.pptx
L-3536-Cost Benifit Analysis in ESIA.pptx
 
Research Experience during my undergraduate study.pptx
Research Experience during my undergraduate study.pptxResearch Experience during my undergraduate study.pptx
Research Experience during my undergraduate study.pptx
 
Trends in Computer Aided Design and MFG.
Trends in Computer Aided Design and MFG.Trends in Computer Aided Design and MFG.
Trends in Computer Aided Design and MFG.
 
this slide shows husien hanafy portfolio 6-2024
this slide shows husien hanafy portfolio 6-2024this slide shows husien hanafy portfolio 6-2024
this slide shows husien hanafy portfolio 6-2024
 
Press Tool and It's Primary Components.pdf
Press Tool and It's Primary Components.pdfPress Tool and It's Primary Components.pdf
Press Tool and It's Primary Components.pdf
 
UNIT I INCEPTION OF INFORMATION DESIGN 20CDE09-ID
UNIT I INCEPTION OF INFORMATION DESIGN 20CDE09-IDUNIT I INCEPTION OF INFORMATION DESIGN 20CDE09-ID
UNIT I INCEPTION OF INFORMATION DESIGN 20CDE09-ID
 
Lecture 3 Biomass energy...............ppt
Lecture 3 Biomass energy...............pptLecture 3 Biomass energy...............ppt
Lecture 3 Biomass energy...............ppt
 
一比一原版(skku毕业证)韩国成均馆大学毕业证如何办理
一比一原版(skku毕业证)韩国成均馆大学毕业证如何办理一比一原版(skku毕业证)韩国成均馆大学毕业证如何办理
一比一原版(skku毕业证)韩国成均馆大学毕业证如何办理
 
Social media management system project report.pdf
Social media management system project report.pdfSocial media management system project report.pdf
Social media management system project report.pdf
 
Citrix Workspace - Diagrams and Icons.pptx
Citrix Workspace - Diagrams and Icons.pptxCitrix Workspace - Diagrams and Icons.pptx
Citrix Workspace - Diagrams and Icons.pptx
 
system structure in operating systems.pdf
system structure in operating systems.pdfsystem structure in operating systems.pdf
system structure in operating systems.pdf
 
IWISS Catalog 2024
IWISS Catalog 2024IWISS Catalog 2024
IWISS Catalog 2024
 
OCS Training - Rig Equipment Inspection - Advanced 5 Days_IADC.pdf
OCS Training - Rig Equipment Inspection - Advanced 5 Days_IADC.pdfOCS Training - Rig Equipment Inspection - Advanced 5 Days_IADC.pdf
OCS Training - Rig Equipment Inspection - Advanced 5 Days_IADC.pdf
 
Enhancing Security with Multi-Factor Authentication in Privileged Access Mana...
Enhancing Security with Multi-Factor Authentication in Privileged Access Mana...Enhancing Security with Multi-Factor Authentication in Privileged Access Mana...
Enhancing Security with Multi-Factor Authentication in Privileged Access Mana...
 
Response & Safe AI at Summer School of AI at IIITH
Response & Safe AI at Summer School of AI at IIITHResponse & Safe AI at Summer School of AI at IIITH
Response & Safe AI at Summer School of AI at IIITH
 
Development of Chatbot Using AI/ML Technologies
Development of  Chatbot Using AI/ML TechnologiesDevelopment of  Chatbot Using AI/ML Technologies
Development of Chatbot Using AI/ML Technologies
 
Coroutines Flow & Channels Workshop Slides
Coroutines Flow & Channels Workshop SlidesCoroutines Flow & Channels Workshop Slides
Coroutines Flow & Channels Workshop Slides
 
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
 

Congestion control in TCP

  • 2. TCP Congestion Control  The idea of TCP congestion control is for each source to determine how much capacity is available in the network, so that it knows how many packets it can safely have in transit. – Once a given source has this many packets in transit, it uses the arrival of an ACK as a signal that one of its packets has left the network, and that it is therefore safe to insert a new packet into the network without adding to the level of congestion. – By using ACKs to pace the transmission of packets, TCP is said to be self- clocking. Additive Increase/Multiplicative Decrease: – TCP maintains a new state variable for each connection, called CongestionWindow, which is used by the source to limit how much data it is allowed to have in transit at a given time. – The congestion window is congestion control’s counterpart to flow control’s advertised window.
  • 3. TCP Congestion Control – TCP is modified such that the maximum number of bytes of unacknowledged data allowed is now the minimum of the congestion window and the advertised window. MaxWindow = MIN(CongestionWindow, AdvertisedWindow) EffectiveWindow = MaxWindow − (LastByteSent − LastByteAcked) – That is, MaxWindow replaces AdvertisedWindow in the calculation of EffectiveWindow. – Thus, a TCP source is allowed to send no faster than the slowest component—the network or the destination host—can accommodate. – The problem, of course, is how TCP comes to learn an appropriate value for CongestionWindow. – Unlike the AdvertisedWindow, which is sent by the receiving side of the connection, there is no one to send a suitable CongestionWindow to the sending side of TCP.
  • 4. TCP Congestion Control  The answer is that the TCP source sets the CongestionWindow based on the level of congestion it perceives to exist in the network.  This involves decreasing the congestion window when the level of congestion goes up and increasing the congestion window when the level of congestion goes down. Taken together, the mechanism is commonly called additive increase/multiplicative decrease (AIMD) – How does the source determine that the network is congested and that it should decrease the congestion window?  Based on the observation that the main reason packets are not delivered, and a timeout results, is that a packet was dropped due to congestion. It is rare that a packet is dropped because of an error during transmission.  Therefore, TCP interprets timeouts as a sign of congestion and reduces the rate at which it is transmitting.  Specifically, each time a timeout occurs, the source sets CongestionWindow to half of its previous value. This halving of the CongestionWindow for each timeout corresponds to the “multiplicative decrease” part of AIMD.  For example, suppose the CongestionWindow is currently set to 16 packets. If a loss is detected, CongestionWindow is set to 8.  Additional losses cause CongestionWindow to be reduced to 4, then 2, and finally to 1 packet.
  • 5. TCP Congestion Control  CongestionWindow is not allowed to fall below the size of a single packet, i.e., maximum segment size (MSS). – Increase the congestion window to take advantage of newly available capacity in the network. – This is the “additive increase” part of AIMD, and it works as follows.  Every time the source successfully sends a CongestionWindow’s worth of packets—that is, each packet sent out during the last RTT has been ACKed—it adds the equivalent of 1 packet to CongestionWindow.
  • 6. TCP Congestion Control – TCP does not wait for an entire window’s worth of ACKs to add 1 packet’s worth to the congestion window, but instead increments CongestionWindow by a little for each ACK that arrives. – Specifically, the congestion window is incremented as follows each time an ACK arrives: • Increment = MSS × (MSS/CongestionWindow) • CongestionWindow+= Increment • That is, rather than incrementing CongestionWindow by an entire MSS bytes each RTT, we increment it by a fraction of MSS every time an ACK is received. • Assuming that each ACK acknowledges the receipt of MSS bytes, then that fraction is MSS/CongestionWindow.
  • 7. TCP Congestion Control Slow Start  Additive Increase / Multiplicative Decrease is only suitable for source, that is operating close to the available capacity of the network, but it takes too long to ramp up a connection when it is starting from scratch.  slow start, that is used to increase the congestion window rapidly from a cold start.  Slow start effectively increases the congestion window exponentially, rather than linearly. – the source starts out by setting CongestionWindow to one packet. – When the ACK for this packet arrives, TCP adds 1 to CongestionWindow and then sends two packets. – Upon receiving the corresponding two ACKs, TCP increments CongestionWindow by 2—one for each ACK—and next sends four packets. – The end result is that TCP effectively doubles the number of packets it has in transit every RTT.
  • 9. TCP Congestion Control Two different situations in which slow start runs,  The first is at the very beginning of a connection, at which time the source has no idea how many packets it is going to be able to have in transit at a given time. − In this situation, slow start continues to double CongestionWindow each RTT until there is a loss, at which time a timeout causes multiplicative decrease to divide CongestionWindow by 2.  The second situation in which slow start is used is a bit more subtle; it occurs when the connection goes dead while waiting for a timeout to occur. − the source then uses slow start to restart the flow of data.  Specifically, the source has a current (and useful) value of CongestionWindow; this is the value of CongestionWindow that existed prior to the last packet loss, divided by 2 as a result of the loss.  This value used as the “target” congestion window also called as CongestionThreshold.
  • 10. TCP Congestion Control  Slow start is used to rapidly increase the sending rate up to this value, and then additive increase is used beyond this point. i.e., assume congestion window size is x at the time of timeout  A time out happens, causing the congestion window to be divided by 2, dropping the CongestionWindow size x to x/2 and CongestionThreshold is set to this amount (x/2).  CongestionWindow is reset to one packet, as the sender enters slow start.  Slow start increases the congestion window exponentially until it reaches CongestionThreshold .  CongestionWindow then grows linearly (i.e., it uses additive increase)
  • 11. TCP Congestion Control Fast Retrasnmit and Fast Recovery – The idea of fast retransmit is straightforward. Every time a data packet arrives at the receiving side, the receiver responds with an acknowledgment, even if this sequence number has already been acknowledged. – Thus, when a packet arrives out of order— that is, TCP cannot yet acknowledge the data the packet contains because earlier data has not yet arrived—TCP resends the same acknowledgment it sent the last time. – This second transmission of the same acknowledgment is called a duplicate ACK. – When the sending side sees a duplicate ACK, it knows that the other side must have received a packet out of order, which suggests that an earlier packet might have been lost. – Since it is also possible that the earlier packet has only been delayed rather than lost, the sender waits until it sees some number of duplicate ACKs and then retransmits the missing packet. In practice, TCP waits until it has seen three duplicate ACKs before retransmitting the packet.
  • 12. TCP Congestion Control – When the fast retransmit mechanism signals congestion, rather than drop the congestion window all the way back to one packet and run slow start, it is possible to use the ACKs that are still in the pipe to clock the sending of packets. – This mechanism, which is called fast recovery, effectively removes the slow start phase that happens between when fast retransmit detects a lost packet and additive increase begins.