IPsec Troubleshooting Understanding and Using Debug Commands
IPsec Troubleshooting Understanding and Using Debug Commands
debug Commands
Document ID: 5409
Introduction
Prerequisites
Requirements
Components Used
Conventions
Cisco IOS Software Debugs
show crypto isakmp sa
show crypto ipsec sa
show crypto engine connection active
debug crypto isakmp
debug crypto ipsec
Sample Error Messages
Replay Check Failed
QM FSM Error
Invalid Local Address
IKE Message from X.X.X.X Failed its Sanity Check or is Malformed
Processing of Main Mode Failed with Peer
Proxy Identities Not Supported
Transform Proposal Not Supported
No Cert and No Keys with Remote Peer
Peer Address X.X.X.X Not Found
IPsec Packet has Invalid SPI
IPSEC(initialize_sas): Invalid Proxy IDs
Reserved Not Zero on Payload 5
Hash Algorithm Offered does not Match Policy
HMAC Verification Failed
Remote Peer Not Responding
Packet Encryption/Decryption Error
PIX Debugs
show crypto isakmp sa
show crypto ipsec sa
debug crypto isakmp
debug crypto ipsec
Common RoutertoVPN Client Issues
Inability to Access Subnets Outside the VPN Tunnel: Split Tunneling
Common PIXtoVPN Client Issues
Traffic Does Not Flow After the Tunnel Is Established: Cannot Ping Inside the Network
Behind PIX
After the Tunnel Is Up, User Is Unable to Browse the Internet: Split Tunneling
After the Tunnel Is Up, Certain Applications Do Not Work: MTU Adjustment on Client
Miss the sysopt Command
Verify Access Control Lists (ACLs)
Related Information
Introduction
This document describes common debug commands used to troubleshoot IPsec issues on both the Cisco IOS
Software and PIX/ASA. This document assumes you have configured IPsec. Refer to Common IPsec Error
Messages and Common IPsec Issues for more details.
Refer to Most Common L2L and Remote Access IPsec VPN Troubleshooting Solutions for information on
the most common solutions to IPsec VPN problems. It contains a checklist of common procedures that you
might try before you begin to troubleshoot a connection and call Cisco Technical Support.
Prerequisites
Requirements
There are no specific requirements for this document.
Components Used
The information in this document is based on these software and hardware versions:
Cisco IOS Software
IPsec feature set.
56iIndicates single Data Encryption Standard (DES) feature (on Cisco IOS Software
Release 11.2 and later).
k2Indicates triple DES feature (on Cisco IOS Software Release 12.0 and later). Triple DES
is available on the Cisco 2600 series and later.
PIXV5.0 and later, which requires a single or triple DES license key in order to activate.
The information in this document was created from the devices in a specific lab environment. All of the
devices used in this document started with a cleared (default) configuration. If your network is live, make sure
that you understand the potential impact of any command.
Conventions
Refer to Cisco Technical Tips Conventions for more information on document conventions.
src
12.1.1.1
state
QM_IDLE
connid
1
slot
0
This error is a result of reordering in transmission medium (especially if parallel paths exist), or unequal paths
of packet processing inside Cisco IOS for large versus small packets plus under load. Change the
transformset to reflect this. The reply check is only seen when transformset espmd5hmac is
enabled. In order to surpress this error message, disable espmd5hmac and do encryption only. Refer to
Cisco bug ID CSCdp19680 ( registered customers only) .
QM FSM Error
The IPsec L2L VPN tunnel does not come up on the PIX firewall or ASA, and the QM FSM error message
appears.
One possible reason is the proxy identities, such as interesting traffic, access control list (ACL) or crypto
ACL, do not match on both the ends. Check the configuration on both the devices, and make sure that the
crypto ACLs match.
A show crypto isakmp sa command shows the ISAKMP SA to be in MM_NO_STATE. This also means that
main mode has failed.
dst
10.1.1.2
src
10.1.1.1
state
MM_NO_STATE
connid
1
slot
0
Verify that the phase 1 policy is on both peers, and ensure that all the attributes match.
Encryption DES or 3DES
Hash MD5 or SHA
DiffieHellman Group 1 or 2
Authentication {rsasig | rsaencr | preshare
The access lists on each peer needs to mirror each other (all entries need to be reversible). This example
illustrates this point.
Peer A
accesslist
accesslist
Peer B
accesslist
accesslist
[transform2 [transform3]]
? ahmd5hmac
? ahshahmac
? espdes
? espdes and espmd5hmac
? espdes and espshahmac
? esp3des and espmd5hmac
? esp3des and espshahmac
? complzs
The received IPsec packet specifies a Security Parameters Index (SPI) that does not exist in the security
associations database (SADB). This could be a temporary condition due to:
Slight differences in the aging of security associations (SAs) between the IPsec peers
The local SAs having been cleared
Incorrect packets sent by the IPsec peer
This might also be an attack.
Recommended Action: The peer might not acknowledge that the local SAs have been cleared. If a new
connection is established from the local router, the two peers can then reestablish successfully. Otherwise, if
the problem occurs for more than a brief period, either attempt to establish a new connection or contact the
peer's administrator.
If you occasionally encounter this error message you can ignore it. However if this becomes more frequent,
then you need to investigate what is actually corrupting the packet. This can be due to a defect in the crypto
accelerator.
PIX Debugs
show crypto isakmp sa
This command shows the ISAKMP SA built between peers.
dst
src
state
connid
slot
12.1.1.2
12.1.1.1
QM_IDLE
In the show crypto isakmp sa output, the state should always be QM_IDLE. If the state is MM_KEY_EXCH, it
means either the configured preshared key is not correct or the peer IP addresses are different.
PIX(config)#show crypto isakmp sa
Total
: 2
Embryonic : 1
dst
src
192.168.254.250
10.177.243.187
state
pending
MM_KEY_EXCH
0
created
0
You can rectify this when you configure the correct IP address or preshared key.
Traffic Does Not Flow After the Tunnel Is Established: Cannot Ping
Inside the Network Behind PIX
This is a common problem associated with routing. Ensure that the PIX has a route for networks that are on
the inside and not directly connected to the same subnet. Also, the inside network needs to have a route back
to the PIX for the addresses in the client address pool.
This output shows an example.
! Address of PIX inside interface.
ip address inside 10.1.1.1 255.255.255.240
! Route to the networks that are on the inside segment.
! The next hop is the router on the inside.
route inside 172.16.0.0 255.255.0.0 10.1.1.2 1
After the Tunnel Is Up, User Is Unable to Browse the Internet: Split
Tunneling
The most common reason for this problem is that, with the IPsec tunnel from the VPN Client to PIX, all the
traffic is sent through the tunnel to the PIX firewall. The PIX functionality does not allow traffic to be sent
back to the interface where it was received. Therefore the traffic destined to the Internet does not work. In
order to fix this problem, use the split tunneling command. The idea behind this fix is that only one sends
specific traffic through the tunnel and the rest of the traffic goes directly to the Internet, not through the
tunnel.
vpngroup vpn3000 splittunnel 90
accesslist 90 permit ip 10.1.1.0 255.255.255.0 10.1.2.0 255.255.255.0
accesslist 90 permit ip 172.16.0.0 255.255.0.0 10.1.2.0 255.255.255.0
Note: The vpngroup vpn3000 splittunnel 90 command enables the split tunneling with accesslist
number 90. The accesslist 90 command defines which traffic flows through the tunnel, the rest of which is
denied at the end of the access list. The access list needs to be the same for denying Network Address
Translation (NAT) on PIX.
This output shows an example of how to find the MTU of the path between the hosts with IP addresses
10.1.1.2 and 172.16.1.56.
Router#debug ip icmp
ICMP packet debugging is on
(172.16.1.56): frag.
(172.16.1.56): frag.
(172.16.1.56): frag.
(172.16.1.56): frag.
(172.16.1.56): frag.
0 percent (0/5)
needed
needed
needed
needed
needed
and
and
and
and
and
DF
DF
DF
DF
DF
set.
set.
set.
set.
set.
! Reduce the datagram size further and perform extended ping again.
Router#ping
Protocol [ip]:
Target IP address: 172.16.1.56
Repeat count [5]:
Datagram size [100]: 1500
Timeout in seconds [2]:
Extended commands [n]: y
Source address or interface: 10.1.1.2
Type of service [0]:
Set DF bit in IP header? [no]: y
Validate reply data? [no]:
Data pattern [0xABCD]:
Loose, Strict, Record, Timestamp, Verbose[none]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 5, 1500byte ICMP Echos to 172.16.1.56, timeout is 2 seconds:
!!!!!
2w5d: ICMP: echo reply rcvd, src 172.16.1.56, dst 10.1.1.2
2w5d: ICMP: echo reply rcvd, src 172.16.1.56, dst 10.1.1.2
2w5d: ICMP: echo reply rcvd, src 172.16.1.56, dst 10.1.1.2
2w5d: ICMP: echo reply rcvd, src 172.16.1.56, dst 10.1.1.2
2w5d: ICMP: echo reply rcvd, src 172.16.1.56, dst 10.1.1.2
Success rate is 100 percent (5/5), roundtrip min/avg/max = 380/383/384 ms
Note: The VPN client comes with an MTU adjust utility that allows the user to adjust MTU for the Cisco
VPN Client. In the case of PPP over Ethernet (PPPoE) client users, adjust MTU for the PPPoE adapter.
Note: Complete these steps in order to adjust the MTU utility for the VPN Client.
1. Choose Start > Programs > Cisco System VPN Client > Set MTU.
2. Select Local Area Connection, and then click the 1400 radio button.
3. Click OK.
Related Information
IPsec Negotiation/IKE Protocol Support Page
An Introduction to IP Security (IPsec) Encryption
PIX Support Page
Documentation for PIX Firewall
PIX Command Reference
Error Message Decoder ( registered customers only)
Requests for Comments (RFCs)
Technical Support & Documentation Cisco Systems