
CONFIGURING DYNAMIC MULTIPOINT VPN WITH ON-DEMAND ROUTING
OVERVIEW
This document provides a sample configuration for configuring On-Demand Routing (ODR) with Dynamic Multipoint VPN (DMVPN) in hub to
spoke configuration. The DMVPN feature simplifies the hub router IPsec configuration and supports dynamic IP addresses at the spoke router.
DMVPN combines Generic Routing Encapsulation (GRE) tunnels, IPsec encryption, and Next Hop Resolution Protocol (NHRP). It provides IP
routing for remote sites, while minimizing the overhead on the network devices. This sample configuration also allows load balancing with dual
ODR hub routers, failover to a single hub when a hub router fails, and the recovery from a hub router failure when it is recovered.
Figure 1. Network Diagram

The sample configuration is based on the following assumptions:
This guide provides the DMPVN configuration, but does not cover the following configuration:
All contents are Copyright © 1992–2005 Cisco Systems, Inc. All rights reserved. Important Notices and Privacy Statement.

Before configurations are made to any router, confirm the following:
COMPONENTS • Cisco IOS Software Release 12.3(11)T3(fc2)
Figure 1 illustrates the network for the sample configuration.
The information presented in this document was created from devices in a specific lab environment. All devices started with a cleared (default)
configuration. It is imperative to understand the potential impact of any command before implementing it in a live network.
This configuration uses two DMVPN hub routers. Each hub router is configured with a separate DMVPN tunnel network (192.168.1.0/24 and
192.168.2.0/24). The first tunnel on the spokes is used for direct connectivity through the first DMVPN hub and the second tunnel on the spokes
is used for the second DMVPN hub. During normal operations with dual hubs, the spoke router load-balances the traffic between both hubs.
Connectivity between the spoke routers is provided through the hub routers in hub and spoke topology. During a failure, the ODR protocol will time
out the failed path, and it will use one active path to the active hub router.
Using ODR, the hub router learns about the remote networks using the CDP protocol. By default, CDP is disabled on the tunnel interface. To allow
the hub and spoke routers to exchange routes, CDP must be enabled on the tunnel interface. ODR allows for push of the default route from the hub
router to the spoke router. The hub router configuration only accepts spoke routers network ranges defined with the “distribute-list 101 in” in order
to prevent the risk of learning the DHCP public network of spoke router from the tunnel interface with ODR. All routing protocols should be
disabled on the spoke routers to activate ODR on the spoke routers.
By default, CDP sends updates every sixty seconds. This update interval may not be frequent enough to provide faster re-convergence of IP routes on
the hub router side of the network. A quicker re-convergence rate may be necessary if the spoke connects to one of several hub routers via
asynchronous interfaces such as modem lines.
ODR expects to receive periodic CDP updates, which contain IP prefix information. When ODR fails to receive updates for routes that it has
installed in the routing table, these ODR routes are first marked invalid and eventually removed from the routing table (by default, ODR routes are
marked invalid after 180 seconds and are removed from the routing table after 240 seconds). These defaults are based on the default CDP update
interval. Configuration changes made to either the CDP or ODR timers should be reflected through changes made to both.
For additional information about configuring ODR timers, refer to:
© 2005 Cisco Systems, Inc. All rights reserved. Important notices, privacy statements, and trademarks of Cisco Systems, Inc. can be found on cisco.com.

Following are the configurations on the Hub router:
crypto ipsec transform-set ESP-3DES-SHA esp-3des esp-sha-hmac
ip nhrp authentication DMVPN_NW
ip nhrp map multicast dynamic
no ip split-horizon eigrp 1
© 2005 Cisco Systems, Inc. All rights reserved. Important notices, privacy statements, and trademarks of Cisco Systems, Inc. can be found on cisco.com.

tunnel mode gre multipoint
redistribute odr metric 2000 100 255 255 1400
network 192.168.1.0
network 192.168.2.0
network 192.168.20.0
ip route 0.0.0.0 0.0.0.0 10.0.149.207
access-list 101 permit ip any 192.168.0.0 0.0.255.255
© 2005 Cisco Systems, Inc. All rights reserved. Important notices, privacy statements, and trademarks of Cisco Systems, Inc. can be found on cisco.com.

This section provides information that can be used to confirm that the configuration is working properly.
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
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
o-ODR, P-periodic downloaded static route
Gateway of last resort is 10.0.149.207 to network 0.0.0.0
o 192.168.27.0/24 [160/1] via 192.168.1.11, 00:00:52, Tunnel0
C 192.168.20.0/24 is directly connected, FastEthernet0/1
10.0.0.0/24 is subnetted, 1 subnets
C 10.0.149.0 is directly connected, FastEthernet0/0
o 192.168.16.0/24 [160/1] via 192.168.1.10, 00:00:21, Tunnel0
C 192.168.1.0/24 is directly connected, Tunnel0
D 192.168.2.0/24 [90/2818560] via 192.168.20.20, 06:03:24, FastEthernet0/1
S* 0.0.0.0/0 [1/0] via 10.0.149.207
c3725-21#show crypto session detail
Crypto session current status
K-Keepalives, N-NAT-traversal, X-IKE Extended Authentication
Capabilities:D connid:10 lifetime:20:55:47
Capabilities:D connid:11 lifetime:20:56:02
© 2005 Cisco Systems, Inc. All rights reserved. Important notices, privacy statements, and trademarks of Cisco Systems, Inc. can be found on cisco.com.
Normal Operation · c3725-21#show ip route

