- Bronze, 100 points or more
Hi every body.
How are my net pro friends doing?
I have few question about the about the data field in tcp header. I asked this question almost 7 month ago, as i was reading through my post, another question arose in my mind.
we know that whether the fragmentation occurs or not depends upon the data link layer 's mtu, for example for ethernet has MTU of 1500 bytes. So if the ip packet is 3000 bytes long,then network layer has to perform fragmentation of the packet in case of ethernet. The question remains what would be maximum data could be put in the tcp segment as it is data field 's size is not fixed.
Thanks and have a great weekend.
Yes, that should be about it. TCP can carry options as well but with standard header sizes, the numbers match.
However, I must admit that I do not quite understand why you should want to know this.As you probably know, there is no LAN protocol today which can carry such a large payload. The now obscure 16Mbit Token Ring could handle about 16k and Jumbo frames on Gigabit Ethernet are generally supporting payloads of around 9000 bytes although the absolute max is higher.
The TCP header does not have a length field as such. The size of the packet is kept in the IP header's 'Total length' field.
Perhaps you are referring to the "Window Size" in the TCP header?
This is something different; it serves to indicate to the peer how much data can be accepted. (Without requiring an ACK).
In absolute figures, both fields are 16 bits long so the highest value they can hold is 65535 (64kByte).
An ip packet of 3000 bytes contains the following:
ip header, 20 bytes
tcp header 20 bytes
data 2960 bytes.
When sending this over a link with mtu=1500 you get the following:
packet 1: 40 bytes ip+tcp header and 1460 bytes of data.
packet 2: 40 bytes ip+tcp header and another 1460 bytes of data.
By now, 2920 out of 2960 bytes have been sent, the remainder goes in the last fragment.
packet 3: 40 bytes ip+tcp header and 40 bytes of data.