Virtual Private Network (VPN)
Course Description
A VPN (Virtual Private Network) creates a secure connection over an untrusted network like the Internet. Internet access is cheap and available almost everywhere, so VPNs are a popular alternative or backup for private WAN connections. In this course, we start with the basics of VPNs and IPsec: IKE, ESP, tunnel mode, encrypted GRE, and virtual tunnel interfaces. Then we build scalable hub and spoke networks with DMVPN phase 1, 2, and 3 and every major routing protocol, and look at Cisco’s FlexVPN, which uses IKEv2 for site-to-site, hub and spoke, and remote access VPNs. We finish with L2TPv3 and GETVPN.
Course Highlights
In this course you will learn:
- What a VPN is, and the difference between site-to-site and remote access VPNs.
- How IPsec works: IKE phase 1 and 2, AH and ESP, and tunnel and transport mode.
- How to configure IPsec with crypto maps, encrypted GRE tunnels, and static and dynamic VTIs.
- How DMVPN uses multipoint GRE and NHRP to build dynamic spoke-to-spoke tunnels.
- How to configure DMVPN phase 1, 2, and 3, and how RIP, EIGRP, OSPF, and BGP behave on each phase.
- How to secure DMVPN with IPsec, and add redundancy with dual hub designs.
- How FlexVPN uses IKEv2 and smart defaults for site-to-site, hub and spoke, and spoke-to-spoke VPNs.
- How to configure FlexVPN remote access for AnyConnect clients.
- How L2TPv3 tunnels layer 2 traffic over IP, and how GETVPN encrypts traffic without tunnels.
Presented to you by instructor Rene Molenaar, CCIE #41726
Course at a glance
- 37 lessons in 10 units.
- Format: self-paced lessons with Cisco IOS configurations, packet captures, and video.
- Last updated: October 2026.
Requirements
- A good understanding of IP addressing and routing.
- Basic knowledge of routing protocols like EIGRP, OSPF, and BGP for the DMVPN routing lessons.
Course Schedule
What is a VPN?
A VPN (Virtual Private Network) builds a tunnel over a network you don’t control, like the Internet. One end of the tunnel encrypts the original IP packet, adds a VPN header and a new IP header, and sends it to the other end, which checks the packet, decrypts it, and forwards the original packet. A secure VPN offers confidentiality (encryption), authentication, integrity, and anti-replay protection. On Cisco routers, IPsec is the framework that provides these features, with IKE to set up the tunnels and ESP to protect the data.
There are two common VPN types. A site-to-site VPN connects two networks through two network devices, so hosts don’t know there is a VPN. A client-to-site or remote access VPN runs between a VPN client on a laptop or phone and a router or firewall. Point-to-point tunnels don’t scale when you have many sites, so we also have technologies like DMVPN and FlexVPN that build hub and spoke networks with dynamic spoke-to-spoke tunnels. Not every VPN is encrypted, by the way: MPLS VPN separates customers without encryption.
Who uses VPNs? Almost every company. Branch offices connect to headquarters with site-to-site VPNs over regular Internet connections, often as an alternative or backup for MPLS VPN, and remote workers use remote access VPNs. DMVPN is a common choice on Cisco routers for connecting many branches.
VPN Learning Roadmap
This roadmap follows the course units. Each topic has a short explanation and links to the lessons where we cover it in detail.
VPN and IPsec Fundamentals
We start with what VPNs are and why we use them. IPsec is a framework, not a single protocol. IKE builds the tunnels in two phases: phase 1 builds a secure management tunnel, and phase 2 negotiates the IPsec SAs that protect user data. AH and ESP both offer authentication and integrity, but only ESP encrypts, so ESP is what we use nowadays. You’ll configure IPsec tunnel mode with a crypto map, encrypt a GRE tunnel, and use static and dynamic VTIs so you don’t need access-lists to select the traffic to encrypt.
DMVPN Basics and Phase 1
DMVPN (Dynamic Multipoint VPN) is a Cisco technology that builds hub and spoke VPNs without configuring a tunnel for every site. It uses multipoint GRE, so one tunnel interface reaches all sites, and NHRP to map tunnel addresses to public addresses. In phase 1, all traffic goes through the hub. We start with the phase 1 configuration and run EIGRP, OSPF, and BGP on top of it.
DMVPN Phase 2 and Phase 3
Phase 2 adds direct spoke-to-spoke tunnels, but spokes need specific routes with the original next hop, so the hub can’t summarize. That makes the routing protocol configuration important: you’ll see how EIGRP, OSPF network types, and BGP behave. Phase 3 fixes this with NHRP redirects and shortcuts. The hub can advertise a summary or default route, and when a spoke sends traffic for another spoke through the hub, the hub tells both spokes to build a direct tunnel. You’ll run EIGRP, OSPF, and BGP on a phase 3 network as well.
Advanced DMVPN
DMVPN doesn’t encrypt anything by itself, so on the Internet we add IPsec. A single hub is a single point of failure; with dual hub single cloud, spokes use a second hub on the same tunnel interface, and with dual hub dual cloud, every spoke gets a second DMVPN network. We also look at per-tunnel QoS, which applies a different QoS policy to groups of spokes, and at running IPv6 over an IPv4 DMVPN network.
FlexVPN and IKEv2
Cisco has many VPN types, each with its own configuration and show commands. FlexVPN is Cisco’s answer: one framework for site-to-site, hub and spoke, and remote access VPNs, all based on IKEv2. Smart defaults give you predefined values based on best practices, so there is less to configure, and you’ll also build a site-to-site VPN without smart defaults. You can authenticate with pre-shared keys or certificates (PKI), and advertise routes with a routing protocol or with IKEv2 routing, which exchanges them within IKEv2 itself.
FlexVPN Topologies and Remote Access
With FlexVPN hub and spoke, all traffic goes through the hub. Like DMVPN, FlexVPN uses NHRP for direct spoke-to-spoke tunnels, but only for resolution: spokes don’t register with the hub. You’ll also build spoke-to-spoke tunnels with an address pool and BGP. FlexVPN supports remote access for AnyConnect clients as well, and you can run MPLS over FlexVPN to extend VRFs securely over the Internet.
L2TPv3 and GETVPN
Two more VPN technologies with a specific job. L2TPv3 is a point-to-point tunnel that carries layer 2 protocols like Ethernet over IP, so you can put two remote sites in the same subnet. GETVPN is a tunnel-less VPN for private networks like MPLS VPN. A key server hands out one SA to all group members, and because GETVPN preserves the original IP header, the network can still route on the real addresses.
Frequently Asked Questions
A VPN (Virtual Private Network) is a secure connection over an untrusted network like the Internet. It can encrypt traffic, authenticate the devices or users on both ends, check that packets weren’t changed, and prevent replay attacks. Read our introduction to VPNs.
A site-to-site VPN connects two networks through two network devices, like routers or firewalls. A remote access VPN, also called client-to-site, connects a single user with a VPN client on their laptop or phone to the network.
IPsec (Internet Protocol Security) is a framework that protects IP traffic at the network layer. It uses IKE to build tunnels and negotiate security associations, and AH or ESP to protect the data. Only ESP supports encryption, which is why ESP is the common choice. Learn how IPsec works.
In IKE phase 1, two peers authenticate each other and build a secure tunnel to negotiate over, the ISAKMP or IKE phase 1 tunnel. In phase 2, they use that tunnel to negotiate the IPsec SAs that protect the actual user data.
DMVPN (Dynamic Multipoint VPN) is a Cisco technology for hub and spoke VPNs with dynamic spoke-to-spoke tunnels. It uses multipoint GRE, NHRP to find the public address of other routers, a routing protocol, and usually IPsec for encryption. Read our introduction to DMVPN.
Phase 1 is hub and spoke only; all traffic goes through the hub. Phase 2 supports direct spoke-to-spoke tunnels, but spokes need specific routes, so the hub can’t summarize. Phase 3 also supports spoke-to-spoke tunnels, and uses NHRP redirects so the hub can advertise a summary route. Learn how to configure DMVPN phase 3.
Both build hub and spoke VPNs with spoke-to-spoke tunnels. DMVPN uses multipoint GRE and NHRP for registration and resolution. FlexVPN is built on IKEv2, uses NHRP only for resolution, and covers site-to-site, hub and spoke, and remote access VPNs with one configuration framework. Read our introduction to FlexVPN.
GETVPN (Group Encrypted Transport VPN) is a tunnel-less VPN for private networks like MPLS VPN. A key server distributes the same security association to all group members with GDOI, so you don’t need point-to-point tunnels between every router. Learn how GETVPN works.
Ready to master VPNs?
Get access to all 37 VPN lessons and every other course on NetworkLessons.com.