IPsec Tunnel Overhead Calculator

May 29, 2026

IPsec Tunnel Overhead Calculator

Estimate ESP overhead, NAT traversal, GRE or VXLAN encapsulation, safe tunnel MTU, TCP MSS clamp, packet efficiency, and bandwidth impact for site-to-site VPNs and home lab routing overlays.

🔒Real Tunnel Presets
⚙Tunnel Inputs
Switch the primary overhead card between bytes and bits.
Loads common encapsulation defaults without locking the fields.
Sets IV, ICV, and padding block assumptions.
The public underlay header wrapped around ESP.
Used to recommend the TCP MSS clamp.
Use 1500 for Ethernet, 1492 for PPPoE, or jumbo if enabled.
Used to calculate packet-specific padding and efficiency.
Most NAT-T data packets add an outer UDP header.
Models route overlays, L2 extensions, or remote-access wrappers.
Standard ESP header is 8 bytes before IV or nonce.
AES-GCM often uses 8 explicit bytes; AES-CBC uses 16.
Authentication tag or truncated HMAC length.
Use 4 for GCM alignment; 16 for AES-CBC block padding.
Used for overhead bandwidth and packet processing load.
Applied to recommended MSS and safe tunnel MTU planning.
Total Tunnel Overhead
0
bytes per packet
Safe Inner Tunnel MTU
0
bytes before fragmentation
Recommended TCP MSS
0
bytes for IPv4 TCP
Payload Efficiency
0%
inner packet share on wire

Encapsulation Breakdown

Outer underlay headerIPv4 = 20 bytes
ESP fixed fieldsHeader, IV, pad length, next header, ICV
NAT-T and overlay adders0 bytes
Packet-specific padding0 bytes
Worst-case planning overhead0 bytes
Overhead bandwidth at entered PPS0 Mbps
Fragmentation checkReady
MSS clamp logicMTU minus TCP/IP headers
💻IPsec Encapsulation Spec Grid
20
IPv4 outer bytes
Standard public underlay header before ESP or UDP encapsulation.
40
IPv6 outer bytes
Larger underlay header reduces the inner tunnel MTU by 20 more bytes.
8
ESP base header
SPI and sequence number are present on ordinary ESP data packets.
8
NAT-T UDP bytes
UDP 4500 is common when either peer is behind NAT or PAT.
16
GCM auth tag
A common AEAD ICV length for modern AES-GCM IPsec profiles.
16
AES-CBC block
CBC profiles may add more variable padding than GCM profiles.
24
GRE overlay bytes
Often used when dynamic routing or multicast must cross a VPN.
50
VXLAN overlay bytes
Ethernet-over-IP overlays stack heavily with ESP on small MTUs.
📊Reference Tables
Deployment scenarioTypical MTUOverhead riskPlanning setting
Site-to-site ESP on Ethernet1500 bytesModerate; GCM usually leaves a usable MSS near the mid-1300sPlain ESP, IPv4 outer, AES-GCM, 10% buffer
Branch VPN behind NAT1500 bytesNAT-T adds UDP encapsulation and can expose PMTUD problemsNAT-T on, clamp MSS, verify DF handling
GRE routing over IPsec1500 bytesGRE and ESP stack together; OSPF, EIGRP, or multicast payloads shrinkGRE overlay, GCM or CBC based on peer support
PPPoE internet circuit1492 bytesEight bytes are lost before IPsec overhead is countedPPPoE MTU, NAT-T if the CPE rewrites traffic
Jumbo data center underlay9000 bytesLow efficiency penalty but devices must agree end to endJumbo MTU, overlay as deployed, measured PMTUD
Field or headerTypical sizeWhere it appearsCalculator treatment
Outer IPv4 header20 bytesBefore ESP or UDP encapsulationSelected by outer IP version
Outer IPv6 header40 bytesBefore ESP or UDP encapsulationSelected by outer IP version
ESP header8 bytesSPI and sequence numberEditable fixed ESP field
ESP trailer2 bytes plus paddingPad length and next header after payloadAlways included, padding computed from block size
Authentication tag or ICV12 to 16 bytesEnd of protected packetLoaded by cipher profile and editable
Transform profileIV or nonceICV or tagPadding behavior
AES-GCM-128 or 2568 bytes explicit16 bytes common4-byte alignment; low variable pad
AES-CBC with SHA1-9616 bytes12 bytes16-byte cipher block; higher variable pad
AES-CBC with SHA256-12816 bytes16 bytes16-byte cipher block; higher variable pad
ChaCha20-Poly13058 bytes explicit16 bytes common4-byte alignment; modern AEAD profile
MTU or MSS targetCommon valueWhy it mattersOperational note
Ethernet underlay MTU1500Default WAN and LAN MTU on many networksIPsec overhead must fit inside this unless fragmentation is allowed
PPPoE underlay MTU1492PPP header consumes eight bytes before the IP packetOften needs a lower MSS clamp than ordinary Ethernet VPNs
IPv4 TCP header set4020 byte IP header plus 20 byte TCP headerMSS equals safe inner MTU minus this header set
IPv6 TCP header set6040 byte IP header plus 20 byte TCP headerIPv6 MSS should usually be 20 bytes lower than IPv4
Jumbo underlay MTU9000Absorbs overlay overhead with little payload lossOnly helpful when every device in the path supports it
💡Planning Tips
MSS tip: Clamp TCP MSS at the VPN edge when PMTUD is unreliable, when ICMP is filtered, or when remote users sit behind unknown NAT. This prevents oversized TCP segments from entering the tunnel.
Capture tip: Confirm the chosen transform with packet captures from the underlay side. Vendor defaults can change IV length, ICV length, NAT-T marker behavior, and padding in ways that shift the real MTU by several bytes.

