IPsec
Cheat sheet · https://pcornel.dk/topic.php?topic=698
Answer
A site-to-site IPsec VPN authenticates peers and protects selected traffic with negotiated IKE and IPsec security associations.
Remember
- IKE SA and IPsec child SA are separate evidence boundaries
- Proxy identities/selectors must agree at both peers
- ESP commonly carries protected data; NAT traversal can encapsulate it in UDP 4500
- Encaps and decaps counters must be interpreted with generated interesting traffic and the return path.
First checks
show crypto session— tunnel state per peer.show crypto ikev2 sa/show crypto isakmp sa— IKE SA state.show crypto ipsec sa— SAs, traffic selectors and encaps/decaps counters.show crypto ikev2 proposal/show crypto ipsec transform-set— algorithms offered.debug crypto ikev2— negotiation errors (briefly).
Commands
show crypto ipsec sa- Local state
Verify in this order
peer reachable → IKE proposal agreed → authentication → IKE SA → IPsec SA with mirrored selectors → interesting traffic encrypted → decrypted at the far end → reply returns
Where it usually breaks
underlay IP/transport → control/session registration → route/endpoint distribution → policy/segment → encapsulation/tunnel state → decapsulation/egress → return path
IPsec · operational reference
| State / evidence | Interpretation |
|---|---|
| IKE SA | Key/control relationship |
| IPsec/child SA | Data protection state |
| Counters | Actual protected traffic |
| Route/selector | Which traffic enters VPN |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=698