What is the difference between MSS and MTU?

26

7

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?

NetworkNinja

Posted 2014-06-08T04:30:45.857

Reputation: 216

While this isn't strictly speaking a duplicate the answer to this question may also answer your question.

– YLearn – 2014-06-08T06:27:37.863

Answers

16

In addition. MSS value derives from the value MTU, if you have a 800-byte packet, it can also say that such a packet was originally 2260 bytes long, and he broke into 2 packet 1460 + 800 bytes, if we use MTU = 1500.
You say is true, if you 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.

t3mp

Posted 2014-06-08T04:30:45.857

Reputation: 535

25

The MTU is the Maximum IP packet size for a given link. Packets bigger than the MTU is fragmented at the point where the lower MTU is found and reassembled further down the chain.

If no fragmentation is wanted, either you have to check the MTU at each hop or use a helper protocol for that (PMTUD)

Note that IPv6 does NOT support packet fragmentation by routers, hence PMTUD with ICMPv6 is mandatory if you don't want to loose packet somewhere because of small MTU. Endpoints can fragment, but not routers Also, IPv6 has a much higher MINIMUM MTU.

MSS is Maximum TCP segment Size. Unlike MTU, packet exceeding MSS aren't fragmented, they're simply discarded. MSS is normally decided in the TCP three-way handshake, but some setup might yield path where the decided upon MSS is still too big, leading to dropped packets. The MSS isn't negociated packet per packet, but for a complete TCP session, nor does it take into account TCP/IP headers

When using PPPoE, all the overhead means you needs to reduce the MSS on the way, normally by specifying it on the router where the chokepoint is found, which will then replace the MSS of passing threeway handshake by the correct lower value if it's higher. PPPoE is simply adding 8 bytes (6 bytes PPPoE + 2 bytes PPP) on top of everything (IP+TCP) and is meant to be run over Ethernet at 1500 bytes MTU, hence the 1492 MSS normally configured to make it go through.

Your IP stack will chop off data to be sent up to the MSS, put it in a TCP segment, then put it in one or more IP packets (depending if it's bigger than local MTU settings) before sending it. Intermediate router could chop it down further if they have lower MTU, but they're only affecting the IP Packet itself, not playing into the TCP segment/header.

Remi Letourneau

Posted 2014-06-08T04:30:45.857

Reputation: 1 596

4Clatification: IPv6 doesn't support fragmentation in routers however end stations may fragment IPv6 packets – Mike Pennington – 2014-06-08T17:24:55.053

1Edited my answer to be more specific – Remi Letourneau – 2014-06-08T23:26:09.303

0

MTU is maximum IP packet size of a given link. MSS is Maximum TCP segment size.

MTU is used for fragmentation i.e packet larger than MTU is fragmented.But in case of MSS, packet larger than MSS is discarded.

MSS is specified during TCP handshake basically in SYN and its value can't be changed after the connection is established.

MSS=MTU-40(IP header(20 bytes) + TCP header(20 bytes) )

Prayag Singh

Posted 2014-06-08T04:30:45.857

Reputation: 1