Lab 3 INWK 6119 IPSec CSR Pod Lab April2022
Lab 3 INWK 6119 IPSec CSR Pod Lab April2022
Lab # 3
INWK 6119
1
TABLE OF CONTENTS
2
LIST OF FIGURES
3
1 IP SECURITY PROTOCOL- MANUAL KEYING
The objectives of this laboratory assignment are to familiarize students with IPSec and
related protocols.
Please, read the entire assignment before you proceed with the task.
Make sure that all unused interfaces are disabled to prevent them from affecting the
network’s operation.
In this exercise students will be using IPSec to encapsulate selected traffic and send it
between networks. IKE (Internet Key Exchange) is not used in this assignment;
therefore, all security associations are created manually.
1.2 Background
IPSec needs security associations (SA) to define how two or more entities use security
services to communicate. A SA includes transforms and secret keys. IPSec does not
have a mechanism for creating security associations. Therefore, SA’s need to be created
manually or negotiated using Internet Key Management Protocol (IKMP).
1.3 Question
What are the advantages and disadvantages of using transport and tunnel modes?
4
1. Task 1 – Basic configuration
Initially, none of the routers are configured, so you will have to log into each of the four
routers and create a basic configuration that includes assigning a hostname to the router, and
an IP address to the interfaces connecting the routers. Note that the topology is constructed
using VLANs.
Complete the following steps to create the basic configuration using the diagrams in Appendix
A as a reference:
2. Login into each router to create basic configuration and skip the auto-configuration
options (if you are not presented with auto-configuration options, then the router
may have an existing configuration that you will need to erase and reload properly).
3. Enter configuration mode:
Router# enable
Router# configure terminal
4. To prevent mistyped commands and terminal output from interfering with your
configuration, apply these commands:
Router(config)# no ip domain lookup
Router(config)# line con 0
Router(config-if)# logging synchronous
Router(config-if)# exit
5. Configure the routers hostname, IP addresses (including loopback) using the
information given in the network topology of Appendix A. Disable all unused
interfaces.
interface GigabitEthernet1
no shutdown
interface GigabitEthernet1.x
encapsulation dot1Q x
ip address <ip address> <mask>
6. Enable RIP version 2:
Router(config)# router rip
Router(config-router) # version 2
7. Add all networks directly attached to the router:
Router(config-router) # network <network address>
8. Disable automatic summarization of network
Router(config-router) # no auto-summary
Table 1 Basic Configuration Information
Deliverables
1. Confirm that all routers can ping each other.
2. Provide the final configuration of the routers.
5
CONFIGURING IPSEC WITH MANUAL KEYS
The minimum IPSec configuration requires that the security associations be established
via pre-shared keys while IKE is disabled. The goal is to establish secure tunnels to
carry IP traffic between R1-R4 routers from different networks as shown in the
diagram.
Do not forget that you must have the same security parameters in both peers to
make IPSec work, which means you have to talk to the peer group to choose the
same (or precisely mirrored) SAs, ACLs, maps, and keys.
2) Create an access list to define the traffic to protect. Choose IP traffic between
networks.
Note: The access lists used for IPSec are used only to determine which traffic should
be protected by IPSec, not which traffic should be blocked or permitted through the
interface. Using the permit keyword causes all IP traffic that matches the specified
conditions to be protected by crypto
In router R4:
Router(config)# access-list 101 permit Ip 155.1.24.0 0.0.0.255 155.1.13.0
0.0.0.255 log
In router R1:
Router(config)# access-list 101 permit Ip 155.1.13.0 0.0.0.255 155.1.24.0
0.0.0.255 log
3) Configure a transform set that defines how the traffic will be protected. You can
configure only one transform set for manually established security associations.
The peer must also have the same transform set specified (the name is case
sensitive). Check the reference for allowed arguments combinations.
6
5) Specify the following in the map entry:
• An IPSec access list. The access list can specify only one permit entry when
you are establishing manual security associations.
• The peer to which the IPSec-protected traffic can be forwarded. Only one peer
can be specified when you are establishing manual security associations.
• The transform set should be used. This must be the same transform set that is
specified in the peer's corresponding crypto map entry.
6) If the specified transform set includes the ESP protocol, set the ESP SPIs and keys
to apply to inbound and outbound protected traffic. If the transform set includes an
ESP cipher algorithm, specify the cipher keys. If the transform set includes an
ESP authenticator algorithm, specify the authenticator keys. The key should be 16
bytes long, at least.
7) Apply a crypto map set to an interface on which the IPSec traffic will be evaluated.
Perform a Ping and a Telnet between R2 and R3 and use the command “Show
crypto ipsec sa” to confirm that the packet counters in the encapsulated and
decapsulated fields are increasing proving that the selected traffic is passing through
the tunnel. All other traffic should flow outside the tunnel.
7
2.3 Questions set
a) Provide the results of the final configuration of routers R1 and R4. Comment
on the configuration that you did in this lab about IPSec.
b) Which transform combinations did you use in step (3)? Explain the purpose of
each one.
e) If we permit TCP traffic in an access list, then what will happen to non-TCP
traffic after implementing the above procedure?
8
INTERNET KEY MANAGEMENT PROTOCOL
3.1 Objectives
The objective of this laboratory assignment is to learn how to use IKMP (Internet Key
Management Protocol) to negotiate security associations for IPSec tunnels.
Students are required to revisit the network built in the previous laboratory session
and automate the key exchange process in IPSec by enabling Internet Key
Management Protocol.
3.3 Background
IPSec does not have a mechanism for creating security associations. It relies on
Internet Key Management Protocol (IKMP) to negotiate security associations.
Internet Key Exchange (IKE) creates an authenticated, secure tunnel between two
entities and then negotiates the security association for IPSec. This process requires
two steps: 1) the two entities must authenticate themselves to each other, and 2)
exchange keys.
Authentication
IKE supports multiple authentication methods:
▪ Pre-shared keys: The same key is pre-installed on each host. IKE peers
authenticate each other by computing and sending a keyed hash of data that
includes the pre-shared key. If the receiving peer is able to independently
create the same hash using its pre-shared key, it knows that both parties must
share the same secret, thus authenticating the other party.
▪ Public key cryptography: Each party generates a pseudo-random number (a
nonce) and encrypts it with the other party’s public key using the RSA (Rivest
Shamir Adleman) algorithm. The other party can decrypt the number with the
local private key. This process authenticates the parties to each other.
▪ Digital signature: Each device digitally signs a set of data and sends it to the
other party. Both the RSA public key algorithm and the digital signature
standard (DSS) are supported.
Key Exchange
Both parties must have a shared session key to encrypt the IKE tunnel. The Diffie-
Hellman protocol is used to agree on a common session key.
9
3.4 Questions Set
10
CONFIGURING IPSEC WITH IKE
Use the following three steps to remove the previous IPSec settings using the
keyword “No” – negation cisco command.
You must create IKE policies at each peer. An IKE policy defines a combination of
security parameters to be used during the IKE negotiation. IKE negotiations must be
protected, so each IKE negotiation begins by each peer agreeing on a common
(shared) IKE policy. This policy states which security parameters will be used to
protect subsequent IKE negotiations.
2) You must create IKE policies at each peer. An IKE policy defines a combination
of security parameters to be used during the IKE negotiation. IKE negotiations
must be protected, so each IKE negotiation begins by each peer agreeing on a
common (shared) IKE policy. This policy states which security parameters will be
used to protect subsequent IKE negotiations.
Router(config)# crypto isakmp policy 15
Router(config-isakmp)# encryption des
Router(config-isakmp)# hash md5
Router(config-isakmp)# authentication pre-share
Router(config-isakmp)# exit
11
5) Configure a transform set that defines how the traffic will be protected.
Router(config)# crypto ipsec transform-set MySet esp-des esp-md5-hmac
8) Apply a crypto map set to an interface on which the IPSec traffic will be
evaluated.
To make new security associations take effect immediately, you must clear the
existing security associations using clear crypto sa.
12
5.3 Questions set
b) Provide a printout of the commands used in the verification process and write
your comments on it.
d) Did you find any difference in both sections? Which technique is better,
provide at least three reasons to support your answer?
13
NETWORK DIAGRAMS
14