Vpn

16
Cisco Configuration Professional Configuration Professional: Site-to-Site IPsec VPN Between Two IOS Routers Configuration Example Contents Introduction Prerequisites Requirements Components Used Conventions Configuration Network Diagram Router A Cisco CP Configuration Router B Cisco CP Configuration Router B CLI Configuration Verify IOS Router - show Commands Troubleshoot Cisco Support Community - Featured Conversations Related Information Document ID: 113337 Introduction This document provides a sample configuration for the LAN-to-LAN (Site-to-Site) IPsec tunnel between two Cisco IOS ® Routers using Cisco Configuration Professional (Cisco CP). Static routes are used for simplicity. Prerequisites Requirements Make sure that you meet this requirement before you attempt this configuration: End-to-End IP connectivity must be established before starting this configuration. Components Used The information in this document is based on these software and hardware versions: Cisco 1841 Router with Cisco IOS Software Release 12.4(15T) Cisco CP version 2.5 Note: Refer to Basic Router Configuration Using Cisco Configuration Professional in order to allow the router to be configured by Cisco CP. 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 the Cisco Technical Tips Conventions for more information on document conventions. Configuration Network Diagram This document uses this network setup: HOME SUPPORT PRODUCT SUPPORT CLOUD AND SYSTEMS MANAGEMENT CISCO CONFIGURATION PROFESSIONAL CONFIGURE CONFIGURATION EXAMPLES AND TECHNOTES Configuration Professional: Site-to-Site IPsec VPN Between Two IOS Routers Configuration Example Configuration Professional: Site-to-Site IPsec VPN Betwe... http://www.cisco.com/en/US/products/ps9422/products_... 1 de 16 03/06/13 16:09

description

 

Transcript of Vpn

Page 1: Vpn

Cisco Configuration Professional

Configuration Professional: Site-to-Site IPsec VPN Between Two IOS RoutersConfiguration Example

ContentsIntroductionPrerequisites Requirements Components Used ConventionsConfiguration Network Diagram Router A Cisco CP Configuration Router B Cisco CP Configuration Router B CLI ConfigurationVerify IOS Router - show CommandsTroubleshootCisco Support Community - Featured ConversationsRelated Information

Document ID: 113337

Introduction

This document provides a sample configuration for the LAN-to-LAN (Site-to-Site)

IPsec tunnel between two Cisco IOS® Routers using Cisco Configuration Professional(Cisco CP). Static routes are used for simplicity.

Prerequisites

Requirements

Make sure that you meet this requirement before you attempt this configuration:

End-to-End IP connectivity must be established before starting thisconfiguration.

Components Used

The information in this document is based on these software and hardware versions:

Cisco 1841 Router with Cisco IOS Software Release 12.4(15T)

Cisco CP version 2.5

Note: Refer to Basic Router Configuration Using Cisco Configuration Professional inorder to allow the router to be configured by Cisco CP.

The information in this document was created from the devices in a specific labenvironment. 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 potentialimpact of any command.

Conventions

Refer to the Cisco Technical Tips Conventions for more information on documentconventions.

Configuration

Network Diagram

This document uses this network setup:

HOME

SUPPORT

PRODUCT SUPPORT

CLOUD AND SYSTEMSMANAGEMENT

CISCO CONFIGURATIONPROFESSIONAL

CONFIGURE

CONFIGURATION EXAMPLES ANDTECHNOTES

Configuration Professional:Site-to-Site IPsec VPNBetween Two IOS RoutersConfiguration Example

Configuration Professional: Site-to-Site IPsec VPN Betwe... http://www.cisco.com/en/US/products/ps9422/products_...

1 de 16 03/06/13 16:09

Page 2: Vpn

Note: The IP addressing schemes used in this configuration are not legally routableon the Internet. They are RFC 1918 addresses, which have been used in a labenvironment.

Router A Cisco CP Configuration

Router B Cisco CP Configuration

Router B CLI Configuration

Router A Cisco CP Configuration

