Networking Reviews

Troubleshooting IPSEC VPN

Leave a Comment

This post discusses the most basic steps needed to troubleshoot a LAN-to-LAN IPSEC tunnel between Cisco Routers.

A Cisco Router with the proper IOS version can make an excellent IPSEC VPN termination device, and can be used to securely connect two distant LANs over an untrusted network, such as the Internet. In our example below, we use two Cisco 800 series broadband routers to create an IPSEC VPN tunnel between two offices over a DSL broadband connection via the Internet.

ipsec vpn

A sample of the configuration concerning the example above is shown below:

hostname siteA  !
  crypto isakmp policy 1
 encr 3des
 authentication pre-share
 group 2
  crypto isakmp key ciscokey address 200.200.200.1
  !
  crypto ipsec transform-set TRANSFORM esp-3des esp-sha-hmac
  !
  crypto map VPN 10 ipsec-isakmp
 set peer 200.200.200.1
 set transform-set TRANSFORM
 match address 100
  !
  interface FastEthernet0
  !
  interface FastEthernet1
  !
  interface FastEthernet2
  !
  interface FastEthernet3
  !        
  interface FastEthernet4
 ip address 200.200.100.1 255.255.255.0
 ip nat outside
 ip virtual-reassembly
 duplex auto
 speed auto
 crypto map VPN
  !
  interface Vlan1
 ip address 10.10.149.1 255.255.255.0
 ip nat inside
 ip virtual-reassembly
  !
  ip classless
  ip route 0.0.0.0 0.0.0.0 200.200.100.2
  !
  ip nat inside source list 101 interface FastEthernet4 overload
  !
  access-list 100 permit ip 10.10.149.0 0.0.0.255 10.10.1.0 0.0.0.255
  access-list 101 deny   ip 10.10.149.0 0.0.0.255 10.10.1.0 0.0.0.255
  access-list 101 permit ip 10.10.149.0 0.0.0.255 any


When using the IPSEC Key Exchange (IKE) mechanism for setting up the VPN tunnel, there are two Phases in the ISAKMP (Internet Security Association and Key Management Protocol) operation:

  • Phase 1: In this phase the two nodes verify their identity and establish an initial secure communication channel for further IKE communication. The parameters negotiated in this Phase include the Encryption algorithm (e.g 3DES), a hash algorithm (MD5 or SHA), an authentication method (e.g pre-shared keys), and a Diffie-Hellman group.
  • Phase 2: Using the secure communication channel established in Phase 1, the two nodes in Phase 2 negotiate Security Associations (SA) for IPSEC Transforms (AH for authentication or ESP for Encryption).

Therefore, in order to efficiently troubleshoot the IPSEC VPN operation, we need to check the two phases independently, starting always with Phase 1 to see if it has been established correctly, and then verifying Phase 2 establishment.

Phase 1:

The following command shows the status of Phase 1 negotiation:

SiteA#show crypto isakmp sa

  IPv4 Crypto ISAKMP SA

  dst                                src             state                  conn-id slot status

  200.200.200.1    200.200.100.1    QM_IDLE           1001    0 ACTIVE

  From the output above we can see the public IP addresses 200.200.200.1 and 200.200.100.1 used as source and destination between the two Site Routers. The most important field to check here is the ‘state’ field which must be ‘QM_IDLE’ in order for Phase 1 to be correctly established. Other possible states in this field are:

State Explanation
MM_NO_STATE The ISAKMP SA has been created, but nothing else has happened yet. It is “larval” at this stage—there is no state.
MM_SA_SETUP The peers have agreed on parameters for the ISAKMP SA.
MM_KEY_EXCH The peers have exchanged Diffie-Hellman public keys and have generated a shared secret. The ISAKMP SA remains unauthenticated.
MM_KEY_AUTH The ISAKMP SA has been authenticated. If the router initiated this exchange, this state transitions immediately to QM_IDLE, and a Quick Mode exchange begins.

Phase 2:

To verify Phase 2 operation use the following command:

SiteA#show crypto ipsec sa

interface: FastEthernet4
      Crypto map tag: VPN, local addr 200.200.100.1
   protected vrf: (none)
     local  ident (addr/mask/prot/port): (10.10.149.0/255.255.255.0/0/0)
     remote ident (addr/mask/prot/port): (10.10.1.0/255.255.255.0/0/0)
     current_peer 200.200.200.1 port 500
       PERMIT, flags={origin_is_acl,}
      #pkts encaps: 1843, #pkts encrypt: 1843, #pkts digest: 1843
      #pkts decaps: 2618, #pkts decrypt: 2618, #pkts verify: 2618
      #pkts compressed: 0, #pkts decompressed: 0
      #pkts not compressed: 0, #pkts compr. failed: 0
      #pkts not decompressed: 0, #pkts decompress failed: 0
      #send errors 0, #recv errors 0
     local crypto endpt.: 200.200.100.1, remote crypto endpt.: 200.200.200.1
       path mtu 1500, ip mtu 1500
       current outbound spi: 0x8BF4C2A1(2348073633)
     inbound esp sas:
        spi: 0x812A50F7(2167034103)
  transform: esp-3des esp-sha-hmac ,

The important points to watch in the output above are the pkts encrypt and pkts decrypt. These values show if packets are successfully encrypted and decrypted inside the VPN tunnel. The output above shows that Phase 2 is succesfuly established.

If you see only packets encrypted without any decrypted packets (or vice-versa), this means that the VPN tunnel works only one-way, which is not correct. You can then use the command: debug crypto ipsec to get a more detailed explanation why Phase 2 failed.

Filed Under: Troubleshooting

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Posts

  • VoIP Tutorial
  • In Review – Sylvania Netbook
  • Choosing the Right 7 Inch Tablet PC For You
  • Wireless Access Point Reviews – How and Why Standards Matter
  • Types Of Wireless Speaker Adapters

Categories

  • Cisco Certifications
  • Cisco Firewall
  • Computer Virus Education
  • General Technology
  • Home Computer Security
  • Home Network Setup
  • Home Security IP Cameras
  • Information Security
  • IP Network Tutorials
  • IP Telephony and VoIP
  • Network Security
  • Networking Acronyms
  • OSI Layers
  • Software Tools
  • Technology News
  • Troubleshooting
  • Usefull Network Info
  • Wii Game Console
  • Windows
  • Wireless Networks
  • XBOX and PS3 Networking
  • XBOX PS3 and Wii News

Copyright © 2025 · | Contact | About | Privacy Policy

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent.
Cookie SettingsAccept All
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT