Figure1: Physical Topology
Figure1: Physical Topology
Figure1: Physical Topology
This lab will treat the design and deployment of dynamic multipoint VPN architectures by moving step by step into the configuration and explaining how mGRE (multipoint Generic Router Encapsulation), NHRP (Next-Hop Resolution Protocol) and IPsec VPN are mixed to build a dynamic secure topology over the Internet for large enterprises with hundreds of sites.
A hypothetical enterprise (figure1) with a central office (HUB) and several branch office sites (spokes) connecting over the Internet is facing a rapid business grow and more and more direct connections between branch offices are needed.
Spokes are spread over different places where it is not always possible to afford a static public addresses therefore company needs more scalable method than a simple Hub and spoke with point-to-point tunneling or a full mesh topology where the administration tasks of the IPSec traffic become extremely burdensome.
II DEPLOYMENT
The DMVPN model provides a scalable configuration for a dynamic-mesh VPN with the only static relationships configured are those between spokes and the HUB.
DMVPN concepts include several components like mGRE, NHRP and IPSec Proxy instantiation that will be explained during this lab.
Each site has its own private address space 10.0.1.0/24, 10.0.2.0/24, 10.0.3.0/24 and 10.0.4.0/24 for central site, site1, site2 and site3 respectively.
Each spoke router obtains its public IP address dynamically from the ISP; only the HUB has a static permanent public IP.
Network OSPF Area 10 central site OSPF Area 11 site 1 OSPF Area 12 site 2 OSPF Area 13 site 3 Multipoint GRE network Area 0 link subnet between HUB and Internet Area 0 link between SPOKEA and Internet Area 0 link between SPOKEB and Internet Area 0 link between SPOKEC and Internet
Addresses 10.0.1.0/24 10.0.2.0/24 10.0.3.0/24 10.0.4.0/24 172.16.0.128/26 192.168.0.16/30 192.168.0.12/30 192.168.0.8/30 192.168.0.4/30
Router HUB Ip /mask Source ip Interface tunnel 0 Dest ip Tunnel type GRE multipoint 172.16.0.129/28 S1/0
Router SPOKEA Ip /mask Source ip Interface tunnel 0 Dest ip Tunnel type GRE multipoint 172.16.0.130/28 S1/0
Router SPOKEB Ip /mask Source ip Interface tunnel 0 Dest ip Tunnel type GRE multipoint 172.16.0.131/28 S1/0
Router SPOKEC Ip /mask Source ip Interface tunnel 0 Dest ip Tunnel type GRE multipoint 172.16.0.132/28 S1/0
A Hub n Spoke point-to-point GRE would be a heavy burden for the administration of the topology because all spokes IP addresses must be known in advance.
Moreover such traditional solutions consume lot of CPU and memory resources because each tunnel will create its own IDB (Interface Descriptor Block).
The alternative for point-to-point GRE will be multipoint GRE where a single interface will terminate all spokes GRE tunnels and will consume a single IDB and conserves interface memory structures and interface process management on the HUB.
With point-to-multipoint GRE the tunnel source should be public routable, in our case we set mGRE packet to take serial 1/0 as an output interface to the SP network, the tunnel destination address is dynamically assigned.
Tunnel source and destination form the outer IP header that will carry the encapsulated traffic throughout the physical topology.
All tunnels participating to mGRE network are identified by a tunnel key ID and belongs to the same subnet 172.16.0.129/26, from the private address space and routable only inside the companys network.
HUB:
interface Tunnel0
!!Enable mGRE
tunnel key 1
SPOKEA :
interface Tunnel0
tunnel key 1
SPOKEB :
interface Tunnel0
tunnel key 1
SPOKEC :
interface Tunnel0
tunnel key 1
So far, all tunnel protocol state still down, because tunnels destination addresses are unknown, so unreachable.
The HUB router knows that traffic destined to 172.16.0.128/26 will be forwarded to the serial interface (tunnel source) to be encapsulated into the needed mGRE tunnel and all other traffic will be reachable through the next
hop physical interface 192.168.0.18, therefore no particular information about spokes on the HUB except that they belong to 172.16.0.128/26.
HUB:
As opposed to the HUB, all spokes know the HUB physical IP address 192.168.0.17 and how to reach it statically (through s1/0). All other traffic will be forwarded to the next hop physical interface IP address.
On SPOKEA:
On SPOKEB:
On SPOKEC:
Each spoke protects a set of private subnet, not known by others; all other routers must be informed of these subnets. With distance vector protocols like RIP or EIGRP the specification of no-split horizon is required for the updates to be sent back to the mGRE interface to other spokes.
With Link State protocols like OSPF the appropriate next-hop is automatically reflected within the subnet.
Typically OSPF is configured in point-to-multipoint mode on mGRE interfaces, this cause spokes to install routes with the HUB as next-hop, which negates DMVPN network topology concept, for that reason DMVPN cloud must be treated as broadcast.
NBMA Non Broadcast Multiple Access are networks where multiple hosts/devices are connected, but data is sent directly to the destination over a virtual circuit or switching fabric like ATM, FR or X.25. Broadcast networks All hosts connected to the network listen to the media but only the host/device to which the communication is intended will receive the frame.
Cisco prefer Distance Vector protocols and recommend using EIGRP for large scale deployments.
Spokes OSPF priorities are set to 0 to force them in DROTHER mode and never become DR/BDR, whereas the HUB priority is set to a higher value 10 for instance.
All routers must be configured to announce the mGRE subnet 172.16.0/128 as area 0 and 10.0.1.0/24, 10.0.2.0/24, 10.0.3.0/24 and 10.0.4.0/24 as OSPF non-backbone area10, area11, area12 and area13 respectively.
Note that the routing protocol is dealing only with mGRE logical topology.
HUB:
interface Tunnel0
ip ospf priority 10
router ospf 10
router-id 1.1.0.1
SPOKEA:
interface Tunnel0
ip ospf priority 0
router ospf 10
router-id 1.1.1.1
SPOKEB:
interface Tunnel0
ip ospf priority 0
router ospf 10
router-id 1.1.2.1
SPOKEC:
interface Tunnel0
ip ospf priority 0
router ospf 10
router-id 1.1.3.1
NHRP role is to discover address of other routers/hosts connected to a NBMA. Generally NBMA networks require tedious static configuration (static mapping between network layer address).
NHRP provides ARP like resolution and dynamically learn addresses of devices connected to the same NBMA networks from a next-hop server and then directly communicate them without passing through intermediate systems like in traditional Hub and Spoke topologies.
In our case the NHRP will facilitate building GRE tunnels. The HUB will maintain NHRP database of spokes mGRE virtual addresses associated to their public interface addresses. Each spoke registers its public address when it boots and queries the NHRP database for other spokes IP when needed.
On each tunnel interface, NHRP must be enabled and identified, it is recommended that the NHRP network-id match tunnel key.
NHRP participants can optionally be authenticated. Because NHRP is a client-server protocol, the server (HUB) doesnt need to know clients, nevertheless clients have to know the server.
Spokes explicitly set HUB as the next-hop server and statically tie the HUB virtual tunnel IP to the HUB physical interface s1/0. In the same manner spokes must map multicast forwarding to the HUB virtual mGRE IP address.
The same configuration is required in the HUB site but without any mapping or next-hop servers just map multicast forwarding to any new dynamically created NHRP adjacency.
HUB:
interface Tunnel0
ip nhrp network-id 1
SPOKEA:
interface Tunnel0
ip nhrp network-id 1
SPOKEB:
interface Tunnel0
ip nhrp network-id 1
SPOKEC:
interface Tunnel0
ip nhrp network-id 1
The only thing to do after setting IPSec phase 1 and phase 2 parameters is to define an IPSec profile and assign it to the mGRE tunnel interface.
Table3: IPSec parameters
PHASE 2
Profile Transform set Mode IPSecprofile ESP-3DES-SHA Transport esp-3des esp-sha-hmac -
encr 3des
authentication pre-share
!! asymmetric algorithm for establishing shared symmetric key across the network
group 2
mode transport
interface Tunnel0
III MONITORING
HUB:
First of all, Make sure those s1/0 and tunnel interfaces are up/up, otherwise review your static routing statements.
HUB#
After spokes have registered to the HUB through NHRP protocol, the HUB have dynamically learned IP addresses of all participants of the mGRE (logical topology) and know how to reach them through the physical topology. Spokes mGRE tunnel IP addresses are mapped to their physical public routable IPs.
HUB#sh ip nhrp
HUB#
The HUB establishes mGRE tunnel with all spokes and initiate OSPF neighbor relationship with each one of them.
HUB#
HUB#sh ip route
HUB#
HUB#ping
Protocol [ip]:
!!!!!
HUB#
HUB#ping
Protocol [ip]:
!!!!!
HUB#
SPOKEA:
Routing information is exchanged between all routers via the HUB, this is the only OSPF neighbor relationship spokes establish.
SPOKEA#
Nevertheless, advertised networks are directly reachable through the router that announced them.
SPOKEA#sh ip route
SPOKEA#
Spoke A knows about the next-hop server, the HUB, through a static map statement and will register by announcing to the HUB its physical public routable IP address assigned to its virtual mGRE IP.
SPOKEA#sh ip nhrp
When spokeA wants to communicate with 10.0.4.1/32 it inspects the routing table and will find that 10.0.4.1 is reachable though the next-hop mGRE address 172.6.0.129.
SpokeA will ask the HUB about the public IP address that corresponds to 172.16.0.129, the HUB will reply with 192.168.0.6; only then, the spoke will send the traffic directly to SPOKEC.
According to the outputs of debug tunnel and a traceroute commands on spokeB, you can note that the next-hop of the mGRE network is the final destination and there is no intermediate hops, this is confirmed by the delivery through the physical topology where mGRE traffic is encapsulated and sent directly from 192.168.0.6 to 192.168.0.9 with no intermediate hops.
SPOKEB#debug tunnel
SPOKEB#traceroute 172.16.0.132
1 172.16.0.132 80 msec
SPOKEB#
Because DMVPN involves several concepts multipoint GRE, NHRP, dynamic routing and IPSec, troubleshooting issues can be very time consuming, so the best practice is to focus on each step and make sure things work well before configuring the next step.