Skip to main content

DMVPN - Key concepts

 DMVPN (Dynamic Multipoint Virtual Private Network)

DMVPN enables dynamic and scalable VPN connections, primarily using mGRE (Multipoint Generic Routing Encapsulation), NHRP (Next Hop Resolution Protocol), and optionally, IPsec for encryption. It supports hub-and-spoke topologies, with the ability to evolve into a fully meshed network.

DMVPN Phases

  1. Phase 1:
    • Basic hub-and-spoke topology where spokes communicate through the hub.
    • mGRE is configured on the hub, and point-to-point GRE on the spokes.
    • Limitation: No direct spoke-to-spoke communication; all traffic passes through the hub.
    • Routing: Spokes register their IP with the hub, and no spoke-to-spoke tunnels are formed.
  2. Phase 2:
    • Introduces spoke-to-spoke communication using mGRE at both the hub and spokes.
    • Next-hop reachability is maintained, and spokes dynamically form tunnels to communicate directly.
    • No route summarization allowed, and the hub doesn’t originate default routes.
    • EIGRP: Requires no split-horizon and no next-hop-self on the hub to preserve next-hop information across spokes.
  3. Phase 3:
    • Improved scalability with route summarization and default routing at the hub.
    • NHRP redirects allow spokes to resolve and create direct spoke-to-spoke tunnels without routing through the hub.
    • Routing: Spokes look up the NHRP table and create dynamic tunnels when needed.
    • Summary: Most efficient phase, allowing default routing and spoke-to-spoke communication without burdening the hub.

DMVPN Key Components

  • NHRP: Works like ARP but maps private (VPN) IPs to public (NBMA) IPs, enabling dynamic tunnel creation.
  • mGRE: Allows multiple endpoints on the same interface, unlike point-to-point GRE which is tied to a single destination.
  • EIGRP: Commonly used due to manual summarization and scalability, though OSPF and BGP can also be used.
  • IPsec: Optional, adds encryption for secure tunnels.
    • Phases involve IKE (Internet Key Exchange) for negotiating keys and establishing IPsec Security Associations (SAs).

Key Features and Configuration Tips

  • Tunnels: Stateless, meaning they come up without requiring configuration on the other end.
  • mGRE MTU: Requires adjusting MTU size (commonly 1476) due to additional GRE headers.
  • NHRP Holdtime: Configured on spokes (recommended holdtime is 600 seconds).
  • IPsec Tunnel Protection: Use the tunnel protection ipsec profile command to apply IPsec to DMVPN tunnels.
  • EIGRP Split-Horizon: Disable split-horizon and next-hop-self to ensure proper route advertisement in hub-and-spoke designs.

DMVPN Troubleshooting

  • Commands:
    • show dmvpn: View active DMVPN connections.
    • show ip nhrp: Inspect NHRP mappings.
  • Spoke-to-Spoke Issues: Ensure NHRP mappings are correct and check if spoke-to-spoke tunnels are being triggered by hub redirects.
  • EIGRP Flapping: If adjacency keeps going up and down, ensure multicast support is configured correctly.

DMVPN Use Cases

  • Phase 1: Simple hub-and-spoke topology where spokes communicate only through the hub.
  • Phase 2: Introduces spoke-to-spoke tunnels, improving efficiency in scenarios where direct communication is necessary.
  • Phase 3: Ideal for large-scale deployments, allowing summarization, default routes, and scalable spoke-to-spoke communication.

DMVPN Technical Tips:

  1. NHRP (Next Hop Resolution Protocol):
    • Works like ARP but maps VPN IP to public IP, enabling dynamic spoke-to-spoke tunnels.
    • NHRP holdtime should be set to 600 seconds as recommended by Cisco.
    • Use ip nhrp redirect on the hub and ip nhrp shortcut on spokes for Phase 3 configuration.
  2. mGRE (Multipoint Generic Routing Encapsulation):
    • Allows for multi-point site connectivity without needing separate GRE tunnels for each spoke.
    • MTU size should be adjusted to 1476 to accommodate the 24-byte overhead for GRE headers.
  3. EIGRP Configurations:
    • Disable split-horizon (no ip split-horizon eigrp <AS-Number>) on hub interfaces to prevent routing issues between spokes.
    • Use no ip next-hop-self to preserve next-hop information between spokes in Phase 2.
  4. Tunnels:
    • Tunnels are stateless: They come up even if the other side is not yet configured, simplifying initial setup.
    • mGRE tunnels are used on both the hub and spokes starting from Phase 2 to support dynamic spoke-to-spoke tunnels.
  5. IPsec Configuration:
    • Use tunnel protection ipsec profile to secure DMVPN tunnels with IPsec.
    • IPsec encryption adds a layer of security, and the key exchange protocol (IKEv1 or IKEv2) should be properly configured.
  6. Routing Protocols:
    • EIGRP is commonly used due to its support for summarization and ease of configuration.
    • OSPF requires careful configuration because it does not handle split-horizon the same way and introduces complexity with next-hop issues.
  7. DMVPN Phase-Specific Tips:
    • Phase 1: Use GRE on spokes and mGRE on hubs. No direct spoke-to-spoke tunnels.
    • Phase 2: mGRE on both hub and spokes allows direct spoke-to-spoke communication.
    • Phase 3: Enable ip nhrp redirect (hub) and ip nhrp shortcut (spokes) to optimize routing and allow spoke-to-spoke communication directly.

