Normally the MTU size should be set correctly using Path MTU discovery, but this may not always work.
The trouble is that the problems caused by an incorrect MTU size can be quite subtle, for example it may be possible to browse to a web server using but for file transfers to fail, or for connections to a chat server to work, but for the information about who is on-line to be incomplete or missing.
If you suspect that the problem is the MTU size then the first problem is to work out what the MTU size is for the network link. To do this you can use ‘ping’ to send a packet of the required size with the do not fragment bit set (it is also a good idea to use a packet count of one as there isn’t any point in sending more network traffic than you need to).
Note – The size specified in the ping command is actually the number of data bytes to send so this needs to be 28 bytes smaller than the actual packet size to allow for size of the packet header.
As a first attempt I’ve (rather optimistically) chosen an MTU size of 1500 bytes, this would be normal on a LAN but if very unlikely to work on an internet connection!
In my case I already know the MTU size is 1492 bytes so I’ll try that next.
If you didn’t know the MTU size you could then just try different values until you found the largest one that worked, but there is a quicker way (depending on your version of ping).