ESP
Cheat sheet · https://pcornel.dk/topic.php?topic=4658
Answer
ESP (Encapsulating Security Payload, IP protocol 50) encrypts and authenticates IPsec packets. In tunnel mode it protects the whole original packet, and over NAT it is carried in UDP 4500.
Remember
- ESP is IP protocol 50.
- Tunnel mode protects the whole original packet.
- Behind NAT, ESP is carried in UDP 4500.
First checks
ip xfrm state | grep -E 'aead|enc|auth'— algorithmsshow crypto ipsec sa | include encaps|decaps— counterstcpdump -ni <if> esp or udp port 4500— packets
Commands
show crypto ipsec saip tcp adjust-mss 1360
Verify in this order
payload → ESP encrypt/authenticate → peer decrypts
Where it usually breaks
First mismatch in endpoint/identity → path/reachability → policy selection → enforcement/session → protected flow → telemetry/detection; preserve identity/policy/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4658