遊戲連線站
VPN

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

By 鍾晏青 · · 11 min
Show crypto IPsec sa: How to Check Cisco IPsec VPN Security Associations

Learn how to use show crypto ipsec sa to verify tunnel traffic, inspect counters, and troubleshoot Cisco IPsec VPNs.

nord-vpn-microsoft-edge
nord-vpn-microsoft-edge

The Cisco IOS command show crypto ipsec sa displays the IPsec security associations (SAs) on a router or other supported Cisco device. Use it to check which peers and traffic selectors are involved in a VPN, inspect inbound and outbound SAs, and see whether encrypted packets are being sent and decrypted. If you are verifying a tunnel or troubleshooting missing traffic, this is one of the most useful operational commands.

Run it in privileged EXEC mode:

VPN prices compared
VPNObfuscationFrom / monthPlanFree planRefundAlipayWeChatUnionPayCryptoWebsite opens in ChinaTrustpilot
ZoogVPNTurn on manually
Shadow
$2.49/mo27 months: $59.99Yes7 days✓✓✓✓Official site blocked; our special link opens (4.4 s)4.2/5 (195 reviews)
NordVPNTurn on manually
Obfuscated Servers / NordWhisper
$3.49/mo27 months: $94.23No30 days?✗✓✓✗ Blocked4.2/5 (51,628 reviews)
ExpressVPN✓ On by default
all servers
$3.00/mo28 months: $84No30 days✗✗✓✗✗ Blocked4.4/5 (29,706 reviews)
Surfshark✓ On by default
Camouflage, with OpenVPN
See siteSee siteNo30 days✗✗✗✓✗ Blocked4.3/5 (31,823 reviews)
Proton VPNTurn on manually
Stealth, free plan too
$2.99/mo12 months: $35.88Yes30 days✗✗✗✓✗ Blocked2.1/5 (1,040 reviews)
Astrill VPNTurn on manually
StealthVPN / OpenWeb
$12.50/mo24 months: $300NoSee site✗✗✗✓✗ Blocked1.3/5 (110 reviews)
Private Internet AccessTurn on manually
Shadowsocks, OpenVPN only
$2.03/mo40 months: $81.2No30 days✗✗✗✗✗ Blocked4.2/5 (11,033 reviews)
CyberGhostTurn on manually
selected servers
$2.19/mo28 months: $61.32No45 days✗✗✗✓✗ Blocked4.0/5 (24,178 reviews)
PureVPNTurn on manually
switch to OpenVPN
$1.69/mo60 months: $101.55No31 days??✗✓✗ Blocked4.4/5 (17,994 reviews)
AdGuard VPN✓ On by default
TrustTunnel
$2.99/mo24 months: $71.76Yes30 days✓✗✓✓Official site blocked; our special link opens (3.7 s)4.3/5 (290 reviews)
MullvadTurn on manually
QUIC / Shadowsocks / LWO
$5.61/mo€5/moNo14 days✗✗✗✓✗ Blocked3.2/5 (192 reviews)
WindscribeTurn on manually
Stealth / WStunnel
$5.75/mo12 months: $69YesSee site✗✗✗✓✗ Blocked4.7/5 (13,355 reviews)
StrongVPNTurn on manually
Scramble, OpenVPN TCP
See siteSee siteNo30 days✓✗✗✗✗ Blocked4.4/5 (2,695 reviews)
LightXtreme 闪连Not listed$7.08/mo12 months: $84.99Yes30 days✓✓✓✓✓ Yes (3.5 s)No page

Prices checked 2026-11-10 on each vendor's pricing page (cheapest long plan, USD). Check the vendor's checkout for the final price.

Obfuscation checked 2026-11-14 on each vendor's site and help center: "on by default" = nothing to set; "turn on manually" = switch protocol or mode in settings; "not listed" = the vendor describes no obfuscation.

Payment methods checked 2026-11-10 on each vendor's payment pages: all 14 take cards and PayPal; ✗ = not listed, ? = the vendor's own pages disagree.

China access: whether the official website opens from mainland China networks (tests the website only, not the VPN connection). Last checked 2026-11-18 01:02 Beijing time.

Trustpilot score and review count checked 2026-11-10.

Router# show crypto ipsec sa

The output can be extensive on a device with multiple VPN peers. You can narrow it to a peer address on platforms that support the option:

Router# show crypto ipsec sa peer 203.0.113.10

Exact syntax and displayed fields vary by Cisco platform and software release. Use show crypto ipsec sa? to check the options available on your device.

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 →

IPsec security association fields and what they tell you

Field or indicatorWhat it describesHealthy signIf unexpected
PeerRemote VPN endpointExpected peer addressCheck peer configuration and routing
Local identityLocal endpoint identityMatches configured identityCompare identity settings on both peers
Inbound SPIIdentifier for inbound SAPresent when SA is establishedCheck whether the inbound SA was created
Outbound SPIIdentifier for outbound SAPresent when SA is establishedCheck whether the outbound SA was created
Encryption algorithmCipher used for trafficMatches the agreed policyCompare transform and proposal settings
Integrity algorithmAuthentication or integrity methodMatches the agreed policyCheck integrity settings at both ends
Encapsulation modeTunnel or transport modeMatches the intended VPN designVerify the configured mode
Packet countersTraffic processed by the SAIncrease when matching traffic flowsCheck traffic, selectors, and SA status
SA lifetimeTime or data limit before rekeyConsistent with the configured policyReview lifetime and rekey behavior

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

What the command shows

IPsec uses SAs to define how traffic is protected between peers. An SA includes details such as the peer, the traffic being protected, the security protocol, and the keys and algorithms used. SAs are directional, so a working connection normally has an inbound and an outbound SA for each protected traffic flow.

Depending on the device and configuration, the command may show:

  • The local and remote IPsec endpoints
  • The local and remote identities or traffic selectors
  • The transform set or negotiated encryption and authentication details
  • Inbound and outbound SPI values
  • SA lifetime information
  • Packet and byte counters
  • Encapsulation, encryption, decryption, and authentication statistics
  • Errors such as replay drops or failed decryptions

An SA in the output means IPsec state exists for the displayed traffic. It does not, by itself, prove that an application is reachable or that all routing and firewall policies are correct.

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

How to read the important fields

Start by matching the peer address and selectors to the VPN you are checking. The selectors identify the traffic covered by the SA, such as a local subnet communicating with a remote subnet. If they do not match the intended networks, the tunnel may be protecting different traffic than expected. Clash Meta for iOS: What It Is and How to Use It Safely

Next, examine the inbound and outbound SA details. Each direction has its own SPI, or Security Parameter Index. The SPI helps the receiving device identify the SA used for an incoming IPsec packet. You generally do not need to interpret the SPI manually, but its presence is useful when confirming that SAs were negotiated.

The packet counters are often the fastest way to assess activity:

  • encapsulated or encrypted packets indicate that the device has protected outbound traffic.
  • Decapsulated or decrypted packets indicate that the device has received and processed inbound IPsec traffic.
  • Bytes provide a volume measure alongside packet counts.
  • Error or drop counters may point to authentication, replay, policy, or packet-processing problems.

Compare counters before and after generating traffic that should cross the VPN. A single snapshot cannot show whether counters are increasing.

Observation Likely meaning Useful next check
Both directions’ counters increase Traffic is likely crossing the IPsec connection Confirm the application and return path
Outbound counters increase, inbound counters do not Local traffic is being encrypted, but replies are not arriving or being accepted Check the remote peer, routing, selectors, and ACLs
Inbound counters increase, outbound counters do not The device receives VPN traffic, but may not have matching return traffic Check local routing, host response, and security policy
No counters increase No matching traffic has been sent, or traffic is not reaching the IPsec policy Check routes, traffic selectors, and test traffic
Error counters rise Packets are arriving but failing some processing check Inspect the specific error and device logs

These are diagnostic clues, not definitive diagnoses. Platform behavior and counter names differ, and a counter can remain unchanged simply because no matching traffic has been generated. Urban VPN Chrome: How to Install, Use, and Choose Safely

A practical verification workflow

Use a short, repeatable sequence so you can distinguish an inactive tunnel from a traffic-flow problem.

  1. Check the configuration and peer. Confirm that the expected peer and protected networks are configured.
  2. Review the IPsec SAs. Run show crypto ipsec sa and locate the relevant peer and selectors.
  3. Record the counters. Note the inbound and outbound packet counts.
  4. Generate matching traffic. For example, send traffic from a host in the protected local subnet to a valid host in the remote subnet. A ping from the router itself may not use the same source address or match the same selectors.
  5. Run the command again. Check whether the relevant counters changed.
  6. Test the application and return path. IPsec counters can show that packets were processed without confirming that the destination host or service responded.

When testing, make sure the source and destination addresses fall within the configured traffic selectors. Traffic outside those selectors may travel without encryption or may be dropped, depending on the design.

Verification approaches for a Cisco IPsec VPN

