SlideShare a Scribd company logo
1 of 22
TRANSPORT LAYER
DONE BY:
STEFFY
THIRD YEAR CSE -B
B.S.ABDUR RAHMAN UNIVERSITY
Contents
TCP Flow Control
• Host has a receiver buffer on each side of TCP
connection.
• Data will be placed in the receive buffer only if
the received data is correct.
• Application process running on the receiver host
will read data from this buffer.
Problem arises……
• Receiving application may be busy with
some other work.
• Data has to wait for a long time until it is read
by application process which is running on
host(receiver).
• Sender can easily overflow the receiver
buffer by sending too much of data quickly.
• To overcome this problem ,TCP provides
flow control service to its applications.
Continues….
• Flow control is a speed matching service the
rate at which sender is sending , against the rate
at the receiving application is reading.
• TCP provides flow control by having the sender
maintain a variable called the receive window.
• The receiver window is used to give the sender a
number of free buffer space is available at the
receiver.
• Since TCP is full duplex, sender at each side of
the connection will maintains a receiver
window.
File Transfer scenario
Host A Host B
TCP connection
Large file
Receiver Buffer
• Variables used in this scenario:
1.LastByteRead
2.LastByteRcvd
• Receive window is represented by RcvWindow
• RcvWindow=RcvBuffer-[LastByteRcvd-LastByteRead]
• TCP is not allow the sender to overflow the allocated receiver
buffer.
• LastByteRcvd-LastByteRead <=RcvBuffer.
• Spare room is changes with time, RcvWindow is dynamic.
How RcvWindow is used?
• Host B tells Host A no of spare room available in its
connection buffer.
• By placing the current value of RcvWindow in the
receive Window field of every segment it sends to A.
• Initially , RcvWindow=RcvBuffer
• Host A keep track of two variables:
1.LastByteSent
2.LastByteAcked
• LastByteSent - LastByteAcked=No of Unacknowledged
data
Continues….
• By keeping the unacknowledged
data value less than the value of
RcvWindow, Host A ensure that it
does not overflow the RcvBuffer at
Host B.
• LastByteSent-LastByteAcked <=
RcvWindow
TCP Connection Management
Client Server
Client- server scenario :In which process running in one host (client)
wants to connects with the process running on the other host (server).
Connection………
• Client application process informs the
client TCP that it wants to establish a
connection to a process in the server.
• Client TCP proceeds to establish a
connection with TCP in the server in the
following manner.
Establish a connection(1)
• Step 1: client TCP send a special segment to
server side TCP which does not contains
application layer data.
• SYN bit in client segment header will be set to 1.
• So , this segment is called as SYN segment.
• Client chooses an random sequence
number(client_isn) and placed this number in the
sequence number field of TCP client SYN
segment.
• This segment is encapsulated with IP datagram
and sent to the server.
Establish a connection(2)
• Step 2: Once TCP datagram arrives at server host , it extracts
the TCP SYN segment from the datagram allocates the TCP
buffers and variables to the connection and sends a
connection granted segment to the client TCP.
• This segment also contains no application data.
• It contains 3 important information:
1.SYN bit set to 1
2.Acknowledgement field of TCP segment
header is set to client_isn+1.
3.Own sequence number(server_isn)
Connection segment is also referred as SYNACK segment.
Establish a connection(3)
• Step 3: Once client receives the connection granted
segment , client also allocates buffers and variables to
the connection.
• Client sends a host a another segment which
acknowledges the server connection granted segment
by putting the server_isn+1(server sequence
number)in the acknowledgement field of the TCP
segment header.
• SYN bit is set to zero , since connection gets
established.
• In order to establish a connection, three packets are
sent between two hosts, Therefore this connection
procedure referred as three-way hand shake.
Closing a connection
• Step 1: client end system sends TCP FIN
set to 1 control segment to server
• Step 2: server receives FIN, replies with
ACK. Closes connection, sends FIN set to
1.
• Step 3: client receives FIN, replies with
ACK. Enters “timed wait” -will respond
with ACK to received FINs
• Step 4: server, receives ACK. Connection
closed.
Note: At this point ,all resources in the host
will be deallocated.
Client Life cycle
Server LifeCycle
RTT Estimation
• How to estimate RTT?
Sample RTT for a segment is the amount
of time between when the segment is sent
and when an acknowledgement for the
segment is received.
• TCP never computes a sample RTT for a
segments that has been retransmitted ; it
only computes sample RTT for a segment
that has been transmitted.
Continues ……
• Sample RTT values will be fluctuate from one
segment to segment due to congestion in routers.
• Because of this fluctuation , some RTT value may
be atypical.
• So, in order to estimate the typical RTT ,there is a
need to take a average of all sample RTT values.
• After obtaining new sampleRTT,TCP updates
EstimateRTT by
• EstimateRTT=(1- α).EstimatedRTT +
α.sampleRTT
Continues…….
• In the above formula,
1. EstimatedRTT is the weighted combinations of the
previous value of estimated RTT and the new value for
sample RTT.
2. α=0.125
Formula will be,
EstimateRTT=0.875.EstimatedRTT +
0.125.sampleRTT.
Now the EstimatedRTT is the weighted
average of the sample RTT values.
Such an average is called Exponential weighted
moving average
RTT: gaia.cs.umass.edu to fantasia.eurecom.fr
100
150
200
250
300
350
1 8 15 22 29 36 43 50 57 64 71 78 85 92 99 106
time (seconnds)
RTT(milliseconds)
SampleRTT Estimated RTT
Thank you

