Layer 3 crypto suite: ESP (protocol 50) encrypts+authenticates — AH (51, auth only) is legacy; “see IPsec, think ESP”.
Two phases
- Phase 1 (IKE, UDP 500): negotiate encryption/hash/DH group/auth (PSK or certs) → IKE SA. Diffie-Hellman shares a secret without ever sending it (that’s the mod-p exponentiation trick).
- Phase 2: negotiate ESP transform-set, lifetimes → IPsec SA. SA is unidirectional — every tunnel has a pair. Rekey on lifetime expiry; DPD detects a dead peer.
Modes
Transport protects payload only (host-to-host); tunnel mode wraps the whole original packet — site-to-site. Deploy styles: classic crypto map + ACL (policy-based) vs VTI (route-based, tunnel protection ipsec profile) — CCNP designs with VTI.
Exam traps
- Crypto ACLs must mirror across peers (or Phase 2 fails).
- NAT breaks ESP without NAT-T (UDP 4500).
- ESP overhead → MTU/fragmentation tuning.
- Asymmetric routing kills IPsec.
show crypto isakmp sa / show crypto ipsec sa
debug crypto isakmp / debug crypto ipsec