Perform these steps in order to configure Site-to-Site VPN Tunnel on the Cisco IOSRouter:

Choose Configure > Security > VPN > Site-to-Site VPN, and click the radiobutton next to Create a Site-to-Site VPN. Click Launch the selected task.

1.

Choose Step by step wizard in order to proceed with the configuration, andclick Next.

2.

Configuration Professional: Site-to-Site IPsec VPN Betwe... http://www.cisco.com/en/US/products/ps9422/products_...

2 de 16 03/06/13 16:09

Page 3: Vpn

In the next window, provide the VPN Connection Information in the respectivespaces. Choose the interface of the VPN Tunnel from the drop-down menu.Here, FastEthernet0 is chosen. In the Peer Identity section, choose Peer withstatic IP address and provide the remote peer IP address. Then, provide thePre-shared Keys (cisco123 in this example) in the Authentication section.Lastly, click Next.

3.

Click Add in order to add IKE proposals which specify the EncryptionAlgorithm, Authentication Algorithm, and the Key Exchange Method.

4.

Configuration Professional: Site-to-Site IPsec VPN Betwe... http://www.cisco.com/en/US/products/ps9422/products_...

3 de 16 03/06/13 16:09

Page 4: Vpn

Provide the Encryption Algorithm, Authentication Algorithm, and Key Exchangemethod, and then click OK. The Encryption Algorithm, AuthenticationAlgorithm, and the Key Exchange method values should match with the data tobe provided in the Router B.

5.

Click Next.6.

Configuration Professional: Site-to-Site IPsec VPN Betwe... http://www.cisco.com/en/US/products/ps9422/products_...

4 de 16 03/06/13 16:09

Page 5: Vpn

In this new window, the Transform Set details are provided. The Transform Setspecifies the Encryption and Authentication algorithms used to protect Data inVPN Tunnel. Click Add in order to provide these details. You can add anynumber of Transform Sets as needed by using this method.

7.

Provide the Transform Set details (Integrity and Encryption Algorithms), andclick OK.

8.

Choose the required Transform Set to be used from the drop-down menu, andclick Next.

9.

Configuration Professional: Site-to-Site IPsec VPN Betwe... http://www.cisco.com/en/US/products/ps9422/products_...

5 de 16 03/06/13 16:09

Page 6: Vpn

In the following window, provide the details about the Traffic to be protectedthrough the VPN Tunnel. Provide the Source and Destination Networks of thetraffic to be protected so that the traffic between the specified source anddestination networks are protected. In this example, the Source network is10.10.10.0 and the Destination network is 10.20.10.0. Click Next.

10.

Click Finish in the next window to complete the configuration on Router A..11.

Router B Cisco CP Configuration

Perform these steps in order to configure Site-to-Site VPN Tunnel on the Cisco IOSRouter (Router B):

Choose Configure > Security > VPN > Site-to-Site VPN, and click the radiobutton next to Create a Site-to-Site VPN. Click Launch the selected task.

1.

Configuration Professional: Site-to-Site IPsec VPN Betwe... http://www.cisco.com/en/US/products/ps9422/products_...

6 de 16 03/06/13 16:09

Page 7: Vpn

Choose Step by step wizard in order to proceed with the configuration, andclick Next.

2.

In the next window, provide the VPN Connection Information in the respectivespaces. Choose the interface of the VPN Tunnel from the drop-down menu.Here, FastEthernet0 is chosen. In the Peer Identity section, choose Peer withstatic IP address and provide the remote peer IP address. Then, provide thePre-shared Keys (cisco123 in this example) in the Authentication section.Lastly, click Next.

3.

Configuration Professional: Site-to-Site IPsec VPN Betwe... http://www.cisco.com/en/US/products/ps9422/products_...

7 de 16 03/06/13 16:09

Page 8: Vpn

Click Add in order to add IKE proposals which specify the EncryptionAlgorithm, Authentication Algorithm, and the Key Exchange Method.

4.

Provide the Encryption Algorithm, Authentication Algorithm, and Key Exchangemethod, and then click OK. The Encryption Algorithm, AuthenticationAlgorithm, and the Key Exchange method values should match with the dataprovided in the Router A.

5.

Configuration Professional: Site-to-Site IPsec VPN Betwe... http://www.cisco.com/en/US/products/ps9422/products_...

8 de 16 03/06/13 16:09

Page 9: Vpn

Click Next.6.

In this new window, the Transform Set details are provided. The Transform Setspecifies the Encryption and Authentication algorithms used to protect Data inVPN Tunnel. Click Add in order to provide these details. You can add anynumber of Transform Sets as needed by using this method.

7.

Configuration Professional: Site-to-Site IPsec VPN Betwe... http://www.cisco.com/en/US/products/ps9422/products_...

9 de 16 03/06/13 16:09

Page 10: Vpn

Provide the Transform Set details (Integrity and Encryption Algorithms), andclick OK.

8.

Choose the required Transform Set to be used from the drop-down menu, andclick Next.

9.

In the following window, provide the details about the Traffic to be protectedthrough the VPN Tunnel. Provide the Source and Destination Networks of thetraffic to be protected so that the traffic between the specified source anddestination networks are protected. In this example, the Source network is10.20.10.0 and the Destination network is 10.10.10.0. Click Next.

10.

Configuration Professional: Site-to-Site IPsec VPN Betwe... http://www.cisco.com/en/US/products/ps9422/products_...

10 de 16 03/06/13 16:09

Page 11: Vpn

This window shows the summary of the Site-to-Site VPN configuration. Checkthe Test VPN Connectivity after configuring checkbox if you want to test theVPN connectivity. Here, the box is checked as the connectivity needs to bechecked. Click Finish.

11.

Click Start in order to check the VPN connectivity.12.

Configuration Professional: Site-to-Site IPsec VPN Betwe... http://www.cisco.com/en/US/products/ps9422/products_...

11 de 16 03/06/13 16:09

Page 12: Vpn

In the next window, the result of the VPN connectivity Test is provided. Here,you can see if the tunnel is Up or Down. In this example configuration, theTunnel is "Up", as shown in green.

This completes the configuration on the Cisco IOS RouterB and shows that thetunnel is up.

13.

Configuration Professional: Site-to-Site IPsec VPN Betwe... http://www.cisco.com/en/US/products/ps9422/products_...

12 de 16 03/06/13 16:09

Page 13: Vpn

Router B CLI Configuration

Router B

Building configuration...

Current configuration : 2403 bytes!version 12.4service timestamps debug datetime msecservice timestamps log datetime msecservice password-encryption!hostname R3!boot-start-markerboot-end-marker!no logging buffered!username cisco123 privilege 15 password 7 1511021F07257A767Bno aaa new-modelip subnet-zero!!ip cef!!ip ips po max-events 100no ftp-server write-enable!

!--- Configuration for IKE policies.!--- Enables the IKE policy configuration (config-isakmp) !--- command mode, where you can specify the parameters that !--- are used during an IKE negotiation. Encryption and Policy details are hidden!--- as the default values are chosen.

crypto isakmp policy 2 authentication pre-share

!--- Specifies the pre-shared key "cisco123" which should !--- be identical at both peers. This is a global !--- configuration mode command.

crypto isakmp key cisco123 address 172.16.1.1!!

!--- Configuration for IPsec policies.!--- Enables the crypto transform configuration mode, !--- where you can specify the transform sets that are used !--- during an IPsec negotiation.

crypto ipsec transform-set Router-IPSEC esp-des esp-sha-hmac!

!--- Indicates that IKE is used to establish !--- the IPsec Security Association for protecting the !--- traffic specified by this crypto map entry.

crypto map SDM_CMAP_1 1 ipsec-isakmp description Tunnel to172.16.1.1

!--- Sets the IP address of the remote end.

set peer 172.16.1.1

!--- Configures IPsec to use the transform-set !--- "Router-IPSEC" defined earlier in this configuration.