More Related Content

What's hot

What's hot (20)

Flow Control
Flow ControlFlow Control
Flow Control
 
Go back-n protocol
Go back-n protocolGo back-n protocol
Go back-n protocol
 
go back n protocol
go back n protocolgo back n protocol
go back n protocol
 
Importance of sliding window protocol
Importance of sliding window protocolImportance of sliding window protocol
Importance of sliding window protocol
 
Sliding window protocol
Sliding window protocolSliding window protocol
Sliding window protocol
 
Cse3213 11 flow_errorcontrol_f2010
Cse3213 11 flow_errorcontrol_f2010Cse3213 11 flow_errorcontrol_f2010
Cse3213 11 flow_errorcontrol_f2010
 
6 data linkcontrol
6  data linkcontrol6  data linkcontrol
6 data linkcontrol
 
Chapter 11
Chapter 11Chapter 11
Chapter 11
 
Advance Repeat reQuest (ARQ)
Advance Repeat reQuest (ARQ)Advance Repeat reQuest (ARQ)
Advance Repeat reQuest (ARQ)
 
Sliding window and error control
Sliding window and error controlSliding window and error control
Sliding window and error control
 
Simplex stop and_wait_protocol
Simplex stop and_wait_protocolSimplex stop and_wait_protocol
Simplex stop and_wait_protocol
 
GO BACK N PROTOCOL
GO BACK N PROTOCOLGO BACK N PROTOCOL
GO BACK N PROTOCOL
 
Ch 11
Ch 11Ch 11
Ch 11
 
Selective repeat protocol
Selective repeat protocolSelective repeat protocol
Selective repeat protocol
 
Error control
Error controlError control
Error control
 
Stop And Wait ARQ
Stop And Wait ARQStop And Wait ARQ
Stop And Wait ARQ
 
Adoptive retransmission in TCP
Adoptive retransmission in TCPAdoptive retransmission in TCP
Adoptive retransmission in TCP
 
Week5 lec2-bscs1
Week5 lec2-bscs1Week5 lec2-bscs1
Week5 lec2-bscs1
 
Data link control
Data link controlData link control
Data link control
 
3a data link layer continued
3a data link layer continued3a data link layer continued
3a data link layer continued
 

Viewers also liked

Viewers also liked (14)

Quiz show
Quiz showQuiz show
Quiz show
 
Surya_Iseries_Resume
Surya_Iseries_ResumeSurya_Iseries_Resume
Surya_Iseries_Resume
 
SWISS BULLION
SWISS BULLIONSWISS BULLION
SWISS BULLION
 
Article
ArticleArticle
Article
 
1 s2.0-0022199679900175-main
1 s2.0-0022199679900175-main1 s2.0-0022199679900175-main
1 s2.0-0022199679900175-main
 
Elasticityofdemand
ElasticityofdemandElasticityofdemand
Elasticityofdemand
 
Gyasi et al, 2015b
Gyasi et al, 2015bGyasi et al, 2015b
Gyasi et al, 2015b
 
P.C.MISHRA Resume
P.C.MISHRA ResumeP.C.MISHRA Resume
P.C.MISHRA Resume
 
Kmc presentation
Kmc presentationKmc presentation
Kmc presentation
 
Chapter 13 presidency
Chapter 13 presidencyChapter 13 presidency
Chapter 13 presidency
 
