VPN软件免费版评测
VPN

show crypto ipsec sa(2026)

阮星澜··8 min
Show crypto IPsec sa: How to Check and Troubleshoot IPsec Security Associations

Learn how to use show crypto ipsec sa to verify tunnel status, inspect counters, and diagnose common IPsec VPN issues.

The Cisco IOS command show crypto ipsec sa displays the IPsec security associations on a router. Use it to check which traffic is protected, which peer the router is communicating with, what encryption and authentication settings are in use, and whether packets are being sent or received through the tunnel.

It is a key troubleshooting command, but it does not tell the whole story by itself. A tunnel can have an IPsec SA while traffic still fails because of routing, firewall rules, mismatched traffic selectors, or problems elsewhere in the path.

Compare the main fields in `show crypto ipsec sa` output

FieldWhat it showsWhat to checkTypical clue
PeerRemote VPN endpointMatches the expected peerWrong peer may indicate a mismatched SA
Local identLocal protected network or hostMatches the intended local trafficUnexpected subnet can point to a selector issue
Remote identRemote protected network or hostMatches the intended remote trafficUnexpected subnet can point to a selector issue
Inbound esp sasInbound IPsec SA detailsSA is present for the peerMissing SA may indicate negotiation trouble
Outbound esp sasOutbound IPsec SA detailsSA is present for the peerMissing SA may indicate negotiation trouble
#pkts encapsPackets protected and sentCounter increases with outbound trafficNo increase suggests traffic is not being encrypted
#pkts decapsPackets received and decryptedCounter increases with inbound trafficNo increase suggests traffic is not arriving or decrypting
#pkts encryptPackets encryptedCounter increases when protected traffic is sentHelps distinguish encryption from encapsulation counts
#pkts decryptPackets decryptedCounter increases when protected traffic is receivedHelps distinguish decryption from decapsulation counts

Compiled November 2026; check the provider's site for current details.

Run the command and identify the relevant SA

Enter privileged EXEC mode on the Cisco device, then run:

show crypto ipsec sa

If the router has several peers or tunnels, the output may be lengthy. Filter it by peer address when supported by your IOS version:

show crypto ipsec sa peer 203.0.113.10

You can also narrow the output by interface or access list on platforms and software versions that support those options. Use show crypto ipsec sa? to see the filters available on your device.

An SA is a set of negotiated parameters used to protect traffic in one direction. IPsec commonly uses separate inbound and outbound SAs, so a tunnel may show more than one entry for a peer. Find the entry that corresponds to the remote endpoint and the traffic you are testing. clash meta for ios(2026)

show crypto ipsec sa(2026): Checklist

Understand the important output fields

Exact formatting varies across Cisco platforms and IOS releases. The following fields are among the most useful:

Output field What it indicates What to check
current_peer Remote IPsec endpoint Confirm that it is the expected peer
local crypto endpt. Local IPsec endpoint Check the address used by the tunnel
#pkts encaps Packets protected and sent Should increase when matching outbound traffic is generated
#pkts decaps Packets received and decrypted Should increase when protected traffic arrives
#pkts encrypt / #pkts decrypt Encryption and decryption activity Compare with encapsulation and decapsulation counters
#pkts not encap Packets not encapsulated May indicate traffic does not match the crypto policy
#pkts invalid or drop counters Packets rejected or discarded Investigate errors, mismatches, or invalid traffic
inbound esp sas / outbound esp sas Directional ESP SA details Confirm that the expected inbound and outbound SAs exist
transform or algorithm details Negotiated encryption and integrity settings Compare with the peer’s configuration

The peer address and SA details help confirm that a negotiation took place. The counters show whether the router is processing traffic, but they should be interpreted as changes over time, not just as a single snapshot.

Interpret common IPsec counter patterns

Encaps / encryptDecaps / decryptLikely interpretationNext check
IncreasingIncreasingTraffic flows in both directionsConfirm the protected application works
IncreasingNot increasingOutbound traffic is sent, but inbound traffic is absentCheck the remote peer and return path
Not increasingIncreasingInbound traffic arrives, but outbound traffic is absentCheck local traffic and routing
Not increasingNot increasingNo matching traffic is being processedGenerate protected traffic and verify selectors
IncreasingIncreasing, but traffic failsIPsec carries packets, but another issue may remainCheck routing, firewall policy, and endpoints
Present SAsCounters stay stillSAs exist, but no matching traffic is seenVerify traffic matches local and remote identities
Missing inbound SAOutbound SA presentSA setup may be incomplete in one directionInspect IKE and peer negotiation
Missing outbound SAInbound SA presentSA setup may be incomplete in one directionInspect IKE and peer negotiation

