Hub-1 Configuration
The following is an example of configuring DMVPN on hub 1.
!
crypto ikev2 profile default
match identity remote any
authentication remote pre-share key CISCO
authentication local pre-share key CISCO
!
crypto ipsec profile default
set ikev2-profile default
!
interface Tunnel0
ip address 10.0.0.99 255.0.0.0
ip nhrp summary-map 192.168.0.0/16 1.1.1.99 preference 16
ip nhrp summary-map 192.168.0.0/20 1.1.1.99 preference 16
ip nhrp summary-map 192.168.128.0/20 1.1.1.99 preference 32
ip nhrp summary-map 192.169.99.0/24 1.1.1.99 preference 128
ip nhrp network-id 1
ip nhrp redirect
nhrp map group G1 service-policy output group1_parent
nhrp map group G2 service-policy output group2_parent
cts sgt inline
bfd interval 1000 min_rx 1000 multiplier 5
tunnel source Ethernet0/0
tunnel mode gre multipoint
tunnel key 1
tunnel protection ipsec profile default
!
interface Ethernet0/0
ip address 1.1.1.99 255.255.255.0
!
interface Ethernet1/0
ip address 192.168.99.1 255.255.255.0
!
!
router bgp 99
bgp router-id 192.168.99.1
bgp log-neighbor-changes
neighbor 192.168.99.11 remote-as 99
!
address-family ipv4
redistribute nhrp 5 registered
neighbor 192.168.99.11 activate
neighbor 192.168.99.11 next-hop-self all
exit-address-family
The following is an example of configuring DMVPN on hub 2.
crypto ikev2 profile default
match identity remote any
authentication remote pre-share key CISCO
authentication local pre-share key CISCO
!
crypto ipsec profile default
set ikev2-profile default
!
interface Tunnel1
ip address 11.0.0.98 255.0.0.0
ip nhrp summary-map 192.168.0.0/16 1.1.1.98 preference 16
ip nhrp summary-map 192.168.0.0/20 1.1.1.98 preference 32
ip nhrp summary-map 192.168.128.0/20 1.1.1.98 preference 16
ip nhrp summary-map 192.169.99.0/24 1.1.1.99 preference 8
ip nhrp network-id 2
bfd interval 1000 min_rx 1000 multiplier 5
tunnel source Ethernet0/0
tunnel mode gre multipoint
tunnel key 2
tunnel protection ipsec profile default
!
interface Ethernet0/0
ip address 1.1.1.98 255.255.255.0
!
interface Ethernet1/0
ip address 192.168.99.2 255.255.255.0
!
router bgp 99
bgp router-id 192.168.99.2
bgp log-neighbor-changes
neighbor 192.168.99.11 remote-as 99
!
address-family ipv4
redistribute nhrp 5 registered
neighbor 192.168.99.11 activate
neighbor 192.168.99.11 next-hop-self all
exit-address-family
!
The following example shows how to configure DMVPN spoke 1.
rypto ikev2 profile default
match identity remote any
authentication remote pre-share key CISCO
authentication local pre-share key CISCO
!
crypto ipsec profile default
set ikev2-profile default
!
interface Loopback0
vrf forwarding test
ip address 192.169.1.1 255.255.255.255
!
interface Tunnel0
vrf forwarding test
ip address 10.0.0.1 255.0.0.0
no ip redirects
ip nhrp network-id 1
ip nhrp nhs 10.0.0.99 nbma 1.1.1.99 multicast
ip nhrp path preference 192
bfd interval 1000 min_rx 1000 multiplier 5
tunnel source Ethernet0/0
tunnel mode gre multipoint
tunnel key 1
tunnel protection ipsec profile default shared
!
interface Tunnel1
vrf forwarding test
ip address 11.0.0.1 255.0.0.0
no ip redirects
ip nhrp network-id 1
ip nhrp nhs 11.0.0.98 nbma 1.1.1.98 multicast
ip nhrp path preference 64
bfd interval 1000 min_rx 1000 multiplier 5
tunnel source Ethernet0/0
tunnel mode gre multipoint
tunnel key 2
tunnel protection ipsec profile default shared
!
interface Ethernet0/0
ip address 1.1.1.1 255.255.255.0
!
interface Ethernet0/1
vrf forwarding fvrf
ip address 1.1.1.11 255.255.255.0
shutdown
!
interface Ethernet1/0
vrf forwarding test
ip address 192.168.1.1 255.255.255.0
!
router nhrp 5
!
address-family ipv4 vrf test
redistribute connected
network 192.168.1.0
network 192.168.11.0
network 192.169.1.1 255.255.255.255
neighbor nhs Tunnel0
neighbor nhs Tunnel1
exit-address-family
!
router ospf 1 vrf test
redistribute nhrp 5
network 192.168.1.0 0.0.0.255 area 0
network 192.169.1.1 0.0.0.0 area 0
!
The following example shows how to configure DMVPN spoke 2.
crypto ikev2 profile default
match identity remote any
authentication remote pre-share key CISCO
authentication local pre-share key CISCO
!
crypto ipsec profile default
set ikev2-profile default
!
interface Loopback0
ip address 192.169.2.1 255.255.255.255
!
interface Tunnel0
ip address 10.0.0.2 255.0.0.0
no ip redirects
ip nhrp network-id 1
ip nhrp nhs 10.0.0.99 nbma 1.1.1.99 multicast
ip nhrp path preference 192
nhrp group G2
cts sgt inline
bfd interval 1000 min_rx 1000 multiplier 5
tunnel source Ethernet0/0
tunnel mode gre multipoint
tunnel key 1
tunnel protection ipsec profile default shared
!
interface Tunnel1
ip address 11.0.0.2 255.0.0.0
no ip redirects
ip nhrp network-id 1
ip nhrp nhs 11.0.0.98 nbma 1.1.1.98 multicast
ip nhrp path preference 192
bfd interval 1000 min_rx 1000 multiplier 5
tunnel source Ethernet0/0
tunnel mode gre multipoint
tunnel key 2
tunnel protection ipsec profile default shared
!
interface Ethernet0/0
ip address 1.1.1.2 255.255.255.0
!
interface Ethernet1/0
ip address 192.168.2.1 255.255.255.0
!
router nhrp 5
traffic-share min across-interfaces
network 192.168.2.0
network 192.168.12.0
network 192.169.2.1 255.255.255.255
neighbor nhs Tunnel0
neighbor nhs Tunnel1
!
router rip
redistribute nhrp 5
network 192.168.2.0
network 192.169.2.0
!
The following is a sample output of the show ip nhrp command on hub 1.
Device# show ip route nhrp
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, m - OMP
n - NAT, Ni - NAT inside, No - NAT outside, Nd - NAT DIA
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
H - NHRP, G - NHRP registered, g - NHRP registration summary
o - ODR, P - periodic downloaded static route, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
Gateway of last resort is not set
H G 192.168.1.0/24 [15/255] via 10.0.0.1, 00:00:42, Tunnel0
H G 192.168.2.0/24 [15/338] via 10.0.0.2, 00:47:48, Tunnel0
H G 192.168.11.0/24 [15/338] via 10.0.0.1, 00:37:22, Tunnel0
H G 192.168.12.0/24 [15/338] via 10.0.0.2, 00:47:48, Tunnel0
192.169.1.0/32 is subnetted, 1 subnets
H G 192.169.1.1 [15/255] via 10.0.0.1, 00:00:42, Tunnel0
192.169.2.0/32 is subnetted, 1 subnets
H G 192.169.2.1 [15/338] via 10.0.0.2, 00:47:48, Tunnel0
Hub#
Hub#sh bfd nei
IPv4 Sessions
NeighAddr LD/RD RH/RS State Int
10.0.0.1 2/1 Up Up Tu0
10.0.0.2 1/1 Up Up Tu0
Hub#
The following is a sample output of the show ip nhrp command on hub 2.
Device# show ip route nhrp
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, m - OMP
n - NAT, Ni - NAT inside, No - NAT outside, Nd - NAT DIA
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
H - NHRP, G - NHRP registered, g - NHRP registration summary
o - ODR, P - periodic downloaded static route, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
& - replicated local route overrides by connected
Gateway of last resort is not set
H G 192.168.1.0/24 [15/255] via 11.0.0.1, 00:01:13, Tunnel1
H G 192.168.2.0/24 [15/338] via 11.0.0.2, 00:51:39, Tunnel1
H G 192.168.11.0/24 [15/1016] via 11.0.0.1, 00:41:13, Tunnel1
H G 192.168.12.0/24 [15/338] via 11.0.0.2, 00:51:39, Tunnel1
192.169.1.0/32 is subnetted, 1 subnets
H G 192.169.1.1 [15/255] via 11.0.0.1, 00:01:13, Tunnel1
192.169.2.0/32 is subnetted, 1 subnets
H G 192.169.2.1 [15/338] via 11.0.0.2, 00:51:39, Tunnel1
Hub-2#
Hub-2#sh bfd nei
IPv4 Sessions
NeighAddr LD/RD RH/RS State Int
11.0.0.1 2/2 Up Up Tu1
11.0.0.2 1/2 Up Up Tu1
Hub-2#
The following is a sample output of the show ip nhrp command on spoke 1.
Device# show ip route vrf test nhrp
Routing Table: test
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, m - OMP
n - NAT, Ni - NAT inside, No - NAT outside, Nd - NAT DIA
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
H - NHRP, G - NHRP registered, g - NHRP registration summary
o - ODR, P - periodic downloaded static route, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
Gateway of last resort is not set
11.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
H 11.0.0.2/32 is directly connected, 00:00:05, Tunnel1
H g 192.168.0.0/16 [16/4064] via 11.0.0.98, 00:43:35, Tunnel1
[16/4064] via 10.0.0.99, 00:43:35, Tunnel0
H g 192.168.0.0/20 [16/2032] via 11.0.0.98, 00:43:35, Tunnel1
[16/4064] via 10.0.0.99, 00:43:35, Tunnel0
H 192.168.2.0/24 [250/338] via 11.0.0.2, 00:00:05, Tunnel1
H g 192.168.128.0/20 [16/4064] via 11.0.0.98, 00:43:35, Tunnel1
[16/2032] via 10.0.0.99, 00:43:35, Tunnel0
H g 192.169.99.0/24 [16/508] via 10.0.0.99, 00:43:35, Tunnel0
Spoke-1#
Spoke-1#sh bfd nei
IPv4 Sessions
NeighAddr LD/RD RH/RS State Int
10.0.0.99 1/2 Up Up Tu0
11.0.0.2 3/4 Up Up Tu1
11.0.0.98 2/2 Up Up Tu1
Spoke-1#sh ip protocols vrf test
*** IP Routing is NSF aware ***
Routing Protocol is "nhrp 5"
Redistributing: connected
Maximum path: 32
Routing for Networks:
192.168.1.0
192.168.11.0
192.169.1.1/32
Publishing Routes over Interfaces:
Tunnel0
Tunnel1
Imported Networks:
Network Pref Tag Route Source
192.169.1.1/32 255 0 connected
192.168.1.0/24 255 0 connected
Routing Information Sources:
Gateway Distance Last Update
11.0.0.2 250 00:00:19
11.0.0.98 16 00:43:48
10.0.0.99 16 00:43:48
Distance: (default is 250)
Routing Protocol is "ospf 1"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 192.169.1.1
It is an area border and autonomous system boundary router
Redistributing External Routes from,
nhrp 5, includes subnets in redistribution
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
192.168.1.0 0.0.0.255 area 0
192.169.1.1 0.0.0.0 area 0
Routing Information Sources:
Gateway Distance Last Update
195.168.1.1 110 00:43:54
Distance: (default is 110)
The following is a sample output of the show ip nhrp command on spoke 2.
Device# show ip route nhrp
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, m - OMP
n - NAT, Ni - NAT inside, No - NAT outside, Nd - NAT DIA
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
H - NHRP, G - NHRP registered, g - NHRP registration summary
o - ODR, P - periodic downloaded static route, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
& - replicated local route overrides by connected
Gateway of last resort is not set
11.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
H 11.0.0.1/32 is directly connected, 00:01:40, Tunnel1
H g 192.168.0.0/16 [16/4064] via 11.0.0.98, 00:55:36, Tunnel1
[16/4064] via 10.0.0.99, 00:55:36, Tunnel0
H g 192.168.0.0/20 [16/2032] via 11.0.0.98, 00:55:36, Tunnel1
[16/4064] via 10.0.0.99, 00:55:36, Tunnel0
H 192.168.1.0/24 [250/1016] via 11.0.0.1, 00:01:40, Tunnel1
H g 192.168.128.0/20 [16/4064] via 11.0.0.98, 00:55:36, Tunnel1
[16/2032] via 10.0.0.99, 00:55:36, Tunnel0
H g 192.169.99.0/24 [16/508] via 10.0.0.99, 00:55:36, Tunnel0
Spoke-2#
Spoke-2#sh bfd nei
IPv4 Sessions
NeighAddr LD/RD RH/RS State Int
10.0.0.99 1/1 Up Up Tu0
11.0.0.1 3/0 Down Down Tu0
11.0.0.1 4/3 Up Up Tu1
11.0.0.98 2/1 Up Up Tu1
Spoke-2#
Spoke-2#sh ip protocols
*** IP Routing is NSF aware ***
Routing Protocol is "application"
Sending updates every 0 seconds
Invalid after 0 seconds, hold down 0, flushed after 0
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Maximum path: 32
Routing for Networks:
Routing Information Sources:
Gateway Distance Last Update
Distance: (default is 4)
Routing Protocol is "nhrp 5"
Redistributing: connected
Maximum path: 32
Routing for Networks:
192.168.2.0
192.168.12.0
192.169.2.1/32
Publishing Routes over Interfaces:
Tunnel0
Tunnel1
Routing Information Sources:
Gateway Distance Last Update
11.0.0.1 250 00:02:03
11.0.0.98 16 00:55:59
10.0.0.99 16 00:55:59
Distance: (default is 250)
Routing Protocol is "rip"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Sending updates every 30 seconds, next due in 25 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Redistributing: nhrp 5, rip
Default version control: send version 1, receive any version
Interface Send Recv Triggered RIP Key-chain
Ethernet1/0 1 1 2 No none
Loopback0 1 1 2 No none
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
192.168.2.0
Interface Send Recv Triggered RIP Key-chain
192.169.2.0
Routing Information Sources:
Gateway Distance Last Update
192.168.2.2 120 00:00:17
Distance: (default is 120)