20.1.2 Lab - Configure Secure DMVPN Tunnels - ILM
20.1.2 Lab - Configure Secure DMVPN Tunnels - ILM
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Topology
Addressing Table
Device Interface IPv4 Address
R1 G0/0/1 192.0.2.1/24
R1
Tunnel 1 100.100.100.1/29
R2 G0/0/1 198.51.100.2/24
R2
Loopback 0 192.168.1.1/24
R2
Loopback 1 172.16.1.1/24
R2
Tunnel 1 100.100.100.2/29
R3 G0/0/1 203.0.113.2/24
R3
Loopback 0 192.168.3.1/24
R3
Loopback 1 172.16.3.1/24
R3
Tunnel 1 100.100.100.3/29
Objectives
Part 1: Build the Network and Verify DMVPN Phase 3 Operation
Part 2: Secure DMVPN Phase 3 Tunnels
Background / Scenario
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 1 of 16 www.netacad.com
Lab - Configure Secure DMVPN Tunnels
In previous labs, you have configured DMVPN Phase 1 and Phase 3 networks, including configuration of
DMVPN Phase 3 with IPv6. However, in those labs, IPsec was not used to encrypt and protect data travelling
on the tunnels. IPsec functionality is essential to DMVPN implementation. In this lab, you will work with the
DMVPN Phase 3 implementation from the Implement a DMVPN Phase 3 Spoke-to-Spoke Topology lab. You
will start with a working configuration and then apply IPsec to the spoke-to-hub and spoke-to-spoke tunnels.
Finally, you will verify the operation of the secured tunnels.
Note: The routers used with CCNA hands-on labs are Cisco 4221 with Cisco IOS XE Release 16.9.4
(universalk9 image). The switch used is a Cisco Catalyst 3650 with Cisco IOS XE Release 16.9.4
(universalk9 image). Other routers, Layer 3 switches, and Cisco IOS versions can be used. Depending on the
model and Cisco IOS version, the commands available and the output produced might vary from what is
shown in the labs. Refer to the Router Interface Summary Table at the end of the lab for the correct interface
identifiers.
Required Resources
3 Routers (Cisco 4221 with Cisco IOS XE Release 16.9.4 universal image or comparable)
1 Switch (Cisco 3560 with Cisco IOS XE Release 16.9.4 universal image or comparable)
1 PC (Choice of operating system with a terminal emulation program installed)
Console cables to configure the Cisco IOS devices via the console ports
Ethernet cables as shown in the topology
Initial Configurations
Students will use the answer configurations from the lab Implement a DMVPN Phase 3 Spoke-to-Spoke
Topology. If they do not have the preconfigured devices, they could benefit by practicing configuration of
DMVPN Phase 3 from that lab. Otherwise, they could paste the initial configurations into the devices. Initial
configurations are provided here.
R1 hub router
hostname R1
no ip domain lookup
banner motd # R1, Implement DMVPN Hub #
line con 0
exec-timeout 0 0
logging synchronous
exit
line vty 0 4
privilege level 15
password cisco123
exec-timeout 0 0
logging synchronous
login
exit
interface g0/0/1
ip address 192.0.2.1 255.255.255.252
no shutdown
exit
interface tunnel 1
tunnel mode gre multipoint
tunnel source g0/0/1
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 2 of 16 www.netacad.com
Lab - Configure Secure DMVPN Tunnels
R2 spoke router 1
hostname R2
no ip domain lookup
banner motd # R2, Implement DMVPN Spoke 1 #
line con 0
exec-timeout 0 0
logging synchronous
exit
line vty 0 4
privilege level 15
password cisco123
exec-timeout 0 0
logging synchronous
login
exit
interface g0/0/1
ip address 198.51.100.2 255.255.255.252
no shutdown
exit
interface loopback 0
ip address 192.168.2.1 255.255.255.0
no shutdown
exit
interface loopback 1
ip address 172.16.2.1 255.255.255.0
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 3 of 16 www.netacad.com
Lab - Configure Secure DMVPN Tunnels
no shutdown
exit
interface tunnel 1
tunnel mode gre multipoint
tunnel source loopback 0
no tunnel destination
tunnel key 999
ip address 100.100.100.2 255.255.255.248
ip nhrp network-id 1
ip nhrp authentication NHRPauth
ip nhrp nhs 100.100.100.1
ip nhrp map multicast 192.0.2.1
ip nhrp map 100.100.100.1 192.0.2.1
ip nhrp shortcut
ip mtu 1400
ip tcp adjust-mss 1360
router eigrp DMVPN_TUNNEL_NET
address-family ipv4 unicast autonomous-system 68
eigrp router-id 2.2.2.2
network 100.100.100.0 255.255.255.248
network 172.16.2.0 255.255.255.0
eigrp stub connected
router eigrp DMVPN_TRANS_NET
address-family ipv4 unicast autonomous-system 168
eigrp router-id 20.2.2.2
network 198.51.100.0 255.255.255.252
network 192.168.2.0 255.255.255.0
end
Router R3 spoke 2
hostname R3
no ip domain lookup
banner motd # R3, Implement DMVPN Spoke 2 #
line con 0
exec-timeout 0 0
logging synchronous
exit
line vty 0 4
privilege level 15
password cisco123
exec-timeout 0 0
logging synchronous
login
exit
interface g0/0/1
ip address 203.0.113.2 255.255.255.252
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 4 of 16 www.netacad.com
Lab - Configure Secure DMVPN Tunnels
no shutdown
exit
interface loopback 0
ip address 192.168.3.1 255.255.255.0
no shutdown
exit
interface loopback 1
ip address 172.16.3.1 255.255.255.0
no shutdown
exit
interface tunnel 1
tunnel mode gre multipoint
tunnel source loopback 0
no tunnel destination
tunnel key 999
ip address 100.100.100.3 255.255.255.248
ip nhrp network-id 1
ip nhrp authentication NHRPauth
ip nhrp nhs 100.100.100.1
ip nhrp map multicast 192.0.2.1
ip nhrp map 100.100.100.1 192.0.2.1
ip nhrp shortcut
ip mtu 1400
ip tcp adjust-mss 1360
router eigrp DMVPN_TUNNEL_NET
address-family ipv4 unicast autonomous-system 68
eigrp router-id 3.3.3.3
network 100.100.100.0 255.255.255.248
network 172.16.3.0 255.255.255.0
eigrp stub connected
router eigrp DMVPN_TRANS_NET
address-family ipv4 unicast autonomous-system 168
eigrp router-id 30.3.3.3
network 203.0.113.0 255.255.255.252
network 192.168.3.0 255.255.255.0
eigrp stub connected
end
Layer 3 Switch DMVPN
hostname DMVPN
no ip domain lookup
ip routing
banner motd # DMVPN, DMVPN cloud switch #
line con 0
exec-timeout 0 0
logging synchronous
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 5 of 16 www.netacad.com
Lab - Configure Secure DMVPN Tunnels
exit
line vty 0 4
privilege level 15
password cisco123
exec-timeout 0 0
logging synchronous
login
interface g1/0/11
no switchport
ip address 192.0.2.2 255.255.255.252
no shutdown
exit
interface g1/0/12
no switchport
ip address 198.51.100.1 255.255.255.252
no shutdown
exit
interface g1/0/13
no switchport
ip address 203.0.113.1 255.255.255.252
no shutdown
exit
router eigrp DMVPN_TRANS_NET
address-family ipv4 unicast autonomous-system 168
eigrp router-id 40.4.4.4
network 192.0.2.0 255.255.255.252
network 198.51.100.0 255.255.255.252
network 203.0.113.0 255.255.255.252
end
Instructions
Step 2: Configure initial settings for each router and the Layer 3 switch.
Console into each device, enter global configuration mode, and apply the initial settings for the lab if the
devices are not already configured.
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 6 of 16 www.netacad.com
Lab - Configure Secure DMVPN Tunnels
b. Issue the traceroute command again. You will now see that R1 has enabled direct spoke-to-spoke
communication between R2 and R3. This tunnel will expire and close dynamically. The tunnel reopens
after data for the spoke router is sent again.
R2# traceroute 172.16.3.1
Type escape sequence to abort.
Tracing the route to 172.16.3.1
VRF info: (vrf in name/id, vrf out name/id)
1 100.100.100.3 1 msec * 1 msec
Close configuration window
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 7 of 16 www.netacad.com
Lab - Configure Secure DMVPN Tunnels
R1(config-isakmp)# exit
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 8 of 16 www.netacad.com
Lab - Configure Secure DMVPN Tunnels
b. Issue the traceroute command again. You will now see that R1 has enabled direct spoke-to-spoke
communication between R2 and R3. This tunnel will expire and close dynamically. The tunnel reopens
after data for the spoke router is sent again.
R2# traceroute 172.16.3.1
Type escape sequence to abort.
Tracing the route to 172.16.3.1
VRF info: (vrf in name/id, vrf out name/id)
1 100.100.100.3 1 msec * 1 msec
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 9 of 16 www.netacad.com
Lab - Configure Secure DMVPN Tunnels
b. It is very important to verify that tunnel traffic will be encrypted. On R1, issue the show dmvpn detail
command. As the hub router, R1 should see the spoke peers. The first part of the output shows the tunnel
interface status and the peer table. Both peers should be shown with their transport and overlay interface
addresses, as you have seen previously.
The Crypto Session Details portion of the output should contain information about the status of the
encrypted tunnels. Both of the spoke routers should appear in this output also. Note that the transform set
Open configuration window
that you configured is also displayed in the Crypto Session output.
R1# show dmvpn detail
<output omitted>
Interface Tunnel1 is up/up, Addr. is 100.100.100.1, VRF ""
Tunnel Src./Dest. addr: 192.0.2.1/Multipoint, Tunnel VRF ""
Protocol/Transport: "multi-GRE/IP", Protect "DMVPN_PROFILE"
Interface State Control: Disabled
nhrp event-publisher : Disabled
Type:Hub, Total NBMA Peers (v4/v6): 2
# Ent Peer NBMA Addr Peer Tunnel Add State UpDn Tm Attrb Target Network
----- --------------- --------------- ----- -------- ----- -----------------
1 192.168.2.1 100.100.100.2 UP 00:04:25 D 100.100.100.2/32
1 192.168.3.1 100.100.100.3 UP 00:04:59 D 100.100.100.3/32
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 10 of 16 www.netacad.com
Lab - Configure Secure DMVPN Tunnels
Interface: Tunnel1
Session: [0x7F6E17B867D0]
Session ID: 0
IKEv1 SA: local 192.0.2.1/500 remote 192.168.2.1/500 Active
Capabilities:(none) connid:1001 lifetime:23:59:19
Session ID: 0
IKEv1 SA: local 192.0.2.1/500 remote 192.168.2.1/500 Active
Capabilities:(none) connid:1002 lifetime:23:59:28
Crypto Session Status: UP-ACTIVE
fvrf: (none), Phase1_id: 192.168.2.1
IPSEC FLOW: permit 47 host 192.0.2.1 host 192.168.2.1
Active SAs: 4, origin: crypto map
Inbound: #pkts dec'ed 17 drop 0 life (KB/Sec) 4607998/3568
Outbound: #pkts enc'ed 16 drop 0 life (KB/Sec) 4607999/3568
Outbound SPI : 0xD2E76488, transform : esp-256-aes esp-sha384-hmac
Socket State: Open
Interface: Tunnel1
Session: [0x7F6E17B86950]
Session ID: 0
IKEv1 SA: local 192.0.2.1/500 remote 192.168.3.1/500 Active
Capabilities:(none) connid:1004 lifetime:23:59:48
Session ID: 0
IKEv1 SA: local 192.0.2.1/500 remote 192.168.3.1/500 Active
Capabilities:(none) connid:1003 lifetime:23:59:40
Crypto Session Status: UP-ACTIVE
fvrf: (none), Phase1_id: 192.168.3.1
IPSEC FLOW: permit 47 host 192.0.2.1 host 192.168.3.1
Active SAs: 6, origin: crypto map
Inbound: #pkts dec'ed 11 drop 0 life (KB/Sec) 4607999/3588
Outbound: #pkts enc'ed 10 drop 0 life (KB/Sec) 4607999/3588
Outbound SPI : 0xCB3D3313, transform : esp-256-aes esp-sha384-hmac
Socket State: Open
c. Issue the show crypto ipsec sa command on R2 to display the security associations (sa) that have been
made by R2. This output is for the spoke-to-hub tunnel between R1 and R2 prior to the establishment of
the spoke-to-spoke tunnel. This command provides additional details regarding the IPsec status of the
tunnel, encrypted and decrypted packet statistics, and other details regarding characteristics of the
Open configuration window
encrypted tunnel.
R2# show crypto ipsec sa
interface: Tunnel1
Crypto map tag: Tunnel1-head-0, local addr 192.168.2.1
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 11 of 16 www.netacad.com
Lab - Configure Secure DMVPN Tunnels
inbound ah sas:
outbound ah sas:
The output below is for the same command after the spoke-to-spoke tunnel is open. Entries exist for both
the tunnel to R1 and the spoke-to-spoke tunnel between R2 and R3.
R2# show crypto ipsec sa
interface: Tunnel1
Crypto map tag: Tunnel1-head-0, local addr 192.168.2.1
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 12 of 16 www.netacad.com
Lab - Configure Secure DMVPN Tunnels
inbound ah sas:
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 13 of 16 www.netacad.com
Lab - Configure Secure DMVPN Tunnels
outbound ah sas:
inbound ah sas:
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 14 of 16 www.netacad.com
Lab - Configure Secure DMVPN Tunnels
spi: 0x97C1D18A(2546061706)
transform: esp-256-aes esp-sha384-hmac ,
in use settings ={Transport, }
conn id: 2004, flow_id: ESG:4, sibling_flags FFFFFFFF80000008, crypto map:
Tunnel1-head-0
sa timing: remaining key lifetime (k/sec): (4607995/3305)
IV size: 16 bytes
replay detection support: Y
Status: ACTIVE(ACTIVE)
outbound ah sas:
d. On R2 issue the show crypto isakmp sa command to view the Internet Security Association
Management Protocol (ISAKMP) SAs between the peers. Before the formation of the spoke-to-spoke
tunnel, SAs have been made between R2 and R3, but no further negotiations have occurred, as indicated
by the MM_NO_STATE state of the two SAs between the routers.
R2# show crypto isakmp sa
IPv4 Crypto ISAKMP SA
dst src state conn-id status
192.0.2.1 192.168.2.1 QM_IDLE 1001 ACTIVE
192.168.2.1 192.0.2.1 QM_IDLE 1002 ACTIVE
192.168.3.1 192.168.2.1 MM_NO_STATE 1004 ACTIVE (deleted)
192.168.2.1 192.168.3.1 MM_NO_STATE 1003 ACTIVE (deleted)
After traffic has established the spoke-to-spoke tunnel, the SAs all show the QM_IDLE state. The SAs
have been fully negotiated and are available for further ISAKMP quick mode exchanges.
Note: ISAKMP modes are outside the scope of this course.
R2# show crypto isakmp sa
IPv4 Crypto ISAKMP SA
dst src state conn-id status
192.0.2.1 192.168.2.1 QM_IDLE 1001 ACTIVE
192.168.2.1 192.0.2.1 QM_IDLE 1002 ACTIVE
192.168.3.1 192.168.2.1 QM_IDLE 1004 ACTIVE
192.168.2.1 192.168.3.1 QM_IDLE 1003 ACTIVE
e. You have successfully configured and verified IPsec on DMVPN Phase 3 tunnels.
Close configuration window
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 15 of 16 www.netacad.com
Lab - Configure Secure DMVPN Tunnels
Router Model Ethernet Interface #1 Ethernet Interface #2 Serial Interface #1 Serial Interface #2
(G0/0) (G0/1)
Fast Ethernet 0/0 Fast Ethernet 0/1
2801 (F0/0) (F0/1) Serial 0/1/0 (S0/1/0) Serial 0/1/1 (S0/1/1)
Fast Ethernet 0/0 Fast Ethernet 0/1
2811 (F0/0) (F0/1) Serial 0/0/0 (S0/0/0) Serial 0/0/1 (S0/0/1)
Gigabit Ethernet 0/0 Gigabit Ethernet 0/1
2900 (G0/0) (G0/1) Serial 0/0/0 (S0/0/0) Serial 0/0/1 (S0/0/1)
Gigabit Ethernet 0/0/0 Gigabit Ethernet 0/0/1
4221 (G0/0/0) (G0/0/1) Serial 0/1/0 (S0/1/0) Serial 0/1/1 (S0/1/1)
Gigabit Ethernet 0/0/0 Gigabit Ethernet 0/0/1
4300 (G0/0/0) (G0/0/1) Serial 0/1/0 (S0/1/0) Serial 0/1/1 (S0/1/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.
The 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.
End of document
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 16 of 16 www.netacad.com