SlideShare a Scribd company logo
1 of 7
Adaptive Flow Control
TCP Sliding Window
TCP Sliding Window provides,
 reliable delivery of data,
 data is delivered in order, and
 flow control between the sender and the receiver.
Reliable delivery and Ordered Delivery:
TCP Sliding Window
Sending Side
 LastByteAcked ≤ LastByteSent
- Receiver cannot acknowledge a byte that has not been sent.
 LastByteSent ≤ LastByteWritten
- TCP cannot send a byte that the application process has not yet written.
Left side of the LastByteAcked need not to be saved in the buffer.
Receiving Side
 LastByteRead < NextByteExpected
- All preceding bytes are already received.
- Byte cannot be read by application until it is received.
 NextByteExpected ≤ LastByteRcvd + 1
- If data has arrived in order, NextByteExpected points to the byte after
LastByteRcvd
- If data has arrives out of order, NextByteExpected points to the start of the first gap
in the data.
Bytes to the left of LastByteRead need not be buffered.
TCP Sliding Window
Flow Control
– Both sender and receiver buffer size is finite size, denoted by MaxSendBuffer,
MaxRcvBuffer.
– In sliding window, window size sets the amount of data that can be sent without
waiting for acknowledgement.
– Here receiver give the maximum window size for the sender by advertising a
window that is no larger than the data that it can buffer.
Receiver side must keep,
 LastByteRcvd – LastByteRead ≤ MaxRcvBuffer
- To avoid overflowing its buffer (Receive Buffer).
 AdvertisedWindow = MaxRcvBuffer – ((NextByteExpected -1) –
LastByteRead)
- Represents the amount of free space remaining in the buffer
Sender side must keep,
 LastByteSent – LastByteAcked ≤ AdvertisedWindow
 EffectiveWindow = AdvertisedWindow – (LastByteSent – LastByteAcked)
TCP Sliding Window
To avoid the overflow of the send buffer by local application process, sender must
make sure,
 LastByteWritten – LastByteAcked ≤ MaxSendBuffer
Protecting against Wraparound
 SequenceNum – 32 bit long
 AdvertisedWindow – 16 bit long
 Sequence number space is twice as big as window size.
Relevance of the 32-bit sequence number space
• The sequence number used on a given connection might wraparound
• A byte with sequence number x could be sent at one time, and then at a later time a
second byte with the same sequence number x could be sent
• Packets cannot survive in the Internet for longer than the MSL
• MSL is set to 120 sec
• We need to make sure that the sequence number does not wrap around within a 120-
second period of time.
TCP Sliding Window
Keeping the Pipe Full
• 16-bit AdvertisedWindow field must be big enough to allow the sender to keep
the pipe full.
TCP Sliding Window
• Clearly the receiver is free not to open the window as large as the
AdvertisedWindow field allows
• If the receiver has enough buffer space
– The window needs to be opened far enough to allow a full
– delay × bandwidth product’s worth of data
– Assuming an RTT of 100 ms
Required Window Size for 100ms RTT

More Related Content

What's hot

CS8591 Computer Networks - Unit IV
CS8591 Computer Networks - Unit IVCS8591 Computer Networks - Unit IV
CS8591 Computer Networks - Unit IVpkaviya
 
Transport Layer
Transport LayerTransport Layer
Transport Layertmavroidis
 
Unicasting , Broadcasting And Multicasting New
Unicasting , Broadcasting And Multicasting NewUnicasting , Broadcasting And Multicasting New
Unicasting , Broadcasting And Multicasting Newtechbed
 
Access control list [1]
Access control list [1]Access control list [1]
Access control list [1]Summit Bisht
 
Multiprotocol label switching (mpls) - Networkshop44
Multiprotocol label switching (mpls)  - Networkshop44Multiprotocol label switching (mpls)  - Networkshop44
Multiprotocol label switching (mpls) - Networkshop44Jisc
 
Computer Networking: Internet Protcol (IP) and IP Addressing
Computer Networking: Internet Protcol (IP) and IP AddressingComputer Networking: Internet Protcol (IP) and IP Addressing
Computer Networking: Internet Protcol (IP) and IP AddressingBisrat Girma
 
Transport Layer Services : Multiplexing And Demultiplexing
Transport Layer Services : Multiplexing And DemultiplexingTransport Layer Services : Multiplexing And Demultiplexing
Transport Layer Services : Multiplexing And DemultiplexingKeyur Vadodariya
 
Precision Time Protocol
Precision Time ProtocolPrecision Time Protocol
Precision Time ProtocolSteven Kreuzer
 

What's hot (20)

CS8591 Computer Networks - Unit IV
CS8591 Computer Networks - Unit IVCS8591 Computer Networks - Unit IV
CS8591 Computer Networks - Unit IV
 