Routing Protocol is “nhrp”
Routing Information Sources:
Gateway Distance Last Update
Routing Protocol is “eigrp 1”
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Default networks flagged in outgoing updates
Default networks accepted from incoming updates
EIGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0
EIGRP maximum hopcount 100
EIGRP maximum metric variance 1
EIGRP NSF-aware route hold timer is 240s
Automatic network summarization is not in effect
Routing for Networks:
192.168.1.0
192.168.20.0
Routing Information Sources:
Gateway Distance Last Update
Gateway Distance Last Update
192.168.20.20 90 3d03h
Routing Protocol is “odr”
Sending updates every 60 seconds, next due in 37 seconds
Invalid after 180 seconds, hold down 0, flushed after 240
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is 101
Routing Information Sources:
Gateway Distance Last Update
192.168.1.11 160 00:00:27
192.168.1.10 160 00:00:41
c3725-21#show interface tunnel 0
Tunnel0 is up, line protocol is up
© 2005 Cisco Systems, Inc. All rights reserved. Important notices, privacy statements, and trademarks of Cisco Systems, Inc. can be found on cisco.com.
c3725-21#show ip protocols

Internet address is 192.168.1.1/24
MTU 1514 bytes, BW 1000 Kbit, DLY 10000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation TUNNEL, loopback not set
Tunnel source 10.0.149.221 (FastEthernet0/0), destination UNKNOWN
Key 0x186A0, sequencing disabled
Checksumming of packets disabled
Tunnel transmit bandwidth 8000 (kbps)
Tunnel receive bandwidth 8000 (kbps)
Tunnel protection via IPSec (profile “SDM_Profile1”)
Last input 00:00:12, output 00:00:04, output hang never
Last clearing of “show interface” counters never
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 1000 bits/sec, 0 packets/sec
24158 packets input, 5290429 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
217102 packets output, 55341094 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 output buffer failures, 0 output buffers swapped out
S-Switch, H-Host, I-IGMP, r-Repeater
Device ID Local Intrfce Holdtme Capability Platform Port ID
c2950-xl Fas 0/1 160 S I WS-C2950G-Fas 0/37
c1751-16.cisco.com
Tunnel0 132 R S 1751-V Tunnel0
c831-27 Tunnel0 146 R C831 Tunnel0
c2924.cisco.com Fas 0/0 123 T S WS-C2924-XFas 0/19
Following are the configurations on the Cisco 1751 spoke router:
© 2005 Cisco Systems, Inc. All rights reserved. Important notices, privacy statements, and trademarks of Cisco Systems, Inc. can be found on cisco.com.

crypto ipsec transform-set ESP-3DES-SHA esp-3des esp-sha-hmac
crypto ipsec transform-set ESP-3DES-SHA1 esp-3des esp-sha-hmac
ip nhrp authentication DMVPN_NW
ip nhrp map 192.168.1.1 10.0.149.221
ip nhrp nhs 192.168.1.1
© 2005 Cisco Systems, Inc. All rights reserved. Important notices, privacy statements, and trademarks of Cisco Systems, Inc. can be found on cisco.com.

tunnel destination 10.0.149.221
ip nhrp authentication DMPVN_BU
ip nhrp map 192.168.2.1 10.0.149.220
ip nhrp nhs 192.168.2.1
tunnel destination 10.0.149.220
ip route 10.0.149.0 255.255.255.0 dhcp
Verifying the Cisco 1751 Spoke Router Results
This section provides information that can be used to confirm that the configuration is working properly.
D-EIGRP, EX-EIGRP external, O-OSPF, IA-OSPF inter area
© 2005 Cisco Systems, Inc. All rights reserved. Important notices, privacy statements, and trademarks of Cisco Systems, Inc. can be found on cisco.com.

N1-OSPF NSSA external type 1, N2-OSPF NSSA external type 2
E1-OSPF external type 1, E2-OSPF external type 2
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
o-ODR, P-periodic downloaded static route
Gateway of last resort is 192.168.2.1 to network 0.0.0.0
10.0.0.0/24 is subnetted, 2 subnets
C 10.0.150.0 is directly connected, FastEthernet0/0
S 10.0.149.0 [1/0] via 10.0.150.207
C 192.168.16.0/24 is directly connected, Ethernet0/0
C 192.168.1.0/24 is directly connected, Tunnel0
C 192.168.2.0/24 is directly connected, Tunnel1
o* 0.0.0.0/0 [160/1] via 192.168.2.1, 00:00:25, Tunnel1
[160/1] via 192.168.1.1, 00:00:56, Tunnel0
c1751-16#show crypto session detail
Crypto session current status
K-Keepalives, N-NAT-traversal, X-IKE Extended Authentication
Capabilities:D connid:268435501 lifetime:20:51:40
Capabilities:D connid:268435500 lifetime:17:04:05
Routing Protocol is “nhrp”
Routing Information Sources:
© 2005 Cisco Systems, Inc. All rights reserved. Important notices, privacy statements, and trademarks of Cisco Systems, Inc. can be found on cisco.com.
c1751-16#show ip protocols

