DMVPN Redundancy with Dual Cloud - Dual Hub Configuration
Table of Contents
- What is DMVPN redundancy? ‹
- DMVPN Phase 2 with eBGP configuration ‹
- DMVPN Phase 3 with iBGP configuration ‹
- Download section ‹
What is DMVPN redundancy?
Dynamic Multipoint Virtual Private Network (DMVPN) redundancy is when multiple hub and/or multiple spoke routers (per site) are deployed in order to increase the availability and stability of a DMVPN network. The hub routers have a central function in managing the control plane of DMVPN, without a functioning hub router the DMVPN network fails. The spoke routers have a central function in providing access for the branch locations to the DMVPN network. Without a functioning spoke router a branch site is isolated from the DMVPN network.
DMVPN Phase 2 with eBGP configuration
In the following example scenario, a DMVPN Phase 2 dual cloud and dual hub network is configured with two branch locations. There are four hub NHS devices servicing two spoke routers and exchanging prefixes with eBGP using 4-byte AS numbers for added scalability. The BGP metric attribute is adjusted to prioritize each hub router. The spoke routers use a BGP peer-session template to organize configurations.
Site 1 is a dual-stack IPv4/IPv6 location using OSPFv3 internally for both address-families. Route redistribution is configured on the hub routers, and the IPv4 address of the Server is advertised to the spokes. Meanwhile Spoke router R3 advertises the single BGP summary route 192.168.3.0/24 representing Site 3. BFD is configured between the hub and spokes to improve failure detection.
Configuration:
Hub1
Hub1#show run int Gi0/0 | sec int interface GigabitEthernet0/0 description ** to Internet Provider ** ip address 172.16.1.2 255.255.255.252 duplex auto speed auto media-type rj45 Hub1#show run int Gi0/1 | sec int interface GigabitEthernet0/1 description ** to R1 (Site 1 LAN) ** ip address 192.168.1.2 255.255.255.0 duplex auto speed auto media-type rj45 ipv6 address FE80::2 link-local ipv6 address 2001:DB8:1::2/64 ospfv3 10 ipv4 area 0 ospfv3 10 ipv4 priority 0 ospfv3 10 ipv6 area 0 ospfv3 10 ipv6 priority 0 Hub1#show run int Tu10 | sec int interface Tunnel10 description ** DMVPN Phase 2 tunnel overlay (left side cloud) ** ip address 10.10.0.1 255.255.255.0 no ip redirects ip nhrp authentication AUTH10 ip nhrp network-id 100 bfd interval 1000 min_rx 1000 multiplier 3 tunnel source 172.16.1.2 tunnel mode gre multipoint tunnel key 10 Hub1#show run | sec ^router bgp router bgp 64086.59904 bgp router-id 10.10.10.10 bgp asnotation dot bgp log-neighbor-changes redistribute ospfv3 10 route-map RMAP-REDIST-OSPF neighbor 10.10.0.3 remote-as 64086.59905 neighbor 10.10.0.3 fall-over bfd neighbor 10.10.0.3 route-map RMAP-METRIC out neighbor 10.10.0.4 remote-as 64086.59906 neighbor 10.10.0.4 fall-over bfd neighbor 10.10.0.4 route-map RMAP-METRIC out Hub1#show run | sec ^route-map RMAP-M route-map RMAP-METRIC permit 10 set metric 10 Hub1#show run | sec ^route-map RMAP-R route-map RMAP-REDIST-OSPF permit 10 match ip address prefix-list PL-REDIST-OSPF Hub1#show run | sec ^ip prefix ip prefix-list PL-REDIST-OSPF seq 5 permit 192.168.10.0/24 Hub1#show run | sec ^router ospf router ospfv3 10 router-id 2.2.2.2 ! address-family ipv4 unicast redistribute bgp 64086.59904 metric 10 exit-address-family ! address-family ipv6 unicast exit-address-family Hub1#show run | sec ^ip route ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/0 172.16.1.1 Hub1#show run | sec ^ipv6 uni ipv6 unicast-routing
Hub2
Hub2#show run int Gi0/0 | sec int interface GigabitEthernet0/0 description ** to Internet Provider ** ip address 172.16.2.2 255.255.255.252 duplex auto speed auto media-type rj45 Hub2#show run int Gi0/1 | sec int interface GigabitEthernet0/1 description ** to R1 (Site 1 LAN) ** ip address 192.168.1.3 255.255.255.0 duplex auto speed auto media-type rj45 ipv6 address FE80::3 link-local ipv6 address 2001:DB8:1::3/64 ospfv3 10 ipv4 area 0 ospfv3 10 ipv4 priority 0 ospfv3 10 ipv6 area 0 ospfv3 10 ipv6 priority 0 Hub2#show run int Tu10 | sec int interface Tunnel10 description ** DMVPN Phase 2 tunnel overlay (left side cloud) ** ip address 10.10.0.2 255.255.255.0 no ip redirects ip nhrp authentication AUTH10 ip nhrp network-id 100 bfd interval 1000 min_rx 1000 multiplier 3 tunnel source 172.16.2.2 tunnel mode gre multipoint tunnel key 10 Hub2#show run | sec ^router bgp router bgp 64086.59904 bgp router-id 10.20.20.20 bgp asnotation dot bgp log-neighbor-changes redistribute ospfv3 10 route-map RMAP-REDIST-OSPF neighbor 10.10.0.3 remote-as 64086.59905 neighbor 10.10.0.3 fall-over bfd neighbor 10.10.0.3 route-map RMAP-METRIC out neighbor 10.10.0.4 remote-as 64086.59906 neighbor 10.10.0.4 fall-over bfd neighbor 10.10.0.4 route-map RMAP-METRIC out Hub2#show run | sec ^route-map RMAP-M route-map RMAP-METRIC permit 10 set metric 20 Hub2#show run | sec ^route-map RMAP-R route-map RMAP-REDIST-OSPF permit 10 match ip address prefix-list PL-REDIST-OSPF Hub2#show run | sec ^ip prefix ip prefix-list PL-REDIST-OSPF seq 5 permit 192.168.10.0/24 Hub2#show run | sec ^router ospf router ospfv3 10 router-id 3.3.3.3 ! address-family ipv4 unicast redistribute bgp 64086.59904 metric 20 exit-address-family ! address-family ipv6 unicast exit-address-family Hub2#show run | sec ^ip route ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/0 172.16.2.1 Hub2#show run | sec ^ipv6 uni ipv6 unicast-routing
Hub3
Hub3#show run int Gi0/0 | sec int interface GigabitEthernet0/0 description ** to Internet Provider ** ip address 172.16.3.2 255.255.255.252 duplex auto speed auto media-type rj45 Hub3#show run int Gi0/1 | sec int interface GigabitEthernet0/1 description ** to R1 (Site 1 LAN) ** ip address 192.168.1.4 255.255.255.0 duplex auto speed auto media-type rj45 ipv6 address FE80::4 link-local ipv6 address 2001:DB8:1::4/64 ospfv3 10 ipv4 area 0 ospfv3 10 ipv4 priority 0 ospfv3 10 ipv6 area 0 ospfv3 10 ipv6 priority 0 Hub3#show run int Tu10 | sec int interface Tunnel10 description ** DMVPN Phase 2 tunnel overlay (right side cloud) ** ip address 10.20.0.1 255.255.255.0 no ip redirects ip nhrp authentication AUTH20 ip nhrp network-id 200 bfd interval 1000 min_rx 1000 multiplier 3 tunnel source 172.16.3.2 tunnel mode gre multipoint tunnel key 20 Hub3#show run | sec ^router bgp router bgp 64086.59904 bgp router-id 10.30.30.30 bgp asnotation dot bgp log-neighbor-changes redistribute ospfv3 10 route-map RMAP-REDIST-OSPF neighbor 10.20.0.3 remote-as 64086.59905 neighbor 10.20.0.3 fall-over bfd neighbor 10.20.0.3 route-map RMAP-METRIC out neighbor 10.20.0.4 remote-as 64086.59906 neighbor 10.20.0.4 fall-over bfd neighbor 10.20.0.4 route-map RMAP-METRIC out Hub3#show run | sec ^route-map RMAP-M route-map RMAP-METRIC permit 10 set metric 30 Hub3#show run | sec ^route-map RMAP-R route-map RMAP-REDIST-OSPF permit 10 match ip address prefix-list PL-REDIST-OSPF Hub3#show run | sec ^ip prefix ip prefix-list PL-REDIST-OSPF seq 5 permit 192.168.10.0/24 Hub3#show run | sec ^router ospf router ospfv3 10 router-id 4.4.4.4 ! address-family ipv4 unicast redistribute bgp 64086.59904 metric 30 exit-address-family ! address-family ipv6 unicast exit-address-family Hub3#show run | sec ^ip route ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/0 172.16.3.1 Hub3#show run | sec ^ipv6 uni ipv6 unicast-routing
Hub4
Hub4#show run int Gi0/0 | sec int interface GigabitEthernet0/0 description ** to Internet Provider ** ip address 172.16.4.2 255.255.255.252 duplex auto speed auto media-type rj45 Hub4#show run int Gi0/1 | sec int interface GigabitEthernet0/1 description ** to R1 (Site 1 LAN) ** ip address 192.168.1.5 255.255.255.0 duplex auto speed auto media-type rj45 ipv6 address FE80::5 link-local ipv6 address 2001:DB8:1::5/64 ospfv3 10 ipv6 area 0 ospfv3 10 ipv6 priority 0 ospfv3 10 ipv4 area 0 ospfv3 10 ipv4 priority 0 Hub4#show run int Tu10 | sec int interface Tunnel10 description ** DMVPN Phase 2 tunnel overlay (right side cloud) ** ip address 10.20.0.2 255.255.255.0 no ip redirects ip nhrp authentication AUTH20 ip nhrp network-id 200 bfd interval 1000 min_rx 1000 multiplier 3 tunnel source 172.16.4.2 tunnel mode gre multipoint tunnel key 20 Hub4#show run | sec ^router bgp router bgp 64086.59904 bgp router-id 10.40.40.40 bgp asnotation dot bgp log-neighbor-changes redistribute ospfv3 10 route-map RMAP-REDIST-OSPF neighbor 10.20.0.3 remote-as 64086.59905 neighbor 10.20.0.3 fall-over bfd neighbor 10.20.0.3 route-map RMAP-METRIC out neighbor 10.20.0.4 remote-as 64086.59906 neighbor 10.20.0.4 fall-over bfd neighbor 10.20.0.4 route-map RMAP-METRIC out Hub4#show run | sec ^route-map RMAP-M route-map RMAP-METRIC permit 10 set metric 40 Hub4#show run | sec ^route-map RMAP-R route-map RMAP-REDIST-OSPF permit 10 match ip address prefix-list PL-REDIST-OSPF Hub4#show run | sec ^ip prefix ip prefix-list PL-REDIST-OSPF seq 5 permit 192.168.10.0/24 Hub4#show run | sec ^router ospf router ospfv3 10 router-id 5.5.5.5 ! address-family ipv4 unicast redistribute bgp 64086.59904 metric 40 exit-address-family ! address-family ipv6 unicast exit-address-family Hub4#show run | sec ^ip route ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/0 172.16.4.1 Hub4#show run | sec ^ipv6 uni ipv6 unicast-routing
R1
R1#show run int Gi0/0 | sec int interface GigabitEthernet0/0 description ** to Server ** ip address 192.168.10.2 255.255.255.0 duplex auto speed auto media-type rj45 ipv6 address FE80::2 link-local ipv6 address 2001:DB8:10::2/64 ospfv3 10 ipv6 area 0 ospfv3 10 ipv4 area 0 R1#show run int Gi0/1 | sec int interface GigabitEthernet0/1 description ** to DMVPN Hub routers ** ip address 192.168.1.1 255.255.255.0 duplex auto speed auto media-type rj45 ipv6 address FE80::1 link-local ipv6 address 2001:DB8:1::1/64 ospfv3 10 ipv4 area 0 ospfv3 10 ipv4 priority 100 ospfv3 10 ipv6 area 0 ospfv3 10 ipv6 priority 100 R1#show run | sec ^router router ospfv3 10 router-id 1.1.1.1 ! address-family ipv4 unicast passive-interface GigabitEthernet0/0 exit-address-family ! address-family ipv6 unicast passive-interface GigabitEthernet0/0 exit-address-family R1#show run | sec ^route-tag route-tag notation dotted-decimal R1#show run | sec ^ipv6 uni ipv6 unicast-routing
R2 (Spoke)
R2#show run int Gi0/0 | sec int interface GigabitEthernet0/0 description ** to Host2 (Site 2 LAN) ** ip address 192.168.2.2 255.255.255.0 duplex auto speed auto media-type rj45 R2#show run int Gi0/1 | sec int interface GigabitEthernet0/1 description ** to Internet Provider ** ip address 172.16.5.2 255.255.255.252 duplex auto speed auto media-type rj45 R2#show run int Tu10 | sec int interface Tunnel10 description ** DMVPN Phase 2 tunnel overlay (left side cloud) ** ip address 10.10.0.3 255.255.255.0 no ip redirects ip nhrp authentication AUTH10 ip nhrp map 10.10.0.1 172.16.1.2 ip nhrp map 10.10.0.2 172.16.2.2 ip nhrp network-id 100 ip nhrp nhs 10.10.0.1 ip nhrp nhs 10.10.0.2 bfd interval 1000 min_rx 1000 multiplier 3 tunnel source GigabitEthernet0/1 tunnel mode gre multipoint tunnel key 10 R2#show run int Tu20 | sec int interface Tunnel20 description ** DMVPN Phase 2 tunnel overlay (right side cloud) ** ip address 10.20.0.3 255.255.255.0 no ip redirects ip nhrp authentication AUTH20 ip nhrp map 10.20.0.1 172.16.3.2 ip nhrp map 10.20.0.2 172.16.4.2 ip nhrp network-id 200 ip nhrp nhs 10.20.0.1 ip nhrp nhs 10.20.0.2 bfd interval 1000 min_rx 1000 multiplier 3 tunnel source GigabitEthernet0/1 tunnel mode gre multipoint tunnel key 20 R2#show run | sec ^router router bgp 64086.59905 template peer-session EXAMPLE-TEMPLATE remote-as 64086.59904 fall-over bfd exit-peer-session ! bgp router-id 2.2.2.2 bgp asnotation dot bgp log-neighbor-changes network 192.168.2.0 neighbor 10.10.0.1 inherit peer-session EXAMPLE-TEMPLATE neighbor 10.10.0.2 inherit peer-session EXAMPLE-TEMPLATE neighbor 10.20.0.1 inherit peer-session EXAMPLE-TEMPLATE neighbor 10.20.0.2 inherit peer-session EXAMPLE-TEMPLATE R2#show run | sec ^ip route ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/1 172.16.5.1
R3 (Spoke)
R3#show run int Gi0/0 | sec int interface GigabitEthernet0/0 description ** to Site 3 LAN (Host3 and Host4) ** no ip address duplex auto speed auto media-type rj45 R3#show run int Gi0/0.10 | sec int interface GigabitEthernet0/0.10 description ** subinterface in VLAN 10 ** encapsulation dot1Q 10 ip address 192.168.3.2 255.255.255.248 R3#show run int Gi0/0.20 | sec int interface GigabitEthernet0/0.20 description ** subinterface in VLAN 20 ** encapsulation dot1Q 20 ip address 192.168.3.10 255.255.255.248 R3#show run int Gi0/1 | sec int interface GigabitEthernet0/1 description ** to Internet Provider ** ip address 172.16.6.2 255.255.255.252 duplex auto speed auto media-type rj45 R3#show run int Tu10 | sec int interface Tunnel10 description ** DMVPN Phase 2 tunnel overlay (left side cloud) ** ip address 10.10.0.4 255.255.255.0 no ip redirects ip nhrp authentication AUTH10 ip nhrp map 10.10.0.1 172.16.1.2 ip nhrp map 10.10.0.2 172.16.2.2 ip nhrp network-id 100 ip nhrp nhs 10.10.0.1 ip nhrp nhs 10.10.0.2 bfd interval 1000 min_rx 1000 multiplier 3 tunnel source GigabitEthernet0/1 tunnel mode gre multipoint tunnel key 10 R3#show run int Tu20 | sec int interface Tunnel20 description ** DMVPN Phase 2 tunnel overlay (right side cloud) ** ip address 10.20.0.4 255.255.255.0 no ip redirects ip nhrp authentication AUTH20 ip nhrp map 10.20.0.2 172.16.4.2 ip nhrp map 10.20.0.1 172.16.3.2 ip nhrp network-id 200 ip nhrp nhs 10.20.0.1 ip nhrp nhs 10.20.0.2 bfd interval 1000 min_rx 1000 multiplier 3 tunnel source GigabitEthernet0/1 tunnel mode gre multipoint tunnel key 20 R3#show run | sec ^router router bgp 64086.59906 template peer-session EXAMPLE-TEMPLATE remote-as 64086.59904 fall-over bfd exit-peer-session ! bgp router-id 3.3.3.3 bgp asnotation dot bgp log-neighbor-changes network 192.168.3.0 mask 255.255.255.248 network 192.168.3.8 mask 255.255.255.248 aggregate-address 192.168.3.0 255.255.255.0 summary-only neighbor 10.10.0.1 inherit peer-session EXAMPLE-TEMPLATE neighbor 10.10.0.2 inherit peer-session EXAMPLE-TEMPLATE neighbor 10.20.0.1 inherit peer-session EXAMPLE-TEMPLATE neighbor 10.20.0.2 inherit peer-session EXAMPLE-TEMPLATE R3#show run | sec ^ip route ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/1 172.16.6.1
Server
Server#show run int Gi0/0 | sec int interface GigabitEthernet0/0 description ** to R1 ** ip address 192.168.10.1 255.255.255.0 duplex auto speed auto media-type rj45 ipv6 address FE80::1 link-local ipv6 address 2001:DB8:10::1/64 Server#show run | sec ip route|ipv6 route ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/0 192.168.10.2 ipv6 route ::/0 GigabitEthernet0/0 2001:DB8:10::2
Host3
Host3#show run int Gi0/0 | sec int interface GigabitEthernet0/0 description ** to Spoke R3 ** ip address 192.168.3.1 255.255.255.248 duplex auto speed auto media-type rj45 Host3#show run | sec ^ip route ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/0 192.168.3.2
Hub1#show dmvpn | beg Int Interface: Tunnel10, IPv4 NHRP Details Type:Hub, NHRP Peers:2, # Ent Peer NBMA Addr Peer Tunnel Add State UpDn Tm Attrb ----- --------------- --------------- ----- -------- ----- 1 172.16.5.2 10.10.0.3 UP 07:12:33 D « Spokes register with the Hubs 1 172.16.6.2 10.10.0.4 UP 07:11:46 D Hub3#show dmvpn | beg Int Interface: Tunnel10, IPv4 NHRP Details Type:Hub, NHRP Peers:2, # Ent Peer NBMA Addr Peer Tunnel Add State UpDn Tm Attrb ----- --------------- --------------- ----- -------- ----- 1 172.16.5.2 10.20.0.3 UP 07:12:42 D 1 172.16.6.2 10.20.0.4 UP 07:12:44 D R2#show ip route bgp | beg Ga Gateway of last resort is 172.16.5.1 to network 0.0.0.0 B 192.168.3.0/24 [20/10] via 10.10.0.4, 02:03:43 « Spoke R2 learns summary route from Spoke R3 (via Hub1) B 192.168.10.0/24 [20/10] via 10.10.0.1, 02:04:06 R2#show ip bgp 192.168.3.0 BGP routing table entry for 192.168.3.0/24, version 28 Paths: (4 available, best #1, table default) Advertised to update-groups: 1 Refresh Epoch 2 64086.59904 64086.59906, (aggregated by 64086.59906 3.3.3.3) 10.10.0.4 from 10.10.0.1 (10.10.10.10) Origin IGP, metric 10, localpref 100, valid, external, atomic-aggregate, best « Hub1 selected as primary NHS based on BGP metric rx pathid: 0, tx pathid: 0x0 Refresh Epoch 2 64086.59904 64086.59906, (aggregated by 64086.59906 3.3.3.3) 10.10.0.4 from 10.10.0.2 (10.20.20.20) Origin IGP, metric 20, localpref 100, valid, external, atomic-aggregate rx pathid: 0, tx pathid: 0 Refresh Epoch 1 64086.59904 64086.59906, (aggregated by 64086.59906 3.3.3.3) 10.20.0.4 from 10.20.0.2 (10.40.40.40) Origin IGP, metric 40, localpref 100, valid, external, atomic-aggregate rx pathid: 0, tx pathid: 0 Refresh Epoch 1 64086.59904 64086.59906, (aggregated by 64086.59906 3.3.3.3) 10.20.0.4 from 10.20.0.1 (10.30.30.30) Origin IGP, metric 30, localpref 100, valid, external, atomic-aggregate rx pathid: 0, tx pathid: 0 R2#show ip bgp | beg Ne Network Next Hop Metric LocPrf Weight Path *> 192.168.2.0 0.0.0.0 0 32768 i *> 192.168.3.0 10.10.0.4 10 0 64086.59904 64086.59906 i « Lowest BGP metric is most preferred * 10.10.0.4 20 0 64086.59904 64086.59906 i * 10.20.0.4 40 0 64086.59904 64086.59906 i * 10.20.0.4 30 0 64086.59904 64086.59906 i *> 192.168.10.0 10.10.0.1 10 0 64086.59904 ? * 10.10.0.2 20 0 64086.59904 ? * 10.20.0.2 40 0 64086.59904 ? * 10.20.0.1 30 0 64086.59904 ? Host2#trace 192.168.3.1 probe 1 Type escape sequence to abort. Tracing the route to 192.168.3.1 VRF info: (vrf in name/id, vrf out name/id) 1 192.168.2.2 1 msec 2 10.10.0.4 47 msec « Direct spoke-to-spoke communication between Site 2 and Site 3 3 192.168.3.1 50 msec Hub1#show ip nhrp traffic Tunnel10: Max-send limit:10000Pkts/10Sec, Usage:0% Sent: Total 6 3 Resolution Request 0 Resolution Reply 0 Registration Request « Primary Hub1 receives and forwards NHRP Resolution Requests 2 Registration Reply 1 Purge Request 0 Purge Reply 0 Error Indication 0 Traffic Indication 0 Redirect Suppress Rcvd: Total 6 3 Resolution Request 0 Resolution Reply 2 Registration Request 0 Registration Reply 1 Purge Request 0 Purge Reply 0 Error Indication 0 Traffic Indication 0 Redirect Suppress Hub1#show bfd neighbors IPv4 Sessions NeighAddr LD/RD RH/RS State Int 10.10.0.3 2/1 Up Up Tu10 « BFD neighborship established over Tunnel interface 10.10.0.4 1/2 Up Up Tu10 Hub1#show bfd summary client Client Session Up Down BGP 2 2 0 CEF 2 2 0 NHRP 2 2 0 « NHRP is a client protocol of BFD Total 2 2 0
Regarding Site 1, DMVPN BGP prefixes are redistributed into OSPFv3 on the hub routers with Hub1 assigning the lowest (most preferred) OSPF metric. This is how the hubs are prioritized for egress traffic (leaving) Site 1. Furthermore, R1 is assigned the highest OSPFv3 interface priority (in both address-families) so it becomes the Designated Router on the broadcast segment.
Hub1#show ospfv3 neighbor OSPFv3 10 address-family ipv4 (router-id 2.2.2.2) Neighbor ID Pri State Dead Time Interface ID Interface 1.1.1.1 100 FULL/DR 00:00:35 3 GigabitEthernet0/1 « Interface priority 100 3.3.3.3 0 2WAY/DROTHER 00:00:33 3 GigabitEthernet0/1 4.4.4.4 0 2WAY/DROTHER 00:00:33 3 GigabitEthernet0/1 5.5.5.5 0 2WAY/DROTHER 00:00:39 3 GigabitEthernet0/1 OSPFv3 10 address-family ipv6 (router-id 2.2.2.2) Neighbor ID Pri State Dead Time Interface ID Interface 1.1.1.1 100 FULL/DR 00:00:32 3 GigabitEthernet0/1 3.3.3.3 0 2WAY/DROTHER 00:00:34 3 GigabitEthernet0/1 4.4.4.4 0 2WAY/DROTHER 00:00:36 3 GigabitEthernet0/1 5.5.5.5 0 2WAY/DROTHER 00:00:33 3 GigabitEthernet0/1 R1#show ip route 192.168.3.0 Routing entry for 192.168.3.0/24 Known via "ospfv3 10", distance 110, metric 10 Tag Complete, AS 59906, 2646, type extern 2, forward metric 1 Last update from 192.168.1.2 on GigabitEthernet0/1, 02:22:37 ago « Site 2 prefix learned through Hub1 Routing Descriptor Blocks: * 192.168.1.2, from 2.2.2.2, 02:22:37 ago, via GigabitEthernet0/1 Route metric is 10, traffic share count is 1 Route tag 250.86.234.2 R1#show ospfv3 database external 192.168.2.0 OSPFv3 10 address-family ipv4 (router-id 1.1.1.1) Type-5 AS External Link States LS age: 584 LS Type: AS External Link Link State ID: 4 Advertising Router: 2.2.2.2 LS Seq Number: 80000005 Checksum: 0x51E3 Length: 36 Prefix Address: 192.168.2.0 Prefix Length: 24, Options: None Metric Type: 2 (Larger than any link state path) Metric: 10 « Each hub router advertises different OSPF metric to R1 External Route Tag: 4200000001 LS age: 793 LS Type: AS External Link Link State ID: 3 Advertising Router: 3.3.3.3 LS Seq Number: 80000005 Checksum: 0x79AE Length: 36 Prefix Address: 192.168.2.0 Prefix Length: 24, Options: None Metric Type: 2 (Larger than any link state path) Metric: 20 External Route Tag: 4200000001 LS age: 757 LS Type: AS External Link Link State ID: 0 Advertising Router: 4.4.4.4 LS Seq Number: 80000005 Checksum: 0xB567 Length: 36 Prefix Address: 192.168.2.0 Prefix Length: 24, Options: None Metric Type: 2 (Larger than any link state path) Metric: 30 External Route Tag: 4200000001 LS age: 992 LS Type: AS External Link Link State ID: 0 Advertising Router: 5.5.5.5 LS Seq Number: 80000005 Checksum: 0xD33B Length: 36 Prefix Address: 192.168.2.0 Prefix Length: 24, Options: None Metric Type: 2 (Larger than any link state path) Metric: 40 External Route Tag: 4200000001
DMVPN Phase 3 with iBGP configuration
In the following example topology DMVPN Phase 3 is configured with iBGP connecting four hub routers to the spoke devices through dual DMVPN clouds. Each hub router only advertises a single default route to the spokes. Prioritization of each hub (Next-Hop Server) is accomplished with the bgp default local-preference 200 example command taken from Hub1.
This command has the effect that Hub1 advertises a BGP Update message to each spoke router carrying a default route with the local preference value set to 200. A higher local preference value is a more preferred route. This way, the hubs can be assigned an order of priority.
Configuration:
Hub1
Hub1#show run int Gi0/0 | sec int interface GigabitEthernet0/0 description ** to Internet Provider ** ip address 172.16.1.2 255.255.255.252 duplex auto speed auto media-type rj45 Hub1#show run int Tu10 | sec int interface Tunnel10 description ** DMVPN Phase 3 tunnel overlay (left side cloud) ** ip address 10.10.0.1 255.255.255.0 no ip redirects ip nhrp authentication AUTH10 ip nhrp network-id 100 ip nhrp redirect bfd interval 1000 min_rx 1000 multiplier 3 tunnel source 172.16.1.2 tunnel mode gre multipoint tunnel key 10 Hub1#show run | sec ^router router bgp 65001 bgp router-id 10.10.10.10 bgp log-neighbor-changes bgp default local-preference 200 neighbor 10.10.0.3 remote-as 65001 neighbor 10.10.0.3 fall-over bfd neighbor 10.10.0.3 default-originate neighbor 10.10.0.4 remote-as 65001 neighbor 10.10.0.4 fall-over bfd neighbor 10.10.0.4 default-originate Hub1#show run | sec ^ip route ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/0 172.16.1.1
Hub2
Hub2#show run int Gi0/0 | sec int interface GigabitEthernet0/0 description ** to Internet Provider ** ip address 172.16.2.2 255.255.255.252 duplex auto speed auto media-type rj45 Hub2#show run int Tu10 | sec int interface Tunnel10 description ** DMVPN Phase 3 tunnel overlay (left side cloud) ** ip address 10.10.0.2 255.255.255.0 no ip redirects ip nhrp authentication AUTH10 ip nhrp network-id 100 ip nhrp redirect bfd interval 1000 min_rx 1000 multiplier 3 tunnel source 172.16.2.2 tunnel mode gre multipoint tunnel key 10 Hub2#show run | sec ^router router bgp 65001 bgp router-id 10.20.20.20 bgp log-neighbor-changes bgp default local-preference 175 neighbor 10.10.0.3 remote-as 65001 neighbor 10.10.0.3 fall-over bfd neighbor 10.10.0.3 default-originate neighbor 10.10.0.4 remote-as 65001 neighbor 10.10.0.4 fall-over bfd neighbor 10.10.0.4 default-originate Hub2#show run | sec ^ip route ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/0 172.16.2.1
Hub3
Hub3#show run int Gi0/0 | sec int interface GigabitEthernet0/0 description ** to Internet Provider ** ip address 172.16.3.2 255.255.255.252 duplex auto speed auto media-type rj45 Hub3#show run int Tu10 | sec int interface Tunnel10 description ** DMVPN Phase 3 tunnel overlay (right side cloud) ** ip address 10.20.0.1 255.255.255.0 no ip redirects ip nhrp authentication AUTH20 ip nhrp network-id 200 ip nhrp redirect bfd interval 1000 min_rx 1000 multiplier 3 tunnel source 172.16.3.2 tunnel mode gre multipoint tunnel key 20 Hub3#show run | sec ^router router bgp 65001 bgp router-id 10.30.30.30 bgp log-neighbor-changes bgp default local-preference 150 neighbor 10.20.0.3 remote-as 65001 neighbor 10.20.0.3 fall-over bfd neighbor 10.20.0.3 default-originate neighbor 10.20.0.4 remote-as 65001 neighbor 10.20.0.4 fall-over bfd neighbor 10.20.0.4 default-originate Hub3#show run | sec ^ip route ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/0 172.16.3.1
Hub4
Hub4#show run int Gi0/0 | sec int interface GigabitEthernet0/0 description ** to Internet Provider ** ip address 172.16.4.2 255.255.255.252 duplex auto speed auto media-type rj45 Hub4#show run int Tu10 | sec int interface Tunnel10 description ** DMVPN Phase 3 tunnel overlay (right side cloud) ** ip address 10.20.0.2 255.255.255.0 no ip redirects ip nhrp authentication AUTH20 ip nhrp network-id 200 ip nhrp redirect bfd interval 1000 min_rx 1000 multiplier 3 tunnel source 172.16.4.2 tunnel mode gre multipoint tunnel key 20 Hub4#show run | sec ^router router bgp 65001 bgp router-id 10.40.40.40 bgp log-neighbor-changes bgp default local-preference 125 neighbor 10.20.0.3 remote-as 65001 neighbor 10.20.0.3 fall-over bfd neighbor 10.20.0.3 default-originate neighbor 10.20.0.4 remote-as 65001 neighbor 10.20.0.4 fall-over bfd neighbor 10.20.0.4 default-originate Hub4#show run | sec ^ip route ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/0 172.16.4.1
R2 (Spoke)
R2#show run int Gi0/0 | sec int interface GigabitEthernet0/0 description ** to Host2 (Site 2 LAN) ** ip address 192.168.2.2 255.255.255.0 duplex auto speed auto media-type rj45 R2#show run int Gi0/1 | sec int interface GigabitEthernet0/1 description ** to Internet Provider ** ip address 172.16.5.2 255.255.255.252 duplex auto speed auto media-type rj45 R2#show run int Tu10 | sec int interface Tunnel10 description ** DMVPN Phase 3 tunnel overlay (left side cloud) ** ip address 10.10.0.3 255.255.255.0 no ip redirects ip nhrp authentication AUTH10 ip nhrp map 10.10.0.1 172.16.1.2 ip nhrp map 10.10.0.2 172.16.2.2 ip nhrp network-id 100 ip nhrp nhs 10.10.0.1 ip nhrp nhs 10.10.0.2 bfd interval 1000 min_rx 1000 multiplier 3 tunnel source GigabitEthernet0/1 tunnel mode gre multipoint tunnel key 10 R2#show run int Tu20 | sec int interface Tunnel20 description ** DMVPN Phase 3 tunnel overlay (right side cloud) ** ip address 10.20.0.3 255.255.255.0 no ip redirects ip nhrp authentication AUTH20 ip nhrp map 10.20.0.1 172.16.3.2 ip nhrp map 10.20.0.2 172.16.4.2 ip nhrp network-id 200 ip nhrp nhs 10.20.0.1 ip nhrp nhs 10.20.0.2 bfd interval 1000 min_rx 1000 multiplier 3 tunnel source GigabitEthernet0/1 tunnel mode gre multipoint tunnel key 20 R2#show run all | inc interface Tunnel10|interface Tunnel20|ip nhrp sh interface Tunnel10 ip nhrp shortcut interface Tunnel20 ip nhrp shortcut R2#show run | sec ^router router bgp 65001 template peer-session EXAMPLE-TEMPLATE remote-as 65001 fall-over bfd exit-peer-session ! bgp router-id 2.2.2.2 bgp log-neighbor-changes network 192.168.2.0 neighbor 10.10.0.1 inherit peer-session EXAMPLE-TEMPLATE neighbor 10.10.0.2 inherit peer-session EXAMPLE-TEMPLATE neighbor 10.20.0.1 inherit peer-session EXAMPLE-TEMPLATE neighbor 10.20.0.2 inherit peer-session EXAMPLE-TEMPLATE R2#show run | sec ^ip route ip route 172.16.0.0 255.255.0.0 GigabitEthernet0/1 172.16.5.1
R3 (Spoke)
R3#show run int Gi0/0 | sec int interface GigabitEthernet0/0 description ** to Site 3 LAN (Host3 and Host4) ** no ip address duplex auto speed auto media-type rj45 R3#show run int Gi0/0.10 | sec int interface GigabitEthernet0/0.10 description ** subinterface in VLAN 10 ** encapsulation dot1Q 10 ip address 192.168.3.2 255.255.255.248 R3#show run int Gi0/0.20 | sec int interface GigabitEthernet0/0.20 description ** subinterface in VLAN 20 ** encapsulation dot1Q 20 ip address 192.168.3.10 255.255.255.248 R3#show run int Gi0/1 | sec int interface GigabitEthernet0/1 description ** to Internet Provider ** ip address 172.16.6.2 255.255.255.252 duplex auto speed auto media-type rj45 R3#show run int Tu10 | sec int interface Tunnel10 description ** DMVPN Phase 3 tunnel overlay (left side cloud) ** ip address 10.10.0.4 255.255.255.0 no ip redirects ip nhrp authentication AUTH10 ip nhrp map 10.10.0.1 172.16.1.2 ip nhrp map 10.10.0.2 172.16.2.2 ip nhrp network-id 100 ip nhrp nhs 10.10.0.1 ip nhrp nhs 10.10.0.2 bfd interval 1000 min_rx 1000 multiplier 3 tunnel source GigabitEthernet0/1 tunnel mode gre multipoint tunnel key 10 R3#show run int Tu20 | sec int interface Tunnel20 description ** DMVPN Phase 3 tunnel overlay (right side cloud) ** ip address 10.20.0.4 255.255.255.0 no ip redirects ip nhrp authentication AUTH20 ip nhrp map 10.20.0.2 172.16.4.2 ip nhrp map 10.20.0.1 172.16.3.2 ip nhrp network-id 200 ip nhrp nhs 10.20.0.1 ip nhrp nhs 10.20.0.2 bfd interval 1000 min_rx 1000 multiplier 3 tunnel source GigabitEthernet0/1 tunnel mode gre multipoint tunnel key 20 R3#show run all | inc interface Tunnel10|interface Tunnel20|ip nhrp sh interface Tunnel10 ip nhrp shortcut interface Tunnel20 ip nhrp shortcut R3#show run | sec ^router router bgp 65001 template peer-session EXAMPLE-TEMPLATE remote-as 65001 fall-over bfd exit-peer-session ! bgp router-id 3.3.3.3 bgp log-neighbor-changes network 192.168.3.0 mask 255.255.255.248 network 192.168.3.8 mask 255.255.255.248 aggregate-address 192.168.3.0 255.255.255.0 summary-only neighbor 10.10.0.1 inherit peer-session EXAMPLE-TEMPLATE neighbor 10.10.0.2 inherit peer-session EXAMPLE-TEMPLATE neighbor 10.20.0.1 inherit peer-session EXAMPLE-TEMPLATE neighbor 10.20.0.2 inherit peer-session EXAMPLE-TEMPLATE R3#show run | sec ^ip route ip route 172.16.0.0 255.255.0.0 GigabitEthernet0/1 172.16.6.1
R2#show ip bgp | beg Ne Network Next Hop Metric LocPrf Weight Path *>i 0.0.0.0 10.10.0.1 0 200 0 i « Hub1 advertises default route with local preference 200 * i 10.10.0.2 0 175 0 i * i 10.20.0.2 0 125 0 i * i 10.20.0.1 0 150 0 i *> 192.168.2.0 0.0.0.0 0 32768 i R2#show ip route bgp | beg Ga Gateway of last resort is 10.10.0.1 to network 0.0.0.0 B* 0.0.0.0/0 [200/0] via 10.10.0.1, 00:12:34 « Spoke R2 prefers default route received from Hub1 R2#show dmvpn | beg Int Interface: Tunnel10, IPv4 NHRP Details « DMVPN hubs in left side cloud Type:Spoke, NHRP Peers:2, # Ent Peer NBMA Addr Peer Tunnel Add State UpDn Tm Attrb ----- --------------- --------------- ----- -------- ----- 1 172.16.1.2 10.10.0.1 UP 00:29:18 S 1 172.16.2.2 10.10.0.2 UP 00:29:38 S Interface: Tunnel20, IPv4 NHRP Details « DMVPN hubs in right side cloud Type:Spoke, NHRP Peers:2, # Ent Peer NBMA Addr Peer Tunnel Add State UpDn Tm Attrb ----- --------------- --------------- ----- -------- ----- 1 172.16.3.2 10.20.0.1 UP 00:40:27 S 1 172.16.4.2 10.20.0.2 UP 00:38:29 S Host2#trace 192.168.3.1 probe 1 Type escape sequence to abort. Tracing the route to 192.168.3.1 VRF info: (vrf in name/id, vrf out name/id) 1 192.168.2.2 1 msec 2 10.10.0.4 47 msec « Direct spoke-to-spoke communication established 3 192.168.3.1 50 msec Host2#trace 192.168.3.9 probe 1 Type escape sequence to abort. Tracing the route to 192.168.3.9 VRF info: (vrf in name/id, vrf out name/id) 1 192.168.2.2 1 msec 2 10.10.0.4 46 msec 3 192.168.3.9 50 msec Hub1#show ip nhrp traffic Tunnel10: Max-send limit:10000Pkts/10Sec, Usage:0% Sent: Total 40 5 Resolution Request 0 Resolution Reply 0 Registration Request 27 Registration Reply 2 Purge Request 1 Purge Reply 0 Error Indication 5 Traffic Indication 0 Redirect Suppress « Primary Hub1 exchanges DMVPN Phase 3 NHRP Redirects Rcvd: Total 35 5 Resolution Request 0 Resolution Reply 27 Registration Request 0 Registration Reply 2 Purge Request 1 Purge Reply 0 Error Indication 0 Traffic Indication 0 Redirect Suppress R2#show ip route nhrp | beg Ga Gateway of last resort is 10.10.0.1 to network 0.0.0.0 10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks H 10.10.0.4/32 is directly connected, 00:00:20, Tunnel10 192.168.3.0/29 is subnetted, 2 subnets H 192.168.3.0 [250/255] via 10.10.0.4, 00:00:20, Tunnel10 « Site-specific routes installed by NHRP on Spoke R2 H 192.168.3.8 [250/255] via 10.10.0.4, 00:00:19, Tunnel10