2.3 Configure and verify a single-hub DMVPN

ENARSI 300-410 v1.1 · 2.0 VPN Technologies

DMVPN builds a full mesh of encrypted tunnels from one hub configuration. Every router has one multipoint GRE tunnel interface; NHRP maps each tunnel address to the router's real (NBMA) address; IPsec protects the traffic; a routing protocol runs over the tunnel; and in phase 3, spokes build direct spoke-to-spoke tunnels on demand.

What you must know

GRE and multipoint GRE

A point-to-point GRE tunnel has one tunnel destination; ten sites in a mesh need 45 tunnels. A multipoint GRE tunnel has none: tunnel mode gre multipoint, and the destination for each packet comes from NHRP. The hub has one mGRE interface for every spoke; spokes can be point-to-point (phase 1) or mGRE (phases 2 and 3).

interface Tunnel0
 ip address 172.16.0.1 255.255.255.0
 ip mtu 1400
 ip tcp adjust-mss 1360
 tunnel source GigabitEthernet0/0
 tunnel mode gre multipoint
 tunnel key 100

GRE adds 24 bytes and IPsec up to about 70 more, so lower the tunnel's IP MTU to 1400 and the TCP MSS to 1360, or large packets are fragmented or dropped.

NHRP

MessageWho sends itWhat it does
Registration requestSpoke → hub (NHS)"Tunnel 172.16.0.11 is at NBMA 198.51.100.11"
Resolution requestSpoke → hub (forwarded)"Where is the router behind 172.16.0.12?"
Redirect (phase 3)Hub → spoke"You sent this through me; ask the other spoke directly"
Resolution replyTarget spoke → asking spokeThe NBMA address, so a direct tunnel can be built
! Hub
interface Tunnel0
 ip nhrp network-id 1
 ip nhrp authentication DMVPN1
 ip nhrp map multicast dynamic
 ip nhrp redirect
!
! Spoke
interface Tunnel0
 ip address 172.16.0.11 255.255.255.0
 ip nhrp network-id 1
 ip nhrp authentication DMVPN1
 ip nhrp nhs 172.16.0.1 nbma 203.0.113.1 multicast
 ip nhrp shortcut
 tunnel source GigabitEthernet0/0
 tunnel mode gre multipoint
 tunnel key 100

IPsec protection

crypto isakmp policy 10
 encryption aes 256
 hash sha256
 authentication pre-share
 group 14
crypto isakmp key DMVPN-KEY address 0.0.0.0
!
crypto ipsec transform-set TS esp-aes 256 esp-sha256-hmac
 mode transport
crypto ipsec profile DMVPN-PROF
 set transform-set TS
!
interface Tunnel0
 tunnel protection ipsec profile DMVPN-PROF

tunnel protection encrypts whatever the tunnel sends; no crypto ACL is needed. Transport mode saves 20 bytes because GRE already adds an outer IP header. A mismatched ISAKMP policy or key leaves NHRP registration failing, so the spoke never appears on the hub.

Dynamic neighbours

The hub needs no per-spoke configuration: a spoke registers, the hub learns its NBMA address, and routing hellos sent to the multicast mapping reach it. That gives dynamic neighbours.

ProtocolOn the hub's tunnelWhy
EIGRPno ip split-horizon eigrp 100 (phase 1/2), no ip next-hop-self eigrp 100 (phase 2)Spokes must learn each other's routes, with the other spoke as next hop in phase 2
OSPFip ospf network point-to-multipoint (phase 1/3) or broadcast with the hub as DR and spokes priority 0 (phase 2)One subnet, many neighbours; spokes must never become DR
BGPbgp listen range 172.16.0.0/24 peer-group SPOKESThe hub accepts spokes without a neighbor line each

Spoke-to-spoke tunnels

PhaseSpoke tunnelRoutingSpoke-to-spoke
1Point-to-point GREHub can summarizeNo: always through the hub
2mGREHub must keep the other spoke as next hop (no summary)Yes, triggered by the routing table
3mGRE + ip nhrp shortcutHub can summarize; NHRP overrides the next hopYes, triggered by NHRP redirect

The first packets go through the hub (1); the hub's redirect makes SPOKE1 resolve SPOKE2, and the next packets take the direct tunnel (2). In show ip route the shortcut appears as an H (NHRP) route, or as a % next-hop override.

SPOKE1# show dmvpn
Interface: Tunnel0, IPv4 NHRP Details
Type:Spoke, NHRP Peers:2,

 # Ent  Peer NBMA Addr Peer Tunnel Add State  UpDn Tm Attrb
 ----- --------------- --------------- ----- -------- -----
     1 203.0.113.1          172.16.0.1    UP 00:12:01     S
     1 198.51.100.12       172.16.0.12    UP 00:00:09     D

Commands

show dmvpn [detail]Peers per tunnel: NBMA and tunnel addresses, state, static or dynamic.
show ip nhrp [brief]The NHRP cache: mappings, expiry, flags.
show crypto isakmp sa / show crypto ipsec saPhase 1 and phase 2 security associations and their counters.
show ip route nhrpShortcut routes installed by NHRP (phase 3).
debug nhrp packetRegistration, resolution and redirect messages.

Exam traps

Check yourself

What does a spoke register with the hub?
Its tunnel address and its NBMA (real) address.
Which two commands enable phase 3?
ip nhrp redirect on the hub, ip nhrp shortcut on the spokes.
Why is mode transport used in the transform set?
GRE already provides the outer IP header, so tunnel mode would add 20 bytes for nothing.
Spokes see the hub as an EIGRP neighbour but not each other's routes. Fix?
no ip split-horizon eigrp <as> on the hub's tunnel.
What do the S and D attributes mean in show dmvpn?
Static mapping (the NHS) and dynamic mapping (learned by NHRP).

Labs

Try it live: DMVPN: one hub, two spokes, IPsec and spoke-to-spoke shortcuts

More topics in 2.0 VPN Technologies