VPN推荐评测
VPN

Show crypto IPsec sa: How to Check Cisco IPsec Security Associations

顾沐川··8 min
Show crypto IPsec sa: How to Check Cisco IPsec Security Associations

Learn how to run and interpret show crypto ipsec sa, troubleshoot counters, and verify an IPsec VPN on Cisco devices.

The Cisco command show crypto ipsec sa displays the IPsec security associations (SAs) that protect VPN traffic. Use it to confirm whether a tunnel has IPsec SAs, which traffic the SAs cover, and whether encrypted packets are moving in both directions. The command is useful for verifying a working VPN and narrowing down common problems such as mismatched traffic selectors, missing return traffic, or an SA that has not been established.

NordVPN — fast, secure VPN

Editor's pick: NordVPN — fast, secure VPN — Strong encryption, a no-logs policy and apps for every device. 30-day money-back guarantee. Get NordVPN →

Output area and what it tells you

Output areaWhat it showsWhat to checkUseful for
PeerRemote VPN endpointExpected peer addressConfirming the tunnel partner
IKE statusIKE security association stateWhether IKE is establishedChecking control-plane setup
EncapsulationPackets sent into IPsecWhether the count increasesConfirming outbound protected traffic
DecapsulationPackets received and decryptedWhether the count increasesConfirming inbound protected traffic
EncryptionsPackets encrypted locallyWhether the count increasesVerifying outbound encryption
DecryptionsPackets decrypted locallyWhether the count increasesVerifying inbound decryption
Crypto mapApplied IPsec policyExpected map and interfaceChecking policy attachment
Local identLocal protected traffic selectorExpected local subnet or hostFinding selector mismatches
Remote identRemote protected traffic selectorExpected remote subnet or hostFinding selector mismatches

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

What the command shows

An IPsec SA defines how a device protects a particular flow of traffic. It includes details such as the peer address, encryption and integrity algorithms, lifetime, and traffic selectors. IPsec generally creates separate SAs for inbound and outbound traffic, so the output often presents information for both directions.

Run the command in privileged EXEC mode:

Router# show crypto ipsec sa

On a router with multiple VPNs, the output may be lengthy. You can filter it by peer or interface, depending on the platform and software version:

Router# show crypto ipsec sa peer 203.0.113.10
Router# show crypto ipsec sa interface GigabitEthernet0/0

Check the command options supported by your device with: Free VPN That Lets You Choose Location: What to Know

Router# show crypto ipsec sa?

Syntax and displayed fields can vary across Cisco IOS, IOS XE, and other Cisco platforms.

Show crypto IPsec sa: How to Check Cisco IPsec Security Associations: Checklist

How to read the output

A typical output includes the local and remote crypto endpoints, the protected traffic, and packet counters. Field names may differ, but the main items to inspect are consistent.

Output item What it tells you What to check
peer The remote VPN endpoint Confirm it is the expected peer address
local ident and remote ident Traffic selectors for the SA Confirm they match the intended source and destination networks
current_peer The peer associated with the active SA Check for the right remote endpoint
#pkts encaps Packets encrypted and sent into the tunnel Look for increases when local protected traffic is generated
#pkts decaps Packets received and decrypted from the tunnel Look for increases when remote protected traffic is sent
#pkts encrypt and #pkts decrypt Encryption and decryption activity, when shown Compare direction and activity with the test traffic
SPI Security Parameter Index identifying an SA Confirm that an SA exists in each required direction
SA lifetime Remaining time or traffic allowance Check for expiry or frequent re-creation

The local ident and remote ident entries describe the traffic that the SA protects. For example, they may show a local subnet paired with a remote subnet. If those networks are incorrect, traffic may not match the crypto policy even when the peer is reachable.

Verify that traffic is passing

The most useful counters are usually the encapsulation and decapsulation counts. Take a baseline, generate traffic between hosts in the protected networks, then run the command again. Compare the counters rather than relying on a single snapshot. NordVPN Windows 10 VPN: How to Install and Use It

  • If encaps increases, the device is encrypting outbound traffic that matches the IPsec policy.
  • If decaps increases, the device is receiving and decrypting inbound IPsec traffic.
  • If neither increases, traffic may not be reaching the device, matching the selectors, or triggering the VPN.
  • If encaps increases but decaps does not, outbound traffic is being sent, but replies are not arriving or are not being accepted.
  • If decaps increases but encaps does not, remote traffic reaches the device, but local return traffic may be missing or using a different route.

Counters can reset when an SA is cleared, expires, or is re-created. Consider the time since the last reset when interpreting their values. Also remember that some VPN configurations establish SAs only when matching traffic is sent. An idle tunnel may not show active SAs until traffic triggers negotiation.

Symptom-to-check comparison

