Use this when IKE Phase 2 fails or SAs do not pass traffic.
IKE Phase 2
IKE Phase 2 (quick mode) negotiates the IPsec SAs that protect actual traffic — encryption, integrity, lifetimes, PFS and the traffic selectors or proxy IDs that must match on both ends.
1. Phase 2 (child SA) creates IPsec SAs for traffic selectors.
2. ESP algorithms and PFS group.
3. Selectors (subnets) must match both sides.
4. Lifetime about 1 h.
5. TS_UNACCEPTABLE = selector mismatch.
IKE SA → child SA proposal + selectors → IPsec SAs
Context & applicabilityCommon mistakes · platform/version boundaries
- Crypto ACLs not mirrored (local/remote swapped on the peer).
- PFS enabled on one side only.
- Overlapping subnets on both sites — use NAT inside the tunnel or renumber.
- Firewall policies allowing the tunnel but not the inner traffic.
Operational reference
Fast context before you go deeper.
show crypto ipsec saVerification & 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 Checks (Cisco IOS) Verify boundary
show crypto ipsec sa
show crypto ipsec sa peer 203.0.113.2
Look at #pkts encaps and #pkts decaps: encaps rising but decaps 0 means the far side is not sending back (routing, NAT exemption or ACL on the peer). Proxy ID (crypto ACL) mismatches show as phase 2 failures.
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.
- Phase 2 negotiates the IPsec SAs.
- Traffic selectors (proxy IDs) must match.
- PFS settings must match.
show crypto ipsec sa— child SAsip xfrm state— Linux- Phase 2 proposal and selectors — ESP algorithms, subnets
ReferenceWhy it matters1 section · depth on demand
What must match
- Transform set (ESP encryption and integrity).
- Proxy IDs / traffic selectors (local and remote subnets), mirrored on both sides.
- PFS group (if used).
- SA lifetime (the shorter one is used).
Mismatched proxy IDs are the classic interop problem between vendors with policy-based VPNs; route-based VPNs often use 0.0.0.0/0 selectors.
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
IKE Phase 2 (Quick Mode in IKEv1) negotiates the IPsec SAs that protect actual traffic: ESP algorithms, the traffic selectors (which networks are protected), PFS group and lifetimes. Phase 2 runs inside the protected phase 1 channel and is renegotiated (rekeyed) regularly.
| Parameter | Recommended |
|---|---|
| ESP encryption | AES-GCM-256/128 (or AES-CBC + SHA-256 HMAC) |
| PFS | Enabled, ECP group 19/20 |
| Lifetime | 3600 s and/or a data volume limit |
| Traffic selectors | Match exactly on both peers (policy-based VPNs) |
Typical phase 2 failures: proxy-ID/traffic selector mismatch (one side defines 10.1.0.0/16, the other 10.1.1.0/24), PFS enabled on one side only, or different transform sets. Phase 1 up but no traffic means look at phase 2.
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 IPsec → IKE Phase 2. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc4301 · confidence 94%