Compiled November 2026; check the provider's site for current details. urban VPN chrome(2026)

Check whether traffic is flowing

Take a counter reading, generate traffic that should cross the VPN, then run the command again. For example, send a ping from a host on one protected subnet to a reachable host on the remote protected subnet.

  • If #pkts encaps increases, the router is matching and protecting outbound packets.
  • If #pkts decaps increases, protected packets are arriving and being decrypted.
  • If both increase, the tunnel is carrying traffic in both directions.
  • If one increases while the other stays at zero, traffic may be flowing in only one direction, or the return path may be failing.

A successful ping is not always a reliable test. The destination might block ICMP, or the ping might originate from an address that is not included in the VPN’s traffic selectors. Test with traffic from the actual protected hosts when possible, and verify that the source and destination addresses match the configured crypto ACL or equivalent policy.

Counters can remain visible after traffic stops, so their presence alone does not prove that the tunnel is currently passing packets. Compare values before and after a test. If necessary, clear the relevant counters or SAs only during an approved maintenance window, since doing so can interrupt active VPN traffic.

Diagnose common counter patterns

The counters help narrow down where to investigate, but they do not identify every root cause. urban VPN for edge extension(2026)

Encapsulation increases, decapsulation does not

The local router is sending protected packets, but no matching protected traffic is being received. Check:

  • Whether the remote peer is reachable and has a matching IPsec configuration.
  • The remote peer’s routing and firewall rules.
  • Whether the peer’s traffic selectors or crypto ACL match the local configuration.
  • Whether NAT is changing addresses in a way that affects the VPN policy.
  • Whether the remote network has a route back to the local protected subnet.

Decapsulation increases, encapsulation does not

The router is receiving protected traffic, but it may not be sending the expected return traffic. Check local routing, host gateways, access rules, and whether return packets match the local VPN policy.

Neither counter increases

First confirm that the test traffic is using the intended router and matches the protected subnets. Then check the route to the peer, the VPN policy, and whether the IPsec SA exists. If there is no negotiated SA, inspect IKE status as well.

Error or drop counters rise

Look for mismatches in proposals, keys, peer addresses, traffic selectors, or packet handling. Some errors are transient or platform-specific, so check related logs and IKE output before changing settings. urban VPN extension for microsoft edge(2026)

show crypto ipsec sa(2026): Key points

Choose a related command for a complete IPsec check

CommandMain purposeUseful whenWhat it complements
`show crypto ipsec sa`Inspect IPsec SAs and traffic countersChecking protected traffic and SA detailsShows data-plane SA state
`show crypto isakmp sa`Inspect IKE / ISAKMP SA stateChecking whether peers established IKEAdds IKE negotiation context
`show crypto ikev2 sa`Inspect IKEv2 SA stateThe connection uses IKEv2Adds IKEv2 negotiation context
`show crypto session`Summarize crypto sessionsReviewing peer and session statusProvides a session-level view
`show crypto map`Inspect crypto map configurationVerifying applied VPN policyHelps check policy and peer settings
`show access-lists`Inspect access-list entries and matchesVerifying traffic selectors or matching rulesHelps confirm traffic is selected
`show ip route`Inspect routing decisionsChecking the path to a protected destinationHelps identify routing problems
`ping`Generate and test reachability trafficTesting a destination across the tunnelCan help trigger counters and test connectivity

Compiled November 2026; check the provider's site for current details.

show crypto ipsec sa reports the IPsec data-plane SAs. Use related commands to inspect negotiation and overall status:

show crypto isakmp sa
show crypto ikev2 sa
show crypto session
show crypto map
show access-lists
show ip route

Which IKE command applies depends on whether the tunnel uses IKEv1 or IKEv2. These commands help answer different questions: Is the peer reachable? Did IKE establish? Is the crypto map or profile applied? Does the router have a route for the protected networks? forti VPN client(2026)

When troubleshooting, follow the packet path: verify the test addresses, confirm routing and policy matches, check IKE negotiation, inspect IPsec SAs and counters, then examine the remote peer and return route. Avoid making changes based only on one counter or one SA field.

Recommendation

Use show crypto ipsec sa to verify the peer, negotiated IPsec parameters, and, most importantly, counter changes during a controlled traffic test. If the counters do not behave as expected, correlate the output with IKE status, routing, access lists, and the remote peer’s configuration before changing the VPN.

© 2026 青枫软件评测 · Qingfeng Software Review Ltd.