Ipsec
Ipsec
Configuring IPSec
Objective
Configure an IP Security (IPSec) virtual private network (VPN) tunnel between the P1R1 router and the
P2R1 router. You will test this tunnel by pinging from P1R2 to P2R2 and verifying that the packets were
encrypted.
For this lab, you will be responsible for configuring P1R1 and P1R2. P2R1 and P2R2 will be configured
when the lab is loaded from the Lab Navigator.
Lab Topology
The topology diagram below represents the NetMap in the Simulator.
P1R2 P2R2
P1R1 P2R1
Command Summary
Command Description
access-list access-list-number {deny | defines an extended IP access control list (ACL) for the
permit} protocol source source-wildcard traffic type specified by the protocol parameter
[operator [port]] destination destination-
wildcard [operator [port]]
authentication {rsa-sig | rsa-encr | pre- specifies the authentication method within an Internet Key
share} Exchange (IKE) policy
clock rate clock-rate sets the clock rate for a Data Communications Equipment
(DCE) interface
configure terminal enters global configuration mode from privileged EXEC
mode
crypto ipsec transform-set transform-set- defines a transform set, which is an acceptable combination
name transform1 [transform2] [transform3] of security protocols and algorithms; can include IPSec
[transform4] Authentication Header (AH) and Encapsulating Security
Protocol (ESP) security parameters
IP Addresses
Device Interface IP Address Subnet Mask
P1R1 Serial 0/1 10.1.1.1 255.255.255.0
FastEthernet 0/0 10.2.2.1 255.255.255.0
P1R2 Serial 0/0 10.1.1.2 255.255.255.0
P2R1 Serial 0/1 10.1.2.1 255.255.255.0
FastEthernet 0/0 10.2.2.2 255.255.255.0
P2R2 Serial 0/0 10.1.2.2 255.255.255.0
Lab Tasks
Task 1: Configure an IPSec VPN Tunnel
1. Configure P1R1 with a host name of P1R1 and P1R2 with a host name of P1R2.
2. On P1R1, configure the appropriate IP addresses for the Serial 0/1 interface and the FastEthernet
0/0 interface; refer to the IP Addresses table.
3. On P1R2, configure the appropriate IP address for the Serial 0/0 interface; refer to the IP Addresses
table.
4. What command should you issue to determine which end of the link between P1R1 and P1R2 has
the DCE interface? _______________________________________________________________
5. Configure a clock rate of 1,000 kilobits per second (Kbps) on the Serial interface of the router with
the DCE interface.
6. Configure RIPv2 on P1R1 and P1R2. Define a network statement for 10.0.0.0.
7. From P1R2, ping P2R2’s Serial 0/0 interface (10.1.2.2). Is the ping successful? _______________
8. On P1R1, create an ISAKMP policy with a priority of 1 and with the following security parameters:
a Message Digest 5 (MD5) hash, Data Encryption Standard (DES) encryption, preshared keys for
authentication, and a 768-bit D-H group.
9. On P1R1, issue the command necessary to create ACL 110 that will allow traffic from the P1R2
network (10.1.1.0) to the P2R2 (10.1.2.0) network.
10. On P1R1, define a preshared key of cisco to be used for authenticating P1R1 to P2R1.
11. On P1R1, define an IPSec transform set that includes AH SHA authentication and ESP DES
encryption; use set_1 as the transform set name.
13. On P1R1, assign the crypto map you created to the FastEthernet 0/0 interface.
14. Test the IPSec tunnel by pinging from P1R2 to P2R2’s Serial 0/0 interface (10.1.2.2) and then
pinging from P2R2 to P1R2’s Serial 0/0 interface (10.1.1.2).
15. Issue the show crypto ipsec sa command on P1R1 to verify that the ICMP packets were
encrypted. Does the output show nonzero counters for packets encrypted/decrypted? __________
16. From P1R1, issue the show crypto isakmp policy command to display the ISAKMP policy you
created.
17. From P1R1, issue the show crypto ipsec transform-set command to display the IPSec transform
set you created.
18. From P1R1, issue the show crypto map command to display the crypto map you created.
Once you have completed this lab, be sure to check your work by using the grading function.
You can do so by clicking the Grade Lab icon ( ) in the toolbar or by pressing Ctrl+G.
On P1R1:
Router(config)#hostname P1R1
On P1R2:
Router(config)#hostname P1R2
2. On P1R1, you should issue the following commands to configure the appropriate IP addresses for
the Serial 0/1 interface and the FastEthernet 0/0 interface:
3. On P1R2, you should issue the following commands to configure the appropriate IP address for the
Serial 0/0 interface:
4. You should issue the following command to determine which end of the link between P1R1 and
P1R2 has the DCE interface. The Serial 0/1 interface on P1R1 is the DCE end of the link, as shown
in the following sample output:
P1R1#show controllers
interface Serial0/0
HD unit 0, idb = 0x1AE828, driver structure at 0x1B4BA0
buffer size 1524 HD unit 0,V.35 DTE cable
cpb = 0x7, eda = 0x58DC, cda = 0x58F0
RX ring with 16 entries at 0x4075800
<output omitted>
interface Serial0/1
HD unit 0, idb = 0x1AE828, driver structure at 0x1B4BA0
buffer size 1524 HD unit 0,V.35 DCE cable
cpb = 0x7, eda = 0x58DC, cda = 0x58F0
RX ring with 16 entries at 0x4075800
<output omitted>
6. You should issue the following commands to enable RIPv2 on P1R1 and P1R2 and to define a
network statement for 10.0.0.0:
P1R1(config)#router rip
P1R1(config-router)#version 2
P1R1(config-router)#network 10.0.0.0
P1R2(config)#router rip
P1R2(config-router)#version 2
P1R2(config-router)#network 10.0.0.0
7. From P1R2, a ping to P2R2’s Serial 0/0 interface (10.1.2.2) should fail because IPSec has not been
configured on P1R1 and P1R2.
P1R2#ping 10.1.2.2
8. You should issue the following commands on P1R1 to create an ISAKMP policy with a priority of 1
and to configure it with the following security parameters: an MD5 hash, DES encryption, preshared
keys for authentication, and group 1 (which is the 768-bit D-H group):
9. On P1R1, you should issue the following command to create an extended ACL numbered 110 that
will allow traffic from the P1R2 network to the P2R2 network:
10. On P1R1, you should issue the following command to define a preshared key of cisco that will be
used to authenticate P1R1 to P2R1:
11. On P1R1, you should issue the following command to define an IPSec transform set that includes
AH SHA authentication and ESP DES encryption:
13. On P1R1, you should issue the following commands to assign the crypto map to the FastEthernet
0/0 interface:
14. To test the IPSec tunnel, you should ping from P1R2 to P2R2’s Serial 0/0 interface (10.1.2.2) and
from P2R2 to P1R2’s Serial 0/0 interface (10.1.1.2). The pings should be successful.
P1R2#ping 10.1.2.2
P2R2#ping 10.1.1.2
15. You should issue the following command on P1R1 to verify that the ICMP packets were encrypted.
The sample output below shows nonzero counters for both encrypted and decrypted packets:
17. You should issue the following command on P1R1 to display the IPSec transform set you created.
Sample output is shown below:
18. You should issue the following command on P1R1 to display the crypto map you created. Sample
output is shown below:
Copyright © 1996–2017 Boson Software, LLC. All rights reserved. NetSim software and documentation are protected by copyright law.