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

A site-to-site digital non-public community (VPN) lets you preserve a safe “always-on” connection between two bodily separate websites utilizing an current non-secure community equivalent to the general public Web. Site visitors between the 2 websites is transmitted over an encrypted tunnel to stop snooping or different kinds of information assaults.

This configuration requires an IOS software program picture that helps cryptography. The one used within the examples is c870-advipservicesk9-mz.124-15.T6.bin.

There are a number of protocols utilized in creating the VPN together with protocols used for a key change between the friends, these used to encrypt the tunnel, and hashing applied sciences which produce message digests.

VPN Protocols

IPSec: Web Protocol Safety (IPSec) is a set of protocols which might be used to safe IP communications. IPSec includes each key exchanges and tunnel encryption. You’ll be able to consider IPSec as a framework for implementing safety. When creating an IPSec VPN, you may select from quite a lot of safety applied sciences to implement the tunnel.

ISAKMP (IKE): Web Safety Affiliation and Key Administration Protocol (ISAKMP) offers a method for authenticating the friends in a safe communication. It usually makes use of Web Key Change (IKE), however different applied sciences may also be used. Public keys or a pre-shared key are used to authenticate the events to the communication.

MD5: Message-Digest algorithm 5 (MD5) is an typically used, however partially insecure cryptographic hash perform with a 128-bit hash worth. A cryptographic hash perform is a means of taking an arbitrary block of information and returning a fixed-size bit string, the hash worth based mostly on the unique block of information. The hashing course of is designed so change to the information can even change the hash worth. The hash worth can be referred to as the message digest.

SHA: Safe Hash Algorithm (SHA) is a set of cryptographic hash capabilities designed by the Nationwide Safety Company (NSA). The three SHA algorithms are structured otherwise and are distinguished as SHA-Zero,SHA-1, and SHA-2. SHA-1 is a generally used hashing algorithm with a regular key size of 160 bits.

ESP: Encapsulating Safety Payload (ESP) is a member of the IPsec protocol suite that gives origin authenticity, integrity, and confidentiality safety of packets. ESP additionally helps encryption-only and authentication-only configurations, however utilizing encryption with out authentication is strongly discouraged as a result of it’s insecure. Not like the opposite IPsec protocol, Authentication Header (AH), ESP doesn’t defend the IP packet header. This distinction makes ESP most popular to be used in a Community Handle Translation configuration. ESP operates straight on prime of IP, utilizing IP protocol quantity 50.

DES: The Information Encryption Normal (DES) offers 56-bit encryption. It’s now not thought-about a safe protocol as a result of its quick key-length makes it susceptible to brute-force assaults.

3DES: Three DES was designed to beat the restrictions and weaknesses of DES by utilizing three totally different 56-bit keys in a encrypting, decrypting, and re-encrypting operation. 3DES keys are 168 bits in size. When utilizing 3DES, the information is first encrypted with one 56-bit key, then decrypted with a distinct 56-bit key, the output of which is then re-encrypted with a 3rd 56-bit key.

AES: The Superior Encryption Normal (AES) was designed as a substitute for DES and 3DES. It’s obtainable in various key lengths and is mostly thought-about to be about six instances sooner than 3DES.

HMAC: The Hashing Message Authentication Code (HMAC) is a sort of message authentication code (MAC). HMAC is calculated utilizing a particular algorithm involving a cryptographic hash perform together with a secret key.

Configuring a Web site-to-Web site VPN

The method of configuring a site-to-site VPN includes a number of steps:

Section One configuration includes configuring the important thing change. This course of makes use of ISAKMP to establish the hashing algorithm and authentication methodology. Additionally it is one in all two locations the place you will need to establish the peer on the reverse finish of the tunnel. On this instance, we selected SHA because the hashing algorithm as a consequence of its extra sturdy nature, together with its 160-bit key. The important thing “vpnkey” have to be an identical on each ends of the tunnel. The handle “” is the surface interface of the router on the reverse finish of the tunnel.

Pattern part one configuration:

tukwila(config)#crypto isakmp coverage 10

tukwila(config-isakmp)#hash sha

tukwila(config-isakmp)#authentication pre-share

tukwila(config-isakmp)#crypto isakmp key vpnkey handle

Section Two configuration includes configuring the encrypted tunnel. In Section Two configuration, you create and title a rework set which identifies the encrypting protocols used to create the safe tunnel. You have to additionally create a crypto map during which you establish the peer on the reverse finish of the tunnel, specify the transform-set for use, and specify which entry management checklist will establish permitted visitors flows. On this instance, we selected AES as a consequence of its heightened safety and enhanced efficiency. The assertion “set peer” identifies the surface interface of the router on the reverse finish of the tunnel. The assertion “set transform-set vpnset” tells the router to make use of the parameters specified within the transform-set vpnset on this tunnel. The “match handle 100” assertion is used to affiliate the tunnel with access-list 100 which will likely be outlined later.

Pattern part two configuration:

tukwila(config)#crypto ipsec transform-set vpnset esp-aes esp-sha-hmac


tukwila(config)#crypto map vpnset 10 ipsec-isakmp

% NOTE: This new crypto map will stay disabled till a peer

and a legitimate entry checklist have been configured.

tukwila(config-crypto-map)#set peer

tukwila(config-crypto-map)#set transform-set vpnset

tukwila(config-crypto-map)#match handle 100

The crypto map have to be utilized to your outdoors interface (on this instance, interface FastEthernet four):

tukwila(config)#int f4

tukwila(config-if)#crypto map vpnset

You have to create an entry management checklist to explicitly permit visitors from the router’s inside LAN throughout the tunnel to the opposite router’s inside LAN (on this instance, the router tukwila’s inside LAN community handle is 10.10.10.Zero/24 and the opposite router’s inside LAN community handle is 10.20.Zero.Zero/24):

tukwila(config)#access-list 100 allow ip 10.10.10.Zero Zero.Zero.Zero.255 10.20.Zero.Zero Zero.Zero.Zero.255

(For extra details about the syntax of access-control lists, see my different articles on creating and managing Cisco router access-control lists.)

You have to additionally create a default gateway (also called the “gateway of final resort”). On this instance, the default gateway is at

tukwila(config)#ip route Zero.Zero.Zero.Zero Zero.Zero.Zero.Zero

Verifying VPN Connections

The next two instructions can be utilized to confirm VPN connections:

Router#present crypto ipsec sa

This command shows the settings utilized by the present Safety Associations (SAs).

Router#present crypto isakmp sa

This command shows present IKE Safety Associations.

Troubleshooting VPN Connections

After confirming bodily connectivity, audit each ends of the VPN connection to make sure they mirror one another.

Use debugging to research VPN connection difficulties:

Router#debug crypto isakmp

This command lets you observe Section 1 ISAKMP negotiations.

Router#debug crypto ipsec

This command lets you observe Section 2 IPSec negotiations.

Copyright (c) 2008 Don R. Crawley

Leave a Reply

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

Find Birth Date by Social Security Number

Advantages of Mathematics