NewIP VPN Notes
VPN

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

By Ethan Marlowe · · 8 min
IPsec MTU: How to Choose the Right Size and Troubleshoot Issues

Learn how IPsec affects MTU, how to calculate a safe packet size, and how to diagnose fragmentation and connectivity problems.

IPsec MTU is the largest inner packet size that can pass through an IPsec tunnel without exceeding the available path MTU after IPsec adds its headers, encryption data, and authentication information. Because that overhead varies by configuration, there is no single correct IPsec MTU for every network. A practical approach is to identify the path MTU, account for tunnel overhead, then verify the result with packet tests and real traffic.

Compare common IPsec encapsulation options and their MTU impact

Encapsulation or settingAdds overhead?Typical impactWhat to check
ESP tunnel modeYesReduces inner-packet spaceESP headers and trailer
ESP transport modeYesUsually less than tunnel modeExisting IP header remains
AES-GCMYesIncludes ESP and authentication dataCipher and tag configuration
AES-CBC with HMACYesIncludes padding and authentication dataCipher, block size, and integrity
UDP encapsulationYesAdds a UDP headerNAT-T enabled or required
IPv4 outer headerYesUses part of the path MTUOuter IP version
IPv6 outer headerYesUses more header space than IPv4IPv6 path MTU
VLAN taggingYesReduces available link-layer frame spaceWhether the path supports the frame size

Compiled November 2026; check the provider's site for current details.

What MTU means in an IPsec tunnel

The Maximum Transmission Unit, or MTU, is the largest IP packet a network link can carry in one piece. A common Ethernet MTU is 1500 bytes, but the effective path MTU may be lower because of additional encapsulation, provider networks, or other tunnels.

IPsec protects packets by adding information around or within them. In tunnel mode, the original packet is carried inside a new outer IP packet. In transport mode, IPsec protects the original packet without adding a new outer IP header. Either way, the protected packet becomes larger.

If the resulting packet exceeds the path MTU, a router may fragment it, drop it, or send a message that allows the sender to reduce packet size. Fragmentation and blocked messages can cause slower performance or connections that partially work, for example, a website may load its basic page but stall when transferring larger data.

IPsec MTU: How to Choose the Right Size and Troubleshoot Issues: Checklist

What affects IPsec overhead?

The amount of overhead depends on the IPsec configuration and network path. Important factors include: BIG-IP F5 VPN Download: How to Get and Install the Official Client

  • Tunnel mode or transport mode: Tunnel mode adds an outer IP header. Transport mode usually adds less.
  • Outer IP version: An IPv6 outer header is larger than an IPv4 outer header.
  • Security protocol: ESP and AH have different overhead. ESP is commonly used for encryption.
  • Encryption and integrity algorithms: These can add authentication data, padding, and alignment requirements.
  • NAT traversal: IPsec traffic carried through UDP, often on port 4500, gains additional encapsulation overhead.
  • Other tunnels or link layers: GRE, PPPoE, and provider-specific encapsulation can further reduce the usable packet size.

For ESP, overhead can include an ESP header, an initialization vector or nonce, padding, a trailer, an integrity check value, and the outer IP header. Some components have fixed sizes. Others vary by algorithm or packet length. That is why a rough rule of thumb may help with initial testing but cannot guarantee the correct value.

Choose a method to find a safe IPsec MTU

MethodBest forRequiresResultLimitation
Calculate from path MTUInitial estimatePath MTU and tunnel overheadEstimated tunnel MTUOverhead varies by configuration
DF-bit pingTesting packet sizePeer response to probesLargest tested packet sizeFiltering can obscure results
Packet captureVerifying encapsulationCapture on tunnel or underlayObserved headers and packet sizesRequires capture access
Router or firewall countersSpotting dropsDevice diagnostic accessClues about MTU-related dropsCounters may be nonspecific
Application testingConfirming user impactRepresentative trafficPractical end-to-end behaviorDoes not isolate the cause
Path MTU discoveryOngoing adaptationICMP feedback across the pathAdjusted packet sizingICMP may be blocked
Conservative MTU settingReducing fragmentation riskAbility to configure the tunnelMore headroom for overheadMay reduce efficiency

Compiled November 2026; check the provider's site for current details.

How to calculate a safe IPsec MTU

Start with the smallest MTU along the outer network path. Subtract the maximum IPsec overhead for the specific configuration. The result is the maximum inner packet size that should fit without exceeding that path MTU. Microsoft Edge Browser Extensions VPN: What They Do and How to Choose

Inner MTU = path MTU − maximum IPsec overhead

For example, if the outer path supports 1500 bytes and the configured tunnel adds about 60 bytes of overhead, the inner MTU should be no larger than approximately 1440 bytes. This is only an illustration: actual overhead can differ, especially with NAT traversal, IPv6, and the selected ESP algorithms.

