How to calculate MSS

velpandian picture velpandian · Mar 28, 2014 · Viewed 15.8k times · Source

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

Answer

AdamR picture AdamR · Feb 8, 2019

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.