How to calculate MSS

19.6k Views Asked by At

By default when we say about MSS for TCP ethernet packet 1460 and MTU is 1500.

MSS = MTU - 20(IP header) - 20(TCP Header) = 1460

from the above the TCP header is calculated without any options in TCP header. In case if any packet consists option value in TCP header it will reduce the MSS size or not?

Then what will be the MSS size presence of option in TCP header

2

There are 2 best solutions below

0
On

Your correct in thinking the MSS shrinks when IP/TCP options are added.

MSS = MTU - (20(IP header) + len(IP Options)) - (20(TCP Header) + len(TCP Options))

The other main reason it would be lowered is if the packet is being encapsulated in some way (IPsec/GTP) since that adds overhead to the packet.

0
On

The MSS won't decrease at all, however if IP, TCP options were there the MSS value will be 1460 only for ethernet. The options will be the part of sender data part, so sender need to reduce the data part while adding IP or TCP options on the header. Refer the following page

http://tools.ietf.org/html/rfc6691