Course contents

Unit 7: IPsec and BFDLesson 7.4 (4 of 5 in this unit)45 of 62 in the Cisco SD-WAN course

Packet forwarding, MTU and tunnel encapsulation

The packet path through a WAN Edge, where overhead bytes come from, and how MTU and MSS settings avoid fragmentation.

Intermediate · 9 min read

You'll learn to follow a packet through a WAN Edge, explain where the extra header bytes come from, and choose an MTU or MSS approach for a link.

Technical definition

Tunnel overhead is the extra bytes that encapsulation adds to every packet, such as the outer IP header, the IPsec header and trailer, and the label. Because the underlay MTU is fixed, the largest user packet that fits is smaller than the interface MTU by this amount.

The path of one packet

Diagram
Forwarding at BR-01
Forwarding at BR-01

From LAN to transport.

  1. Lookupin VPN 10 table
  2. Encapsulatelabel and IPsec
  3. Sendfrom VPN 0 interface
  4. Far enddecrypts, delivers in VPN 10
The label identifies the VPN at the far end.

The user packet is looked up in its service VPN, where the route points to a remote TLOC. The WAN Edge adds the VPN label, encrypts the result, and wraps it in an outer packet addressed to the remote TLOC. That packet leaves from a transport interface in VPN 0. The remote WAN Edge reverses the steps.

Diagram
Where the extra bytes come from
Where the extra bytes come from
PartAdded by
Outer IP headerTunnel encapsulation
IPsec header, padding and trailerESP encryption and authentication
UDP header (when used for NAT traversal)Tunnel encapsulation
VPN labelSD-WAN forwarding
Exact sizes depend on the cipher and options.

Staying under the MTU

Diagram
Two protections
Two protections

Both keep packets small enough.

MSS adjustmentSmaller TCP segments
Tunnel MTUSets the largest packetafter encapsulation
Many designs use both.
  • Check the effective tunnel MTU on each WAN Edge, rather than assuming 1500.
  • Enable TCP MSS adjustment on the service side for common traffic.
  • Test with large packets and the do-not-fragment bit set to find the real path limit.
  • Remember that some providers reduce the underlay MTU, for example with PPPoE.
Example output written for this lesson, simplified; real output has more fields and a different layout
BR-01#show interface Tunnel1
Tunnel1 is up, line protocol is up
  MTU 1500 bytes
  Tunnel protocol/transport IPSEC/IP
A tunnel interface with its MTU. In real output the effective IP MTU may be lower than the figure shown, and the interface names differ by platform.

Learn more: Overlay and TunnelsIPsec Transport SecurityVPN 0: Transport Interfaces

Test yourself

Predict · scenario 1

Small pings work between sites but large file transfers stall. What is a likely cause?

Predict · scenario 2

What does TCP MSS adjustment do?

FAQ

How much overhead should I expect?
It depends on the cipher, the options and the platform, but it is commonly in the range of around 50 to 100 bytes. The documentation for the platform gives the figure used for the default tunnel MTU.
What is MSS adjustment?
The device rewrites the maximum segment size in TCP handshakes so hosts send segments that already fit after encapsulation. It avoids fragmentation for TCP without relying on path MTU discovery.
What happens if the packet is too large?
It is either fragmented, which costs performance, or dropped if the do-not-fragment bit is set and the sender is not told. Odd stalls on large transfers while small pings work are a classic sign.