This planner estimates packet sizing for engineering work. Production values should be verified with packet captures, path MTU discovery tests, tunnel interface counters, and the exact IPsec transform negotiated by the peers.

When you set up an IPsec tunnel, a large portion of the original packets gets replaced by headers and padding. This means that there is less data that can be sent through the tunnel, hence the maximum segment size for TCP will also be smaller. Additionally, if the payload that get sent over the tunnel is larger than the MTU for the links along the tunnel, IPsec will force the packet to be fragmented.

Fragmentation of IP packets can cause applications to break. IPsec overhead is a very important topic to understand in setting up an IPsec tunnel, but many people struggle with it because they treat the IPsec tunnel like a simple pipe. IPsec has several different layers of overhead.

How IPsec Affects Packet Size

The outer IP header will always be placed in front of every packet that is sent through the IPsec tunnel. This outer header will take up twenty bytes of the packet if the outer IP header is IPv4, but if it is IPv6 then it will take up forty bytes. Following the outer IP header will be the ESP header.

This header contains security parameter and a sequence number. Additionally, if AES-GCM is used as the cipher mode, then the additional header from the cipher mode will be added to the packet. If instead CBC profiles are used, then there will be a padding block that will take up a variable number of bytes depending on the size of the packet.

If the peer devices are located behind a NAT device, then the UDP header will be added to the packet to allow it to traverse the NAT device. Additionally, if GRE is used for dynamic routing and VXLAN is used for an overlay fabric, then the IPsec overhead will be even larger. Each of these header fields is an independent addition to the packet, meaning the overhead for IPsec will change depending on the cipher that is used, the IP version that is used for both the outer and inner packets, and any GRE or VXLAN tunnels that is implemented.

In the calculator that is included with this article, there is a field where the math for these variables can be performed. Each of the variables must be entered in order for the calculator to generate the correct results. The outer IP version and inner IP version must be picked in order for the physical link MTU to be correctly determined.

Additionally, the cipher profile must be selected in order for the initialization vector length, authentication tag length and padding to be correctly set up in the devices running IPsec. The underlay MTU must also be entered in order to determine the maximum size of the packet that will actually be transmit. For example, if IPsec is running over Ethernet, the underlay MTU would be 1500, but if it is a PPPoE link then eight bytes will be removed from the packet.

The calculator will report the worst case overhead in bytes in the result. In addition to this variable, the calculator will report the largest safe MTU size for the inner IP packets and the TCP maximum segment size that should be used. In addition to reporting the worst-case overhead for IPsec, the calculator will also report the efficiency of the tunnel.

The efficiency of the tunnel is calculated based on the size of the packets that will normally pass through the tunnel. For tunnels that carry large amounts of data, a small amount of overhead is acceptable. For tunnels that carry small packets, like voice or telemetry packets, even a small amount of overhead will have a much more larger impact on the total size of each packet and the capacity of the tunnel to transmit those packets.

Thus, the efficiency of the tunnel will factor in the size of the packets that pass through it and how many packets are transmitted each second. Finally, the calculator also asks for a buffer percentage for the final value in order to account for the fact that links dont always behave as expected in real life. A slight buffer will allow the tunnel to handle slightly larger packets.

There are some common mistakes with IPsec that people make by ignoring one of these layers of IPsec overhead. For instance, many network teams will use the default profile from the vendor that published the IPsec software. In many cases, the default profile for these vendors does not enable the features necessary for traversal of NAT device.

Thus, the teams will experience an MTU that is eight bytes smaller than they might have otherwise expected. Additionally, many networks will leave the TCP maximum segment size at its default for Ethernet networks. However, the packets will fail to transfer during large file transfers because of oversized packet.

The third of the common mistakes is forgetting that the inner packets for IPv6 will require twenty additional bytes of header space as compared to IPv4. These mistakes are easily avoided if IPsec overhead is considered during the initial setup of the IPsec tunnel. Included with the calculator are tables that show common configurations for IPsec.

For instance, one table row shows settings for a site-to-site ESP session on an Ethernet network. Another row in the table shows the settings for an ESP session where NAT traversal is enabled. Another row in the tables shows the settings for an ESP session where GRE is added.

These tables are merely an aid in understanding which settings to choose when implementing IPsec; they dont replace the need for the teams to capture packets in their network to ensure that their settings will work accordingly. Finally, the goal in managing IPsec overhead is not to eliminate it because it is impossible to eliminate IPsec overhead entirely. The goal is to ensure that the remaining payload in the packet is large enough to meet the needs of the applications that sit on top of the IPsec tunnel.

The goal can be achieved by clamping the TCP maximum segment size at the edge of the tunnel, ensuring that path MTU discovery is working correctly and ensuring that the IPsec settings are checked whenever there is a change to the cipher that is implemented. The numbers can be determined by the calculator, but the teams must verify the actual effectiveness of the settings through their network and there traffic. You should of also checked the furnitures size in the lab.

Actualy, the calculator will help alot.

IPsec Tunnel Overhead Calculator

Related posts

Leave a Comment