DMVPN Phase 3 establishes direct spoke-to-spoke forwarding over mGRE Tunnel0.
However, mGRE provides zero encryption: all tunnel packets cross the Internet in cleartext.
Figure 1 – The lab topology
Cleartext GRE Across Transit
When Chicago (
10.30.30.10) forwards traffic to Miami (10.40.40.10), every intermediate hop can inspect the packet stack:Outer header: Public transit IPs
GRE header: Protocol 47
Inner header: Private LAN subnets
Payload: Unencrypted application data

Figure 2 – The GRE packet on the Internet
Before the direct shortcut forms, packets transit ISP1, the hub, and ISP2.
Any router or eavesdropper along this path can capture and read the entire payload.
Figure 3 – Anyone on the transit path reads the packet
Internal IP subnets and corporate data are completely exposed across the WAN.
IPsec must encrypt the GRE packet before it leaves the physical interface.Answer the question below
Which header of the GRE packet carries the private LAN addresses?
Why Crypto Maps Fail on mGRE
Point-to-point IPsec applies crypto maps to physical WAN interfaces.
A crypto map requires:An ACL matching GRE between specific public IPs.
A static
set peerpointing to the remote public IP.

Figure 4 – A crypto map needs a peer it does not know
This model fails on mGRE:
Spokes do not know remote spoke public IPs in advance.
NHRP resolves spoke NBMA addresses on demand.
Crypto maps demand static peer definitions before tunnel creation.
An IPsec profile attached directly to interface Tunnel0 solves this.
It encrypts all traffic leaving Tunnel0 and derives the remote peer directly from the GRE header.Answer the question below
Which protocol gives a spoke the public IP of another spoke?
Securing DMVPN replaces static crypto maps and ACLs with an IPsec profile bound to Tunnel0.
The configuration relies on four components:
An IKE Phase 1 policy
A wildcard pre-shared key
A transport-mode transform set
The IPsec profile itself
IKE Phase 1 Policy
The ISAKMP policy sets encryption, hashing, authentication, and Diffie-Hellman parameters for Phase 1 negotiation.
Configure the Phase 1 policy on the hub and both spokes:
R1# conf t R1(config)# crypto isakmp policy 1 R1(config-isakmp)# encryption aes R1(config-isakmp)# hash sha R1(config-isakmp)# authentication pre-share R1(config-isakmp)# group 14 R1(config-isakmp)# exitR3# conf t R3(config)# crypto isakmp policy 1 R3(config-isakmp)# encryption aes R3(config-isakmp)# hash sha R3(config-isakmp)# authentication pre-share R3(config-isakmp)# group 14 R3(config-isakmp)# exitR4# conf t R4(config)# crypto isakmp policy 1 R4(config-isakmp)# encryption aes R4(config-isakmp)# hash sha R4(config-isakmp)# authentication pre-share R4(config-isakmp)# group 14 R4(config-isakmp)# exitWildcard Pre-Shared Key
Spokes discover peer IP addresses dynamically via NHRP.
Because routers cannot pre-configure every spoke IP, bind the key to wildcard address 0.0.0.0.Apply the wildcard key across all routers:
R1(config)# crypto isakmp key DMVPN_KEY address 0.0.0.0R3(config)# crypto isakmp key DMVPN_KEY address 0.0.0.0R4(config)# crypto isakmp key DMVPN_KEY address 0.0.0.0Every router can now mutually authenticate any peer across the DMVPN cloud.
Production Note: In enterprise networks, replace wildcard keys with PKI certificates.
A compromised router exposes the shared key of the entire cloud.
Figure 5 – One key, any peer
Answer the question below
Which address does the wildcard pre-shared key use?
Transport-Mode Transform Set
GRE already provides the routable outer IP header.
Configuring transport mode prevents adding a redundant IPsec header.
Figure 6 – Transport mode on the GRE packet
The outer IP header stays in cleartext for public transit, while ESP encrypts the GRE header, private subnets, and payload.
Configure the transform set on all routers:
R1(config)# crypto ipsec transform-set DMVPN-SET esp-aes esp-sha-hmac R1(cfg-crypto-trans)# mode transport R1(cfg-crypto-trans)# exitR3(config)# crypto ipsec transform-set DMVPN-SET esp-aes esp-sha-hmac R3(cfg-crypto-trans)# mode transport R3(cfg-crypto-trans)# exitR4(config)# crypto ipsec transform-set DMVPN-SET esp-aes esp-sha-hmac R4(cfg-crypto-trans)# mode transport R4(cfg-crypto-trans)# exitThe IPsec Profile
An IPsec profile links Phase 2 transform settings to virtual tunnel interfaces.
It removes static peer definitions and ACL requirements.Create the profile and attach the transform set:
R1(config)# crypto ipsec profile DMVPN-PROFILE R1(ipsec-profile)# set transform-set DMVPN-SET R1(ipsec-profile)# endR3(config)# crypto ipsec profile DMVPN-PROFILE R3(ipsec-profile)# set transform-set DMVPN-SET R3(ipsec-profile)# endR4(config)# crypto ipsec profile DMVPN-PROFILE R4(ipsec-profile)# set transform-set DMVPN-SET R4(ipsec-profile)# endThe profile is now ready across all routers.
It remains inactive until applied to Tunnel0.Answer the question below
Which mode does the transform set use on a GRE tunnel?
Applying an IPsec profile to
interface Tunnel0activates encryption.
Configuration order affects neighbor adjacencies.Protect the Hub First
Apply the profile to the hub:
R1# conf t R1(config)# interface tunnel0 R1(config-if)# tunnel protection ipsec profile DMVPN-PROFILE %CRYPTO-6-ISAKMP_ON_OFF: ISAKMP is ON %OSPF-5-ADJCHG: Process 1, Nbr 203.0.113.3 on Tunnel0 from FULL to DOWN, Neighbor Down: Dead timer expired %OSPF-5-ADJCHG: Process 1, Nbr 203.0.113.4 on Tunnel0 from FULL to DOWN, Neighbor Down: Dead timer expired R1(config-if)# endR1 now requires incoming GRE packets to be encrypted with ESP.
Because spokes still send cleartext GRE, R1 drops their traffic and neighbor dead timers expire.
Figure 7 – The hub drops unencrypted packets
Protect the Spokes
Apply the profile to both spokes:
R3# conf t R3(config)# interface tunnel0 R3(config-if)# tunnel protection ipsec profile DMVPN-PROFILE %CRYPTO-6-ISAKMP_ON_OFF: ISAKMP is ON %OSPF-5-ADJCHG: Process 1, Nbr 203.0.113.1 on Tunnel0 from LOADING to FULL, Loading Done R3(config-if)# endR4# conf t R4(config)# interface tunnel0 R4(config-if)# tunnel protection ipsec profile DMVPN-PROFILE %CRYPTO-6-ISAKMP_ON_OFF: ISAKMP is ON %OSPF-5-ADJCHG: Process 1, Nbr 203.0.113.1 on Tunnel0 from LOADING to FULL, Loading Done R4(config-if)# endWith IPsec established, both spokes re-register via NHRP and restore OSPF to FULL.