set transform-set Router-IPSEC

Configuration Professional: Site-to-Site IPsec VPN Betwe... http://www.cisco.com/en/US/products/ps9422/products_...

13 de 16 03/06/13 16:09

Page 14: Vpn

!--- Specifies the interesting traffic to be encrypted.

match address 100!!!

!--- Configures the interface to use the !--- crypto map "SDM_CMAP_1" for IPsec.

interface FastEthernet0 ip address 172.17.1.1 255.255.255.0 duplex auto speed autocrypto map SDM_CMAP_1

!interface FastEthernet1 ip address 10.20.10.2 255.255.255.0 duplex auto speed auto!interface FastEthernet2 no ip address!interface Vlan1 ip address 10.77.241.109 255.255.255.192!ip classlessip route 10.10.10.0 255.255.255.0 172.17.1.2ip route 10.77.233.0 255.255.255.0 10.77.241.65ip route 172.16.1.0 255.255.255.0 172.17.1.2!!ip nat inside source route-map nonat interface FastEthernet0 overload!ip http serverip http authentication localip http secure-server!

!--- Configure the access-lists and map them to the Crypto map configured.

access-list 100 remark SDM_ACL Category=4access-list 100 remark IPSec Ruleaccess-list 100 permit ip 10.20.10.0 0.0.0.255 10.10.10.0 0.0.0.255!!!

!--- This ACL 110 identifies the traffic flows using route map

access-list 110 deny ip 10.20.10.0 0.0.0.255 10.10.10.0 0.0.0.255access-list 110 permit ip 10.20.10.0 0.0.0.255 anyroute-map nonat permit 10 match ip address 110!control-plane!!line con 0 login localline aux 0line vty 0 4 privilege level 15 login local transport input telnet ssh!end

Verify

Use this section to confirm that your configuration works properly.

The Output Interpreter Tool (registered customers only) (OIT) supports certain showcommands. Use the OIT to view an analysis of show command output.

IOS Router - show Commands

IOS Router - show Commands

Configuration Professional: Site-to-Site IPsec VPN Betwe... http://www.cisco.com/en/US/products/ps9422/products_...

14 de 16 03/06/13 16:09

Page 15: Vpn

show crypto isakmp sa—Shows all current IKE SAs at a peer.

RouterB# show crypto isakmp sa

dst src state conn-id slot status172.17.1.1 172.16.1.1 QM_IDLE 3 0 ACTIVE

show crypto ipsec sa—Shows all current IPsec SAs at a peer.

RouterB# show crypto ipsec sainterface: FastEthernet0

Crypto map tag: SDM_CMAP_1, local addr 172.17.1.1

protected vrf: (none) local ident (addr/mask/prot/port): (10.20.10.0/255.255.255.0/0/0) remote ident (addr/mask/prot/port): (10.10.10.0/255.255.255.0/0/0) current_peer 172.16.1.1 port 500 PERMIT, flags={origin_is_acl,} #pkts encaps: 68, #pkts encrypt: 68, #pkts digest: 68 #pkts decaps: 68, #pkts decrypt: 68, #pkts verify: 68 #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.: 172.17.1.1, remote crypto endpt.: 172.16.1.1 path mtu 1500, ip mtu 1500 current outbound spi: 0xB7C1948E(3082917006) inbound esp sas: spi: 0x434C4A7F(1129073279) transform: esp-des esp-sha-hmac , in use settings ={Tunnel, } conn id: 2001, flow_id: C18XX_MBRD:1, crypto map: SDM_CMAP_1 sa timing: remaining key lifetime (k/sec): (4578719/3004) IV size: 8 bytes replay detection support: Y Status: ACTIVE

inbound ah sas:

inbound pcp sas:

outbound esp sas: spi: 0xB7C1948E(3082917006) transform: esp-des esp-sha-hmac , in use settings ={Tunnel, } conn id: 2002, flow_id: C18XX_MBRD:2, crypto map: SDM_CMAP_1 sa timing: remaining key lifetime (k/sec): (4578719/3002) IV size: 8 bytes replay detection support: Y Status: ACTIVE

