Hello! Welcome back to our course.
In our last lesson, we built a secure point-to-point GRE tunnel using an IPsec profile. This "route-based VPN" is a massive improvement over static crypto maps because it allows dynamic routing protocols to run securely across the internet. However, it still has a major scalability limitation: for every new branch office, you need to configure a new tunnel interface on your central hub router. Imagine managing this for hundreds of sites!
This lesson introduces a powerful and elegant solution to that problem: Dynamic Multipoint VPN (DMVPN). We will explore how DMVPN builds upon the concepts of GRE and IPsec to create a highly scalable, dynamic, and manageable VPN framework. This is a cornerstone technology for modern enterprise WANs and a critical topic for your CCNP ENCOR exam.
Specifically, this lesson will guide you through the learning outcome: Describe the components of a DMVPN solution (mGRE, NHRP, IPsec) and its operational phases.
1. The Challenge of Scale and the DMVPN Solution
A traditional hub-and-spoke VPN using point-to-point GRE tunnels requires a dedicated tunnel interface on the hub for each spoke. This creates two significant problems:
- Configuration Overhead: The hub's configuration becomes enormous and complex as the network grows.
- Inefficient Spoke-to-Spoke Traffic: If one branch office needs to communicate with another, traffic must travel up to the hub and then back down, consuming bandwidth and increasing latency. This is often called "hairpinning."
DMVPN solves both problems by creating a dynamic, non-broadcast multi-access (NBMA) network over a public transport like the internet.
To achieve this, DMVPN combines three key technologies.
2. The Core Components of DMVPN
Let's break down the building blocks of a DMVPN solution.
A. Multipoint GRE (mGRE)
The first innovation is Multipoint GRE (mGRE). Unlike a point-to-point GRE interface that requires a static tunnel destination, an mGRE interface on the hub has no configured destination. It acts as a single "one-to-many" endpoint capable of accepting connections from any number of spokes.
This single change dramatically simplifies the hub's configuration. Instead of hundreds of interface TunnelX sections, you have just one.
DMVPN Design Guide - GRE Interfaces
For an authoritative explanation of how mGRE differs from point-to-point GRE and reduces configuration complexity, please read this section from the official Cisco DMVPN Design Guide.
Read the section titled 'Generic Routing Encapsulation—p2p GRE and mGRE Interfaces.' Focus on how an mGRE interface serves as a 'one-to-many' interface, eliminating the need for a unique tunnel configuration for each branch.
B. Next Hop Resolution Protocol (NHRP)
mGRE creates a new question: If the hub has no tunnel destination configured, how does it know the public (underlay) IP address of a spoke it needs to send traffic to? And more importantly, how can one spoke dynamically learn the public IP address of another spoke to build a direct tunnel?
The answer is the Next Hop Resolution Protocol (NHRP).
NHRP functions similarly to ARP. While ARP resolves a Layer 3 IP address to a Layer 2 MAC address, NHRP resolves an overlay (tunnel) IP address to an underlay (NBMA/public) IP address.
It operates on a client-server model:
- Next Hop Server (NHS): The hub router is configured as the NHS. It maintains a database—a cache of NHRP mappings.
- Next Hop Client (NHC): The spoke routers are NHCs. When a spoke comes online, it initiates a Registration Request to the hub, providing its overlay and underlay IP addresses.
- The NHS stores this mapping. Now, when any router in the DMVPN cloud needs to find the underlay address for a given overlay address, it sends a Resolution Request to the NHS.
Dynamic Multipoint VPN (DMVPN)
To see how these components work together, let's watch the beginning of a video from Kevin Wallace Training. He effectively explains the purpose of DMVPN and the roles of mGRE and NHRP.
Watch from 00:46 to 04:56. Pay close attention to: How mGRE allows a single interface to form multiple tunnels. The analogy of NHRP to DNS for dynamic address resolution. The client-server relationship between the spokes (clients) and the hub (server).
C. IPsec Encryption
Just like the GRE tunnels we built in the last lesson, the mGRE tunnels in DMVPN are unencrypted by default. To secure them, we apply the same IPsec profile method directly to the tunnel interface.
The command tunnel protection ipsec profile <PROFILE_NAME> instructs the router to encrypt all GRE traffic (which includes the NHRP messages and the actual user data) before sending it out the physical interface. This seamlessly integrates strong security into the dynamic DMVPN fabric.
DMVPN Deep Dive – NHRP, mGRE, Routing Scenarios and IPsec
The article 'DMVPN Deep Dive' explains how to secure the DMVPN tunnel using an IPsec profile, providing continuity from our previous lesson.
Please read the section 'DMVPN Encryption - IPsec'. Note how the IKEv2 and IPsec profiles are created and then applied to the tunnel interface with the tunnel protection command. This should feel very familiar.
3. DMVPN Operational Phases
DMVPN is not a single entity but an evolution of a technology across three "phases." Each phase enhances the capabilities of the previous one. Understanding these phases is crucial for both design and troubleshooting.
Phase 1: Hub-and-Spoke
Phase 1 provides the basic scalable hub-and-spoke topology.
- Topology: Hub uses mGRE; spokes use standard point-to-point GRE.
- Operation: Spokes can only form a tunnel to the hub. They cannot dynamically discover other spokes.
- Traffic Flow: All traffic, including spoke-to-spoke, must hairpin through the hub. While more scalable from a configuration perspective, it's inefficient for inter-spoke communication.
Phase 2: Spoke-to-Spoke
Phase 2 introduces dynamic, direct spoke-to-spoke tunnels.
- Topology: Both the hub and all spokes use mGRE interfaces.
- Operation:
- Spoke-A wants to send a packet to Spoke-B. The routing table on Spoke-A points to Spoke-B's overlay IP via the hub.
- The first packet travels from Spoke-A to the Hub, which forwards it to Spoke-B.
- This triggers Spoke-A to send an NHRP Resolution Request for Spoke-B's overlay IP to the Hub.
- The Hub forwards the request to Spoke-B.
- Spoke-B responds directly to Spoke-A with its underlay IP information.
- Spoke-A and Spoke-B now have each other's public IPs and can build a direct, dynamic IPsec tunnel. Subsequent packets flow directly.
- Limitation: This phase has a significant drawback. If you summarize routes on the hub (a common practice for scalability), the specific next-hop information is lost, and the spoke-to-spoke tunnel mechanism breaks. All traffic reverts to hairpinning through the hub.
Dynamic Multipoint VPN (DMVPN)
The following video clip provides an excellent demonstration of Phase 2 in action. Watch the traceroute output change after the first packet, proving the dynamic creation of a spoke-to-spoke tunnel.
Watch from 20:21 to 23:26. Observe the first traceroute going through the hub (172.16.10.1) and the second traceroute going directly to the other spoke (172.16.10.2). This is the 'magic' of DMVPN Phase 2.
Phase 3: Optimized and Scalable Spoke-to-Spoke
Phase 3 is the most advanced and widely deployed version. It improves upon Phase 2 by optimizing the discovery process and, most importantly, solving the route summarization problem.
- Topology: Same as Phase 2 (mGRE everywhere).
- Operation: Phase 3 introduces two key commands:
ip nhrp redirecton the hub andip nhrp shortcuton the spokes.- Spoke-A sends a packet to Spoke-B via the hub.
- The hub forwards the packet but also sends an NHRP Redirect message back to Spoke-A. This message tells Spoke-A, "There is a better path to this destination."
- This redirect triggers Spoke-A to initiate the same NHRP Resolution process as in Phase 2 to find Spoke-B's real address.
- A direct tunnel is formed. Because of this redirect/shortcut mechanism, the hub can advertise summarized routes, and the spokes can still resolve the specific next-hop addresses required to build direct tunnels.
This diagram perfectly illustrates the Phase 3 process:

DMVPN Deep Dive – Phase 1, 2, and 3
To understand the technical nuances between the phases, this article provides a detailed written explanation.
Read the sections 'DMVPN Phase 1,' 'DMVPN Phase 2,' and 'DMVPN Phase 3.' Focus on the key differences in traffic flow and the problem that each subsequent phase solves.
Test your understanding!
You are troubleshooting a DMVPN Phase 3 network. A user at a branch office (Spoke-A) reports that access to a server at another branch (Spoke-B) is slow. You run a traceroute from Spoke-A to Spoke-B and see that every hop goes through the central hub router.
What is the most likely reason for this behavior, and which component is failing to do its job?
Show answer
The most likely reason is that the dynamic spoke-to-spoke tunnel is failing to build. Since the traffic is consistently hairpinning through the hub, it indicates that the NHRP resolution process is not completing successfully. This could be due to a misconfiguration in NHRP itself, a firewall blocking NHRP messages, or a routing issue preventing the spokes from resolving each other's underlay addresses. The key failure is in the NHRP Resolution and shortcut switching part of the DMVPN operation.
Conclusion
You've now explored the architecture and operation of DMVPN, one of the most important and scalable VPN technologies in enterprise networking. By mastering these concepts, you've moved from static, point-to-point tunnels to a dynamic, on-demand multipoint fabric.
Key Takeaways:
- DMVPN solves the scalability issues of point-to-point IPsec VPNs using a hub-and-spoke model that can dynamically create spoke-to-spoke connections.
- The core components are mGRE for one-to-many tunnel termination, NHRP for dynamic address resolution (mapping overlay to underlay IPs), and IPsec for securing the tunnels.
- DMVPN has three phases:
- Phase 1: Basic hub-and-spoke. All traffic hairpins through the hub.
- Phase 2: Enables dynamic spoke-to-spoke tunnels, but is broken by route summarization.
- Phase 3: The optimal phase. Uses NHRP redirects to support both route summarization and efficient spoke-to-spoke communication.
Preview of the Next Lesson:
We've spent the last few lessons on securing and segmenting traffic between geographically separate sites. In our next module, we'll shift our focus to virtualization and segmentation within a single device. Our first lesson will be on configuring and verifying Virtual Routing and Forwarding (VRF-lite), a technology that allows you to create multiple independent routing tables inside a single router.