The Path MTU discovery, documented with the RFC1191, is a technique for dynamically discovering the
maximum transmission unit (MTU) of an arbitrary internet path, with the goal of avoiding IP fragmentation.
It works using an IP header bit called the Don't fragment bit. Usually when a gateway forwards a packet from a network to another with
an MTU value that's smaller than the packet size, the packet gets fragmented in smaller parts (called fragments).
Instead if the Don't fragment bit is set in the IP header, the gateway
will refuse to fragment the packet, and will instead send an ICMP error of type Fragmentation required but Don't fragment big set to the source of
the packet. The error will quote part of the original packet, so the source has a way to know that it must use packets with a minor length when sending
to a given destination. The sender will try with smaller packets, if still an ICMP error will return, it will try again with a smaller packet and so on,
until the outgoing packets will be smaller enough to ensure no fragmentation will occur.
Other sources of information:
Path MTU, MTU, Path MTU spoofing