Free tech learning for everyone, from basics to pro

Routing & SwitchingNetworking SecurityAdvanced

Configuring DMVPN phase 3 with IPsec on Cisco IOS: hub, spokes, routing and verification

In short: A DMVPN phase 3 build has four parts: an IKEv2 and IPsec profile, an mGRE tunnel on the hub acting as NHRP server with redirect enabled, mGRE tunnels on spokes registered to the hub with shortcut enabled, and a routing protocol over the tunnel. Show dmvpn and show crypto session confirm each part.

The lab

One hub (public address 198.51.100.10, tunnel 172.16.0.1) and two spokes on the internet. The tunnel network is 172.16.0.0/24. The hub's LAN is 10.0.0.0/24, spoke 1 is 10.1.0.0/24, spoke 2 is 10.2.0.0/24. Keys and names below are examples only.

Building DMVPN phase 3IPsec profileIKEv2 +transform setHub tunnelmGRE, NHS,redirectSpoke tunnelsmGRE, NHS,shortcutRoutingEIGRP or BGPover tunnelVerifyshow dmvpn
Figure 1. Build the encryption first, then the hub, then one spoke at a time.

Step 1: IPsec (same on every router)

crypto ikev2 keyring DMVPN-KEYS
 peer ANY
  address 0.0.0.0 0.0.0.0
  pre-shared-key Example-Lab-Key-Only
crypto ikev2 profile DMVPN-IKEV2
 match identity remote address 0.0.0.0
 authentication remote pre-share
 authentication local pre-share
 keyring local DMVPN-KEYS
crypto ipsec transform-set DMVPN-TS esp-aes 256 esp-sha256-hmac
 mode transport
crypto ipsec profile DMVPN-PROF
 set transform-set DMVPN-TS
 set ikev2-profile DMVPN-IKEV2

Transport mode saves 20 bytes per packet because GRE already adds a new IP header. In production, use certificates instead of a shared key for large deployments.

Step 2: the hub

interface Tunnel0
 ip address 172.16.0.1 255.255.255.0
 ip mtu 1400
 ip tcp adjust-mss 1360
 ip nhrp network-id 100
 ip nhrp authentication DMVPNkey
 ip nhrp map multicast dynamic
 ip nhrp redirect
 no ip split-horizon eigrp 100
 tunnel source GigabitEthernet0/0/0
 tunnel mode gre multipoint
 tunnel key 100
 tunnel protection ipsec profile DMVPN-PROF

map multicast dynamic lets the hub send routing protocol multicasts to every spoke that registers. ip nhrp redirect is what makes it phase 3.

Step 3: each spoke

interface Tunnel0
 ip address 172.16.0.11 255.255.255.0
 ip mtu 1400
 ip tcp adjust-mss 1360
 ip nhrp network-id 100
 ip nhrp authentication DMVPNkey
 ip nhrp nhs 172.16.0.1 nbma 198.51.100.10 multicast
 ip nhrp shortcut
 tunnel source GigabitEthernet0/0/0
 tunnel mode gre multipoint
 tunnel key 100
 tunnel protection ipsec profile DMVPN-PROF

The nhs ... nbma ... multicast line (IOS 15.4 and later) tells the spoke the hub's tunnel and public addresses in one command. Spoke 2 is the same with 172.16.0.12.

Step 4: routing

router eigrp 100
 network 172.16.0.0 0.0.0.255
 network 10.0.0.0 0.0.0.255
! On the hub only: send spokes a summary
interface Tunnel0
 ip summary-address eigrp 100 10.0.0.0 255.0.0.0

With phase 3, spokes only need the summary. BGP with the hub as a route reflector is a common choice for very large networks.

Step 5: verify

  • show dmvpn: each peer's public and tunnel address, state (UP) and whether it is static or dynamic (D).
  • show crypto ikev2 sa and show crypto session: IKE and IPsec are up.
  • show ip nhrp: NHRP cache entries, including shortcut entries after spokes talk.
  • From spoke 1, traceroute 10.2.0.1 source 10.1.0.1: the first attempt goes via 172.16.0.1, and after the redirect the next one goes directly to 172.16.0.12.
  • On spoke 1, show ip route nhrp shows the shortcut route marked H.

Common problems

  • Mismatched network-id, NHRP authentication or tunnel key: registrations fail.
  • Firewalls blocking UDP 500 and 4500 (IKE and NAT-T) or ESP.
  • Large packets dropped: set ip mtu 1400 and ip tcp adjust-mss 1360.
  • Spokes behind NAT work with NAT-T, but two spokes behind the same NAT device need extra care.

Practice

Which hub command turns a DMVPN design into phase 3?
ip nhrp redirect on the hub tunnel (with ip nhrp shortcut on the spokes).
Why is IPsec transport mode common in DMVPN?
GRE already adds a new IP header, so transport mode avoids adding a second one and saves 20 bytes per packet.
Which command shows DMVPN peers and their state?
show dmvpn.

Key takeaways

  • Build an IKEv2 and IPsec profile and apply it with tunnel protection.
  • The hub uses mGRE, NHRP dynamic multicast mapping and ip nhrp redirect.
  • Spokes register with the hub as NHS and use ip nhrp shortcut.
  • Set tunnel MTU and TCP MSS, and verify with show dmvpn and show ip nhrp.
Tracks your learning on this device only. See your progress on the learning paths.
Verified author✓ Valid
Issued to
Mohamed Fayas
Role
Founder of FM TecHub
Credentials
CCNABTEC HND Network EngineeringBEng (Hons) Computer Networking & Cloud Security
Issuer
FM TecHub · fmtechub.com

He writes practical, plain-English guides on networking, security and cloud.

More about the author →

Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.

Email updates: coming soon

New notes, tools and security news from FM TecHub by email, explained simply. Free. We're not collecting email addresses yet; see our privacy policy.

PortServiceStatus
SMTP/25Email updatesopening soon

Meanwhile, stay connected: