0

We know that instead of send a packet and wait a RTT then send another(stop and wait), TCP use pipelined sending as picture below shows: enter image description here

enter image description here

so my question is, what's the maximum packets can be send in the pipeline without considering flow control and congestion control (what's the window size of TCP pipelined sending)

  • This isn't a great question. The diagrams, above, express a fundamental misunderstanding of how IP and TCP operate. We're not concerned with when any given bit of any IP packet arrives. Additionally, the relationship among the above diagrams seems nonsensical. I suggest readers make more of an effort to understand how TCP functions before trying to characterize it using their own terminology. – Jeff Wheeler Aug 21 at 10:16
3

so my question is, how many packets can be send in the pipeline (what's the window size of TCP pipelined sending)

There is no single answer for that. The window size changes as the receiver sends ACKs back to the sender. It is up to the receiver as to the window size, which is based on octets, not segments.

RFC 793, Transmission Control Protocol explains:

Flow Control:

TCP provides a means for the receiver to govern the amount of data sent by the sender. This is achieved by returning a "window" with every ACK indicating a range of acceptable sequence numbers beyond the last segment successfully received. The window indicates an allowed number of octets that the sender may transmit before receiving further permission.

| improve this answer | |
  • 1
    That really does not make any sense because the window is the flow control. That is the reason for the window. The receiver will set the window, and it can be very large, or even set to 0. – Ron Maupin Aug 21 at 2:19
  • 1
    You cannot ask about the maximum packets (really segments, not packets). TCP is a stream protocol, and it measures in octets. Different segment can be of different sizes. "does TCP has a standard to allocate a fixed size for sender's and receiver's buffers?" No, it does not. TCP has the receiver set the window size in the SYN and modify it on the fly in the ACK. – Ron Maupin Aug 21 at 2:33
  • 1
    "But then it means receiver can configure its own buffer size and set it to whatever it wants for example, 10mb or even 1gb which is not practical?" Yes, that is the case. The receiver can set its receive window to what it wants, up to the limit imposed by the Window field size (16 bits will be zero to a maximum of 65,535). It is up to the host OS, but OS-specific implementations are off-topic here. "Window: 16 bits The number of data octets beginning with the one indicated in the acknowledgment field which the sender of this segment is willing to accept." – Ron Maupin Aug 21 at 3:45
  • 1
    @RonMaupin Don't forget TCP's window scale option which allows window sizes approaching 1 GiB. – Zac67 Aug 21 at 7:04
  • 1
    @Zac67, yes, of course, but I think that when someone is quoting from a textbook, bringing options into it can really confuse them more than sticking to the straight TCP theory, especially in the comments that have deviated from the original question. The OP seems to have a particular concept stuck in his head, and I really just want to dispel the idea that windowing can be decoupled from flow control. – Ron Maupin Aug 21 at 13:05
0

The TCP window uses 16 bits. This means the maximum size of the TCP window is 65,536 bytes (216). This creates a problem; to fill up the 100 Mbps pipe over a path with 80ms of latency we must use a TCP window of 1 MB, but the TCP window can only grow to 65 10 Answers. The absolute limitation on TCP packet size is 64K (65535 bytes), but in practicality this is far larger than the size of any packet you will see, because the lower layers (e.g. ethernet) have lower packet sizes. The MTU (Maximum Transmission Unit) for Ethernet, for instance, is 1500 bytes.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.