Skip to content
Tech Interview Prep
Technical interview guide

VPNs & Tunneling

Encapsulating traffic inside another protocol to create a private, often encrypted path across an untrusted network.

Read
45 min
Practice MCQs
25
Interview Q&A
25
Edition
v4
Editorial status
Reviewed
Relevant for
Network Engineer

Scope: Current IETF IPsec/IKEv2/NAT-T/GRE/L3VPN/VXLAN/PMTUD/UDP, NIST IPsec, WireGuard, OpenVPN 2.6, and TLS 1.3 references reviewed 2026-09-04.

Curated: · Written: · Reviewed:

25 questions

MCQ-1A GRE tunnel between R1 (10.0.0.1) and R2 (10.0.0.2) carries traffic between 192.168.1.0/24 and 192.168.2.0/24 over the public internet. The tunnel is plain GRE: no IPsec or other protection is configured on it. An attacker taps the ISP link between the two routers and captures the tunneled packets. What can the attacker recover from those packets?
MCQ-15A colo provider runs VXLAN between two customer VTEPs, 10.20.0.1 and 10.20.0.2, on its IP fabric. Tenant hosts 192.168.30.5 and 192.168.30.9 exchange HTTPS (TLS 1.3) over VNI 10420 on UDP 4789, and no other encapsulation or security feature is configured. A provider engineer captures one packet on a fabric link between the VTEPs. What can the engineer read from that packet?
MCQ-2A branch office runs an IPsec VPN to headquarters in tunnel mode. A capture on a router in the public transit path between the two gateways shows ESP packets whose outer IP header carries the two gateway addresses, and the payload is unreadable. A capture on the branch LAN, inside the tunnel, shows the original packets with their private source and destination addresses intact. Which statement explains why the transit router sees only the gateway addresses while the branch LAN sees the private addresses?
MCQ-3A gateway terminates one ESP tunnel to peer 203.0.113.7. The SA was negotiated with selectors 10.20.0.0/16 ↔ 10.30.0.0/16, and the SPD entry that authorized it covers exactly those selectors. The peer sends an ESP packet on that SA; the SPI resolves in the SAD, the integrity check passes, and the decrypted inner packet is 10.20.4.9 → 10.99.0.1. No SPD entry covers 10.99.0.0/16. What does the gateway do with the inner packet?
MCQ-4A site-to-site gateway pair runs IKEv2 with the IKE SA lifetime set to 8 hours and the Child SA (ESP tunnel) lifetime set to 1 hour. At the 1-hour mark the Child SA lifetime expires. What does the gateway do?
MCQ-17An IPsec ESP receiver uses an anti-replay window of 64. Its highest accepted sequence number is 1050. A packet arrives with sequence number 980 and its bitmap bit is clear. What should the receiver do?
MCQ-6A VPN gateway terminates IPsec IKEv2 tunnels for 40,000 remote workers. The security team's audit requires that if an attacker steals the gateway's long-term RSA private key tonight, they still cannot decrypt any of the tunnel traffic captured on the uplink last month. The gateway currently runs IKEv2 with a single static RSA key pair used for authentication, and each tunnel's session keys are derived by encrypting a random nonce under that RSA key. Which change to the key exchange is required to satisfy the audit?
MCQ-5A site-to-site IKEv2 responder authenticates branch routers with certificates from the corporate CA. Branch 14's peer entry pins the remote ID to CN=branch14.example.com and records the router's subnet as 10.14.0.0/16; branch 22's subnet is 10.22.0.0/16. A peer negotiates IKE_SA_INIT with the responder's own proposals (AES-GCM with 256-bit keys, DH group 19, no NAT on either address), presents a certificate issued to CN=branch14.example.com with a valid chain, a good OCSP result and proof of possession of the private key, then requests CHILD_SA traffic selectors of 10.22.0.0/16. The responder installs the CHILD_SA with exactly those selectors and routes 10.22.0.0/16 into it. Which check was missing?
MCQ-7A gateway terminates ESP natively, with no NAT-T. Two engineers behind one PAT router (a single public IP) each bring up a tunnel to it. IKE completes for both, but the gateway receives ESP from only the first engineer, and the router's translation table holds a single protocol-50 entry pointing at that engineer's private address. The team enables NAT-T on both peers, and the second tunnel starts passing traffic. What does the UDP encapsulation give the router that it did not have before?
MCQ-16A site-to-site IKEv2 tunnel runs DPD with a 10-second interval and 3 retries. After a routing change at the remote site, TCP sessions to 10.20.30.0/24 time out, but the tunnel still shows as up and DPD never declares the peer dead. What does this indicate?
MCQ-18Two IKEv2 gateways run a single ESP tunnel for a 400 Mbit/s replication stream. Path RTT is 90 ms, and under load the sending side's WAN egress queue holds about 200 ms of packets. The CHILD_SA rekeys every 3600 s, and the responder deletes its old inbound CHILD_SA in the same operation that installs the new one. Every rekey costs about 300 ms of loss at the receiver and a burst of TCP retransmissions, while link error counters and ESP integrity-failure counters stay flat. Which change removes the loss without weakening the tunnel?
MCQ-10A route-based IPsec tunnel uses VTI vti1, and the routing table has a default route 0.0.0.0/0 pointing at vti1 so that traffic is meant to be encrypted. The table also still holds a leftover pre-migration entry: 10.20.0.0/16 via GigabitEthernet0/0 (the WAN). The IPsec SA is up, yet traffic to 10.20.0.0/16 is observed leaving the WAN interface in cleartext. What is the correct fix?
MCQ-25A policy-based IPsec tunnel between two offices uses traffic selectors 10.10.1.0/24 (local) and 10.20.1.0/24 (remote) on both gateways. Validation confirmed IKE phase 1 and phase 2 are established and that a ping from 10.10.1.5 to 10.20.1.10 succeeds. A subnet 10.20.5.0/24 was later added behind the remote gateway, and gateway A has a default route out its internet interface. An audit finds that a connection from 10.10.1.5 to 10.20.5.20 succeeds but its packets are not encrypted. What is the cause?
MCQ-24An IPsec tunnel joins Site A (10.20.1.0/24) and Site B (10.30.1.0/24). The tunnel is up and ESP counters increment on both gateways. A client at 10.20.1.50 opens HTTPS to 10.30.1.80 and curl times out. Captures show the SYN leaving gateway A's tunnel interface and arriving at 10.30.1.80 on gateway B's LAN interface. The server's SYN-ACK arrives on gateway B's LAN interface and then appears on gateway B's WAN interface, and gateway B's ESP outbound counter does not increment. What is the cause?
MCQ-22A strongSwan 5.9 gateway terminates two conns to the same peer: conn-a with rightsubnet 10.20.0.0/16 and conn-b with rightsubnet 10.20.1.0/24. Traffic to 10.20.1.5 is being carried by conn-a's SA, so partner B's monitoring never sees it. You need the log line that shows the child-config lookup and the conn it matched for 10.20.1.5, without logging key material or inner payloads. Which change gives you that line?
MCQ-13A company merges with a partner. Both use 10.0.0.0/8 internally, and each site's 10.0.0.0/8 is reachable over a separate site-to-site IPsec tunnel terminating on the same hub router. After both tunnels come up, a hub user's SSH to 10.0.0.5 reaches the local server, but the partner's 10.0.0.5 is unreachable. Why can't the hub route to both?
MCQ-9A site-to-site IPsec tunnel in tunnel mode adds 72 bytes to every packet: 20 outer IPv4, 8 ESP header, 24 ESP trailer and padding, 20 ICV. The gateway sets DF on the outer header, and the provider path between the two public IPs has an MTU of 1500. An upstream firewall drops all ICMP messages, including Fragmentation Needed. A host inside the tunnel negotiates MSS 1460; the handshake and short requests complete, but a bulk transfer stalls, with captures at the sending gateway showing 1572-byte outer packets retransmitted unchanged and the receiving gateway logging none of them. Which change resolves the stall?
MCQ-8A GRE tunnel carries IPv4 over a 1400-byte path; the encapsulation adds a 4-byte GRE header and a 20-byte outer IPv4 header. The tunnel interface MTU is left at 1400, and the provider filters all ICMP. Users can ping across the tunnel, but SSH sessions hang as soon as a large transfer starts. What is happening, and what fixes it?
MCQ-19A pair of IPsec gateways runs active/standby behind a floating virtual IP. On failover the standby takes the VIP in under a second and routing reconverges; the tunnel re-establishes within a few seconds and new connections work normally. Every TCP session that was in flight across the tunnel stalls and has to be re-established by the application. What explains the stalled flows?
MCQ-23A team benchmarks an IPsec VPN gateway with a single 1 Gbit/s iperf3 TCP stream of 1400-byte packets and reports 940 Mbit/s, so they size the box for 1 Gbit/s of customer traffic. In production the same gateway saturates one core at 100% softirq and drops traffic at roughly 180 Mbit/s of aggregate load, even though the link is only 30% utilised. What should the benchmark have measured to predict this?
MCQ-11A branch router (eth0 192.168.200.2/24, default via 192.168.200.1) has a working WireGuard tunnel to a cloud gateway at 203.0.113.10:51820; the client peer is 10.10.0.2/32 with AllowedIPs = 0.0.0.0/0. To send all branch traffic through the gateway the engineer runs ip route add 0.0.0.0/0 dev wg0. Within a minute the tunnel stops passing traffic: wg show reports the latest handshake is now 7 minutes old with the counters frozen at 1.42 MiB received / 3.08 MiB sent from before the command, and ping to 203.0.113.10 fails. Which action restores the tunnel while still sending all other branch traffic through it?
MCQ-14A service provider runs an MPLS L3VPN. PE1 has VRF BLUE (RD 65000:1) and VRF RED (RD 65000:2). PE2 has VRF BLUE (RD 65000:3) and VRF RED (RD 65000:4). Each PE exports its VRFs' VPNv4 routes with route-target extended communities and imports by matching those communities. The operator wants the two BLUE sites to reach each other and the two RED sites to reach each other, but no route from any RED site to appear in any BLUE VRF. Which export/import route-target configuration on the four VRFs achieves this?
MCQ-12A 4,000-employee company runs a hub-and-spoke VPN whose hub sits in one region. Every packet from every laptop, including traffic to Microsoft 365 and Zoom, is backhauled through the hub. Measured p95 latency to Microsoft 365 is 210 ms from the APAC offices versus 35 ms on a direct internet path, and the hub's 10 Gbps uplink peaks at 9.4 Gbps at 09:00 local time. The security team requires that traffic to the internal finance application keep traversing the hub and be inspected there. Which change addresses the measured bottleneck while preserving that requirement?
MCQ-21A zero-trust gateway evaluates each remote-access request against three inputs: the user's group, the device's current posture, and the requested resource. The policy says contractors may reach the build server at `10.30.4.10:22` only from compliant devices, and may never reach the finance subnet `10.20.0.0/16`. A session arrives with user `bob` (group `contractors`), device posture `non-compliant` (EDR reports a missing patch), requesting `10.30.4.10:22`. What should the gateway return for this request?
MCQ-20An always-on VPN client enforces its kill switch with a firewall ruleset that permits only the VPN gateway's IP and blocks everything else. On a network change the client deletes the entire ruleset, brings up the tunnel, then reinstalls it. A capture across a Wi-Fi-to-LTE handover shows three DNS queries and one HTTPS request to an internal app leaving the physical interface in cleartext during the 1.8 s between delete and reinstall. Which change removes the leak?