HRAD_PAHTA_-_Justin_Jauk
HRAD_PAHTA_-_Justin_JaukHRAD_PAHTA_-_Justin_Jauk
HRAD_PAHTA_-_Justin_Jauk
 
Saleem Lawati CV
Saleem Lawati CVSaleem Lawati CV
Saleem Lawati CV
 
SWISSWAY 1500
SWISSWAY 1500SWISSWAY 1500
SWISSWAY 1500
 
Trane: Pasos para automatizar un hogar y oficina sin cables
Trane: Pasos para automatizar un hogar y oficina sin cables Trane: Pasos para automatizar un hogar y oficina sin cables
Trane: Pasos para automatizar un hogar y oficina sin cables
 

Similar to Flow control

Similar to Flow control (20)

Computer networks unit iv
Computer networks    unit ivComputer networks    unit iv
Computer networks unit iv
 
Working of TCP
Working of TCP Working of TCP
Working of TCP
 
TCP/IP
TCP/IPTCP/IP
TCP/IP
 
4. tcp header.ppt
4. tcp header.ppt4. tcp header.ppt
4. tcp header.ppt
 
Unit-4 (1).pptx
Unit-4 (1).pptxUnit-4 (1).pptx
Unit-4 (1).pptx
 
Mobile computing-tcp data flow control
Mobile computing-tcp data flow controlMobile computing-tcp data flow control
Mobile computing-tcp data flow control
 
Network performance overview
Network  performance overviewNetwork  performance overview
Network performance overview
 
TCP protocol flow control
TCP protocol flow control TCP protocol flow control
TCP protocol flow control
 
Socket网络编程
Socket网络编程Socket网络编程
Socket网络编程
 
Tcp(no ip) review part1
Tcp(no ip) review part1Tcp(no ip) review part1
Tcp(no ip) review part1
 
tcpflowcontrolanurag-150513130509-lva1-app6892 (1).pptx
tcpflowcontrolanurag-150513130509-lva1-app6892 (1).pptxtcpflowcontrolanurag-150513130509-lva1-app6892 (1).pptx
tcpflowcontrolanurag-150513130509-lva1-app6892 (1).pptx
 
CCNA (R & S) Module 01 - Introduction to Networks - Chapter 9
CCNA (R & S) Module 01 - Introduction to Networks - Chapter 9CCNA (R & S) Module 01 - Introduction to Networks - Chapter 9
CCNA (R & S) Module 01 - Introduction to Networks - Chapter 9
 
NE #1.pptx
NE #1.pptxNE #1.pptx
NE #1.pptx
 
TCP_NISCHAYBAHL.pptx
TCP_NISCHAYBAHL.pptxTCP_NISCHAYBAHL.pptx
TCP_NISCHAYBAHL.pptx
 
Traffic Characterization
Traffic CharacterizationTraffic Characterization
Traffic Characterization
 
13_TCP_Attack.pptx
13_TCP_Attack.pptx13_TCP_Attack.pptx
13_TCP_Attack.pptx
 
Eshcol tech solutions pvt ltd
Eshcol tech solutions pvt ltdEshcol tech solutions pvt ltd
Eshcol tech solutions pvt ltd
 
Olumide pidan b
Olumide pidan bOlumide pidan b
Olumide pidan b
 
Transmission control protocol
Transmission control protocolTransmission control protocol
Transmission control protocol
 
Transport Layer Description By Varun Tiwari
Transport Layer Description By Varun TiwariTransport Layer Description By Varun Tiwari
Transport Layer Description By Varun Tiwari
 

Recently uploaded

APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
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
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...ranjana rawat
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 

Recently uploaded (20)

APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
★ 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
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
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...
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 

