Tags:


Forum Replies

  1. Hi Zaman,

    Originally the window size is a 16 bit value so the largest window size would be 65535. We couldn't add more bits to the TCP header but it was possible to reassign the purpose of those 16 bits.

    What we do nowadays is that we use a scaling factor so that we can use higher window sizes.

    For example, the window size value is 400 and the scaling factor is 64.

    400 x 64 = 25600

    In my lesson one of the screenshots also showed a windows size of 132480.

    Window size value = 2070
    Window size scaling factor = 64

    2070 x 64 = 132480

    Here's a short explanation of the relative sequence and ACK numbers:

    TCP Header explained

    Rene

  2. Really excellent explanation on a very difficult topic. The wireshark captures really illustrate the points. This is the best way I have seen this topic described to get the idea across.

  3. Hello Azm

    Yes, these numbers can be confusing. Here is an attempt to clarify these parameters:

    The first thing to keep in mind is that in any TCP communication, there are actually TWO sequence numbers and TWO acknowledgement numbers: those of each party in the exchange of data. For the sake of this example, and for the diagram below, let's call these SNL and SNR for Sequence Number Left and Sequence Number Right for the left and right hosts. Similarly, the acknowledgement numbers will be called ANL and ANR.

    Note, these abbreviations are my own and are not generally accepted. I am using them only for the purpose of this example.

    Take a look at this diagram:

    The current state of this diagram is when the three way handshake has already been completed and transmission of data has begun. The current window size is 10.

    So, the left host begins transmitting and sends a frame where SNL is 1 and ANL is 1. The SNL and ANL have been determined after the procedure of the three way handshake. (To find out how these are initially determined, take a look at Rene's lesson here: https://networklessons.com/cisco/ccna-routing-switching/introduction-to-tcp-and-udp/ )

    Since the window size is 10, the left host will send 10 bytes (this can be sent in one or more segments) and the header of the segment will have an SNL of 1 and an ANL of 1. Once 10 bytes are sent (the window size) the left host will stop.

    The right host will continue to receive data and will do nothing until 10 bytes have been received. Once they have been received, it will compose an acknowledgement segment with the following information:

    SNR = 1 This has been determined after the three way handshake. Note this is independent of the SNL
    ANR = SNL + window size = 11 This essentially is the number of the next expected byte

    Once this acknowledgement segment is received by the left host, it prepares the next batch of bytes to be sent, specifically, 10 since the window size is 10. In the segment it sends, it puts the following values:

    SNL = ANR = 11
    ANL = SNR + 1 = 2

    And the process continues.

    I hope this has been helpful!

    Laz

  4. Hello Laz,
    Thanks for taking the time to explain it to me and I am feeling like I am almost there. I just need clarifications for a few more questions. I was always thinking that when one host is sending some data to another host, the sender will break that piece of data into smaller pieces(called segment in transport layer) and puts a tag(sequence number) on every single segment so the other end(receiver) can organize them in the right order by using the sequence numbers.
    According to your explanation, it seems like what I knew was completely wrong because you are referring sequence number to window size(the amount of data is being sent). So what is the mechanism a receiver uses to track every single segment and organize them in the proper meaningful order?
    One more thing is very confusing to me. In Rene's tutorial, he is saying "H1 has setup a connection with H2 by using the 3 way handshake. We are sending 10 bytes of Data which means our “window size” is 10 bytes. The sequence number is 10", but in your example even though when Left device is sending the first chunk of data of 10 bytes, still the sequence number is 1. I am not sure why. Would you please explain it to me? I thought the sequence number would be 10 since Left device is sending 10 bytes of data.
    What field of a packet represents how much data that packet is carrying?

    Thank you so much for your great help.

    Best Regards,
    Azm Uddin

  5. Hello Laz,
    Once again SPECTACULAR. Thanks for your great help.

    Azm

25 more replies! Ask a question or join the discussion by visiting our Community Forum