IPsec MTU: How to Choose the Right Size and Troubleshoot Problems

Learn how IPsec encapsulation affects MTU, how to calculate a starting value, and how to diagnose fragmentation and connectivity issues.


IPsec MTU is the largest inner packet that can pass through an IPsec tunnel without exceeding the underlying path’s packet-size limit. Because IPsec adds headers, encryption data, and sometimes padding, the tunnel’s usable MTU is lower than the MTU of the network carrying it. A value near 1,400 bytes is often a practical starting point for Ethernet-based tunnels, but the right setting depends on the encapsulation and path. Measure and test rather than relying on a universal number.
Editor's pick: NordVPN — fast, secure VPN — Strong encryption, a no-logs policy and apps for every device. 30-day money-back guarantee. Get NordVPN →
Typical IPsec encapsulation overhead and MTU impact
| Encapsulation or condition | Added overhead | Inner MTU impact | What to check |
|---|---|---|---|
| Outer IP header | IPv4 or IPv6 header | Reduces available space | Outer IP version |
| ESP header and trailer | Header, padding, trailer | Reduces available space | ESP mode and settings |
| ESP authentication | Integrity data | Reduces available space | Authentication algorithm |
| UDP encapsulation | UDP header | Further reduces available space | NAT traversal |
| Tunnel mode | New outer IP header | More overhead than transport mode | IPsec mode |
| Transport mode | No new outer IP header | Less overhead than tunnel mode | Whether suitable |
| Encryption padding | Variable padding | Can vary packet size | Cipher and alignment |
| Path constraints | Varies by link | May require a smaller MTU | Smallest path MTU |
Compiled November 2026; check the provider's site for current details.
What MTU means for an IPsec tunnel
MTU, or maximum transmission unit, is the largest IP packet an interface can send without fragmenting it at the IP layer. A typical Ethernet network has an MTU of 1,500 bytes. That limit applies to the outer packet on the physical path.
In tunnel mode, IPsec wraps the original packet in a new outer IP packet, along with IPsec security information. The encapsulated packet must still fit within the path MTU. If the inner packet is already close to 1,500 bytes, the added overhead can make the outer packet too large.
For example, an inner packet might be 1,400 bytes, while IPsec and the outer IP header add enough data to push the transmitted packet beyond a 1,500-byte link limit. The result may be fragmentation, packet drops, or performance problems.
What adds overhead
There is no single fixed IPsec overhead. The amount depends on the configuration and network path, including: Big IP F5 VPN Download: How to Get and Install the Official Client
- Tunnel or transport mode: Tunnel mode adds a new outer IP header. Transport mode generally does not.
- Outer IP version: An IPv6 outer header is larger than an IPv4 outer header.
- Security protocol and algorithms: ESP adds its own header, trailer, authentication data, and possible padding. Exact sizes vary by configuration.
- NAT traversal: When IPsec passes through NAT, UDP encapsulation typically adds another UDP header.
- Additional encapsulation: Technologies such as GRE, PPPoE, or other overlays consume further space.
- Path MTU: A tunnel’s route may cross a link with a lower MTU than the local Ethernet interface.
Because padding and authentication sizes can differ, a simple fixed subtraction is only an estimate. Check the device documentation and, where possible, inspect the actual packet format.
Methods for choosing or testing an IPsec MTU
| Method | What it compares or tests | Useful when | Limitation | Decision signal |
|---|---|---|---|---|
| Calculate from link MTU | Link MTU minus encapsulation overhead | Overhead is known | Must account for all headers | Fits within path MTU |
| Check device configuration | Configured tunnel and interface MTUs | Reviewing existing setup | Settings may not reflect path | Consistent values |
| DF-bit ping | Whether a packet fits without fragmentation | Testing IPv4 paths | Filtering can affect results | Largest successful size |
| IPv6 packet-too-big testing | Path MTU feedback | Testing IPv6 paths | Depends on ICMPv6 delivery | Feedback reaches sender |
| Incremental packet-size test | Success at increasing sizes | Narrowing an unknown limit | May be affected by loss | Repeatable size threshold |
| End-to-end application test | Real traffic behavior | Confirming user impact | Harder to isolate cause | Stable transfer |
| Compare both directions | MTU behavior each way | Paths may be asymmetric | Requires testing both ends | Both directions work |
Compiled November 2026; check the provider's site for current details.
How to choose an IPsec MTU
Start with the MTU of the smallest link on the path, then subtract the complete outer encapsulation overhead. The result is the maximum inner packet size that should fit without fragmentation: Microsoft Edge Browser Extensions VPN: What They Do and Which to Choose
Estimated tunnel MTU = path MTU − IPsec and other encapsulation overhead
For instance, if the path MTU is 1,500 bytes and the total overhead is approximately 70 bytes, a tunnel MTU near 1,430 bytes may be a reasonable test value. The actual overhead can be higher or lower, so confirm the estimate with tests.
The following values are starting points, not universal recommendations:
| Tunnel setup | Common starting point | What to check |
|---|---|---|
| IPsec over a 1,500-byte IPv4 path | About 1,400 bytes | ESP mode, algorithms, and padding |
| IPsec with NAT-T | Often lower than a non-NAT-T tunnel | Added UDP encapsulation |
| IPsec over IPv6 | Often lower than an equivalent IPv4 setup | Larger outer IP header |
| IPsec over a reduced-MTU link | Reduce the tunnel MTU further | The smallest MTU anywhere on the route |
If you control both tunnel endpoints, configure compatible tunnel MTUs and verify that the setting applies to the correct interface. If changing the interface MTU is impractical, TCP MSS clamping can help TCP connections by limiting the size of TCP segments. It does not solve oversized packets for UDP, ICMP, or other traffic, so it is not a replacement for correct MTU handling. Cisco VPN AnyConnect: How It Works, How to Connect, and How to Troubleshoot
How to test the path MTU
Use a path MTU discovery test between hosts across the tunnel. On systems that support it, send packets with the “do not fragment” flag set and increase their size until they no longer pass. The largest successful packet, including the IP header, gives an estimate of the path MTU for that traffic.
For example, on Linux, ping -M do -s SIZE DESTINATION can test IPv4 packet sizes. The -s value is the ICMP payload size, not the full IP packet size, so account for the ICMP and IP headers when interpreting results. Command options differ across operating systems.
Test from both directions when possible. Also check that:
- ICMP messages needed for path MTU discovery are not blocked.
- The test follows the same route and tunnel as the affected application.
- Firewalls and VPN devices are not silently dropping oversized packets.
- A successful small ping is not mistaken for proof that large packets work.
When path MTU discovery is blocked, devices may not learn that packets need to be smaller. This can create a “black hole” where small requests succeed but larger transfers stall. VPN for Microsoft Edge Free: What Works Best in 2026
IPsec MTU symptoms and troubleshooting decisions
| Symptom | Possible MTU-related cause | First check | Useful test | Next step |
|---|---|---|---|---|
| Small packets work, large ones fail | Oversized packets on tunnel path | Tunnel MTU | DF-bit or packet-size test | Lower tunnel MTU |
| Web pages partly load | Large packets are dropped | Path MTU feedback | Test both directions | Check ICMP handling |
| Transfers stall | Fragmentation or packet loss | Encapsulation overhead | Compare packet sizes | Adjust MTU or MSS |
| VPN works for some sites only | Different path MTUs | Destination path | Test affected destination | Use a safe lower MTU |
| One direction fails | Asymmetric path MTU | Return path | Test both directions | Check routing and feedback |
| IPsec packets fragment | Outer packets exceed link MTU | Outer-interface MTU | Observe packet sizes | Reduce inner MTU |
| Lower MTU fixes symptoms | Previous size exceeded usable path MTU | New MTU stability | Retest applications | Keep validated value |
Compiled November 2026; check the provider's site for current details.
Symptoms and troubleshooting
MTU problems often appear as selective failures rather than a complete loss of connectivity. Common signs include:
- A VPN connects, but some websites or applications load only partially.
- Small pings succeed while large transfers hang or time out.
- File transfers, remote desktop sessions, or voice and video traffic perform inconsistently.
- Connections work on one network but fail over another with a smaller path MTU.
- Logs show fragmentation, oversized packets, or repeated retransmissions.
Troubleshoot systematically: Clash Free: How to Find and Enjoy Conflict-Free Games
- Confirm the MTU on the physical interfaces, tunnel interfaces, and any intermediate overlay.
- Check whether NAT-T or another encapsulation layer is active.
- Test packet sizes across the tunnel and identify the largest reliable size.
- Lower the tunnel MTU in small increments, then retest the affected applications.
- If the issue is limited to TCP, test MSS clamping as a targeted workaround.
- Review firewall rules for ICMP filtering, especially messages that report a packet is too large.
- Capture packets at both tunnel endpoints to see whether packets are fragmented, dropped, or retransmitted.
Avoid setting the MTU extremely low without evidence. Smaller packets increase packet counts and protocol overhead, which can reduce throughput and add processing work.
Recommendation
Set the IPsec tunnel MTU based on the smallest path MTU minus the actual encapsulation overhead, then verify it with packet-size tests in both directions. If you need a quick initial value on a standard 1,500-byte Ethernet path, try approximately 1,400 bytes and adjust based on measurements. Use TCP MSS clamping only as a complement when TCP needs it, and ensure the network permits the messages required for path MTU discovery.
