Pcornel
Browse topics
Options
Recent
Favorites
Security · Technical reference

ESP · VPN

Direct answer

Encapsulating Security Payload protects IPsec traffic with confidentiality when encryption is selected and can provide integrity, data-origin authentication and anti-replay, operating in transport or tunnel mode under an SA.

When to use this

Use it when configuring, checking or troubleshooting ESP in VPN.

First 30 seconds

1. ESP (IP protocol 50) encrypts and authenticates payloads.

2. Use AEAD (AES-GCM).

3. UDP 4500 encapsulation with NAT-T.

4. Firewalls must allow ESP or UDP 4500.

5. Check encaps/decaps counters.

Operational verification

plain packet → ESP encryption → tunnel

Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common traps

Valid ESP decapsulation shows packet protection under the SA, but it does not show application authorization or endpoint integrity.

Suspicious evidence: SPI mismatch, authentication failure, replay drop, sequence exhaustion, obsolete transform, MTU/fragmentation, zero decapsulation or cleartext policy bypass.

Platform / version applicability
Network security
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformNetwork security
Scope / prerequisiteUse it when configuring, checking or troubleshooting ESP in VPN.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification path Verify boundary

inner packet/selectors → outbound SA → ESP encrypt/auth/sequence → outer transport → inbound SPI/replay/verify/decrypt → inner delivery

Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • ESP ≠ encryption guaranteed in every allowed transform.
  • ESP packet observed ≠ inner application delivered.
  • Tunnel or SA up ≠ protected application traffic succeeds.
  • Cryptographic negotiation ≠ correct identity, selector, route or application outcome.
Key checks
  • ip xfrm state | grep -i -e aead -e enc — ESP algorithms
  • tcpdump -ni <if> esp — ESP packets
  • show crypto ipsec sa | include pkts — counters
ReferenceWhat it is1 section · depth on demand

Packet format

ESP header (SPI 4 bytes + sequence number 4 bytes) → IV → encrypted payload + padding + pad length + next header → integrity check value (ICV). The outer IP header is not protected, which is why ESP works through NAT (with NAT-T). Overhead is typically 50–60 bytes in tunnel mode with AES-GCM.

ReferenceImportant terms & boundaries2 sections · depth on demand

What this shows and what it does not

Valid ESP decapsulation shows packet protection under the SA, but it does not show application authorization or endpoint integrity.

In depth

ESP (Encapsulating Security Payload, IP protocol 50) is the IPsec protocol that protects data: it encrypts the payload and provides integrity, authentication and anti-replay. Almost every IPsec deployment uses ESP.

ModeWhat ESP protects
Tunnel modeEntire original IP packet, new outer header added — site-to-site
Transport modePayload only, original header kept — host-to-host, GRE over IPsec

Firewalls must allow ESP (protocol 50) between gateways, or UDP 4500 when NAT traversal encapsulates ESP in UDP. Use AEAD algorithms (AES-GCM) so encryption and integrity are combined efficiently.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docNetwork security current

Authoritative/upstream documentation reviewed for bounded claims in VPN → ESP. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.rfc-editor.org/rfc/rfc4301 · confidence 94%
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
Encapsulating Security PayloadIP protocol 50IPsec ESP
Embedded reference data

Quick lookup tables

VPN → ESP proof map

Fast scope, effective-policy, runtime-evidence and closure boundaries for VPN → ESP.

BoundaryEstablishDoes not establish
Scope and intentExact subjects, destinations, application, direction, trust zone and expected decisionDoes not prove effective path, identity, cryptography or enforcement
Effective control stateResolved rule/policy, session/SA, identity/posture, translation and selected pathObject/config presence does not prove a match or packet outcome
Runtime evidenceCorrelated client, authenticator/firewall/VPN, AAA and destination observations for one flow/timeA single log or success does not prove every packet, peer, path or failover state
ClosureOriginal allowed/denied operation behaves as intended and regression/failure tests passAdministrative commit or tunnel-up state alone is not closure
Confirmation

Confirm action

Continue?