Use it to connect branches or partners over the internet, and when one site cannot reach another through the tunnel.
Site-to-Site
A site-to-site VPN connects two networks through a permanent encrypted tunnel between two gateways, usually IPsec with IKEv2.
1. show crypto session — tunnel UP-ACTIVE?
2. Down → IKE: show crypto ikev2 sa / show crypto isakmp sa; compare proposals and keys on both peers.
3. Up but no traffic → show crypto ipsec sa — encaps increasing, decaps not → the peer or return path.
4. Neither → routing or NAT sends traffic elsewhere.
5. debug crypto ikev2 briefly if negotiation fails.
peers reachable (UDP 500/4500, ESP) → IKE proposals match → peers authenticate → IKE SA up → IPsec SAs for the traffic → routing sends traffic into the tunnel → encrypt and decrypt counters increase
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Known-good closure and original test Verify boundary
Layered verification for Site-to-Site: known test tuple → expected rule/binding → programmed policy/session → counter or capture delta → protected resource/application → reverse flow/regression Close only when the original source, destination, protocol, VRF/VLAN/policy context and return path are tested.
Step 2 Branching failure-boundary diagnosis Narrow the fault
Branch packet tuple/direction → prerequisite binding/state → matching rule/sequence → hardware/session programming → hit/drop counters for the test packet → downstream service/return path.
Step 3 Common mistakes Narrow the fault
- Mismatched proxy IDs.
- No redundancy.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Both peers must agree on proposals, authentication and the protected networks (traffic selectors or VTI routing). Exclude VPN traffic from NAT. Use dead peer detection and monitor the tunnel.
show crypto ikev2 sa— IKEv2 security associations and their state.show crypto isakmp sa— IKEv1 phase 1 state (QM_IDLE is up).show crypto ipsec sa— IPsec SAs, encrypt and decrypt counters.show crypto session— summary of tunnels and peers.show interfaces tunnel <n>— tunnel interface state for VTI/DMVPN.
ReferenceHow it works1 section · depth on demand
Mechanics and state boundaries
Separate packet classification inputs, rule/sequence ordering, state/binding dependencies, hardware programming and observed hit/drop counters. A configured permit or deny is only intent until the packet takes that path and the counter/evidence matches.
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
Site-to-site VPN
A site-to-site VPN connects networks rather than individual users. NIST SP 800-77 Rev. 1 calls it the gateway-to-gateway model: two gateways (for example a branch and headquarters) protect traffic between them, so hosts on either side need no VPN software, but the protection covers only the path between the two gateways.
Topologies
| Topology | Description |
|---|---|
| Point-to-point | Two sites, one tunnel |
| Hub-and-spoke | Branches connect to one or two hubs |
| Full or partial mesh | Sites connect to each other directly (often dynamically, as with DMVPN or SD-WAN) |
Building blocks
| Element | Recommendation (SP 800-77 Rev. 1) |
|---|---|
| Key exchange | IKEv2 |
| Protocol | ESP |
| Encryption and integrity | AES-GCM, or AES with HMAC-SHA-2 |
| Authentication | Certificates; PSKs only if highly random |
| Perfect forward secrecy | DH group at least as strong as the initial IKE exchange |
| Lifetimes | 24 h IKE SA, 8 h IPsec SA |
BR1(config)# crypto ikev2 proposal S2S-PROP
BR1(config-ikev2-proposal)# encryption aes-gcm-256
BR1(config-ikev2-proposal)# prf sha384
BR1(config-ikev2-proposal)# group 20
BR1(config)# crypto ikev2 profile S2S-HQ
BR1(config-ikev2-profile)# match identity remote fqdn hq-vpn.example.net
BR1(config-ikev2-profile)# authentication remote rsa-sig
BR1(config-ikev2-profile)# authentication local rsa-sig
BR1(config-ikev2-profile)# pki trustpoint CORP-CA
BR1(config)# crypto ipsec profile S2S-IPSEC
BR1(ipsec-profile)# set ikev2-profile S2S-HQ
BR1(ipsec-profile)# set pfs group20
BR1(config)# interface Tunnel10
BR1(config-if)# tunnel protection ipsec profile S2S-IPSEC
BR1# show crypto session remote 203.0.113.10 detail | include Session status|Phase1|IPSEC FLOW
Route-based versus policy-based
| Type | How traffic is selected |
|---|---|
| Route-based (VTI) | Routing decides; dynamic protocols over the tunnel |
| Policy-based (crypto map) | ACLs define which traffic is encrypted |
Route-based VPNs scale and fail over better; policy-based tunnels are common with third parties and firewalls.
What site-to-site VPNs don't do
Traffic inside each site and beyond the gateways isn't protected by the tunnel (SP 800-77 Rev. 1), so combine VPNs with segmentation and firewall policy at each end.
Documented example, not captured output.
Quick reference
A site-to-site VPN connects whole networks — branch to headquarters, or on-premises to cloud — over an encrypted tunnel, so users do not need to do anything themselves. The two main approaches differ in how they decide what traffic is encrypted, which affects routing, failover and interoperability.
Site-to-site VPN connects networks:
| Type | Notes |
|---|---|
| Policy-based (crypto map) | Traffic selectors define what is encrypted; legacy |
| Route-based (VTI) | Tunnel interface, routing decides; supports dynamic routing |
| DMVPN | Hub-and-spoke with dynamic spoke-to-spoke (mGRE + NHRP + IPsec) |
| FlexVPN / SD-WAN | IKEv2-based, automated |
show crypto session detail
show crypto ikev2 sa
ping 10.20.0.1 source 10.10.0.1
Common failures: mismatched proposals, PSK mismatch, traffic selectors not matching (policy-based), NAT applied to traffic that should be encrypted.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Security → VPN Security → Site-to-Site. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.cisco.com/c/en/us/support/ios-nx-os-software/ios-xe-17/series.html · confidence 94%