Loading...
DMVPN


Next Hop Resolution ProtocoL

DMVPN Configuration

Let’s start by examining the configuration of R1 Router
R1:
interface FastEthernet0/0
ip address 172.16.1.2 255.255.255.252
!
interface Tunnel 0
ip address 192.168.0.1 255.255.255.0
ip nhrp map multicast dynamic
(enables forwarding of multicast traffic across the tunnel to dynamic spokes required by most routing protocols).
ip nhrp network-id 1
(uniquely identifies the DMVPN network; tunnels will not form between routers with differing network IDs.)
tunnel source 172.16.1.2
tunnel mode gre multipoint
Here tunnel does not have an explicit destination specified because multipoint tunnels are built dynamically from the spokes to the hub router; The hub router doesn’t need to be preconfigured with spoke addresses.
R2:
interface FastEthernet0/0
ip address 172.16.2.2 255.255.255.252
!
interface Tunnel 0
ip address 192.168.0.2 255.255.255.0
ip nhrp map 192.168.0.1 172.16.1.2 (statically maps the NHS address to R1’s physical address.)
ip nhrp map multicast 172.16.1.2 (multicast traffic is only allowed from spokes to the hub, not from spoke to spoke.)
ip nhrp network-id 1
ip nhrp nhs 192.168.0.1 (ip nhrp nhs 192.168.0.1 designates R1 as the Next Hop Server)
tunnel source 172.16.2.2
tunnel mode gre multipoint
R3: and R4: Create similar configurations on all spoke routers
Verify DMVPN Sessions
R1# show dmvpn
Legend: Attrb –> S – Static, D – Dynamic, I – Incomplete
N – NATed, L – Local, X – No Socket
# Ent –> Number of NHRP entries with same NBMA peer
Tunnel0, Type:Hub, NHRP Peers:3,
# Ent Peer NBMA Addr Peer Tunnel Add State UpDn Tm Attrb
—– ————— ————— ———————- ———— ——–
1 172.16.25.2 192.168.0.2 UP 00:57:47 D
1 172.16.35.2 192.168.0.3 UP 00:45:56 D
1 172.16.45.2 192.168.0.4 UP 00:45:46 D
Dynamic Tunneling
Verify
R2# show dmvpn
Tunnel0, Type:Spoke, NHRP Peers:1,
# Ent Peer NBMA Addr Peer Tunnel Add State UpDn Tm Attrb
—– ————— ————— —– ——– —–
1 172.16.1.2 192.168.0.1 UP 01:08:02 S
R2# ping 192.168.0.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.0.4, timeout is 2 seconds:
! ! ! ! !
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/37/56 ms
R2# show dmvpn
Tunnel0, Type:Spoke, NHRP Peers:2,
# Ent Peer NBMA Addr Peer Tunnel Add State UpDn Tm Attrb
—– ————— ————— —– ——– —–
1 172.16.1.2 192.168.0.1 UP 01:08:27 S
1 172.16.4.2 192.168.0.4 UP 00:00:03 D
Notice that the tunnel to R4 has been flagged as dynamic, in contrast to the static tunnel to the hub/NHS
IPSEC: ADDING CRYPTO
authentication pre-share
crypto isakmp key P4ssw0rd address 172.16.0.0 255.255.0.0
!
crypto ipsec transform-set MyTransformSet esp-aes esp-sha-hmac
!
crypto ipsec profile MyProfile
set transform-set MyTransformSet
!
interface Tunnel0
tunnel protection ipsec profile MyProfile
After bumping the tunnel interfaces, we can see the DMVPN sessions have been rebuilt, this time sporting some slick military-grade encryption.
Verification
R1# show dmvpn
Tunnel0, Type:Hub, NHRP Peers:3,
# Ent Peer NBMA Addr Peer Tunnel Add State UpDn Tm Attrb
—– ————— ————— —– ——– —–
1 172.16.2.2 192.168.0.2 UP 00:02:28 D
1 172.16.3.2 192.168.0.3 UP 00:02:26 D
1 172.16.4.2 192.168.0.4 UP 00:02:25 D
R1# show crypto isakmp sa
IPv4 Crypto ISAKMP SA
dst src state conn-id slot status
172.16.1.2 172.16.3.2 QM_IDLE 1002 0 ACTIVE
172.16.1.2 172.16.2.2 QM_IDLE 1001 0 ACTIVE
172.16.1.2 172.16.4.2 QM_IDLE 1003 0 ACTIVE