Use it when configuring, checking or troubleshooting ESP in VPN.
ESP · VPN
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.
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.
plain packet → ESP encryption → tunnel
Context & applicabilityCommon mistakes · platform/version boundaries
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.
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
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 · 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.
- 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.
ip xfrm state | grep -i -e aead -e enc— ESP algorithmstcpdump -ni <if> esp— ESP packetsshow 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.
| Mode | What ESP protects |
|---|---|
| Tunnel mode | Entire original IP packet, new outer header added — site-to-site |
| Transport mode | Payload 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.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
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%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.
Quick lookup tables
VPN → ESP proof map
Fast scope, effective-policy, runtime-evidence and closure boundaries for VPN → ESP.
| Boundary | Establish | Does not establish |
|---|---|---|
| Scope and intent | Exact subjects, destinations, application, direction, trust zone and expected decision | Does not prove effective path, identity, cryptography or enforcement |
| Effective control state | Resolved rule/policy, session/SA, identity/posture, translation and selected path | Object/config presence does not prove a match or packet outcome |
| Runtime evidence | Correlated client, authenticator/firewall/VPN, AAA and destination observations for one flow/time | A single log or success does not prove every packet, peer, path or failover state |
| Closure | Original allowed/denied operation behaves as intended and regression/failure tests pass | Administrative commit or tunnel-up state alone is not closure |