Introduction
Add payload and header sizes to calculate an IP packet budget for TCP or UDP. 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
IP packet = payload + IP header + transport header + additional headersThe calculator adds the selected base header sizes and extra header bytes. Link framing is excluded, and the modeled IP packet cannot exceed the IPv4 65,535-byte limit used by this worksheet.
- payload · bytes
- application data carried by the transport
- additional headers · bytes
- extra bytes supplied for options or encapsulation
Method and concepts
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.
- Enter the quantities in the units or notation shown by the input labels.
- Calculate and compare the output with the worked example.
MTU and packet payload diagram
- 1500-byte outer IP budget
- 40-byte outer header
- 1460-byte inner packet
- Inner headers and data
Worked examples
Build a UDP datagram
- Enter 1200 payload bytes, IPv4, UDP and zero additional header bytes.
- The ordinary packet occupies 1200 + 20 + 8 = 1228 bytes before link framing.
MTU and packet payload: 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.
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 |
Reading the result
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.
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.
Further learning and references
- RFC 8200 · IPv6 packet size
Reference source for the concepts and service described in this guide.
- RFC 8201 · IPv6 path MTU discovery

