zNetLaB › Guided labs › Security
IPsec site-to-site VPN — protect two LANs across the internet
Security Advanced 5 devices 4 checked tasks 100 points Plan lab
Two offices, one untrusted internet between them. Build the tunnel the classic way — an IKE policy with a pre-shared key, a transform set, a crypto ACL that says which traffic to protect, and a crypto map on each outside interface — then send traffic and prove both security associations are up and encrypting. You build it in a browser, type real commands at each device, and every task below is
checked against the running configuration — so you find out it is wrong before anybody else does.
Open this lab in the simulator
The simulator runs in your browser with nothing to install. This lab is part of the full simulator: open it free for 7 days with a new account, then with a plan. It needs an account, which keeps your progress.
The scenario
Two offices, one untrusted internet between them. Build the tunnel the classic way — an IKE policy with a pre-shared key, a transform set, a crypto ACL that says which traffic to protect, and a crypto map on each outside interface — then send traffic and prove both security associations are up and encrypting.
Your role: a security engineer. Level: Advanced Done when: all 4 goals show as passed (100 points).
Network status
Devices: 3 routers, 2 PCs, cabled as drawn. No Layer 1 or Layer 2 faults: every link is connected and up. HQ starts with addresses (G0/0 203.0.113.1/30, G0/1 10.1.0.1/24) and static routes already configured. Internet starts with addresses (G0/0/0 203.0.113.2/30, G0/0/1 198.51.100.2/30). Branch starts with addresses (G0/0 198.51.100.1/30, G0/1 10.2.0.1/24) and static routes already configured. HQ-PC is a host with 10.1.0.10/24, gateway 10.1.0.1. Branch-PC is a host with 10.2.0.10/24, gateway 10.2.0.1.
Known problems
None: nothing is misconfigured. The network is simply not finished: what the goals list is what you have to build or secure.
Goals
IKE phase 1 is up between HQ and the branch (25 pts) IPsec security associations are passing traffic (encrypts and decrypts) (30 pts) The crypto map is applied on HQ’s outside interface (15 pts) HQ-PC reaches Branch-PC through the tunnel (30 pts)
The activity, in order
IKE phase 1 is up between HQ and the branch Do what the title says on the device shown in the topology, then run the show command that proves it.Why: Each goal is a state the lab can check on the running device. Verify with: show running-config IPsec security associations are passing traffic (encrypts and decrypts) Do what the title says on the device shown in the topology, then run the show command that proves it.Why: Each goal is a state the lab can check on the running device. Verify with: show running-config The crypto map is applied on HQ’s outside interface The configuration of HQ must contain the line: interface GigabitEthernet0/0[^!]*crypto map. Type it in the right mode (global, interface or line) and check it appears.Why: This is the task that checks your configuration directly: the line must really be there, not just look right. Verify with: show running-config HQ-PC reaches Branch-PC through the tunnel From HQ-PC, ping 10.2.0.10. If it fails, walk the path hop by hop: gateway, then each router’s routing table, then the way back.Why: A ping needs a route in BOTH directions. This is the end-to-end proof that everything before it worked. Verify with: ping 10.2.0.10
Tips
Work in the order given: later goals depend on the earlier ones. After every change, run the verify command before moving on; do not guess. Stuck? Read the verify output first. It names the interface, neighbour or route that is wrong. Common mistake: Crypto ACLs that are not mirror images of each other on the two peers Common mistake: Applying the crypto map to the wrong interface Common mistake: A missing route to the remote LAN, so no interesting traffic is ever generated and no SA appears
Why this matters
Two offices must talk privately across a network they do not control. IPsec protects the traffic in two phases: IKE authenticates the peers and agrees keys, then ESP protects the data selected by a crypto ACL.
What you will be able to do
Configure an IKE policy, a pre-shared key and a transform set
Write the crypto ACL (interesting traffic) and bind it to a crypto map
Verify both SAs with show commands and prove traffic is being encrypted and decrypted
The network
ISR 2911, ISR 4331, PC — 5 devices in all, already cabled.
Gi0/0 203.0.113.1/30 Gi0/0/0 203.0.113.2/30 Gi0/0/1 198.51.100.2/30 Gi0/0 198.51.100.1/30 Gi0/1 10.1.0.1/24 Fa0 Gi0/1 10.2.0.1/24 Fa0 HQ Internet Branch HQ-PC 10.1.0.10/24 · gw 10.1.0.1 Branch-PC 10.2.0.10/24 · gw 10.2.0.1 Drawn from this lab: devices, cables, ports and the addresses already set.
Device Model Address already set
HQ ISR 2911 configure it
Internet ISR 4331 configure it
Branch ISR 2911 configure it
HQ-PC PC 10.1.0.10 / 255.255.255.0 gw 10.1.0.1
Branch-PC PC 10.2.0.10 / 255.255.255.0 gw 10.2.0.1
Cabling
HQ Gi0/0 ↔ Internet Gi0/0/0
Internet Gi0/0/1 ↔ Branch Gi0/0
HQ Gi0/1 ↔ HQ-PC Fa0
Branch Gi0/1 ↔ Branch-PC Fa0
What is configured at the start
These are already configured when the lab opens — including, where this is a troubleshooting lab, the fault itself:
Internet interface g0/0/0
ip address 203.0.113.2 255.255.255.252
no shutdown
exit
interface g0/0/1
ip address 198.51.100.2 255.255.255.252
no shutdown
exit
HQ interface g0/0
ip address 203.0.113.1 255.255.255.252
no shutdown
exit
interface g0/1
ip address 10.1.0.1 255.255.255.0
no shutdown
exit
ip route 0.0.0.0 0.0.0.0 203.0.113.2
Branch interface g0/0
ip address 198.51.100.1 255.255.255.252
no shutdown
exit
interface g0/1
ip address 10.2.0.1 255.255.255.0
no shutdown
exit
ip route 0.0.0.0 0.0.0.0 198.51.100.2
Tasks, and how each one is checked
Every task is decided by reading the live network — a neighbour in FULL, a ping that succeeds, a line in the running configuration — not by looking for a keyword you typed. The same command shows you what the lab sees.
# Task Pts How to verify it yourself
1 IKE phase 1 is up between HQ and the branch 25 On HQ: show crypto isakmp sa — peer 198.51.100.1 is QM_IDLE.
2 IPsec security associations are passing traffic (encrypts and decrypts) 30 On HQ: show crypto ipsec sa — packets encrypted and decrypted for peer 198.51.100.1.
3 The crypto map is applied on HQ’s outside interface 15 On HQ: show running-config contains the line(s) matching interface GigabitEthernet0/0 … crypto map.
4 HQ-PC reaches Branch-PC through the tunnel 30 On HQ-PC: ping 10.2.0.10 must succeed.
Stuck? Ask the coach
Tell the coach what you see or what you tried. It gives you a hint, not the answer, the way a senior engineer would. Included with a free trial or any plan.
Ask the coach
Common mistakes
Crypto ACLs that are not mirror images of each other on the two peers
Applying the crypto map to the wrong interface
A missing route to the remote LAN, so no interesting traffic is ever generated and no SA appears
Reference solution
Try it yourself first — the lab checks your work either way. This is one configuration that makes every task pass, device by device:
HQ crypto isakmp policy 10
encryption aes 256
hash sha256
authentication pre-share
group 14
exit
crypto isakmp key V3ryS3cret address 198.51.100.1
crypto ipsec transform-set TS esp-aes 256 esp-sha-hmac
exit
access-list 101 permit ip 10.1.0.0 0.0.0.255 10.2.0.0 0.0.0.255
crypto map CMAP 10 ipsec-isakmp
set peer 198.51.100.1
set transform-set TS
match address 101
exit
interface g0/0
crypto map CMAP
exit
ip route 10.2.0.0 255.255.255.0 203.0.113.2
Branch crypto isakmp policy 10
encryption aes 256
hash sha256
authentication pre-share
group 14
exit
crypto isakmp key V3ryS3cret address 203.0.113.1
crypto ipsec transform-set TS esp-aes 256 esp-sha-hmac
exit
access-list 101 permit ip 10.2.0.0 0.0.0.255 10.1.0.0 0.0.0.255
crypto map CMAP 10 ipsec-isakmp
set peer 203.0.113.1
set transform-set TS
match address 101
exit
interface g0/0
crypto map CMAP
exit
Internet ip route 10.1.0.0 255.255.255.0 203.0.113.1
ip route 10.2.0.0 255.255.255.0 198.51.100.1
HQ-PC ping 10.2.0.10
ping 10.2.0.10
Where this is examined
CCNP ENCOR/ENARSI/SCOR (VPN), CCIE Security, Security+ (secure communications), Network+ (VPN).
This lab practises these topics in the zNetLaB certification courses:
AAA, passwords, VPN and wireless security — CCNA · Security Fundamentals
GRE and IPsec tunnels, LISP, VXLAN concepts — CCNP Enterprise · ENCOR · Virtualization
CoPP, uRPF, IPv6 FHS, 802.1X, ZBFW — CCIE Enterprise Infrastructure · Infrastructure Security and Services
Access control: ACLs, AAA, remote access and VPNs — CompTIA Network+ · Network Security
Cryptography, hashing, PKI and certificates — CompTIA Security+ · General Security Concepts
Secure communications: VPN, IPsec, tunnels — CompTIA Security+ · Security Architecture
Cryptography: encryption, hashing, key exchange, PKI — CCNP Security Core · Security Concepts
VPN technologies: site-to-site IPsec, DMVPN, GRE — CCNP Security Core · Security Concepts
Encrypted tunnels and VPN attacks — Ethical Hacking (network level) · Perimeter, Evasion and Secure Design
Cryptography and attacks on it — Ethical Hacking (network level) · Systems, Web, Wireless and Cryptography
Related labs
Where to start
The lessons are open to everyone, all guided labs are listed by track, and
plans explains what is free and what is not.
CCNA®, CCNP® and Cisco® are trademarks of Cisco Systems, Inc. zNetLaB is not affiliated with or endorsed by Cisco.