Hi every body!
My book shows different examples of tcp segments.
one example shows a tcp segment carrying 1000 bytes of data, while the other example shows 550 bytes of data being carried in data field of tcp segment .
The question how is the number of bytes of data that can be carried in single segment determined?
Thanks a lot!
During the TCP 3-way handshake, one of the option fields is the "mss" or maximum segment size. This number is the maximum size of the data field. This number is calculated by subtracting layer 3 and layer 4 overhead (20 bytes each) from the interface mtu number (1500 bytes by default). For this example, you would see an mss of 1460 but its possible to see mss lower (google returns 1430).
If one machines is configured differently and sends a mss that is either higher or lower than your mss, then both machines will use the lower of the two mss's. You can also have your router modify the MSS on the fly by using the interface command "tcp adjust-mss" which will rewrite the mss on every tcp syn packet that crosses that interface.
Please rate is you find this helpful.
Without looking it up, my guess it might be as much as 64 KB. This assuming a 16 bit field is used for segment size.
Thing to keep in mind, TCP isn't specific to one media's MTU although segment size normally not generated larger than the MTU can sustain.