Introduction
A link can accept an IP packet only up to a certain size. An additional tunnel or a smaller link elsewhere on the path can reduce the amount of application data that fits in one packet.
Formula and calculation
payload = IP MTU − IP header − transport header − additional overheadThis model uses 20 bytes for the IPv4 base header, 40 for IPv6, 20 for the TCP base header, and 8 for UDP. Additional bytes are entered by the user. Link-layer framing is excluded.
- IP MTU · bytes
- maximum modeled IP packet size on the link
- overhead · bytes
- additional IP or transport bytes supplied to the tool
Count bytes at the correct layer
An interface IP MTU gives the largest IP packet that the interface can carry in one link-layer transmission unit. For an Ethernet IP MTU of 1500 bytes, the IP header belongs inside that budget. The Ethernet header and frame check sequence are outside it. A product that reports a frame limit may use a different convention.
Separate the link limit from the path limit
The path MTU is the smallest link MTU along a particular path. IPv6 routers that cannot forward an oversized packet send an ICMPv6 Packet Too Big message toward the sender. The sender can reduce subsequent packets. IPv6 fragmentation, when used, takes place at the source.
An interface can successfully carry small messages even when larger packets encounter a downstream limit. A record of the path, packet size and encapsulation helps interpret such a symptom.
Budget headers once
For a given packet, subtract each actual IP, transport and encapsulation header from the available bytes. The IPv4 base header is normally 20 bytes, the IPv6 base header 40, UDP 8 and the minimum TCP header 20. IPv4 options, IPv6 extensions and TCP options all occupy additional space. TCP maximum segment size describes TCP data bytes and does not describe the full IP packet.
Diagram
- 1500-byte outer IP budget
- 40-byte outer header
- 1460-byte inner packet
- Inner headers and data
Worked examples
Size a datagram inside a tunnel
- An IPv6-in-IPv6 path carries outer packets up to 1500 bytes. Assume base IPv6 headers and UDP inside, with no extensions or other encapsulation.
- Subtract the outer 40 bytes to get an inner packet budget of 1460. Subtract another 40 for the inner IPv6 header and 8 for UDP.
- Up to 1412 bytes of UDP data fit. Check the sum of 40 + 40 + 8 + 1412 = 1500 before documenting the application limit.
MTU Calculator: Fit TCP data and options in a 1500-byte IPv4 packet
- Choose a 1500-byte IP MTU and IPv4 with TCP. The base headers take 20 + 20 = 40 bytes, leaving 1460 bytes.
- Suppose this packet carries 12 more bytes of TCP options and padding. Enter 12 as additional overhead.
- The data budget is 1448 bytes. Reassemble the packet on paper: 20 bytes of IPv4 + 32 bytes of TCP + 1448 bytes of data = 1500.
Reference table
| IP MTU | Headers in this example | Data bytes |
|---|---|---|
| 1500 | IPv4 + UDP, 20 + 8 | 1472 |
| 1500 | IPv6 + UDP, 40 + 8 | 1452 |
| 1500 | IPv6 + TCP, 40 + 20 | 1440 |
| 1280 | IPv6 + UDP, 40 + 8 | 1232 |
Configuration example
- Record the physical interface MTU, tunnel encapsulation and configured inner MTU independently.
- When a service adds optional protocol headers, account for their actual lengths and document the assumptions next to any payload limit.
Common mistakes
- Subtracting Ethernet headers from an already specified IP MTU.
- Treating a local 1500-byte setting as proof of the complete path's MTU.
Frequently asked questions
Why does a small request succeed while a large transfer stalls?
An MTU mismatch is one possible explanation. Compare the affected sizes with interface and tunnel budgets and any existing Packet Too Big reports. Application timeouts and loss can produce similar symptoms.
Can every IPv6 application send 1280 data bytes in one 1280-byte packet?
The 1280-byte budget includes IPv6 and transport headers. For base IPv6 and UDP, 1232 data bytes remain.
Does MTU include Ethernet headers?
An IP MTU usually describes the largest IP packet carried by a link. Ethernet framing adds link-layer bytes outside that IP packet size.
Why can a smaller path MTU cause a connection to hang?
If oversized packets are dropped and the sender does not learn a usable path size, larger transfers can stall while small exchanges succeed. Path MTU discovery depends on correct feedback handling.
Do tunnels reduce the usable inner packet size?
Encapsulation adds outer headers, consuming part of the underlay MTU. Tunnel designs must account for the overhead or adjust inner MTU and segmentation behavior.
Is a larger MTU always faster?
No. Larger packets reduce per-packet overhead in some cases, but every device and path segment must support them. Mismatches can cause loss or fragmentation.
What is the difference between IP MTU and TCP MSS?
MTU is the maximum IP packet size a link can carry. TCP MSS is the maximum TCP payload size advertised by an endpoint, usually accounting for IP and TCP headers.
Can IPv6 routers fragment packets in transit?
No. IPv6 routers do not fragment forwarded packets. A source can use an IPv6 Fragment header, and Path MTU Discovery helps the sender choose a usable size.
What happens if an IPv6 packet exceeds a link MTU?
A router drops it and sends an ICMPv6 Packet Too Big message so the source can adjust. Filtering that control message can cause path-MTU problems.
Why can reducing an interface MTU fix a tunnel issue?
A lower inner MTU leaves room for tunnel headers in the outer path. It can avoid oversized encapsulated packets, though it should be set based on the actual path and overhead.
What is Path MTU Discovery?
It is a mechanism for learning the smallest packet size supported along a route. IPv4 and IPv6 use different feedback and fragmentation rules, but both depend on control messages being handled correctly.
Does TCP MSS include IP options?
MSS represents the maximum TCP data portion. A sender must still account for actual IP and TCP header sizes, including options, when fitting a segment into the path MTU.
Can a VLAN tag reduce Ethernet's available IP packet size?
A VLAN tag adds frame-header bytes. The configured Ethernet MTU often still describes the IP payload, but hardware frame limits and path accounting should be checked explicitly.
Why might small pings work while large transfers fail?
Small packets may fit where larger packets do not. Filtering or mishandling MTU feedback can leave a connection partially working until a larger packet is sent.
Should I set every interface to a jumbo MTU?
No. Jumbo frames require support across the full relevant path. Set them only where the network design and all intermediate devices have been verified.

