36

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?

21

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.

| improve this answer | |
29

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 (Path MTU Discovery).

Note that IPv6 does NOT support packet fragmentation by routers, hence PMTUD with ICMPv6 is mandatory if you don't want to lose a 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 negotiated 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.

| improve this answer | |
  • 4
    Clatification: IPv6 doesn't support fragmentation in routers however end stations may fragment IPv6 packets – Mike Pennington Jun 8 '14 at 17:24
  • 1
    Edited my answer to be more specific – Remi Letourneau Jun 8 '14 at 23:26
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) )

| improve this answer | |
  • I think TCP header is not necessarily 20 bytes, that's just the minimal length? – Sajuuk Jul 1 '19 at 8:09
  • there could be an additional options header – aneesh joshi Jul 25 '19 at 14:19

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