outbound ah sas:

outbound pcp sas:

show crypto engine connections active—Shows current connections andinformation about encrypted and decrypted packets.

RouterB#show crypto engine connections active

ID Interface IP-Address State Algorithm Encrypt Decrypt 3 FastEthernet0 172.17.1.1 set HMAC_SHA+DES_56_CB 0 02001 FastEthernet0 172.17.1.1 set DES+SHA 0 592002 FastEthernet0 172.17.1.1 set DES+SHA 59 0

Troubleshoot

This section provides information you can use to troubleshoot your configuration.

The Output Interpreter Tool (registered customers only) (OIT) supports certain showcommands. Use the OIT to view an analysis of show command output.

Note: Refer to Important Information on Debug Commands and IP SecurityTroubleshooting: Understanding and Using debug Commands before you use debugcommands.

debug crypto ipsec 7—Displays the IPsec negotiations of phase 2.

debug crypto isakmp 7—Displays the ISAKMP negotiations of phase 1.

Configuration Professional: Site-to-Site IPsec VPN Betwe... http://www.cisco.com/en/US/products/ps9422/products_...

15 de 16 03/06/13 16:09

Page 16: Vpn

Subscribe Start A New Discussion

debug crypto ipsec—Displays the IPsec negotiations of phase 2.

debug crypto isakmp—Displays the ISAKMP negotiations of phase 1.

Cisco Support Community - Featured Conversations

Cisco Support Community is a forum for you to ask and answer questions, sharesuggestions, and collaborate with your peers. Below are just some of the most recentand relevant conversations happening right now.

Want to see more? Join us by clicking here

8.4以降のASAとISR(892J or... nobuo.nakako 1 Reply 1 year, 8 months ago

site to site vpn configuration questions benlemasurier 7 Replies 2 years, 3 months ago

VPN on Cisco router 1720 egrellet_at_ares.fr 1 Reply 12 years, 4 months ago

site to site tunnel between to WAN... jatinkumar 30 Replies 11 months, 3 weeks ago

Configuring Site to Site IPSec VPN... cpartsenidis 4 Replies 7 months, 2 weeks ago

CISCO 2811 router... a.rooprao 1 Reply 5 years, 1 month ago

Easy VPN question Whiteford 1 Reply 2 years, 11 months ago

Point-to-Point VPN bornskir 1 Reply 9 years, 11 months ago

IOS IPSEC VPN tunnels to multi-point v.kanjana 2 Replies 10 years, 11 months ago

iPsec S2S ASA to ASR with VRF Using Lo... HummusChipsSalat 5 Replies 2 months, 1 dayago

VPN between two 800 series routers brent_hanson 1 Reply 1 year, 1 month ago

Related Information

Cisco Configuration Professional Quick Start GuideRequests for Comments (RFCs)Technical Support & Documentation - Cisco Systems

Updated: Nov 30, 2011 Document ID: 113337

Contacts | Feedback | Help | Site Map | Terms & Conditions | Privacy Statement | Cookie Policy | Trademarks

Information For

Small Business

Midsize Business

Service Provider

Executives

Home (Linksys)

Contacts

Contact Cisco

Find a Partner

News & Alerts

Newsroom

Blogs

Newsletters

Field Notices

Security Advisories

Technology Trends

Cloud

IPv6

Open Network Environment

Trustworthy Systems

Support

Downloads

Documentation

Communities

Developer Network

Learning Network

Support Community

About Cisco

Investor Relations

Corporate Social Responsibility

Environmental Sustainability

Tomorrow Starts Here

Career Opportunities

Programs

Cisco Powered

Financing Options

Industries

Video Portal

Configuration Professional: Site-to-Site IPsec VPN Betwe... http://www.cisco.com/en/US/products/ps9422/products_...

16 de 16 03/06/13 16:09