Figure 8 – Both spokes protected, OSPF back to FULL
Answer the question below
Which Tunnel0 command applies the IPsec profile?
IPsec operates beneath GRE and NHRP.
A Security Association (SA) must establish before GRE packets can travel across the wire.Hub-to-Spoke Security Associations
Check IKE Phase 1 status on the hub (R1):
R1# show crypto isakmp sa IPv4 Crypto ISAKMP SA dst src state conn-id status 203.0.113.1 203.0.113.3 QM_IDLE 1001 ACTIVE 203.0.113.1 203.0.113.4 QM_IDLE 1002 ACTIVE IPv6 Crypto ISAKMP SAThe hub maintains two active Phase 1 SAs in
QM_IDLEstate: one for Chicago and one for Miami.
Spoke-to-spoke SAs do not exist yet.
Figure 9 – One SA per spoke on the hub
Check the IPsec Phase 2 SA toward Chicago:
R1# show crypto ipsec sa peer 203.0.113.3 interface: Tunnel0 Crypto map tag: Tunnel0-head-0, local addr 203.0.113.1 protected vrf: (none) local ident (addr/mask/prot/port): (203.0.113.1/255.255.255.255/47/0) remote ident (addr/mask/prot/port): (203.0.113.3/255.255.255.255/47/0) current_peer 203.0.113.3 port 500 PERMIT, flags={origin_is_acl,} #pkts encaps: 42, #pkts encrypt: 42, #pkts digest: 42 #pkts decaps: 39, #pkts decrypt: 39, #pkts verify: 39 #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.: 203.0.113.1, remote crypto endpt.: 203.0.113.3 plaintext mtu 1362, path mtu 1400, ip mtu 1400, ip mtu idb Tunnel0 current outbound spi: 0x5C3A91F0(1547407856) PFS (Y/N): N, DH group: none inbound esp sas: spi: 0xA1B07E22(2712829474) transform: esp-aes esp-sha-hmac , in use settings ={Transport, } conn id: 2001, flow_id: SW:1, sibling_flags 80000000, crypto map: Tunnel0-head-0 sa timing: remaining key lifetime (k/sec): (4608000/3498) IV size: 16 bytes replay detection support: Y Status: ACTIVE(ACTIVE) inbound ah sas: inbound pcp sas: outbound esp sas: spi: 0x5C3A91F0(1547407856) transform: esp-aes esp-sha-hmac , in use settings ={Transport, } conn id: 2002, flow_id: SW:2, sibling_flags 80000000, crypto map: Tunnel0-head-0 sa timing: remaining key lifetime (k/sec): (4608000/3498) IV size: 16 bytes replay detection support: Y Status: ACTIVE(ACTIVE) outbound ah sas: outbound pcp sas:Traffic selectors match public IP endpoints on IP protocol
47(GRE).
The SA usesTransportmode, and encryption counters increment with every routing hello and NHRP packet.Answer the question below
Which IP protocol number appears in the IPsec identities?
Answer the question below
How many ISAKMP SAs does the hub hold with two spokes?
Spoke-to-Spoke SAs on Demand
Before any LAN traffic crosses the shortcut, Chicago holds a single SA, with the hub.