Flow control

  • 1. TRANSPORT LAYER DONE BY: STEFFY THIRD YEAR CSE -B B.S.ABDUR RAHMAN UNIVERSITY
  • 3. TCP Flow Control • Host has a receiver buffer on each side of TCP connection. • Data will be placed in the receive buffer only if the received data is correct. • Application process running on the receiver host will read data from this buffer.
  • 4. Problem arises…… • Receiving application may be busy with some other work. • Data has to wait for a long time until it is read by application process which is running on host(receiver). • Sender can easily overflow the receiver buffer by sending too much of data quickly. • To overcome this problem ,TCP provides flow control service to its applications.
  • 5. Continues…. • Flow control is a speed matching service the rate at which sender is sending , against the rate at the receiving application is reading. • TCP provides flow control by having the sender maintain a variable called the receive window. • The receiver window is used to give the sender a number of free buffer space is available at the receiver. • Since TCP is full duplex, sender at each side of the connection will maintains a receiver window.
  • 6. File Transfer scenario Host A Host B TCP connection Large file Receiver Buffer
  • 7. • Variables used in this scenario: 1.LastByteRead 2.LastByteRcvd • Receive window is represented by RcvWindow • RcvWindow=RcvBuffer-[LastByteRcvd-LastByteRead] • TCP is not allow the sender to overflow the allocated receiver buffer. • LastByteRcvd-LastByteRead <=RcvBuffer. • Spare room is changes with time, RcvWindow is dynamic.
  • 8. How RcvWindow is used? • Host B tells Host A no of spare room available in its connection buffer. • By placing the current value of RcvWindow in the receive Window field of every segment it sends to A. • Initially , RcvWindow=RcvBuffer • Host A keep track of two variables: 1.LastByteSent 2.LastByteAcked • LastByteSent - LastByteAcked=No of Unacknowledged data
  • 9. Continues…. • By keeping the unacknowledged data value less than the value of RcvWindow, Host A ensure that it does not overflow the RcvBuffer at Host B. • LastByteSent-LastByteAcked <= RcvWindow
  • 10. TCP Connection Management Client Server Client- server scenario :In which process running in one host (client) wants to connects with the process running on the other host (server).
  • 11. Connection……… • Client application process informs the client TCP that it wants to establish a connection to a process in the server. • Client TCP proceeds to establish a connection with TCP in the server in the following manner.
  • 12. Establish a connection(1) • Step 1: client TCP send a special segment to server side TCP which does not contains application layer data. • SYN bit in client segment header will be set to 1. • So , this segment is called as SYN segment. • Client chooses an random sequence number(client_isn) and placed this number in the sequence number field of TCP client SYN segment. • This segment is encapsulated with IP datagram and sent to the server.
  • 13. Establish a connection(2) • Step 2: Once TCP datagram arrives at server host , it extracts the TCP SYN segment from the datagram allocates the TCP buffers and variables to the connection and sends a connection granted segment to the client TCP. • This segment also contains no application data. • It contains 3 important information: 1.SYN bit set to 1 2.Acknowledgement field of TCP segment header is set to client_isn+1. 3.Own sequence number(server_isn) Connection segment is also referred as SYNACK segment.
  • 14. Establish a connection(3) • Step 3: Once client receives the connection granted segment , client also allocates buffers and variables to the connection. • Client sends a host a another segment which acknowledges the server connection granted segment by putting the server_isn+1(server sequence number)in the acknowledgement field of the TCP segment header. • SYN bit is set to zero , since connection gets established. • In order to establish a connection, three packets are sent between two hosts, Therefore this connection procedure referred as three-way hand shake.
  • 15. Closing a connection • Step 1: client end system sends TCP FIN set to 1 control segment to server • Step 2: server receives FIN, replies with ACK. Closes connection, sends FIN set to 1. • Step 3: client receives FIN, replies with ACK. Enters “timed wait” -will respond with ACK to received FINs • Step 4: server, receives ACK. Connection closed. Note: At this point ,all resources in the host will be deallocated.
  • 18. RTT Estimation • How to estimate RTT? Sample RTT for a segment is the amount of time between when the segment is sent and when an acknowledgement for the segment is received. • TCP never computes a sample RTT for a segments that has been retransmitted ; it only computes sample RTT for a segment that has been transmitted.
  • 19. Continues …… • Sample RTT values will be fluctuate from one segment to segment due to congestion in routers. • Because of this fluctuation , some RTT value may be atypical. • So, in order to estimate the typical RTT ,there is a need to take a average of all sample RTT values. • After obtaining new sampleRTT,TCP updates EstimateRTT by • EstimateRTT=(1- α).EstimatedRTT + α.sampleRTT
  • 20. Continues……. • In the above formula, 1. EstimatedRTT is the weighted combinations of the previous value of estimated RTT and the new value for sample RTT. 2. α=0.125 Formula will be, EstimateRTT=0.875.EstimatedRTT + 0.125.sampleRTT. Now the EstimatedRTT is the weighted average of the sample RTT values. Such an average is called Exponential weighted moving average
  • 21. RTT: gaia.cs.umass.edu to fantasia.eurecom.fr 100 150 200 250 300 350 1 8 15 22 29 36 43 50 57 64 71 78 85 92 99 106 time (seconnds) RTT(milliseconds) SampleRTT Estimated RTT