SymptomFirst checkLikely interpretationNext action
No IPsec SAPeer and IKE statusIKE may not be establishedCheck IKE configuration and reachability
SA exists, counters stay stillEncapsulation and decapsulationNo matching traffic, or traffic is not reaching the peerGenerate matching traffic and recheck
Encapsulation rises, decapsulation does notOutbound and inbound countersReturn traffic may be absent or failingCheck the remote peer and return path
Decapsulation rises, encapsulation does notInbound and outbound countersLocal outbound traffic may not match policyCheck local traffic selectors and routing
Encryption rises, decryption does notEncryptions and decryptionsPeer response or reverse-direction processing may be missingVerify the peer and bidirectional traffic
Wrong local or remote identTraffic selectorsPeers may disagree on protected networksAlign subnet and host selectors
Unexpected peer addressPeer fieldSA may be associated with the wrong endpointConfirm peer configuration
Counters rise but application failsSA counters and end-to-end pathIPsec passes packets, but another issue may remainCheck routing, filtering, and the application

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

Troubleshoot common problems

No IPsec SAs appear

First, generate traffic that should match the VPN’s protected networks. If no SAs appear, check whether the traffic reaches the router and matches the configured crypto ACL or traffic selectors. Confirm that the remote peer is reachable and that the IKE negotiation succeeds. Clash Meta for iOS: What It Is and How to Use It Safely

Useful companion commands include:

Router# show crypto isakmp sa
Router# show crypto ikev2 sa
Router# show crypto map
Router# show access-lists

Use the IKE command that applies to the device and VPN configuration. IKE establishes the control-plane relationship; show crypto ipsec sa shows the data-plane SAs used to protect traffic.

Encapsulation rises, but decapsulation stays at zero

This pattern often points to a problem beyond outbound encryption. Check the remote peer’s configuration, routing back to the local networks, firewall rules, and whether the remote device has matching traffic selectors. Confirm that the peer is receiving the packets and that its return traffic uses the VPN.

Decapsulation rises, but applications still fail

Decrypted packets may still be blocked or misrouted after they arrive. Check interface ACLs, firewall policies, NAT rules, host firewalls, and routes to the destination network. Verify that the selectors cover the actual host addresses and subnets used by the application. iPhone VPN: How to Choose, Set Up, and Use One

NAT can also interfere with VPN traffic. Confirm that VPN traffic is exempted from translation when required by the design, and make sure the translated addresses do not conflict with the configured selectors.

SAs appear but counters do not move

An established SA does not prove that a particular application flow is using it. Check that the test traffic matches the selectors, that the source host is using the expected gateway, and that routing sends the traffic toward the VPN device. Repeat the test while watching the counters.

Show crypto IPsec sa: How to Check Cisco IPsec Security Associations: Key points

A practical verification sequence

Use a consistent sequence to separate negotiation problems from forwarding problems:

  1. Confirm the peer’s reachability and verify the IKE SA with the appropriate IKE status command.
  2. Run show crypto ipsec sa and check that the expected peer and selectors are present.
  3. Record the current encapsulation and decapsulation counters.
  4. Send test traffic between hosts in the protected networks.
  5. Run the command again and compare the counters.
  6. If traffic fails, inspect routing, access lists, NAT, and the remote peer’s corresponding SA and counters.

Avoid clearing SAs as an early troubleshooting step. Clearing them can interrupt active traffic and erase useful counter history. If a reset is necessary, capture the current output first and follow your organization’s change-control process. Forti VPN: What It Is, How It Works, and When to Use It

Practical verification sequence

StepCommand or actionEvidence to look forIf evidence is missing
1Run `show crypto ipsec sa`Expected peer and IPsec SACheck configuration and peer reachability
2Review IKE statusIKE association is establishedTroubleshoot IKE negotiation
3Check local and remote identExpected protected networksCorrect traffic selectors
4Record encapsulation and encryption countersCurrent outbound countsConfirm matching traffic and policy
5Record decapsulation and decryption countersCurrent inbound countsCheck peer response and return path
6Generate traffic between protected endpointsTraffic matches the selectorsVerify source, destination, and routing
7Run the command againRelevant counters increaseRecheck selectors, peer, and path
8Test the application end to endApplication traffic succeedsInvestigate filtering or application issues
9Recheck the SA after troubleshootingExpected SA remains presentReview configuration and tunnel stability

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

Recommendation

Use show crypto ipsec sa to verify the VPN’s data-plane state, and judge success by matching selectors and counters that increase in the expected directions during a controlled traffic test. Pair it with IKE, routing, ACL, and NAT checks to identify whether a failure is in negotiation, traffic matching, or forwarding.

© 2026 信远网络评测 · Xinyuan Net Review Ltd.