DMVPN Troubleshooting Tips:

  1. Flapping EIGRP adjacencies:
    • Ensure multicast capability is enabled (e.g., ip nhrp map multicast), especially on NBMA networks.
  2. Spoke-to-Spoke Tunnel Issues:
    • Verify NHRP mappings and ensure spoke-to-spoke tunnels are triggered by NHRP redirects from the hub.
    • Check the NHRP cache using show ip nhrp to ensure correct resolution of spokes.
  3. IPsec Tunnel Issues:
    • Use show crypto isakmp sa and show crypto ipsec sa to verify IPsec tunnel establishment and troubleshoot encryption problems.

Comments

Popular posts from this blog

Basic MPLS BGP and L3VPN Lab Setup

In this lab, we’ve set up a basic MPLS, BGP, and L3VPN environment, which is a great foundation for understanding how service providers build scalable networks. The lab uses the EVE-NG simulator along with Router IOS C7200-ADVENTERPRISEK9-M, Version 15.2(4)M8 to emulate a realistic MPLS environment. Below is a summary of the key components and roles of each router in the lab. MPLS Core Routers : The MPLS core consists of the routers responsible for label switching and forwarding customer traffic through the network: PE1 (Provider Edge 1) : Connects customer networks to the MPLS core and handles both MPLS and BGP routing. It also hosts VRF (Virtual Routing and Forwarding) instances for customers. PE2 (Provider Edge 2) : Functions similarly to PE1, connecting another customer network to the MPLS core. P1 (Core Router 1) and P2 (Core Router 2) : These routers serve as MPLS core routers and handle label switching but do not store or process customer routes directly. They simply f

OSPF Adjacency Stuck in EXSTART on Cisco IOS XR – Issue and Solution

In a recent lab setup using Cisco IOS XR on EVE-NG, I faced a common but frustrating issue with OSPF adjacencies getting stuck in the EXSTART state. After spending considerable time troubleshooting interface MTUs and configurations, I discovered that the root cause was related to the virtual network interface type being used. This post outlines the issue, troubleshooting steps, and the eventual solution that got everything working. Issue: While configuring OSPF between two routers running Cisco IOS XR in my lab, OSPF adjacencies were getting stuck in the EXSTART state. I verified that interface configurations, MTU settings, and OSPF parameters were correct, but the problem persisted. I tried adjusting the MTU size, using the mtu-ignore command, and even checked for ACLs, but nothing seemed to resolve the issue. Troubleshooting Steps: MTU Settings: I started by verifying that both sides of the OSPF adjacency had matching MTUs. I used the default MTU and even tried different values wit

How to Properly Clone an EVE-NG Lab with Configurations

Cloning labs in EVE-NG is a great way to duplicate setups and expand or experiment on a new copy without affecting the original lab. However, if not done correctly, the cloned lab may only copy the topology without configurations. In this guide, I’ll show you how to properly clone a lab in EVE-NG with all configurations using the EVE-NG GUI . Follow these steps to ensure that both the topology and router configurations are retained when cloning your lab. Steps to Clone an EVE-NG Lab with Configurations Save Running Configuration on All Devices In your original lab, make sure all devices have their configurations saved to NVRAM. Go into the CLI of each router and run the command: copy running-config startup-config Export All Configurations (CFGs) On the left sidebar in the EVE-NG Web UI , click on the "More Actions" option. Then select "Export all CFGs" . This step exports the configurations of all devices in the lab. Shutdown All Devices After exporting the confi