Monitoring IPSec
This section contains information about troubleshooting and monitoring IPSec.
System Event Logs
To troubleshoot and monitor IPSec, use the following system event logs:
- auditIpsecLower layers of IKE SA negotiations
- ikepkiUpper layers of IKE SA negotiations
- stTunnelSecure tunnel interface
For more information about using event logs, see the JUNOSe System Event Logging Reference Guide.
show Commands
To view your IPSec configuration and to monitor IPSec tunnels and statistics, use the following show commands.
show ipsec ike-policy-rule
NOTE: The show ipsec ike-policy-rule command replaces the show ipsec isakmp-policy-rule command, which may be removed completely in a future release.
- Protection suite priorityPriority number assigned to the policy rule
- encryption algorithmEncryption algorithm used in the IKE policy: des, 3des
- hash algorithmHash algorithm used in the IKE policy: SHA, MD5
- authentication methodAuthentication method used in the IKE policy: RSA signature, preshared keys
- Diffie-Hellman groupSize of the Diffie-Hellman group: 768-bit, 1024-bit, 1536-bit
- lifetimeLifetime of SAs created with this policy: 60 to 86400 seconds
- aggressive modeAllowed or not allowed
host1#show ipsec ike-policy-ruleIKE Policy Rules:Protection suite priority: 5encryption algorithm :3DES Triple Data Encryption Standard(168 bit keys)hash algorithm :SHA Secure Hash Standardauthentication method:RSA SignaturesDiffie-Hellman group :5 (1536 bit)lifetime :7200 secondsaggressive mode :Not AllowedProtection suite priority: 6encryption algorithm :3DES Triple Data Encryption Standard(168 bit keys)hash algorithm :SHA Secure Hash Standardauthentication method:Pre Shared KeysDiffie-Hellman group :2 (1024 bit)lifetime :28800 secondsaggressive mode :Not Allowedshow ipsec ike-sa
NOTE: The show ipsec ike-sa command replaces the show ike sa command, which may be removed completely in a future release.
- Local:PortLocal IP address and UDP port number of phase 1 negotiation
- Remote:PortRemote IP address and UDP port number of phase 1 negotiation
- Time(Sec)Time remaining in phase 1 lifetime, in seconds
- StateCurrent state of the phase 1 negotiation. Corresponds to the messaging state in the main mode and aggressive mode negotiations. Possible states are:
- AM_SA_IInitiator has sent initial aggressive mode SA payload and key exchange to the responder
- AM_SA_RResponder has sent aggressive mode SA payload and key exchange to the initiator
- AM_FINAL_IInitiator has finished aggressive mode negotiation
- AM_DONE_RResponder has finished aggressive mode negotiation
- MM_SA_IInitiator has sent initial main mode SA payload to the responder
- MM_SA_RResponder has sent a response to the initial main mode SA
- MM_KE_IInitiator has sent initial main mode key exchange to the responder
- MM_KE_RResponder has sent a response to the key exchange
- MM_FINAL_IInitiator has sent the final packet in the main mode negotiation
- MM_FINAL_RResponder has finished main mode negotiation
- MM_DONE_IInitiator has finished main mode negotiation
- DONEPhase 1 SA negotiation is complete, as evidenced by receipt of some phase 2 messages
- Local CookieUnique identifier (SPI) for the local phase 1 IKE SA
- Remote CookieUnique identifier (SPI) for the remote phase 1 IKE SA
host1#show ipsec ike-saIKE Phase 1 SA's:Local:Port Remote:Port Time(Sec) State Local Cookie Remote Cookie195.0.0.100:500 195.0.0.200:500 1551 DONE 0x90ee723e6cb0c016 0xf7d3651e93d56431195.0.0.100:500 195.0.0.200:500 1552 DONE 0x821bccf81dcedbb0 0x35152bdb7a9c734e195.0.1.100:500 195.0.1.200:500 1687 DONE 0x1b4fbcebe36d1b16 0xed742166a305a6a0195.0.1.100:500 195.0.1.200:500 1687 DONE 0xacf3acd1b3555b6a 0x0af9edbc95622869195.0.2.100:500 195.0.2.200:500 1688 DONE 0x3153379b32d8c936 0x17f5d77f9badc3cf195.0.2.100:500 195.0.2.200:500 1688 DONE 0x6573dcbc9bf31fae 0x7af8b4d13078b463195.0.3.100:500 195.0.3.200:500 1685 DONE 0xdc7df648fcac375a 0x0346752d2881d5c5195.0.3.100:500 195.0.3.200:500 1685 DONE 0xe776e9ffb6678635 0x8de857af1c681874195.0.4.100:500 195.0.4.200:500 1690 DONE 0x16410d890500e94e 0xbd47831b55e81c27show ipsec lifetime
host1#show ipsec lifetimeDefault lifetime in seconds is '7200'.Default lifetime in kilobytes is '4294967295'.show ipsec local-endpoint
- Use to display the address and transport virtual router of local endpoints.
- To display the local endpoint of a specific transport virtual router, include the virtual router name.
- Example
host1#show ipsec local-endpoint transport-virtual-router defaultLocal endpoint for transport-virtual-router default is '0.0.0.0'.show ipsec option
- Use to display the status, enabled or disabled, of IPSec options configured on the current virtual router. Information is displayed for the following options:
- Dead peer detection (DPD)
- Network Address Translation Traversal (NAT-T). For information about configuring and monitoring NAT-T on L2TP/IPSec tunnels, see Chapter 13, Securing L2TP and IP Tunnels with IPSec.
- Transmission of invalid cookie notification in ISAKMP messages to peers
host1:vrA#show ipsec optionIPsec options:Dead Peer Detection: disabledNAT Traversal : enabledTX Invalid Cookie : disabledshow ipsec transform-set
- Use to display transform sets configured on the router.
- To display a specific transform set, include the transform set name.
- Field descriptions
host1#show ipsec transform-setTransform-set: Highest security = {esp-3des-hmac-sha }.Transform-set: transform-esp-3des-hmac-sha = {esp-3des-hmac-sha }.Example 2 host1#show ipsec transform-set transform-esp-3des-hmac-shaTransform-set: transform-esp-3des-hmac-sha = {esp-3des-hmac-sha}.show ipsec tunnel detail
- IPSEC tunnelName and state of tunnel for which information is displayed
- Tunnel operational configurationConfiguration running on the tunnel
- Tunnel typeManual, signaled
- Tunnel mtuMTU size of the tunnel
- Tunnel localEndpointIP address of local tunnel endpoint
- Tunnel remoteEndpointIP address of remote tunnel endpoint
- Tunnel sourceIP address or FQDN of tunnel source
- Tunnel destinationIP address or FQDN of tunnel destination
- Tunnel backup destinationAlternate tunnel destination
- Tunnel transport virtual routerName of transport virtual router over which tunnel runs
- Tunnel transform setTunnel transform set in use on this tunnel
- Tunnel local identityIP address of local endpoint identity that ISAKMP uses
- Tunnel peer identityIP address of peer endpoint identity that ISAKMP uses
- Tunnel outbound spi/SASPI and SA in use on traffic sent to the tunnel (manual tunnels only)
- Tunnel inbound spi/SASPI and SA in use on traffic received from the tunnel (manual tunnels only)
- Tunnel lifetime secondsConfigured time-based lifetime in seconds
- Tunnel lifetime kilobytesConfigured traffic-based lifetime in kilobytes
- Tunnel pfsPFS group in use on the tunnel: 0 (PFS is not in use), 1 (768-bit group), 2 (1024-bit group), 5 (1536-bit group)
- Tunnel administrative stateUp, Down
- inbound/outboundSpi/SASPI in use on traffic received from or sent to the tunnel
- inbound/outboundSaSA in use on traffic received from or sent to the tunnel
- inbound/outbound lifetime allowedNegotiated time-based lifetime in seconds
- inbound/outbound lifetime remainingNumber of seconds remaining before time-based lifetime expires
- inbound/outbound traffic allowedNegotiated traffic-based lifetime in kilobytes
- inbound/outbound traffic remainingNumber of additional kilobytes that tunnel can send or receive before traffic-based lifetime expires
- InUserPacketsNumber of user packets received
- InUserOctetsNumber of octets received from user packets
- InAccPacketsNumber of encapsulated packets received
- InAccOctetsNumber of octets received in encapsulated packets
- InAuthErrorsNumber of authentication errors received
- InReplayErrorsNumber of replay errors in received traffic
- InPolicyErrorsNumber of policy errors in received traffic
- InOtherRxErrorsNumber of packets received that have errors other than those listed above
- InDecryptErrorsNumber of decryption errors in received traffic
- InPadErrorsNumber of packets received that had invalid values after the packet was decrypted
- OutUserPacketsNumber of user packets sent
- OutUserOctetsNumber of octets sent in user packets
- OutAccPacketsNumber of encapsulated packets sent
- OutAccOctetsNumber of octets sent in encapsulated packets
- OutPolicyErrorsNumber of packets arriving at tunnel for encapsulation that do not meet specified tunnel identifier (selector)
- OutOtherTxErrorsNumber of outbound packets that have errors other than those listed above
hostl#show ipsec tunnel detailIPSEC tunnel r200000 is UpTunnel configuration:Tunnel type is signaledTunnel mtu is 1440Tunnel local endpoint is 195.0.0.200Tunnel remote endpoint is 195.0.0.100Tunnel source is 195.0.0.200Tunnel destination is 195.0.0.100Tunnel backup destination is 0.0.0.0Tunnel transport virtual router is rTunnel transform set is perfTunnel local identity is ipAddress: 4.0.0.100Tunnel peer identity is ipAddress: 3.0.0.100Tunnel lifetime seconds is 7200Tunnel lifetime kilobytes is 1024000Tunnel pfs is group 5Tunnel administrative state is UpTunnel Operational Attributes:inboundSpi = 0x17270202, inboundSa = esp-3des-hmac-shainbound lifetime: allowed 7200s, remaining 7100sinbound traffic: allowed 1024000KB, remaining 1023997KBoutboundSpi = 0x283b0201, outboundSa = esp-3des-hmac-shaoutbound lifetime: allowed 7200s, remaining 7100soutbound traffic: allowed 1024000KB, remaining 1023997KBTunnel Statistics:InUserPackets 15InUserOctets 1920InAccPackets 15InAccOctets 2760InAuthErrors 0InReplayErrors 0InPolicyErrors 0InOtherRxErrors 0InDecryptErrors 0InPadErrors 0OutUserPackets 15OutUserOctets 1920OutAccPackets 15OutAccOctets 2760OutPolicyErrors 0OutOtherTxErrors 0show ipsec tunnel summary
- Total number of ipsec interfaceNumber of tunnels configured on the router
- Administrative statusNumber of tunnels with an administrative status of enabled and disabled
- Operational statusNumber of tunnels with an operational status of up, down, lower layer down, not present
host1#show ipsec tunnel summaryTotal number of ipsec interface is 40Administrative status enabled disabled40 0Operational status up down lower-down not-present40 0 0 0show ipsec tunnel virtual-router
- Use to display the status of tunnels configured on a virtual router.
- To display only tunnels that are in a specific state, use the state keyword.
- To display tunnels that are using a particular IP address, use the ip keyword.
- Field descriptions
host1#show ipsec tunnel virtual-router default ip 10.255.1.13IPSEC tunnel s0l1e3d0 is upIPSEC tunnel s0l1e3d1 is upIPSEC tunnel s0l2e3d0 is upIPSEC tunnel s0l2e3d1 is upIPSEC tunnel s0l3e3d0 is upIPSEC tunnel s0l4e3d0 is upIPSEC tunnel s0l4e3d1 is upIPSEC tunnel s0l5e3d0 is upshow license ipsec-tunnels
- Use to display the IPSec license key configured on the router and the number of tunnels allowed on the router.
- Example
host1#show license ipsec-tunnelsipsec-tunnels license is 'g1k23b23eb2j' which allows 5000 tunnels with 1 IPsec card and 7500 tunnels with 2 or more IPsec cards.