TCP Vs UDP
TCP Vs UDP TCP Vs UDP
TCP Vs UDP
 
Tcp
TcpTcp
Tcp
 
Transport Layer
Transport LayerTransport Layer
Transport Layer
 
Unicasting , Broadcasting And Multicasting New
Unicasting , Broadcasting And Multicasting NewUnicasting , Broadcasting And Multicasting New
Unicasting , Broadcasting And Multicasting New
 
IGMP
IGMPIGMP
IGMP
 
OSI MODEL
    OSI MODEL    OSI MODEL
OSI MODEL
 
2g 3g
2g 3g2g 3g
2g 3g
 
Access control list [1]
Access control list [1]Access control list [1]
Access control list [1]
 
Multiprotocol label switching (mpls) - Networkshop44
Multiprotocol label switching (mpls)  - Networkshop44Multiprotocol label switching (mpls)  - Networkshop44
Multiprotocol label switching (mpls) - Networkshop44
 
Igmp presentation
Igmp presentationIgmp presentation
Igmp presentation
 
Congestion control in TCP
Congestion control in TCPCongestion control in TCP
Congestion control in TCP
 
Arp
ArpArp
Arp
 
What is XMPP Protocol
What is XMPP ProtocolWhat is XMPP Protocol
What is XMPP Protocol
 
Computer Networking: Internet Protcol (IP) and IP Addressing
Computer Networking: Internet Protcol (IP) and IP AddressingComputer Networking: Internet Protcol (IP) and IP Addressing
Computer Networking: Internet Protcol (IP) and IP Addressing
 
Arp and rarp
Arp and rarpArp and rarp
Arp and rarp
 
Addressing
AddressingAddressing
Addressing
 
Transport Layer Services : Multiplexing And Demultiplexing
Transport Layer Services : Multiplexing And DemultiplexingTransport Layer Services : Multiplexing And Demultiplexing
Transport Layer Services : Multiplexing And Demultiplexing
 
TCP/IP Presentation
TCP/IP PresentationTCP/IP Presentation
TCP/IP Presentation
 
Precision Time Protocol
Precision Time ProtocolPrecision Time Protocol
Precision Time Protocol
 

Similar to Adoptive flowcontrol in TCP

13_TCP_Attack.pptx
13_TCP_Attack.pptx13_TCP_Attack.pptx
13_TCP_Attack.pptxAlmaOraevi
 
Transmission control protocol
Transmission control protocolTransmission control protocol
Transmission control protocolSundra Anand
 
Lecture 5
Lecture 5Lecture 5
Lecture 5ntpc08
 
Transport layer
Transport layerTransport layer
Transport layersteffy1996
 
Flow control
Flow controlFlow control
Flow controlsteffy D
 
Flow control
Flow controlFlow control
Flow controlSTEFFY D
 
TCP protocol flow control
TCP protocol flow control TCP protocol flow control
TCP protocol flow control anuragjagetiya
 
tcpflowcontrolanurag-150513130509-lva1-app6892 (1).pptx
tcpflowcontrolanurag-150513130509-lva1-app6892 (1).pptxtcpflowcontrolanurag-150513130509-lva1-app6892 (1).pptx
tcpflowcontrolanurag-150513130509-lva1-app6892 (1).pptxGOKULKANNANMMECLECTC
 
Eshcol tech solutions pvt ltd
Eshcol tech solutions pvt ltdEshcol tech solutions pvt ltd
Eshcol tech solutions pvt ltdOjas Kumar
 
5-LEC- 5.pptxTransport Layer. Transport Layer Protocols
5-LEC- 5.pptxTransport Layer.  Transport Layer Protocols5-LEC- 5.pptxTransport Layer.  Transport Layer Protocols
5-LEC- 5.pptxTransport Layer. Transport Layer ProtocolsZahouAmel1
 
Mobile Transpot Layer
Mobile Transpot LayerMobile Transpot Layer
Mobile Transpot LayerMaulik Patel
 
Unit III IPV6 UDP
Unit III IPV6 UDPUnit III IPV6 UDP
Unit III IPV6 UDPsangusajjan
 

Similar to Adoptive flowcontrol in TCP (20)

Flow control
Flow controlFlow control
Flow control
 
Week5 lec3-bscs1
Week5 lec3-bscs1Week5 lec3-bscs1
Week5 lec3-bscs1
 
13_TCP_Attack.pptx
13_TCP_Attack.pptx13_TCP_Attack.pptx
13_TCP_Attack.pptx
 
Transmission control protocol
Transmission control protocolTransmission control protocol
Transmission control protocol
 
Week8 lec2-bscs1
Week8 lec2-bscs1Week8 lec2-bscs1
Week8 lec2-bscs1
 
Lecture 5
Lecture 5Lecture 5
Lecture 5
 
Transport layer
Transport layerTransport layer
Transport layer
 
Flow control
Flow controlFlow control
Flow control
 
Flow control
Flow controlFlow control
Flow control
 
TCP protocol flow control
TCP protocol flow control TCP protocol flow control
TCP protocol flow control
 
Working of TCP
Working of TCP Working of TCP
Working of TCP
 
tcpflowcontrolanurag-150513130509-lva1-app6892 (1).pptx
tcpflowcontrolanurag-150513130509-lva1-app6892 (1).pptxtcpflowcontrolanurag-150513130509-lva1-app6892 (1).pptx
tcpflowcontrolanurag-150513130509-lva1-app6892 (1).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
 
5-LEC- 5.pptxTransport Layer. Transport Layer Protocols
5-LEC- 5.pptxTransport Layer.  Transport Layer Protocols5-LEC- 5.pptxTransport Layer.  Transport Layer Protocols
5-LEC- 5.pptxTransport Layer. Transport Layer Protocols
 
Osi model
Osi modelOsi model
Osi model
 
TCP/IP
TCP/IPTCP/IP
TCP/IP
 
Mobile Transpot Layer
Mobile Transpot LayerMobile Transpot Layer
Mobile Transpot Layer
 
Unit III IPV6 UDP
Unit III IPV6 UDPUnit III IPV6 UDP
Unit III IPV6 UDP
 
Tcp(no ip) review part1
Tcp(no ip) review part1Tcp(no ip) review part1
Tcp(no ip) review part1
 

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

Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxhumanexperienceaaa
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
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
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
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
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
High Profile Call Girls Nagpur 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
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
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
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 

Recently uploaded (20)

Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
 
★ 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
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
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🔝
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
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
 
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)
 
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...
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
High Profile Call Girls Nagpur 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
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
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
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 

Adoptive flowcontrol in TCP

  • 2. TCP Sliding Window TCP Sliding Window provides,  reliable delivery of data,  data is delivered in order, and  flow control between the sender and the receiver. Reliable delivery and Ordered Delivery:
  • 3. TCP Sliding Window Sending Side  LastByteAcked ≤ LastByteSent - Receiver cannot acknowledge a byte that has not been sent.  LastByteSent ≤ LastByteWritten - TCP cannot send a byte that the application process has not yet written. Left side of the LastByteAcked need not to be saved in the buffer. Receiving Side  LastByteRead < NextByteExpected - All preceding bytes are already received. - Byte cannot be read by application until it is received.  NextByteExpected ≤ LastByteRcvd + 1 - If data has arrived in order, NextByteExpected points to the byte after LastByteRcvd - If data has arrives out of order, NextByteExpected points to the start of the first gap in the data. Bytes to the left of LastByteRead need not be buffered.
  • 4. TCP Sliding Window Flow Control – Both sender and receiver buffer size is finite size, denoted by MaxSendBuffer, MaxRcvBuffer. – In sliding window, window size sets the amount of data that can be sent without waiting for acknowledgement. – Here receiver give the maximum window size for the sender by advertising a window that is no larger than the data that it can buffer. Receiver side must keep,  LastByteRcvd – LastByteRead ≤ MaxRcvBuffer - To avoid overflowing its buffer (Receive Buffer).  AdvertisedWindow = MaxRcvBuffer – ((NextByteExpected -1) – LastByteRead) - Represents the amount of free space remaining in the buffer Sender side must keep,  LastByteSent – LastByteAcked ≤ AdvertisedWindow  EffectiveWindow = AdvertisedWindow – (LastByteSent – LastByteAcked)
  • 5. TCP Sliding Window To avoid the overflow of the send buffer by local application process, sender must make sure,  LastByteWritten – LastByteAcked ≤ MaxSendBuffer Protecting against Wraparound  SequenceNum – 32 bit long  AdvertisedWindow – 16 bit long  Sequence number space is twice as big as window size. Relevance of the 32-bit sequence number space • The sequence number used on a given connection might wraparound • A byte with sequence number x could be sent at one time, and then at a later time a second byte with the same sequence number x could be sent • Packets cannot survive in the Internet for longer than the MSL • MSL is set to 120 sec • We need to make sure that the sequence number does not wrap around within a 120- second period of time.
  • 6. TCP Sliding Window Keeping the Pipe Full • 16-bit AdvertisedWindow field must be big enough to allow the sender to keep the pipe full.
  • 7. TCP Sliding Window • Clearly the receiver is free not to open the window as large as the AdvertisedWindow field allows • If the receiver has enough buffer space – The window needs to be opened far enough to allow a full – delay × bandwidth product’s worth of data – Assuming an RTT of 100 ms Required Window Size for 100ms RTT