Gateway Distance Last Update
S-Switch, H-Host, I-IGMP, r-Repeater
Device ID Local Intrfce Holdtme Capability Platform Port ID
c2950-xl Eth 0/0 165 S I WS-C2950G-Fas 0/6
c2950-xl Fas 0/0 165 S I WS-C2950G-Fas 0/9
c3725-21.cisco.com
Tunnel0 152 R S I 3725 Tunnel0
c3745-20.cisco.com
Tunnel1 124 R S I 3745 Tunnel0
Verifying the network connectivity during a failure:
The following results shows the status on the Cisco 1751 router when the path to the first hub
fails.
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
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
o-ODR, P-periodic downloaded static route
Gateway of last resort is 192.168.2.1 to network 0.0.0.0
10.0.0.0/24 is subnetted, 2 subnets
C 10.0.150.0 is directly connected, FastEthernet0/0
S 10.0.149.0 [1/0] via 10.0.150.207
C 192.168.16.0/24 is directly connected, Ethernet0/0
C 192.168.1.0/24 is directly connected, Tunnel0
C 192.168.2.0/24 is directly connected, Tunnel1
o* 0.0.0.0/0 [160/1] via 192.168.2.1, 00:00:25, Tunnel1\
Cisco 3745 Router Configuration
© 2005 Cisco Systems, Inc. All rights reserved. Important notices, privacy statements, and trademarks of Cisco Systems, Inc. can be found on cisco.com.

crypto ipsec transform-set ESP-3DES-SHA esp-3des esp-sha-hmac
ip nhrp authentication DMPVN_BU
ip nhrp map multicast dynamic
no ip split-horizon eigrp 1
tunnel mode gre multipoint
tunnel protection ipsec profile SDM_Profile1 shared
© 2005 Cisco Systems, Inc. All rights reserved. Important notices, privacy statements, and trademarks of Cisco Systems, Inc. can be found on cisco.com.

network 192.168.2.0
network 192.168.20.0
ip route 0.0.0.0 0.0.0.0 10.0.149.207
access-list 101 permit ip any 192.168.0.0 0.0.255.255
© 2005 Cisco Systems, Inc. All rights reserved. Important notices, privacy statements, and trademarks of Cisco Systems, Inc. can be found on cisco.com.

crypto ipsec transform-set ESP-3DES-SHA esp-3des esp-sha-hmac
crypto ipsec transform-set ESP-3DES-SHA1 esp-3des esp-sha-hmac
ip nhrp authentication DMVPN_NW
ip nhrp map 192.168.1.1 10.0.149.221
ip nhrp nhs 192.168.1.1
tunnel destination 10.0.149.221
ip nhrp authentication DMPVN_BU
ip nhrp map 192.168.2.1 10.0.149.220
ip nhrp network-id 100001 ip nhrp holdtime 360
ip nhrp nhs 192.168.2.1
© 2005 Cisco Systems, Inc. All rights reserved. Important notices, privacy statements, and trademarks of Cisco Systems, Inc. can be found on cisco.com.

tunnel destination 10.0.149.220
ip route 10.0.149.0 255.255.255.0 dhcp
RELATED INFORMATION • IPsec Support Page
© 2005 Cisco Systems, Inc. All rights reserved. Important notices, privacy statements, and trademarks of Cisco Systems, Inc. can be found on cisco.com.

Corporate Headquarters Cisco Systems, Inc. 170 West Tasman Drive San Jose, CA 95134-1706 USA www.cisco.com Tel: 408 526-4000 800 553-NETS (6387) Fax: 408 526-4100
European Headquarters Cisco Systems International BV Haarlerbergpark Haarlerbergweg 13-19 1101 CH Amsterdam The Netherlands www-europe.cisco.com Tel: 31 0 20 357 1000 Fax: 31 0 20 357 1100
Americas Headquarters Cisco Systems, Inc. 170 West Tasman Drive San Jose, CA 95134-1706 USA www.cisco.com Tel: 408 526-7660 Fax: 408 527-0883
Asia Pacific Headquarters Cisco Systems, Inc. 168 Robinson Road #28-01 Capital Tower Singapore 068912 www.cisco.com Tel: +65 6317 7777 Fax: +65 6317 7799
Cisco Systems has more than 200 offices in the following countries and regions. Addresses, phone numbers, and fax numbers are listed on
© 2005 Cisco Systems, Inc. All rights reserved. Important notices, privacy statements, and trademarks of Cisco Systems, Inc. can be found on cisco.com.
Owners and our team usually reply within a day — and your question helps the next person too.
Be the first to ask — other owners or our team will answer.