Figure 10 – Chicago before the first spoke-to-spoke packet
Check initial crypto sessions on Chicago (R3):
R3# show crypto session Crypto session current status Interface: Tunnel0 Session status: UP-ACTIVE Peer: 203.0.113.1 port 500 Session ID: 0 IKEv1 SA: local 203.0.113.3/500 remote 203.0.113.1/500 Active IPSEC FLOW: permit 47 host 203.0.113.3 host 203.0.113.1 Active SAs: 2, origin: crypto mapOnly one session is active, directed to hub
203.0.113.1.Trigger traffic to the Miami LAN:
R3# ping 10.40.40.1 source 10.30.30.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.40.40.1, timeout is 2 seconds: Packet sent with a source address of 10.30.30.1 !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 52/80/164 msThe initial echo takes 164 ms while three events occur:
R1 sends an NHRP Redirect to Chicago.
Chicago resolves the Miami NBMA address via NHRP.
Chicago negotiates IKE and IPsec directly with Miami (
203.0.113.4).
Verify updated ISAKMP SAs on Chicago:
R3# show crypto isakmp sa IPv4 Crypto ISAKMP SA dst src state conn-id status 203.0.113.1 203.0.113.3 QM_IDLE 1001 ACTIVE 203.0.113.4 203.0.113.3 QM_IDLE 1002 ACTIVE IPv6 Crypto ISAKMP SAA second Phase 1 SA is now active with Miami (
203.0.113.4).
The wildcard key authenticated the dynamic peer without a pre-configured address.Check active crypto sessions on Chicago:
R3# show crypto session Crypto session current status Interface: Tunnel0 Session status: UP-ACTIVE Peer: 203.0.113.4 port 500 Session ID: 0 IKEv1 SA: local 203.0.113.3/500 remote 203.0.113.4/500 Active IPSEC FLOW: permit 47 host 203.0.113.3 host 203.0.113.4 Active SAs: 2, origin: crypto map Interface: Tunnel0 Session status: UP-ACTIVE Peer: 203.0.113.1 port 500 Session ID: 0 IKEv1 SA: local 203.0.113.3/500 remote 203.0.113.1/500 Active IPSEC FLOW: permit 47 host 203.0.113.3 host 203.0.113.1 Active SAs: 2, origin: crypto mapTwo sessions run concurrently on Tunnel0.
Spoke-to-spoke SAs follow the NHRP cache lifecycle: when the shortcut entry expires after 600 idle seconds, the dynamic IPsec SA tears down automatically.
Figure 11 – Spoke-to-spoke SA built on demand
Answer the question below
After the ping, how many ISAKMP SAs does Chicago hold?
Securing DMVPN comes down to one core shift: protect the virtual tunnel interface directly and let GRE supply the peers.
Architecture Comparison
Property
Traditional Crypto Map
DMVPN IPsec Profile
Interface Binding
Physical WAN interface
Virtual
Tunnel0interfacePeer Definition
Static (
set peer <IP>)Dynamic (derived from GRE header)
Traffic Selector
Static ACL matching GRE
Automatic (matches GRE tunnel)
IPsec Mode
Tunnel or Transport
Always Transport mode
Table 1 – Crypto Map vs IPsec Profile
Key Takeaways
Protect Tunnel0 Directly: Use
tunnel protection ipsec profile <name>. Crypto maps and static ACLs are obsolete on mGRE.Always Use Transport Mode: GRE already provides encapsulation. Transport mode prevents redundant outer IP overhead.
Wildcard Authentication: Binding pre-shared keys to
address 0.0.0.0allows dynamic spokes to authenticate without pre-configuring peer IPs.On-Demand Lifecycle: Hubs maintain persistent SAs with all spokes. Spoke-to-spoke SAs build dynamically with NHRP shortcuts and tear down automatically when idle.
Answer the question below
On which interface is the IPsec profile applied?
Answer the question below
What does a crypto map need that a DMVPN spoke cannot provide in advance?