← Blog

CCNA explainer C03: IPsec VPNs, remote access and site-to-site

ccnacertification

Exam topic 4.5 asks you to describe IPsec VPNs rather than configure them, so this is an explainer. It covers the protocols IPsec uses, its two modes, and the two kinds of VPN built with it.

What IPsec provides

IPsec protects IP packets travelling across an untrusted network such as the internet. It can provide:

The protocols

Protocol Job Port or protocol number
IKE (IKEv1 or IKEv2) Authenticates the peers and negotiates the keys and algorithms UDP 500, or UDP 4500 through NAT
ESP (Encapsulating Security Payload) Encrypts and authenticates the data IP protocol 50
AH (Authentication Header) Authenticates the data but doesn’t encrypt it IP protocol 51

ESP is what almost every VPN uses. AH also authenticates parts of the outer IP header, so it breaks when NAT changes that header. IKEv2 is the current version: it needs fewer messages than IKEv1 and handles NAT traversal and remote clients better.

Tunnel mode and transport mode

Tunnel mode Transport mode
What is protected The whole original packet, wrapped in a new IP header Only the payload; the original IP header stays
Outer addresses The two VPN gateways The two end hosts
Typical use Site-to-site and remote access VPNs Host-to-host traffic, or inside another tunnel such as GRE

In tunnel mode, someone watching the internet link sees only traffic between the two gateways. The real source and destination addresses are hidden inside the encrypted packet.

Site-to-site VPNs

A site-to-site VPN joins two networks permanently, for example a branch office to headquarters.

In this lab series, the branch router BR1 would build a site-to-site tunnel to the edge router at headquarters.

Remote access VPNs

A remote access VPN connects one user’s device to the company network, for example from home or a hotel.

What to remember for the exam