Article Directory :: Computers & Technology Articles

Configuring a Site-to-Site VPN Between Two Cisco Routers

Copyright © 2009 Don R. Crawley

Subscribe to Don R. Crawley's RSS feed using any feed reader!

Republish: EasyPublish
Published: 17Dec2008
Word count: 1185
Viewed: 490 time(s)
Bookmark this article using any bookmark manager!
Get Free Content For Your Site

A site-to-site virtual private network (VPN) allows you to maintain a secure "always-on" connection between two physically separate sites using an existing non-secure network such as the public Internet. Traffic between the two sites is transmitted over an encrypted tunnel to prevent snooping or other types of data attacks.

This configuration requires an IOS software image that supports cryptography. The one used in the examples is c870-advipservicesk9-mz.124-15.T6.bin.

There are several protocols used in creating the VPN including protocols used for a key exchange between the peers, those used to encrypt the tunnel, and hashing technologies which produce message digests.

VPN Protocols

IPSec: Internet Protocol Security (IPSec) is a suite of protocols that are used to secure IP communications. IPSec involves both key exchanges and tunnel encryption. You can think of IPSec as a framework for implementing security. When creating an IPSec VPN, you can choose from a variety of security technologies to implement the tunnel.

ISAKMP (IKE): Internet Security Association and Key Management Protocol (ISAKMP) provides a means for authenticating the peers in a secure communication. It typically uses Internet Key Exchange (IKE), but other technologies can also be used. Public keys or a pre-shared key are used to authenticate the parties to the communication.

MD5: Message-Digest algorithm 5 (MD5) is an often used, but partially insecure cryptographic hash function with a 128-bit hash value. A cryptographic hash function is a way of taking an arbitrary block of data and returning a fixed-size bit string, the hash value based on the original block of data. The hashing process is designed so that a change to the data will also change the hash value. The hash value is also called the message digest.

SHA: Secure Hash Algorithm (SHA) is a set of cryptographic hash functions designed by the National Security Agency (NSA). The three SHA algorithms are structured differently and are distinguished as SHA-0,SHA-1, and SHA-2. SHA-1 is a commonly used hashing algorithm with a standard key length of 160 bits.

ESP: Encapsulating Security Payload (ESP) is a member of the IPsec protocol suite that provides origin authenticity, integrity, and confidentiality protection of packets. ESP also supports encryption-only and authentication-only configurations, but using encryption without authentication is strongly discouraged because it is insecure. Unlike the other IPsec protocol, Authentication Header (AH), ESP does not protect the IP packet header. This difference makes ESP preferred for use in a Network Address Translation configuration. ESP operates directly on top of IP, using IP protocol number 50.

DES: The Data Encryption Standard (DES) provides 56-bit encryption. It is no longer considered a secure protocol because its short key-length makes it vulnerable to brute-force attacks.

3DES: Three DES was designed to overcome the limitations and weaknesses of DES by using three different 56-bit keys in a encrypting, decrypting, and re-encrypting operation. 3DES keys are 168 bits in length. When using 3DES, the data is first encrypted with one 56-bit key, then decrypted with a different 56-bit key, the output of which is then re-encrypted with a third 56-bit key.

AES: The Advanced Encryption Standard (AES) was designed as a replacement for DES and 3DES. It is available in varying key lengths and is generally considered to be about six times faster than 3DES.

HMAC: The Hashing Message Authentication Code (HMAC) is a type of message authentication code (MAC). HMAC is calculated using a specific algorithm involving a cryptographic hash function in combination with a secret key.

Configuring a Site-to-Site VPN

The process of configuring a site-to-site VPN involves several steps:

Phase One configuration involves configuring the key exchange. This process uses ISAKMP to identify the hashing algorithm and authentication method. It is also one of two places where you must identify the peer at the opposite end of the tunnel. In this example, we chose SHA as the hashing algorithm due to its more robust nature, including its 160-bit key. The key "vpnkey" must be identical on both ends of the tunnel. The address "192.168.16.105" is the outside interface of the router at the opposite end of the tunnel.

Sample phase one configuration:
tukwila(config)#crypto isakmp policy 10
tukwila(config-isakmp)#hash sha
tukwila(config-isakmp)#authentication pre-share
tukwila(config-isakmp)#crypto isakmp key vpnkey address 192.168.16.105

Phase Two configuration involves configuring the encrypted tunnel. In Phase Two configuration, you create and name a transform set which identifies the encrypting protocols used to create the secure tunnel. You must also create a crypto map in which you identify the peer at the opposite end of the tunnel, specify the transform-set to be used, and specify which access control list will identify permitted traffic flows. In this example, we chose AES due to its heightened security and enhanced performance. The statement "set peer 192.168.16.25" identifies the outside interface of the router at the opposite end of the tunnel. The statement "set transform-set vpnset" tells the router to use the parameters specified in the transform-set vpnset in this tunnel. The "match address 100" statement is used to associate the tunnel with access-list 100 which will be defined later.

Sample phase two configuration:
tukwila(config)#crypto ipsec transform-set vpnset esp-aes esp-sha-hmac
tukwila(cfg-crypto-trans)#exit
tukwila(config)#crypto map vpnset 10 ipsec-isakmp
% NOTE: This new crypto map will remain disabled until a peer
and a valid access list have been configured.
tukwila(config-crypto-map)#set peer 192.168.16.105
tukwila(config-crypto-map)#set transform-set vpnset
tukwila(config-crypto-map)#match address 100

