Calculate the optimal maximum transmission unit for a network path.
The MTU (Maximum Transmission Unit) is the largest packet size a network link can carry in a single frame — 1500 bytes for standard Ethernet, or up to 9000 bytes for 'jumbo frames' on networks that support them. If a payload plus its headers exceeds the MTU, it must be split into multiple fragments, each carrying its own header overhead, which reduces the useful data ratio and adds reassembly work at the destination. Path MTU Discovery is the mechanism modern stacks use to avoid fragmentation by finding the smallest MTU along a route.
Fragment count
fragments = ceil(payload_size / (MTU − header_overhead))
1500 bytes is the standard Ethernet MTU, defined by the original Ethernet II frame format. This has remained the default across most LANs and the public internet for decades.
Jumbo frames raise the MTU to typically 9000 bytes, reducing the number of packets (and thus header overhead and CPU interrupts) needed to move the same amount of data. They're common in data center and storage networks but must be supported end-to-end to be useful.
Routers either fragment the packet into smaller pieces (adding overhead and reassembly work) or, if the Don't Fragment (DF) bit is set, drop the packet and return an ICMP 'Fragmentation Needed' message so the sender can reduce its packet size.
Every fragment needs its own copy of the packet headers (IP, and sometimes TCP), so splitting one large packet into several smaller ones multiplies the header bytes sent, reducing the fraction of the transmission that's actual payload data.