Setting or condition Effect on usable inner MTU
Larger outer IP header Reduces the space available for the inner packet
NAT traversal over UDP Adds encapsulation and reduces usable MTU
ESP encryption and authentication Adds headers, trailers, and other data
Additional tunneling Uses more of the path MTU
Lower path MTU Requires a correspondingly smaller inner MTU

Check the device documentation or IPsec implementation for exact overhead details. When the configuration varies between peers, use the most restrictive combination along the path. Leave room for any additional encapsulation rather than setting the tunnel MTU right at a theoretical maximum.

How to find the right value

First, establish the path MTU between the IPsec endpoints or across the relevant network. Then test traffic through the tunnel, because the usable size may be different from the endpoint-to-endpoint path outside the tunnel. Cisco VPN AnyConnect: How It Works and How to Connect

On systems that support it, send packets with the “do not fragment” option and gradually adjust their size. A successful test at one size and failure at the next larger size can help identify the limit. Remember that some tools count the IP and ICMP headers in the packet size, while others report only the data payload. Account for that difference when interpreting results.

Also verify that Path MTU Discovery is working. It relies on network devices sending appropriate messages when a packet is too large to forward. Firewalls that block these messages can leave senders unaware that they need to reduce packet size. This often causes a “black hole”: small packets work, but larger transfers hang or fail.

Useful checks include:

  • Test packet sizes both inside and outside the tunnel.
  • Review IPsec interface, tunnel, and route MTU settings.
  • Check for packet fragmentation or drops in device counters and logs.
  • Confirm that firewalls allow the messages required for Path MTU Discovery.
  • Test both directions; MTU limits may differ on each path.
IPsec MTU: How to Choose the Right Size and Troubleshoot Issues: Key points

MTU versus TCP MSS

MTU sets a limit on the size of an IP packet. TCP MSS, or Maximum Segment Size, limits the amount of application data carried in a TCP segment. MSS does not include the IP and TCP headers. VPN for Microsoft Edge Free: What Works, What to Check, and How to Choose

TCP MSS clamping can help when Path MTU Discovery is unreliable. A router or firewall adjusts the MSS advertised during a TCP connection setup so that TCP endpoints send smaller segments. The chosen MSS should account for the effective tunnel MTU and the relevant IP and TCP headers.

MSS clamping is not a complete replacement for a correct MTU configuration. It can help TCP connections, but it does not fix oversized UDP traffic or every other protocol. Use it as a targeted workaround or safeguard, while ensuring that the tunnel and path MTU are configured appropriately.

Compare common IPsec MTU symptoms and troubleshooting actions

SymptomPossible causeFirst checkUseful action
Small packets work, large packets failMTU or PMTUD issueTest progressively larger packetsLower tunnel MTU
Some websites stallOversized TCP segmentsCompare affected and working flowsAdjust TCP MSS
Transfers are slowFragmentation or packet lossCheck interface and tunnel countersInspect packet sizes
One direction failsAsymmetric path MTUsTest both traffic directionsCheck both endpoints
VPN connects but data hangsICMP feedback is blockedCheck for “fragmentation needed” messagesPermit required ICMP
IPsec packets are fragmentedTunnel MTU exceeds path capacityCapture underlay trafficReduce MTU or overhead
Problem appears after NAT traversalUDP encapsulation overheadConfirm NAT-T useRecalculate safe MTU
Issue follows a configuration changeChanged cipher or encapsulationCompare tunnel settingsRecalculate and retest

Compiled November 2026; check the provider's site for current details. How to Make a Clash Free Clash of Clans Base

Common symptoms and troubleshooting

An incorrect IPsec MTU may show up as:

  • Web pages that begin loading but never finish.
  • Large downloads or file transfers that stall.
  • VPN connections that work for some applications but not others.
  • Repeated fragmentation, retransmissions, or packet drops.
  • Problems that occur only when NAT traversal or another tunnel is in use.

When investigating, avoid lowering the MTU by guesswork alone. Confirm the path limit, calculate the configured IPsec overhead, and test the result. If lowering the tunnel MTU resolves the issue, check why discovery or fragmentation was failing before treating the change as final. A very low MTU can increase packet count and reduce efficiency.

Recommendation

Set the IPsec tunnel MTU based on the smallest known path MTU minus the actual overhead of the configured encapsulation, then confirm it with packet-size tests in both directions. Keep Path MTU Discovery messages available where possible, and use TCP MSS clamping as a practical safeguard for TCP, not as a substitute for a sound tunnel MTU.

© 2026 Northlight Network Notes · Northlight Network Notes LLC