The crypto map must be applied to your outside interface (in this example, interface FastEthernet 4):

tukwila(config)#int f4
tukwila(config-if)#crypto map vpnset

You must create an access control list to explicitly allow traffic from the router's inside LAN across the tunnel to the other router's inside LAN (in this example, the router tukwila's inside LAN network address is 10.10.10.0/24 and the other router's inside LAN network address is 10.20.0.0/24):

tukwila(config)#access-list 100 permit ip 10.10.10.0 0.0.0.255 10.20.0.0 0.0.0.255

(For more information about the syntax of access-control lists, see my other articles on creating and managing Cisco router access-control lists.)

You must also create a default gateway (also known as the "gateway of last resort"). In this example, the default gateway is at 192.168.16.1:

tukwila(config)#ip route 0.0.0.0 0.0.0.0 192.168.16.1

Verifying VPN Connections

The following two commands can be used to verify VPN connections:

Router#show crypto ipsec sa
This command displays the settings used by the current Security Associations (SAs).

Router#show crypto isakmp sa
This command displays current IKE Security Associations.

Troubleshooting VPN Connections

After confirming physical connectivity, audit both ends of the VPN connection to ensure they mirror each other.

Use debugging to analyze VPN connection difficulties:

Router#debug crypto isakmp
This command allows you to observe Phase 1 ISAKMP negotiations.

Router#debug crypto ipsec
This command allows you to observe Phase 2 IPSec negotiations.

Don R. Crawley, Linux+ and CCNA-certified, is president and chief technologist at soundtraining.net, the Seattle training firm specializing in accelerated, task-oriented training for IT professionals. He works with IT pros to enhance their work, lives, and careers. For more information about learning opportunities with soundtraining.net, visit here.

Bookmark this article using any bookmark manager! Subscribe to Don R. Crawley's RSS feed using any feed reader!

EasyPublish™ this article - publishers click here

More articles by Don R. Crawley

Free Report!
Ten Essential Secrets Of Article Marketing ... Grab Your Free
Copy
Now:




We respect your privacy.


Need Content?
Regular Top Quality Content for your Blog, Ezine or Website ...
Delivered Direct,
For Free!

Click For Details



Arts & Entertainment
Automotive
Business - General
Computers & Technology
Finance & Investment
Food & Drink
Health & Fitness
Home & Family
Internet Marketing/Online Business
Legal
Pets & Animals
Politics & Government
Reference & Education
Religion & Faith
Self-Improvement/Motivation
Social
Sports & Recreation
Travel & Leisure
Writing & Speaking

More computing articles:

  • IPTV Technology - Benefits, Advantages and More (John King)
    IPTV technology is the latest in innovations for getting the daily communications that people thrive on and enjoy. Here I take a look at the benefits and advantages of this new kid on the block.

  • Casio Watches: A History of Trend Setting (Paul Wise)
    A small history of Casio Watches and their many popular watch models and lines .

  • IP Cameras in Traffic Environments: Advantages, Risks and Configuration Advice (Wes Fernley)
    In today's fast paced world, it's more important than ever to have proper traffic and road video surveillance. One of the best options are IP cameras which function as a closed video surveillance system but have the additional feature of being able to work online.

  • Get Full Details On Who Owns Any Phone Number With This Free Reverse Phone Search (Grant Dougan)
    If you ever need to determine who owns a particular telephone number you need to use what is called a reverse phone number search. Using a reverse phone lookup will get you full information about the owner of the telephone, including their full name along with other details. In this article we are going to show you how it works.

  • Protect your Liquor Store with IP Camera Surveillance (Wes Fernley)
    Unfortunately, liquor stores have a high susceptibility to theft and shrinkage. However, using a proper surveillance system can prevent a great deal of this loss from occurring. A properly installed, state of the art surveillance system will protect your business from internal and external theft.

  • How Can I Download Playstation 3 Games Online? Here's How - It's Incredibly Easy! (Grant Dougan)
    If you have a PS3, then you already know how impressive of a gaming machine it is! They keep flying off the shelves and there's lots of spectacular games that keep being created. Today we wanted to show you how you can find PS3 game downloads online and then use them on your PS3.

  • Legal Implications Of Blog & Forum Postings (Terry S Vostor)
    It is not only authorities in the media - newspapers and TV / radio who have to be concerned about the legalities of libel and slander laws in the broadcasting and editorialization of views and information. Running a website , a forum or a blog involves currently involves such risks as well. Prudence and caution are the watchwords.

  • Kinetic Energy: Harnessing the Energy Naturally Created By Our Own Bodies (Ezra Drissman)
    Kinetic energy is formed whenever we move around we drive around. Harnessing that power by various forms of technology allows that energy to be transformed into electrical power and used for a number of applications. It is happening at this very time in various locations and in many ways.

  • Recharging Batteries to Save Money, and Better Than Buying New (Ezra Drissman)
    People have a great many batteries in their homes and their cost is even greater. The cost, however, of buying non-rechargeable batteries for our toys, games and small appliances goes far beyond money because the question arises of how to dispose of dead batteries.

We Automatically Distribute Articles
To Thousands Of Publishers And Web Sites:

Submit Article
All content is viewed and used by you at your own risk and we do not warrant the accuracy or reliability of any of the information. The views expressed are those of the individual contributing authors and not necessarily those of this web site, or its owner, Takanomi Limited.
 
Copyright © 2009 Takanomi Ltd. Company no. 5629683. All rights reserved. | Privacy | Legal | Contact Information