Please Whitelist This Site?

I know everyone hates ads. But please understand that I am providing premium content for free that takes hundreds of hours of time to research and write. I don't want to go to a pay-only model like some sites, but when more and more people block ads, I end up working for free. And I have a family to support, just like you. :)

If you like The TCP/IP Guide, please consider the download version. It's priced very economically and you can read all of it in a convenient format without ads.

If you want to use this site for free, I'd be grateful if you could add the site to the whitelist for Adblock. To do so, just open the Adblock menu and select "Disable on tcpipguide.com". Or go to the Tools menu and select "Adblock Plus Preferences...". Then click "Add Filter..." at the bottom, and add this string: "@@||tcpipguide.com^$document". Then just click OK.

Thanks for your understanding!

Sincerely, Charles Kozierok
Author and Publisher, The TCP/IP Guide


NOTE: Using software to mass-download the site degrades the server and is prohibited.
If you want to read The TCP/IP Guide offline, please consider licensing it. Thank you.

The Book is Here... and Now On Sale!

Get The TCP/IP Guide for your own computer.
The TCP/IP Guide

Custom Search







Table Of Contents  The TCP/IP Guide
 9  TCP/IP Lower-Layer (Interface, Internet and Transport) Protocols (OSI Layers 2, 3 and 4)
      9  TCP/IP Transport Layer Protocols
           9  Transmission Control Protocol (TCP) and User Datagram Protocol (UDP)
                9  TCP/IP Transmission Control Protocol (TCP)
                     9  TCP Message Formatting and Data Transfer

Previous Topic/Section
TCP Maximum Segment Size (MSS) and Relationship to IP Datagram Size
Previous Page
Pages in Current Topic/Section
123
4
56
Next Page
TCP Immediate Data Transfer: "Push" Function
Next Topic/Section

TCP Sliding Window Data Transfer and Acknowledgement Mechanics
(Page 4 of 6)

The Relationship Between Send and Receive Pointers

The SND and RCV pointers are complementary, of course, just as the categories are, with each device managing both the sending of its data and receiving of data from its peer. Assuming we have a client and a server, then:

  • Client: The SND pointers keep track of the client's outgoing data stream; the RCV pointers refer to the data coming in from the server. The client’s SND categories correspond to the server’s RCV categories.

  • Server: The SND pointers keep track of the server's outgoing data stream; the RCV pointers refer to the data being received from the client. The server’s SND categories correspond to the client’s RCV categories.
TCP Segment Fields Used to Exchange Pointer Information

Since the SND and RCV values are complementary, the send window of one device is the receive window of the other, and vice-versa. Note, however, that the values of the pointers do not always line up exactly between the two devices, because at any given time, some bytes may be in transit between the two. Figure 220, for example, shows the receive pointers of the recipient prior to receiving bytes 32 to 45, which are shown in transit in Figure 219.

Both SND and RCV pointers are all maintained in the transmission control block (TCB) for the connection held by each device. As data is exchanged the pointers are updated, and communication about the state of the send and receive streams is exchanged using control fields in the TCP segment format. The three most important ones are:

  • Sequence Number: Identifies the sequence number of the first byte of data in the segment being transmitted. This will normally be equal to the value of the SND.UNA pointer at the time that data is sent.

  • Acknowledgment Number: Acknowledges the receipt of data by specifying the sequence number that the sender of the segment expects in the segment recipient's next transmission. This field will normally be equal to the RCV.NXT pointer of the device that sends it.

  • Window: The size of the receive window of the device sending the segment (and thus, the send window of the device receiving the segment.)

The Acknowledgment Number field is critical because this is what a device uses to tell its peer what segments it has received. The system is cumulative: the Acknowledgment Number field says “I have received all data bytes with sequence numbers less than this value”. This means if a client receives many segments of data from a server in rapid succession, it can acknowledge all of them using a single number, as long as they are contiguous. If they are not contiguous, then things get more complicated.

Key Concept: Three essential fields in the TCP segment format are used to implement the sliding windows system. The Sequence Number field indicates the number of the first byte of data being transmitted. The Acknowledgment Number is used to acknowledge data received by the device sending this segment. The Window field tells the recipient of the segment the size to which it should set its send window.



Previous Topic/Section
TCP Maximum Segment Size (MSS) and Relationship to IP Datagram Size
Previous Page
Pages in Current Topic/Section
123
4
56
Next Page
TCP Immediate Data Transfer: "Push" Function
Next Topic/Section

If you find The TCP/IP Guide useful, please consider making a small Paypal donation to help the site, using one of the buttons below. You can also donate a custom amount using the far right button (not less than $1 please, or PayPal gets most/all of your money!) In lieu of a larger donation, you may wish to consider purchasing a download license of The TCP/IP Guide. Thanks for your support!
Donate $2
Donate $5
Donate $10
Donate $20
Donate $30
Donate: $



Home - Table Of Contents - Contact Us

The TCP/IP Guide (http://www.TCPIPGuide.com)
Version 3.0 - Version Date: September 20, 2005

© Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved.
Not responsible for any loss resulting from the use of this site.