Here´s a simple lab to set up a DMVPN scenario, we have two spokes (R2 and R3) and one hub (R1). R4 is simply there to simulate a "network" cloud". We will be using DMVPN phase 2 to permit the dynamic creation of spoke to spoke tunnels. Here's our topology:
In this the goal is to set up DMVPN. To simulate private networks we'll set up loopback interface's on each of the routers (R1 through R3) with addresses in the format 11.11.11.11, 22.22.22.22, etc.
Begin by setting up basic connectivity, R4 interface's should be the default gateway for other routers.
Here's a breakdown of the tasks necessary to configure DMVPN in each router:
- Configure ISAKMP policy and keys
- Configure IPsec transform-set and profile
- Configure the tunnel interface:
- IP address
- Tunnel source, mode and key
- NHRP authentication, mappings, network-id
- Tunnel protection
- Test!
We'll begin with the DMVPN configuration without EIGRP, and then add EIGRP routing over the tunnel. I'll be posting the configs for the hub and one of the spokes (R2), the other spoke's configuration is identical.
1-ISAKMP
Hub and Spoke:
2-IPsec
Hub and Spoke:
So far the only thing that you don't have in a simple ipsec tunnel is the ipsec profile.
3-Tunnel interface
3.1 and 3.2- IP, tunnel mode and source
Hub and Spoke:
On the spoke the ip address should be 10.0.0.2 instead of 10.0.0.1. By not using a tunnel destination and defining the tunnel mode as gre multipoint on the spoke router we are implicitly using DMVPN Phase 2, whereas if we used a tunnel destination on the spoke we would be using DMVPN Phase 1, thus making all spoke-to-spoke traffic traverse the hub router.
3.3-NHRP
Hub:
Spoke:
And finally the configurations differ, on the spoke router we manually map the ip of tunnel interface of R1 to the physical interface of R1, and map multicast traffic to be directed to R1's physical interface, and define our next hop server as R1's tunnel interface.
On the hub side we simply say that multicast mapping is dynamic.
3.4-Tunnel protection
Hub and Spoke:
When you apply the tunnel protection command ISAKMP should become ON (if you weren't allready using it for something else).
4-Test!
You should see the nhrp mappings on the spoke and hub (show ip nhrp) and the DMVPN peers (show dmvpn), to make sure everything is working ping R1's tunnel interface from R2:
Bringing up R3 and configuring it identically, you should be able to ping it from the other spoke, and you should see that the two spokes form an adjacency ( sh adjacency detail ).
And we're done, on my next post we'll add routing and more to this scenario.