show ipsec sa

Displays IPsec Security Association (SA) information.
Syntax
show ipsec sa [ summary ] | [ detail ] | [ [ sa-index ]| [ sa-id id ] ]
Command Default

No command default.

Parameters
summary
Shows a summary of all Security Associations (SAs) in the SA table, including counts for inbound and outbound SAs, paired and unpaired SAs, and those referenced in tunnel protections.
detail
Displays detailed information for all SAs, including paired SA details and advanced fields.
sa-index
Displays SA information based on its index in the SA table.
sa-id id

Displays SA information for the specified SA ID (unique identifier assigned to the SA).

Modes

Network mode

Examples

The following example shows all SAs.

Network# show ipsec sa
[0] sa 129 (0x81) spi 3377481753 (0xc9504819) protocol:esp flags:[inbound ]
[1] sa 130 (0x82) spi 3419487488 (0xcbd13d00) protocol:esp flags:[]

The following example shows SA summar.

Network# show ipsec sa summary
SA Summary:
  Total SA count:
    Total Inbound SAs: 1
    Total Outbound SAs: 1
  Total SA pairs: 1
  Total Isolated SAs: 0
  Total Outbound SAs used in tunnel protection: 1
  Total Inbound SAs used in tunnel protection: 1

The following example shows SA information based on the SA ID. It displays the data in detailed form.

Network# vppctl.sh show ipsec sa sa-id 654
[1] sa 654 (0x28e) spi 3435656779 (0xccc7f64b) protocol:esp flags:[udp-encap ]
   locks 2
   salt 0x0
   reverse-dir-sa 653
   thread-index:2
   seq 24 seq-hi 0
   window 0000000000000000000000000000000000000000000000000000000000000000
   crypto alg aes-cbc-128 key b851b61619dd3a28a503fbf3e82f6e36
   integrity alg sha-256-128 key 021026d91dd6ca7c8ddbccf936d2a6c3136f7314efc34e52b6bb8412c7932d74
   UDP:[src:4500 dst:28520]
   tx/rx:[packets:24 bytes:1920], lost:[packets:0]
   lifetime: installed 132 seconds ago, expires in 1847 seconds
   transport-mode peer-ip: 172.20.20.13

The following example shows SA information based on the SA index in the SA table.

Network# vppctl.sh show ipsec sa 1   
[1] sa 654 (0x28e) spi 3435656779 (0xccc7f64b) protocol:esp flags:[udp-encap ]
   locks 2
   salt 0x0
   reverse-dir-sa 653
   thread-index:2
   seq 60 seq-hi 0
   window 0000000000000000000000000000000000000000000000000000000000000000
   crypto alg aes-cbc-128 key b851b61619dd3a28a503fbf3e82f6e36
   integrity alg sha-256-128 key 021026d91dd6ca7c8ddbccf936d2a6c3136f7314efc34e52b6bb8412c7932d74
   UDP:[src:4500 dst:28520]
   tx/rx:[packets:60 bytes:4800], lost:[packets:0]
   lifetime: installed 315 seconds ago, expires in 1664 seconds
   transport-mode peer-ip: 172.20.20.13

The following example shows detailed SA information, including paired SA details.

Network# show ipsec sa detail
[0] sa 27 (0x1b) spi 3284237068 (0xc3c17b0c) protocol:esp flags:[udp-encap inbound ]
   locks 2
   salt 0x0
   reverse-dir-sa 28
   thread-index:2
   seq 1420 seq-hi 0
   window 1111111111111111111111111111111111111111111111111111111111111111
   crypto alg aes-cbc-128 key [redacted]
   integrity alg sha-256-128 key [redacted]
   UDP:[src:28520 dst:4500]
   tx/rx:[packets:1420 bytes:480576], lost:[packets:0]
   lifetime: installed 788 seconds ago, expires in 1191 seconds
   transport-mode peer-ip: 172.20.20.13
[1] sa 28 (0x1c) spi 3324750791 (0xc62babc7) protocol:esp flags:[udp-encap ]
   locks 2
   salt 0x0
   reverse-dir-sa 27
   thread-index:2
   seq 854 seq-hi 0
   window 0000000000000000000000000000000000000000000000000000000000000000
   crypto alg aes-cbc-128 key [redacted]
   integrity alg sha-256-128 key [redacted]
   UDP:[src:4500 dst:28520]
   tx/rx:[packets:854 bytes:292608], lost:[packets:0]
   lifetime: installed 788 seconds ago, expires in 1191 seconds
   transport-mode peer-ip: 172.20.20.13
History
Release version Command history
2.5.0 This command was introduced.