MSS vs MTU – What is the Difference Between MSS and MTU?

layer3layer4mtupppoetcp

I'm confused as to the difference between maximum segment size and a maximum transmission unit.

Can someone please explain in relation to layers 2 and 3?

If I had a packet of 800 bytes in the payload. Would it be correct to say that the MSS would be 800 bytes (If I set it to be that) and the MTU would be 840? TCP 20 and IP 20 bytes. Would it be any different if I was doing PPPoE?

Best Answer

In addition, MSS value is derived from the MTU. Consider that you have data of 2260 bytes to be sent to a remote device. If MTU is 1500, and we consider IP header + TCP header to be 40 bytes, then only 1460 bytes of data can be sent in the first IP packet. The remaining 800 bytes will be sent in the second IP packet. So, for MSS = 800, the MTU should be at least 840.

As PPPoE overhead is 8 bytes, and therefore MTU = 1492 bytes, and MSS = 1492-40 = 1452 bytes.