ApproachBest forWhat it can confirmMain limitationNext step
`show crypto ipsec sa`Checking data-plane SAsSPI, algorithms, counters, and SA detailsDoes not by itself explain every negotiation failureInspect IKE status and logs
Check packet countersConfirming traffic matches an SAWhether encapsulation or decapsulation is increasingCounters alone do not prove end-to-end deliveryGenerate matching traffic and recheck
Review peer and selectorsValidating intended trafficWhether peer and traffic identities look correctOutput may not show the full configuration contextCompare with the configured crypto ACL
Check IKE security associationsDiagnosing negotiation stateWhether the control-plane exchange is establishedAn IKE SA does not guarantee IPsec traffic is passingCheck IPsec SAs and counters
Review logsInvestigating errors and rekeysNegotiation or policy messagesMessages may be incomplete or platform-specificCorrelate timestamps with SA output
Compare both peersFinding mismatched settingsDifferences in policy, identity, or traffic selectorsRequires access to both endpointsAlign settings and retest
Use a controlled traffic testVerifying a real traffic pathWhether test traffic increments relevant countersTest traffic must match the configured selectorsCheck counters on both peers

Compiled November 2026; check the provider's site for current details. Urban VPN for Edge Extension: Installation, Features, and Safety

Troubleshooting common results

No SA appears

If the expected SA is missing, the peers may not have established IPsec state for that traffic. Check IKE status, peer reachability, and whether interesting traffic has been generated. Also confirm that both sides agree on the protected networks and IPsec parameters.

Useful companion commands can include:

show crypto isakmp sa
show crypto ikev2 sa
show crypto session

The right command depends on whether the device uses IKEv1, IKEv2, and which platform it runs. These commands help examine IKE negotiation or overall session state, while show crypto ipsec sa focuses on IPsec SAs and data-plane counters.

Outbound counters rise, but inbound counters stay flat

The local device may be encrypting traffic successfully, while replies fail to return. Check the remote device’s SA counters, its route back to the local network, and any firewall or access-control rules along the path. Confirm that the remote selectors match the local configuration. Urban VPN Extension for Microsoft Edge: How to Install and Use It

Inbound counters rise, but the application still fails

IPsec may be delivering traffic to the device, but a later step can still prevent communication. Check routing from the VPN device to the destination, security policies, host firewalls, and whether the destination service is listening. Also verify that return traffic follows a path that matches the VPN policy.

Counters remain at zero

First make sure you are inspecting the correct peer and traffic selectors. Then confirm that test traffic reaches the VPN device and matches the configured policy. Check routing and access lists, and avoid relying only on router-originated tests if the VPN is intended to carry traffic between subnets.

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

Limits and safe use

show crypto ipsec sa is primarily a status and troubleshooting command. It does not replace configuration review, packet captures, routing checks, or application testing. A populated SA can coexist with a broken user experience, and an inactive SA may be normal when a VPN is configured to establish on demand.

Avoid sharing full command output publicly without reviewing it. Although it does not ordinarily display the private key itself, the output can reveal peer addresses, network ranges, algorithms, and other details that may be sensitive. Forti VPN Client: Setup, Features, and Troubleshooting

Common `show crypto ipsec sa` results and response

ResultWhat it may meanCheck firstSafe response
No IPsec SA shownNo matching SA is established or displayedPeer, IKE state, and traffic selectorsCheck configuration and logs before changing state
SA present; counters stay stillNo matching traffic is reaching the SATraffic source, destination, and selectorsSend controlled test traffic
Encapsulation rises; decapsulation does notLocal traffic is sent but replies are not observedRemote peer, return path, and remote countersVerify routing and peer status
Decapsulation rises; encapsulation does notInbound traffic arrives without matching outbound trafficLocal traffic generation and selectorsCheck the intended traffic flow
SPI differs between peersSAs may be viewed in opposite directions or may not alignInbound versus outbound SPI on each peerCompare corresponding directions, not labels alone
Algorithms look unexpectedSA may use a different negotiated policyConfigured proposals and peer policyConfirm the active policy before making changes
SA repeatedly rekeysRekey negotiation or lifetime behavior may be involvedLifetimes, logs, and peer configurationInvestigate both endpoints before clearing SAs
Output is truncated or platform-specificCommand format or display differs by software releaseDevice model, software version, and full outputUse the platform’s supported show commands
Clearing an SA is being consideredReset may interrupt traffic temporarilyWhether the cause is understood and change is approvedPrefer diagnosis first; clear only under an approved plan

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

Recommendation

Use show crypto ipsec sa to verify the peer, traffic selectors, SA details, and, most importantly, whether packet counters increase when you generate matching traffic. If the counters do not explain the problem, pair the result with IKE status, routing, policy, and endpoint checks rather than treating the SA output as proof that the entire VPN path works.

© 2026 Fernhollow Play Media · Fernhollow Play Media Ltd.