8.4.1.3 Lab - Configure Site-To-Site VPN Using CLI - Instructor
8.4.1.3 Lab - Configure Site-To-Site VPN Using CLI - Instructor
8.4.1.3 Lab - Configure Site-To-Site VPN Using CLI - Instructor
2017 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 1 of 16
CCNA Security Chapter 8 Lab A
IP Addressing Table
Objectives
Part 1: Configure Basic Device Settings
Configure hostnames, interface IP addresses, and access passwords.
Configure the OSPF dynamic routing protocol.
Part 2: Configure a Site-to-Site VPN Using Cisco IOS
Configure IPsec VPN settings on R1 and R3.
Verify site-to-site IPsec VPN configuration.
Test IPsec VPN operation.
Background / Scenario
VPNs can provide a secure method of transmitting data over a public network, such as the Internet. VPN
connections can help reduce the costs associated with leased lines. Site-to-Site VPNs typically provide a
secure (IPsec or other) tunnel between a branch office and a central office. Another common implementation
of VPN technology is remote access to a corporate office from a telecommuter location, such as a small office
or home office.
In this lab, you will build and configure a multi-router network, use Cisco IOS to configure a site-to-site IPsec
VPN, and then test the VPN. The IPsec VPN tunnel is from R1 to R3 via R2. R2 acts as a pass-through and
has no knowledge of the VPN. IPsec provides secure transmission of sensitive information over unprotected
networks, such as the Internet. IPsec acts at the network layer and protecting and authenticating IP packets
between participating IPsec devices (peers), such as Cisco routers.
Note: The router commands and output in this lab are from a Cisco 1941 router with Cisco IOS Release
15.4(3)M2 (with a Security Technology Package license). Other routers and Cisco IOS versions can be used.
See the Router Interface Summary Table at the end of the lab to determine which interface identifiers to use
based on the equipment in the lab. Depending on the router model and Cisco IOS version, the commands
available and output produced might vary from what is shown in this lab.
Note: Before beginning, ensure that the routers and the switches have been erased and have no startup
configurations.
2017 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 2 of 16
CCNA Security Chapter 8 Lab A
Required Resources
3 routers (Cisco 1941 with Cisco IOS Release 15.4(3)M2 image with a Security Technology package
license)
2 switches (Cisco 2960 or comparable) (not required)
2 PCs (Windows 7 or Windows 8.1, SSH Client, and WinRadius)
Serial and Ethernet cables, as shown in the topology
Console cables to configure Cisco networking devices
Step 4: Configure the OSPF routing protocol on R1, R2, and R3.
a. On R1, use the following commands:
R1(config)# router ospf 101
R1(config-router)# network 192.168.1.0 0.0.0.255 area 0
R1(config-router)# network 10.1.1.0 0.0.0.3 area 0
b. On R2, use the following commands:
R2(config)# router ospf 101
R2(config-router)# network 10.1.1.0 0.0.0.3 area 0
R2(config-router)# network 10.2.2.0 0.0.0.3 area 0
c. On R3, use the following commands:
R3(config)# router ospf 101
R3(config-router)# network 192.168.3.0 0.0.0.255 area 0
R3(config-router)# network 10.2.2.0 0.0.0.3 area 0
2017 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 3 of 16
CCNA Security Chapter 8 Lab A
b. Configure a static IP address, subnet mask, and default gateway for PC-C, as shown in the IP Addressing
Table.
Step 10: Save the basic running configuration for all three routers.
Save the running configuration to the startup configuration from the privileged EXEC mode prompt on R1, R2,
and R3.
R1# copy running-config startup-config
2017 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 4 of 16
CCNA Security Chapter 8 Lab A
2017 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 5 of 16
CCNA Security Chapter 8 Lab A
2017 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 6 of 16
CCNA Security Chapter 8 Lab A
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
The IP addresses should be R1 S0/0/0 IP address 10.1.1.1 and R3 S0/0/1 IP address 10.2.2.1. These are the
addresses that are used to send normal traffic between R1 and R3.
a. Each IP address that is used to configure the IKE peers is also referred to as the IP address of the
remote VPN endpoint. Configure the pre-shared key of cisco123 on router R1. Production networks
should use a complex key. This command points to the remote peer R3 S0/0/1 IP address.
R1(config)# crypto isakmp key cisco123 address 10.2.2.1
b. Configure the pre-shared key cisco123 on router R3. The command for R3 points to the R1 S0/0/0 IP
address.
R3(config)# crypto isakmp key cisco123 address 10.1.1.1
2017 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 7 of 16
CCNA Security Chapter 8 Lab A
c. You can also change the IPsec security association lifetime from the default of 3600 seconds. On R1 and
R3, set the IPsec security association lifetime to 30 minutes, or 1800 seconds.
R1(config)# crypto ipsec security-association lifetime seconds 1800
2017 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 8 of 16
CCNA Security Chapter 8 Lab A
2017 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 9 of 16
CCNA Security Chapter 8 Lab A
2017 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 10 of 16
CCNA Security Chapter 8 Lab A
interface: Serial0/0/0
Crypto map tag: CMAP, local addr 10.1.1.1
2017 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 11 of 16
CCNA Security Chapter 8 Lab A
inbound ah sas:
outbound ah sas:
Step 3: Generate some uninteresting test traffic and observe the results.
a. Ping from R1 to the R3 S0/0/1 interface IP address 10.2.2.1. These pings should be successful.
b. Issue the show crypto isakmp sa command.
c. Ping from R1 to the R3 G0/1 interface IP address 192.168.3.1. These pings should be successful.
d. Issue the show crypto isakmp sa command again. Was an SA created for these pings? Explain.
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
SA was not created. The source address of both pings was the R1 S0/0/0 address of 10.1.1.1. In the first
case, the destination address was 10.2.2.1. In the second case, the destination address was 192.168.3.1.
This is not interesting traffic. The ACL 101 that is associated with the crypto map for R1 defines
interesting traffic as IP packets from the 192.168.1.0/24 network to the 192.168.3.0/24 network.
e. Issue the debug ip ospf hello command. You should see OSPF hello packets passing between R1 and
R3.
R1# debug ip ospf hello
OSPF hello events debugging is on
R1#
*Apr 7 18:04:46.467: OSPF: Send hello to 224.0.0.5 area 0 on GigabitEthernet0/1 from
192.168.1.1
*Apr 7 18:04:50.055: OSPF: Send hello to 224.0.0.5 area 0 on Serial0/0/0 from
10.1.1.1
*Apr 7 18:04:52.463: OSPF: Rcv hello from 10.2.2.2 area 0 from Serial0/0/0 10.1.1.2
*Apr 7 18:04:52.463: OSPF: End of hello processing
*Apr 7 18:04:55.675: OSPF: Send hello to 224.0.0.5 area 0 on GigabitEthernet0/1 from
192.168.1.1
2017 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 12 of 16
CCNA Security Chapter 8 Lab A
Step 4: Generate some interesting test traffic and observe the results.
a. Use an extended ping from R1 to the R3 G0/1 interface IP address 192.168.3.1. Extended ping allows
you to control the source address of the packets. Respond as shown in the following example. Press
Enter to accept the defaults, except where a specific response is indicated.
R1# ping
Protocol [ip]:
Target IP address: 192.168.3.1
Repeat count [5]:
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]: y
Source address or interface: 192.168.1.1
Type of service [0]:
Set DF bit in IP header? [no]:
Validate reply data? [no]:
Data pattern [0xABCD]:
Loose, Strict, Record, Timestamp, Verbose[none]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.3.1, timeout is 2 seconds:
2017 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 13 of 16
CCNA Security Chapter 8 Lab A
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
The source was 192.168.1.1 and the destination was 192.168.3.1. This is interesting traffic based on the
ACL 101 definition. An SA is established and packets travel through the tunnel as encrypted traffic.
What are the endpoints of the IPsec VPN tunnel?
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
Src: 10.1.1.1 (R1 S0/0/0), Dst: 10.2.2.1 (R3 S0/0/1).
c. Ping from PC-A to PC-C. If the pings were successful, issue the show crypto ipsec sa command. How
many packets have been transformed between R1 and R3?
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
Answers may vary. Seven: Three of the five packets from the R1 to R3 pings, four packets from the PC-A
to R3 pings, and one packet for each echo request. The number of packets may vary depending on how
many pings have been issued and from where.
R1# show crypto ipsec sa
interface: Serial0/0/0
Crypto map tag: CMAP, local addr 10.1.1.1
2017 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 14 of 16
CCNA Security Chapter 8 Lab A
IV size: 16 bytes
replay detection support: Y
Status: ACTIVE
inbound ah sas:
outbound ah sas:
Reflection
1. Would traffic on the Gigabit Ethernet link between PC-A and the R1 G0/0 interface be encrypted by the site-
to-site IPsec VPN tunnel? Explain.
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
No. This site-to-site VPN only encrypts from router R1 to R3. A sniffer could be used to see the traffic from
PC-A to the R1 default gateway.
2017 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 15 of 16
CCNA Security Chapter 8 Lab A
Router Model Ethernet Interface #1 Ethernet Interface #2 Serial Interface #1 Serial Interface #2
1800 Fast Ethernet 0/0 Fast Ethernet 0/1 Serial 0/0/0 (S0/0/0) Serial 0/0/1 (S0/0/1)
(Fa0/0) (Fa0/1)
1900 Gigabit Ethernet 0/0 Gigabit Ethernet 0/1 Serial 0/0/0 (S0/0/0) Serial 0/0/1 (S0/0/1)
(G0/0) (G0/1)
2801 Fast Ethernet 0/0 Fast Ethernet 0/1 Serial 0/1/0 (S0/1/0) Serial 0/1/1 (S0/1/1)
(Fa0/0) (Fa0/1)
2811 Fast Ethernet 0/0 Fast Ethernet 0/1 Serial 0/0/0 (S0/0/0) Serial 0/0/1 (S0/0/1)
(Fa0/0) (Fa0/1)
2900 Gigabit Ethernet 0/0 Gigabit Ethernet 0/1 Serial 0/0/0 (S0/0/0) Serial 0/0/1 (S0/0/1)
(G0/0) (G0/1)
Note: To find out how the router is configured, look at the interfaces to identify the type of router and how many
interfaces the router has. There is no way to effectively list all the combinations of configurations for each router
class. This table includes identifiers for the possible combinations of Ethernet and Serial interfaces in the device.
This table does not include any other type of interface, even though a specific router may contain one. An
example of this might be an ISDN BRI interface. The string in parenthesis is the legal abbreviation that can be
used in Cisco IOS commands to represent the interface.
2017 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 16 of 16