Question

I find the mtu value to a my server from my linux host by issuing:

ping -s 1312 my.sever.com  --> 100% successful
ping -s 1313 my.sever.com  --> 100% failed

So I assume my max MTU is 1340 (1312 + 28).

However, when I capture a http post from my java client to that server, I can see a tcp package with size 1354 in wireshark and the whole request/response is successful.

4 0.054168000 my.ip -> server.ip TCP 1354 80 59060  [TCP segment of a reassembled PDU]

I was wondering how it can be successful with a package size > max MTU size?

Thanks,

Was it helpful?

Solution

The Internet Protocol implements datagram fragmentation, breaking it into smaller pieces, so that packets may be formed that can pass through a node with a smaller maximum transmission unit than the original datagram size. In a case where a router receives a protocol data unit larger than the next hop's MTU, it has two options: drop the PDU and send an ICMP message which indicates the condition packet too big, or fragment the IP packet.

See

OTHER TIPS

If you are capturing packets on the server then you might see TCP sending out larger segments than the MTU. The packets on the wire , however, will be MTU size only. You can verify this by capturing on a network device (switch) etc. Alternatively capturing packets on the remote (client) machine will reveal that each packet is <= MTU .

This behaviour is due to the fact that with TSO/GSO enabled, the TCP segment is split into MTU sized packets by NIC hardware. Since tcpdump captures at software layer, it sees segments larger than the MTU being sent to the NIC card for further transfer.

If you disable tso/gso for the NIC, then you will see all outgoing packets to be <= MTU size (more likely pMTU size).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top