Use it after building an IPsec tunnel, or when traffic does not pass through it.
Verification · IPsec
Verify IPsec with show crypto ikev2 sa (or show crypto isakmp sa), show crypto ipsec sa (encaps/decaps counters increasing on both sides) and show interfaces tunnel, then test with traffic that must use the tunnel.
1. Verify IPsec: IKE up, child SAs, counters both ways, routing into the tunnel.
2. One-way counters mean return routing or selector issues.
3. Check NAT-T and firewall.
4. Check lifetimes and rekeys.
5. Compare configs on both peers.
IKE SA → IPsec SAs → routing → encaps/decaps
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
show crypto ikev2 saShow Commands
Read-only Cisco show commands for confirming state, narrowing a fault and interpreting the current boundary.
show crypto ikev2 saShowDisplay IKEv2 security associations.
Use when: Use this command at the IPsec / Site-to-Site VPN boundary in the documented evidence chain.
Quick note: Cisco IOS / IOS XE first. IKE established does not prove that the required traffic matches an IPsec SA or decrypts successfully.
Cisco IOS / IOS XE · mixedshow crypto sessionShowDisplay VPN crypto sessions and their status.
Use when: Use as the prior manifest-approved bounded observation/validation surface for this exact Topic.
Quick note: Restores exact/ ownership only; this authored guidance is not observed production Evidence.
Cisco IOS / IOS XE · control planeshow interfaces tunnel <id>ReferenceInspect tunnel state and endpoints.
Use when: Use this command at the IPsec / Site-to-Site VPN boundary in the documented evidence chain.
Quick note: Cisco IOS / IOS XE first. IKE established does not prove that the required traffic matches an IPsec SA or decrypts successfully.
IOS/IOS XE · mixedshow crypto ipsec saShowDisplay IPsec SAs with encrypt/decrypt counters.
Use when: Use this command at the Network Virtualization / Overlay boundary in the documented evidence chain.
Quick note: Cisco IOS / IOS XE first. Healthy underlay reachability does not prove overlay mappings; an overlay mapping does not prove encapsulated forwarding.
Cisco IOS / IOS XE · mixedHow to read the output
show interfaces tunnel <id>Look first: line/protocol state, errors/discards, rate, duplex/speed, last input/output
Healthy: State and counters align with expected traffic and physical conditions.
Warning: CRC/input errors, drops, resets, queue drops or unexpected negotiation.
Does not prove: An interface counter is a symptom until correlated with path/time/workload.
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 Known-good, broken and when it is fixed Verify boundary
Known-good means the expected IKEv2 peer/session is established, matching IPsec SAs exist for the intended traffic, encapsulation and decapsulation counters increase with the controlled original flow, and the application succeeds in both required directions. Broken evidence includes no IKE SA, missing CHILD_SA, selector mismatch, one-sided counter increments or tunnel state inconsistent with routing. The limit of what it shows is that show crypto state shows negotiated/protected packet handling only within its scope, but it does not show inner routing, application authorization or reverse-path correctness unless the workload test also closes.
Step 2 Verification and output interpretation Verify boundary
Healthy evidence includes the expected peer identity, negotiated IKE/IPsec state, increasing encapsulation and decapsulation counters, absence of persistent decrypt/auth/replay errors and correct route/selector mapping. Re-run counters around a known test flow rather than trusting lifetime totals. A ping can be useful as a controlled stimulus but does not replace application-level validation.
Step 3 Verification & troubleshooting Narrow the fault
Step 4 Native failure isolation and next-check logic Narrow the fault
Start with the exact protected source/destination flow and verify underlay reachability to the peer. If IKEv2 is absent, branch to peer reachability, identity, proposals, certificates/PSK and time; if IKE is up but IPsec SAs are missing, inspect CHILD_SA negotiation/selectors and policy. If SAs exist but traffic fails, generate the original flow and watch encaps/decaps counters in both directions; one-sided counter movement points toward selector, return-route, peer or policy asymmetry. For VTI/GRE-over-IPsec, also verify tunnel/routing state without assuming interface up shows encryption success.
- 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.
show crypto ikev2 sa— IKEshow crypto ipsec sa— IPsecshow crypto session detail— summarydebug crypto ikev2 error— failures (lab)
ReferenceHow it works1 section · depth on demand
How it works
IPsec verification separates IKE/control-plane Security Association state from ESP data-plane protection. IKEv2 can be established while CHILD_SA selectors, transforms, routing or peer policy prevent protected traffic; conversely, stale counters can make an old SA look active. Direction matters because inbound and outbound SPI/counters are independent. For route-based designs, tunnel-interface state adds another boundary but still depends on underlay reachability and the selected protected path.
ReferenceImportant terms & boundaries4 sections · depth on demand
In depth
Verifying IPsec: IKE first, then the IPsec SAs, then traffic
Troubleshoot in the order the tunnel is built: the IKE SA must be up before the IPsec (Child) SAs exist, and the SAs must exist before traffic is encrypted. RFC 4303 identifies each ESP SA by its SPI at the receiver, so a working tunnel shows one inbound and one outbound SPI per SA pair, with counters increasing in both directions.
R1# show crypto ikev2 sa
IPv4 Crypto IKEv2 SA
Tunnel-id Local Remote fvrf/ivrf Status
1 198.51.100.2/500 203.0.113.2/500 none/none READY
Encr: AES-GCM, keysize: 256, PRF: SHA384, Hash: None, DH Grp:20, Auth sign: PSK, Auth verify: PSK
Life/Active Time: 86400/41522 sec
R1# show crypto ipsec sa interface Tunnel100
interface: Tunnel100
Crypto map tag: Tunnel100-head-0, local addr 198.51.100.2
protected vrf: (none)
local ident (addr/mask/prot/port): (0.0.0.0/0.0.0.0/0/0)
remote ident (addr/mask/prot/port): (0.0.0.0/0.0.0.0/0/0)
current_peer 203.0.113.2 port 500
#pkts encaps: 1882231, #pkts encrypt: 1882231, #pkts digest: 1882231
#pkts decaps: 1794410, #pkts decrypt: 1794410, #pkts verify: 1794410
#send errors 0, #recv errors 0
inbound esp sas:
spi: 0x8C1F22A1(2350850721)
transform: esp-gcm 256 ,
in use settings ={Tunnel, }
sa timing: remaining key lifetime (k/sec): (4607612/2311)
replay detection support: Y
outbound esp sas:
spi: 0x4D02B7E3(1292023779)
R1# show crypto session detail
R1# debug crypto ikev2
What to look for
| Check | Healthy |
|---|---|
| IKEv2 SA status | READY |
#pkts encaps and #pkts decaps | Both rising |
#send errors, #recv errors | 0, or not increasing |
| Inbound and outbound SPIs | Both present |
| Replay detection | Y (RFC 4303 allows anti-replay only together with integrity) |
| Remaining key lifetime | Counting down; rekeys before reaching 0 |
Common faults
| Symptom | Likely cause |
|---|---|
| No IKE SA | UDP 500/4500 blocked, wrong peer address, no matching proposal |
| IKE fails at authentication | Pre-shared key or certificate mismatch; identity doesn't match the profile |
| IKE up, no IPsec SA | Transform set or traffic selectors don't match |
| Encaps rising, decaps zero | The peer isn't sending back: its routing, its NAT, or ESP blocked on the path |
| Decaps rising, encaps zero | Local routing doesn't send traffic into the tunnel |
| Replay errors | Packet reordering across QoS queues or paths; widen the replay window |
Anti-replay (RFC 4303)
The receiver keeps a sliding window and drops duplicates and packets older than the window. The minimum window is 32 packets and the recommended default 64. QoS that reorders packets between priority and best-effort queues can push valid packets outside a small window.
Documented example, not captured output.
Method
IPsec verification checks each layer of the VPN in turn.
1. IKE SA: show crypto ikev2 sa — status READY.
2. IPsec SAs: show crypto ipsec sa — both inbound and outbound SPIs present.
3. Counters: #pkts encaps and #pkts decaps both increasing during traffic.
4. Routing: the destination network routes into the tunnel (VTI) or matches the crypto ACL.
5. End-to-end test: ping/traceroute from inside networks, not only from the router.
State model and protocol mechanics
Limits and common misconceptions
No single “up” flag shows the VPN end to end. IKE up without a child SA is incomplete, child SA up without counter increments may mean no matching traffic, outbound increments without inbound increments suggests a return or peer-side issue, and bidirectional counters still do not show the application works. Treat verification as correlated evidence, not a binary tunnel lamp.
ReferenceConfiguration & state1 section · depth on demand
Design and configuration model
Use a stable verification order instead of relying on one command. Start with peer reachability and route resolution, then inspect IKE, IPsec SAs, negotiated parameters, lifetimes and counters. For route-based VPNs, include tunnel interface and routing-table state. For policy-based designs, include selectors/ACLs. Capture both directions because one-sided encryption can coexist with a broken return path.
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 Virtualization & Overlays → IPsec → Verification. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc4301.html · confidence 94%Quick lookup tables
Verification · operational reference
Compact state and interpretation boundaries for fast lookup.
| State / evidence | Interpretation |
|---|---|
| Underlay | Peer reachable |
| IKE | Control/key state |
| IPsec SA | Protected data state |
| Counters | Traffic actually using SA |