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!

Searchable, convenient, complete TCP/IP information.
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 Fundamentals and General Operation

Previous Topic/Section
TCP Data Handling and Processing: Streams, Segments and Sequence Numbers
Previous Page
Pages in Current Topic/Section
12345
6
789
Next Page
TCP Ports, Connections and Connection Identification
Next Topic/Section

TCP Sliding Window Acknowledgment System For Data Transport, Reliability and Flow Control
(Page 6 of 9)

Sequence Number Assignment and Synchronization

The sender and receiver must agree on the sequence numbers to assign to the bytes in the stream. This is called synchronization and is done when the TCP connection is established. For simplicity, let's assume the first byte was sent with sequence number 1 (this is not normally the case). Thus, in our example the byte ranges for the four categories are:

  1. Bytes Sent And Acknowledged: Bytes 1 to 31.

  2. Bytes Sent But Not Yet Acknowledged: Bytes 32 to 45.

  3. Bytes Not Yet Sent For Which Recipient Is Ready: Bytes 46 to 51.

  4. Bytes Not Yet Sent For Which Recipient Is Not Ready: Bytes 52 to 95.
The Send Window and Usable Window

The key to the operation of the entire process is the number of bytes that the recipient is allowing the transmitter to have unacknowledged at one time. This is called the send window, or often, just the window. The window is what determines how many bytes the sender is allowed to transmit, and is equal to the sum of the number of bytes in Category #2 and Category #3. Thus, the dividing line between the last two categories (bytes not sent that recipient is ready for and ones it is not ready for) is determined by adding the window to the byte number of the first unacknowledged byte in the stream. In our example above, the first unacknowledged byte is #32. The total window size is 20.


Figure 207: TCP Transmission Stream Categories and Send Window Terminology

This diagram shows the same categories as Figure 206, with the send window indicated as well. The black box is the overall send window (categories #2 and #3 combined); the gray represents the bytes already sent (category #2) and the red box is the usable window (category #3).

 


The term usable window is defined as the amount of data the transmitter is still allowed to send given the amount of data that is outstanding. It is thus exactly equal to the size of Category #3. You may also commonly hear mention of the edges of the window. The left edge marks the first byte in the window (byte 32 above). The right edge marks the last byte in the window (byte 51). Please see Figure 207 for a graphical view of these concepts.

Key Concept: The send window is the key to the entire TCP sliding window system: it represents the maximum number of unacknowledged bytes a device is allowed to have outstanding at once. The usable window is the amount of the send window that the sender is still allowed to send at any point in time; it is equal to the size of the send window less the number of unacknowledged bytes already transmitted.



Previous Topic/Section
TCP Data Handling and Processing: Streams, Segments and Sequence Numbers
Previous Page
Pages in Current Topic/Section
12345
6
789
Next Page
TCP Ports, Connections and Connection Identification
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.