China Route Planner
IPsec MTU: How to Set It and Avoid Fragmentation
VPN

IPsec MTU: How to Set It and Avoid Fragmentation

Learn how IPsec affects MTU, how to calculate a safe value, and how to troubleshoot fragmentation and connection problems.

Charlotte Adams
· 5 min read
nord-vpn-microsoft-edge
nord-vpn-microsoft-edge

IPsec MTU is the maximum size of an IP packet that can pass through an IPsec tunnel without being fragmented or dropped. Because IPsec adds headers and encryption-related overhead, a tunnel usually needs a lower MTU than the network interface carrying it. A practical starting point is often 1400 bytes for a tunnel over a standard 1500-byte path, but the correct value depends on the IPsec mode, algorithms, outer IP version, and network path.

NordVPN — fast, secure VPN

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 →

What MTU means for IPsec

MTU, or maximum transmission unit, is the largest packet a link can carry as a single unit. A standard Ethernet network commonly uses an MTU of 1500 bytes. If a packet exceeds the usable MTU, it may be fragmented, rejected, or trigger a path MTU discovery process.

IPsec introduces additional data around the original packet. In tunnel mode, the original IP packet is encapsulated inside a new outer IP packet. ESP, the Encapsulating Security Payload protocol, adds its own header, trailer, authentication data, and sometimes an initialization vector. NAT traversal can add a UDP header as well.

The result is that the inner packet must be smaller than the outer path’s MTU. If the tunnel sends packets that are too large, performance may suffer, or some traffic may fail entirely.

IPsec MTU: How to Set It and Avoid Fragmentation: Checklist

How to estimate an IPsec tunnel MTU

A useful estimate is: Big IP f5 VPN download: How to Get and Install the Official VPN Client

Tunnel MTU = path MTU − IPsec overhead

The overhead is not a universal constant. It varies with the outer IP version, tunnel or transport mode, encryption and authentication configuration, padding requirements, and whether NAT traversal is in use.

For example, a 1500-byte Ethernet path cannot carry a 1500-byte inner packet plus IPsec encapsulation without exceeding the path limit. Setting the tunnel MTU near 1400 bytes is a common initial measure, not a guaranteed correct answer. Some configurations may support a higher value. Others need a lower one.

Configuration or condition Effect on usable inner MTU
Larger outer IP header Reduces the space available for the inner packet
ESP encapsulation Adds security headers, trailer, and authentication data
NAT traversal Adds a UDP header and further reduces usable space
Lower underlying path MTU Requires a lower tunnel MTU
Different encryption settings Can change the amount of per-packet overhead

For an accurate calculation, consult the VPN vendor’s overhead guidance or calculate the full encapsulation for the configured suite. Include every outer header and any padding, and use the smallest MTU along the actual route, not just the local Ethernet interface’s MTU. Microsoft Edge Browser Extensions VPN: How to Choose and Use One

Symptoms of an MTU problem

MTU issues are often confusing because basic connectivity can work while particular applications fail. Small packets may pass, but larger packets may be dropped or fragmented.

Common signs include:

  • A VPN connects, but websites or applications load only partially.
  • Large file transfers stall or perform poorly.
  • Some remote services work while others time out.
  • Connections succeed when packets are small but fail with larger payloads.
  • The issue appears only when traffic crosses the VPN or a particular network.

These symptoms can also have other causes, so verify packet size and fragmentation behavior rather than assuming the MTU is responsible.

Fragmentation and path MTU discovery

Path MTU discovery (PMTUD) helps a sender learn the largest packet size that can cross a route. It relies on network messages indicating that a packet is too large to forward. If those messages are blocked, the sender may keep transmitting oversized packets, which can be silently dropped. This is sometimes called a PMTU black hole. Cisco VPN AnyConnect: Setup, Features, Troubleshooting, and Alternatives

IPsec can make troubleshooting more difficult because the network sees the outer packet, while the application produces the inner packet. Fragmentation may happen before or after encryption depending on the implementation and configuration, and fragments can be filtered by firewalls or intermediate devices.

Where supported, allow the relevant ICMP messages required for path MTU discovery. Avoid broadly blocking ICMP without understanding the impact on packet sizing and connectivity.

IPsec MTU: How to Set It and Avoid Fragmentation: Key points

Choosing between MTU and MSS adjustments

For TCP traffic, adjusting the Maximum Segment Size (MSS) can prevent TCP from creating segments that become oversized after encapsulation. MSS clamping changes the advertised TCP segment size during connection setup. It is often a practical fix for VPNs, especially when the tunnel MTU is managed by the VPN platform.

MTU adjustment and MSS clamping are related but not interchangeable. MTU controls the maximum packet size on an interface or tunnel. MSS clamping applies to TCP and does not fix oversized UDP packets or other non-TCP traffic. VPN for Microsoft Edge Free: How to Choose a Safe Option

Approach Best suited for Limitation
Lower the tunnel MTU Managing packet size across the tunnel for multiple protocols Must be configured correctly on the relevant tunnel endpoints
Clamp TCP MSS Preventing oversized TCP segments over a VPN Does not address UDP or other non-TCP packets
Enable or repair PMTUD Allowing endpoints to adapt to path constraints Depends on required signaling being delivered
Permit fragmentation A possible compatibility measure in specific environments Can increase overhead and may be blocked or unreliable

How to troubleshoot and verify

Start by checking the MTU on the physical interface, tunnel interface, and any intermediate links. Confirm whether the VPN uses IPv4 or IPv6 externally, whether NAT traversal is active, and which IPsec mode and algorithms are configured.

Then test packet sizes across the tunnel. Use a ping tool that can set packet size and disable fragmentation where supported. Increase the test size until packets fail, allowing for the difference between the tool’s payload size and the full IP packet size. Repeat tests in both directions if possible, since routes and MTUs may differ.

Make one change at a time. Lower the tunnel MTU or apply a suitable TCP MSS clamp, then test the applications and protocols that were failing. Check tunnel counters, firewall logs, and packet captures for fragmentation, dropped packets, or ICMP messages indicating that a packet is too large.

Recommendation

Begin with the VPN vendor’s documented MTU and MSS settings. If none are available, test a conservative tunnel MTU such as 1400 bytes on a standard 1500-byte path, then adjust it based on measurement rather than guesswork. Ensure path MTU discovery can work, use MSS clamping for TCP when appropriate, and verify both TCP and non-TCP traffic across the complete VPN route. Clash Free: How to Prevent Scheduling Conflicts

© 2026 Wayfarer Lantern Media · Wayfarer Lantern Media Ltd.