1

This page says the following:

TCP controls this maximum size, known as Maximum Segment Size (MSS), for each TCP connection. For direct-attached networks, TCP computes the MSS by using the MTU size of the network interface and then subtracting the protocol headers to come up with the size of data in the TCP packet. For example, Ethernet with a MTU of 1500 would result in a MSS of 1460 after subtracting 20 bytes for IPv4 header and 20 bytes for TCP header.

Shouldn't the number of bytes of the Ethernet header be subtracted too?

2 Answers 2

1

Shouldn't the number of bytes of the Ethernet header be subtracted too?

No. The MTU is the size of the data-link payload. With ethernet, the MTU is 1500 octets, and that is exclusive of the ethernet frame (header and FCS). The MTU does include the IP header, which is 20 to 60 octets for IPv4, and 40 octets for IPv6. The IP packet payload would contain the TCP segment that also includes the TCP header of 20 to 60 octets.

You must subtract the IP and TCP headers to calculate the MSS: 40 to 120 octets for IPv4/TCP (MSS of 1380 to 1460), and 60 to 100 octets for IPv6/TCP (MSS of 1400 to 1440).

0

There are two different MTUs. Ethernet MTU and IP MTU. When calculating TCP MSS, the result is obtained by subtracting the "IP MTU" value. 1460 bytes, just like the result you calculated. You can monitor TCP MSS default value with wireshark. Under the Option property in TCP Header, you can observe the MSS value represented by 4 bytes of information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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