Week 10 · Lesson 10

IPsec Site-to-Site VPNs

Two offices need to talk as if they shared one wire, even though the only path between them is the public Internet. A site-to-site VPN does exactly that: it encrypts traffic inside a secure tunnel between two edge routers, so the network looks private and reads like private traffic to anyone outside. This lesson covers the VPN concept, the IPsec machinery (IKE, AH vs ESP), the two modes, and why GRE-over-IPsec exists.

CCNA 200-301 Domain 5.0 Security Fundamentals Verified 2026-10-11
Learning objectives
Part 1

What a VPN is

A Virtual Private Network (VPN) is a private network built on top of a public one. The “virtual” is doing real work: the private segments behave as if directly connected, but the packets actually travel across the Internet inside protected tunnels. The security properties of that tunnel are encryption (no one else can read the data), integrity (no one can silently change it), and authentication (we know which device sent it).

Definition — VPN A technology that provides a secure, logical connection sharing an insecure physical network. To the endpoints the connection looks leased and private; to an eavesdropper on the carrier network it looks like a stream of encrypted packets.

VPNs save money and time: instead of leased lines you use your existing Internet service, and instead of installing client software you can tunnel at the network edge for whole offices. The trade is that everything the tunnel carries becomes dependent on encryption being done right.

In this lesson · select a part to jump

Key ideas & exam traps · select one

Part 2

Site-to-site vs remote access

VPNs divide by who the endpoints are:

CharacteristicSite-to-siteRemote access
EndpointsRouter ↔ router (two sites)Client software ↔ concentrator
Who authenticatesThe two devicesThe individual user
What it securesWhole subnets behind each edgeOne device’s traffic
Typical protocolIPsec (often over GRE)SSL/TLS VPN or client IPsec

The exam line to remember: site-to-site = device-to-device, no per-user login; remote access = one user device at a time, per-user authentication.

Reference table · select a row

Part 3

IPsec and the IKE handshake

IPsec (Internet Protocol Security) is a framework of protocols protecting IP traffic, and it is the standard for site-to-site VPNs. It has two working parts:

IKE is essential because IPsec has no built-in way to agree on keys. It uses UDP port 500 (with IKEv1) and can use a pre-shared key (PSK) or digital certificates for peer authentication. A PSK is a shared secret phrase; a certificate proves identity through a CA. Both are legitimate, and the exam wants you to know the choice exists.

Note on the two IKE phases IKEv1 phase 1 (main/aggressive mode) negotiates the IKE SA and exchanges the authentication material; IKEv1 phase 2 (quick mode) builds the IPsec SA that actually encrypts data. Modern IKEv2 folds this into fewer exchanges, but the idea — negotiate trust, then negotiate protection — is unchanged.
Part 4

AH vs ESP

IPsec’s data protection comes from two protocols. Pick and compare:

ProtocolConfidentialityIntegrity / AuthenticationTypical use
AH (IP 51)None — no encryptionYes, on the whole packetRare in modern VPNs; legacy/odd compliance cases
ESP (IP 50)Yes — encrypts the payloadYes — authenticates the part it processedThe default and near-universal choice

The one-line contrast to retain: ESP encrypts and authenticates; AH only authenticates. Because AH does not encrypt, it offers integrity and authentication without confidentiality endpoint — and it is blocked by NAT easily, since it authenticates IP addresses (including ones NAT rewrites), which is why ESP dominates in the real world.

Exam tip — protocol numbers ESP is IP protocol 50, AH is 51, and IKE uses UDP 500 (plus UDP 4500 for NAT traversal, IPsec-over-NAT). Seeing “ESP” in a filter or a packet capture question is code for “the encrypted, authenticated tunnel traffic”.
Part 5

Transport vs tunnel mode

IPsec can protect packets in one of two modes, and the exam loves the distinction:

Definition — tunnel mode An IPsec mode where the entire original IP packet is encapsulated in a new IP header carrying the VPN gateways’ addresses. This is how site-to-site VPNs hide private addressing across a public network: the private source/destination live only inside the encrypted payload.

The rule of thumb: gateway-to-gateway (site-to-site) → tunnel mode; host-to-host → transport mode. GRE-over-IPsec is the interesting hybrid: GRE handles the tunnelling/multicast job and IPsec runs in transport mode on top, so GRE nesting is not needed twice.

Part 6

Confidentiality, integrity, and authentication

Encryption is only one pillar of IPsec. The full set is what makes a tunnel trustworthy, and each pillar maps to a distinct mechanism:

PropertyQuestion it answersWho provides it
ConfidentialityCan anyone else read the data?Encryption by ESP using algorithms like AES
IntegrityWas the data changed in transit?An HMAC/digest in ESP or AH (e.g., SHA-based)
AuthenticationIs this really the peer we agreed with?IKE peer auth (PSK or certificate) plus per-packet authentication on ESP/AH
Analogy A sealed, signed courier envelope: confidentiality is the seal (no one can read inside), integrity is checking the envelope is unbroken, and authentication is the courier’s signed badge proving who sent it. IPsec puts all three on every packet.
PC A1 Site A 10.1.0.0/24 R-A Internet R-B PC B1 Site B 10.2.0.0/24 IPsec tunnel (AH/ESP encrypted) IKE negotiated SA — AES + HMAC transport mode: 10.1↔10.2 hidden
A site-to-site IPsec VPN in tunnel mode: the outer header names the two gateways; the private addresses of the real hosts live inside the encrypted payload.
Part 7

GRE over IPsec

Plain IPsec carries unicast IP payloads, but it does not natively support multicast or broadcast. Routing protocols (OSPF, EIGRP), video multicast, and other destination-free traffic therefore cannot cross a bare IPsec tunnel. GRE (Generic Routing Encapsulation) provides the tunnelling that can carry multicast, and it encapsulates the whole payload in a GRE header ending at the far gateway. But GRE alone is unencrypted — anyone on the Internet can read the GRE packets. So the standard design is GRE over IPsec: GRE carries the routing and multicast, then IPsec (in transport mode, protecting the GRE traffic) adds confidentiality, integrity, and authentication.

GRE is not secure by itself If a scenario says “the two routers run GRE so the routing protocol can run between sites”, that is tunnelling, not security. The moment an exam question adds “and encrypt the tunnel”, GRE must be wrapped in IPsec. GRE→no encryption; GRE over IPsec→encrypted.
Part 8

A site-to-site VPN in IOS

A minimal IOS site-to-site configuration shows the moving parts: an ISAKMP/IKE policy, a transform set (the encryption + integrity pair), the crypto ACL that matches which traffic to protect, and finally the crypto map that ties it to the peer and interface. Here is the skeleton:

! IKE policy: encryption AES, hash SHA, PSK authentication
R-A(config)# crypto isakmp policy 10
R-A(config-isakmp)# encryption aes
R-A(config-isakmp)# hash sha
R-A(config-isakmp)# authentication pre-share
R-A(config-isakmp)# group 2
R-A(config-isakmp)# crypto isakmp key SiteKey1234 address 203.0.113.2
R-A(config-isakmp)# exit

! Transform set: AES encryption + HMAC-SHA
R-A(config)# crypto ipsec transform-set TS-AES esp-aes esp-sha-hmac

! Traffic to protect: Site-B private subnet
R-A(config)# access-list 101 permit ip 10.1.0.0 0.0.0.255 10.2.0.0 0.0.0.255

! Crypto map bound outbound
R-A(config)# crypto map S2S-VPN 10 ipsec-isakmp
R-A(config-crypto-map)# set peer 203.0.113.2
R-A(config-crypto-map)# set transform-set TS-AES
R-A(config-crypto-map)# match address 101
R-A(config-crypto-map)# exit
R-A(config)# interface gigabitethernet0/1
R-A(config-if)# crypto map S2S-VPN
R-A(config-if)# end
R-A# show crypto isakmp sa
R-A# show crypto ipsec sa

Do not memorize the whole config — do internalise the pieces: IKE policy (algorithm + PSK), transform set (ESP + integrity), crypto ACL (what to protect), crypto map (peer + binding). The verification commands end with show crypto isakmp sa and show crypto ipsec sa, and a classic troubleshooting fact: if the crypto ACLs on both ends do not mirror each other, the tunnel never establishes.

Key terms

The vocabulary you need

Every term below appears in the lesson text above. Select one to read its definition, then use the quiz at the end to check what stuck.

Key terms · select a term

Part 9 · Your turn

Review

Check what you have learned with these review questions.

Review · 5 questions

Sources

Sources & references

  1. Cisco. CCNA (200-301) Exam Topics. cisco.com.
  2. IETF. Request for Comments (RFCs). rfc-editor.org.
  3. IANA. Internet Assigned Numbers Authority registries. iana.org.

Target exams: CCNA 200-301 v1.1 · CyberOps Associate 200-201. Last content verification: 2026-10-11.