IPsec MTU: How to Choose the Right Size and Fix Fragmentation
Learn how IPsec affects MTU, how to calculate a safe value, and how to troubleshoot fragmentation and connectivity problems.


IPsec MTU is the maximum size of an inner packet that can travel through an IPsec tunnel without the resulting outer packet exceeding the network path’s MTU. Because IPsec adds encapsulation and encryption overhead, a tunnel’s usable MTU is usually smaller than the physical interface MTU. If the tunnel MTU is too large, packets may fragment or be dropped. If it is too small, connections can work but transfer data less efficiently.
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 →
Approximate IPsec MTU starting points by tunnel mode
| Tunnel mode | Encapsulation overhead | Starting MTU approach | Likely fragmentation risk | Best next step |
|---|---|---|---|---|
| IPsec transport | Lower; no new outer IP header | Subtract IPsec overhead from path MTU | Lower than tunnel mode | Verify with packet-size tests |
| IPsec tunnel over IPv4 | Adds an outer IPv4 header plus IPsec overhead | Subtract all added headers from path MTU | Moderate | Test across the full path |
| IPsec tunnel over IPv6 | Adds a larger outer IP header plus IPsec overhead | Subtract all added headers from path MTU | Higher if the path MTU is unchanged | Confirm the outer path MTU |
| ESP with no extra encapsulation | ESP and authentication add overhead | Account for the selected ESP transforms | Depends on transform and path | Check the negotiated transforms |
| ESP with UDP encapsulation | Adds UDP encapsulation overhead | Include UDP and ESP overhead | Higher than without UDP encapsulation | Check for NAT traversal |
| Path MTU unknown | Overhead cannot be applied reliably | Discover the path MTU before setting the tunnel MTU | Unknown | Probe or inspect the path |
Compiled November 2026; check the provider's site for current details.
What MTU means in an IPsec tunnel
The Maximum Transmission Unit (MTU) is the largest packet a link can carry without fragmentation. Ethernet commonly has an MTU of 1500 bytes, but the actual path may support a different value. A VPN tunnel must fit both the original, or inner, packet and the IPsec headers that wrap or protect it.
For example, a 1500-byte inner IP packet cannot fit unchanged inside a 1500-byte outer packet once IPsec adds its own headers. The tunnel must either send a smaller inner packet, fragment the outer packet, or rely on path-MTU mechanisms to adjust packet sizes.
This is why there is no single correct IPsec MTU for every network. The right value depends on the path MTU and on details such as:
- Tunnel mode or transport mode
- IPv4 or IPv6 outer headers
- ESP or AH
- Encryption and authentication algorithms
- NAT traversal, which adds UDP encapsulation
- Other encapsulation, such as VLANs, PPPoE, or an additional VPN
How to calculate a starting value
A practical starting point is: iPhone VPN: How to Choose, Set Up, and Use One
Tunnel MTU = path MTU − IPsec overhead
The path MTU is the smallest MTU across the route carrying the outer IPsec packets. IPsec overhead varies, so the subtraction is not a universal constant.
With ESP tunnel mode, overhead can include a new outer IP header, an ESP header, an initialization vector or nonce, an integrity check value, padding, and, when NAT traversal is enabled, a UDP header. The exact size depends on the protocol version and selected algorithms. IPv6 outer headers are larger than IPv4 headers, and some encryption modes require different amounts of additional data.
As an illustration, if the path MTU is 1500 bytes and the complete IPsec encapsulation adds roughly 60 bytes, an initial tunnel MTU estimate would be about 1440 bytes. Treat that as an estimate, not a guarantee: the real overhead may differ, and nested encapsulation can reduce the available size further. Forti VPN: What It Is, How It Works, and When to Use It
When the path is uncertain, start conservatively, then test and increase the value where measurements show it is safe. Avoid choosing an extremely low MTU without evidence, since smaller packets increase packet-processing and bandwidth overhead.
MTU and MSS adjustments compared
| Adjustment | What it changes | Applies to | Helps with | Limitation |
|---|---|---|---|---|
| Lower tunnel MTU | Maximum packet size on the tunnel interface | Tunnel traffic | Oversized packets across protocols | May reduce payload per packet |
| Lower interface MTU | Maximum packet size on an interface | All traffic on that interface | Oversized packets leaving that interface | Can affect unrelated traffic |
| Clamp TCP MSS | Maximum TCP segment size advertised in a connection | TCP traffic | TCP packets that exceed tunnel capacity | Does not fix non-TCP traffic |
| Set MSS manually | TCP segment size at an endpoint or device | TCP traffic | Predictable TCP paths | Must match the effective path MTU |
| Enable path MTU discovery | Lets endpoints learn a smaller path MTU | Supported IP traffic | Avoiding oversized packets | Depends on ICMP messages getting through |
| Allow required ICMP messages | Permits path MTU feedback | Traffic using path MTU discovery | PMTU black holes | May require firewall rule changes |
Compiled November 2026; check the provider's site for current details.
MTU and MSS: what each setting changes
MTU limits the size of an IP packet. TCP MSS, or Maximum Segment Size, limits the amount of TCP data in a segment. MSS excludes the IP and TCP headers, so it is typically adjusted to help TCP traffic fit through a reduced-MTU tunnel. Big IP F5 VPN Download: Get the Official Client Safely
| Setting | Applies to | Typical purpose |
|---|---|---|
| Tunnel MTU | Packets entering or leaving the tunnel interface | Sets the maximum inner IP packet size |
| TCP MSS | TCP connection negotiation | Limits TCP payload so packets fit the tunnel |
| Physical interface MTU | Packets carried on a network link | Sets the link’s maximum packet size |
MSS clamping is often useful when clients send large TCP segments but do not receive or act on path-MTU signals. A device at the tunnel edge can rewrite the MSS advertised during the TCP handshake so that the resulting packets fit.
However, MSS clamping only helps TCP. It does not fix oversized UDP, ICMP, or other non-TCP packets, and it does not replace a correct tunnel MTU. A robust configuration uses an appropriate MTU and applies MSS clamping where TCP peers or network paths need help.
Common symptoms of an incorrect IPsec MTU
MTU problems can be difficult to spot because small packets may pass normally while larger transfers fail. Common signs include:
- A VPN connects, but some websites or applications stall.
- Small pings work, while large pings fail.
- File transfers start and then stop or slow dramatically.
- Remote desktop, voice, or video traffic behaves inconsistently.
- Certain sites work while others do not.
- Connections succeed in one direction but fail in the other.
If outer packets are fragmented, the network must reassemble them before delivering the protected traffic. Fragmentation can reduce performance and may fail when a firewall or intermediary drops fragments. If fragmentation is prohibited or the packet is too large and no usable signal reaches the sender, packets may be silently discarded. Microsoft Edge Browser Extensions VPN: What to Know Before You Choose
How to diagnose and fix the problem
Start by confirming the path MTU rather than assuming the physical interface’s configured MTU is the end-to-end limit. Test from the relevant endpoints and check the tunnel, gateway, and intermediate links for additional encapsulation.
For an IPv4 ping test, send packets with the “do not fragment” option and increase the payload until the test fails. Remember that the ping payload is smaller than the complete IP packet because headers also count toward the MTU. IPv6 handles packet-too-big feedback differently: routers do not fragment IPv6 packets in transit, so the sending host must respond to ICMPv6 Packet Too Big messages.
Then check that ICMP messages needed for path-MTU discovery are not being blocked. For IPv4, this commonly includes ICMP “fragmentation needed” messages. For IPv6, allow ICMPv6 Packet Too Big messages. Blocking them can create a “black hole,” where oversized packets disappear without the sender learning to reduce their size.
A practical troubleshooting sequence is: Cisco VPN AnyConnect: What It Is and How to Connect
- Measure the path MTU in both directions where possible.
- Identify the IPsec mode, outer IP version, NAT traversal, and algorithms.
- Estimate the encapsulation overhead and set a conservative tunnel MTU.
- Enable TCP MSS clamping if large TCP sessions still stall.
- Retest large packets and real applications, not just tunnel connectivity.
- Check counters and logs for fragmentation, drops, or MTU-related errors.
Make changes consistently at the relevant tunnel endpoints. In asymmetric routes, each direction may have a different path MTU, so one setting may not resolve every issue.
Symptom-to-fix guide for IPsec MTU problems
| Symptom | Likely cause | Diagnostic check | Possible fix | Confirm the result |
|---|---|---|---|---|
| Small packets work; large transfers stall | Packets exceed tunnel capacity | Test progressively larger packets | Lower tunnel MTU or clamp MSS | Retry a large transfer |
| TCP connections start but hang | Oversized TCP segments or blocked PMTU feedback | Inspect MSS and ICMP handling | Clamp MSS or allow required ICMP | Test the same connection again |
| Some applications fail while others work | Different packet sizes or protocols | Compare affected and working traffic | Adjust MTU; check non-TCP traffic | Retest each affected application |
| Tunnel works until encapsulation changes | Added headers changed available payload size | Review IPsec mode and transforms | Recalculate the tunnel MTU | Verify after the change |
| Fragmented packets appear | Packet size exceeds the effective MTU | Capture traffic on both sides of the tunnel | Reduce MTU or MSS as appropriate | Check for fewer or no fragments |
| Issues occur only on one path | Path MTU differs between routes | Compare path MTU and ICMP behavior | Set path-appropriate MTU or MSS | Test both routes |
Compiled November 2026; check the provider's site for current details.
Recommendation
Set the IPsec tunnel MTU based on the measured path MTU minus the actual encapsulation overhead, then verify it with traffic that previously failed. Keep path-MTU discovery signals available, and use TCP MSS clamping as a supporting measure, not as a substitute for correct MTU handling. VPN for Microsoft Edge Free: Safe Options and Setup Guide

