Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

Site-to-Site VPN

Direct answer

A site-to-site VPN connects whole networks through an encrypted tunnel between two gateways, so hosts communicate without VPN software of their own.

When to use this

Use Site-to-Site VPN when two networks must be connected securely over the internet with an IPsec tunnel between gateways; prefer route-based VTI.

First 30 seconds

1. Site-to-site VPN connects networks over untrusted transport.

2. Policy-based (crypto map) or route-based (VTI).

3. Prefer route-based.

4. Match selectors, proposals and keys.

5. Test from LAN interfaces.

Operational verification

IKE → IPsec SAs → encrypted LAN-to-LAN traffic

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Protocol standard + deployed implementation
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformProtocol standard · Cisco IOS / IOS XE · Cisco IOS XE
Key commandip address 172.16.10.1 255.255.255.252
Scope / prerequisiteUse Site-to-Site VPN when two networks must be connected securely over the internet with an IPsec tunnel between gatewa…
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification & troubleshooting Narrow the fault
SymptomCommandLook forNext check
Tunnel never comes upshow crypto ikev2 saStatus READYNo SA: UDP 500/4500 reachability, peer address, proposal or key mismatch (debug crypto ikev2 in a maintenance window)
IKE up, no trafficshow crypto ipsec sa peer 203.0.113.2#pkts encaps and #pkts decaps increase on both peersEncaps only: remote side or its return route. Neither: routing does not send traffic into Tunnel10
Tunnel interface downshow ip interface briefTunnel10 up/upTunnel source/destination reachability, IPsec profile
Large packets failping <remote-lan> size 1400 df-bitSuccess with DF setip mtu and ip tcp adjust-mss on the tunnel
Step 2 Common mistakes Narrow the fault
  • Mismatched protected subnets (proxy IDs) between peers.
  • Overlapping LAN subnets at the two sites without NAT.
  • No route for the remote subnet pointing into the tunnel/crypto interface.
Evidence references

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.

observation · 1
Command lookup Jump straight to Cisco syntax
Key points
  • IKE SA and IPsec child SA are separate evidence boundaries
  • Proxy identities/selectors must agree at both peers
  • ESP commonly carries protected data; NAT traversal can encapsulate it in UDP 4500
  • Encaps and decaps counters must be interpreted with generated interesting traffic and the return path.
Key checks
  • show crypto session — site tunnels
  • show crypto ipsec sa peer <ip> — counters
  • ping <remote-lan-ip> source <local-lan-if> — interesting traffic
ReferenceWhat it is1 section · depth on demand

What it is

A site-to-site VPN joins two networks over an untrusted network with an IPsec tunnel between two gateways. IKE (IKEv2 for new designs) authenticates the peers with a pre-shared key or certificates and negotiates the IPsec SAs; ESP then encrypts the traffic.

Cisco IOS XE offers two models:

  • Crypto map on the physical interface, with a crypto ACL selecting the protected traffic (policy-based).
  • Virtual Tunnel Interface (VTI) with tunnel mode ipsec ipv4: routing decides what enters the tunnel (route-based), and dynamic routing protocols can run over it.
ReferenceWhy it matters1 section · depth on demand

When to use it

Use it to connect branch sites, partners or a cloud VPC/VNet over the internet. Prefer route-based VTI for new designs: simpler to troubleshoot, routing-protocol friendly, and no mirrored crypto ACLs to keep in sync.

ReferenceImportant terms & boundaries2 sections · depth on demand

In depth

Site-to-site VPN: connecting two networks over the Internet

A site-to-site VPN joins two sites' networks through an encrypted tunnel between their edge routers or firewalls. Cisco's IOS XE VTI guide describes the static VTI as the choice for always-on connectivity between two sites, and a dynamic VTI on a hub for many remote peers.

Two configuration models

ModelTraffic selectionBest for
Policy-based (crypto map)Crypto ACL lists the networks to protectInteroperability with peers that require narrow selectors
Route-based (VTI)Routing into the tunnel interfaceDynamic routing, several prefixes, failover
R1(config)# interface Tunnel100
R1(config-if)# ip address 172.31.100.1 255.255.255.252
R1(config-if)# tunnel source GigabitEthernet0/0/0
R1(config-if)# tunnel mode ipsec ipv4
R1(config-if)# tunnel destination 203.0.113.2
R1(config-if)# tunnel protection ipsec profile VTI-PROF
R1(config)# ip route 10.2.0.0 255.255.0.0 Tunnel100
R1# ping 10.2.0.1 source Vlan10
!!!!!
R1# show crypto ipsec sa interface Tunnel100
interface: Tunnel100
    Crypto map tag: Tunnel100-head-0, local addr 198.51.100.2
   protected vrf: (none)
   local  ident (addr/mask/prot/port): (0.0.0.0/0.0.0.0/0/0)
   remote ident (addr/mask/prot/port): (0.0.0.0/0.0.0.0/0/0)
   current_peer 203.0.113.2 port 500
    #pkts encaps: 1882231, #pkts encrypt: 1882231, #pkts digest: 1882231
    #pkts decaps: 1794410, #pkts decrypt: 1794410, #pkts verify: 1794410
    #send errors 0, #recv errors 0
     inbound esp sas:
      spi: 0x8C1F22A1(2350850721)
        transform: esp-gcm 256 ,
        in use settings ={Tunnel, }
        sa timing: remaining key lifetime (k/sec): (4607612/2311)
        replay detection support: Y
     outbound esp sas:
      spi: 0x4D02B7E3(1292023779)

What both sides must agree on

ItemMust match
IKE version and proposalsEncryption, integrity or PRF, Diffie-Hellman group
AuthenticationPre-shared key or trusted certificates; identities
IPsec transformESP algorithms, PFS group, lifetimes (lifetimes can differ; the lower is used)
Traffic selectorsAny/any for VTIs (the guide's default), or the same network pairs for crypto maps

Design points

PointRecommendation
RedundancyTwo tunnels over two ISPs with a routing protocol or tracked static routes
NATExempt VPN traffic from Internet NAT; with NAT between the peers, NAT traversal (UDP 4500) is used automatically
MTUip mtu and ip tcp adjust-mss on the tunnel; the guide states fragmentation isn't supported over the IPsec tunnel
MonitoringAlert on tunnel interface state and on IKE SA flaps

Hub-and-spoke at scale

With many branches, a hub with a dynamic VTI (or DMVPN/FlexVPN) avoids configuring one tunnel per branch at the hub. The guide states that IKEv2 dynamic VTIs are supported in FlexVPN.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Quick reference

A site-to-site VPN connects networks at different locations over the internet or another untrusted network, using IPsec between gateway routers or firewalls. Users at each site reach the other site transparently.

DesignNotes
Policy-based (crypto map)Crypto ACL decides what is encrypted
Route-based (VTI)Routing decides; supports dynamic routing
DMVPN / FlexVPNScalable hub-and-spoke with dynamic spoke-to-spoke
SD-WANController-managed IPsec overlay

Prefer IKEv2, AES-GCM and DH group 19 or higher, and monitor tunnels with DPD and routing protocol adjacencies.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
ReferenceConfiguration & state1 section · depth on demand

Configuration example: IKEv2 with VTI (Cisco IOS XE)

crypto ikev2 proposal PROP-1
 encryption aes-gcm-256
 prf sha384
 group 20
crypto ikev2 policy POL-1
 proposal PROP-1
crypto ikev2 keyring KR
 peer SITE-B
  address 203.0.113.2
  pre-shared-key <secret>
crypto ikev2 profile IKEV2-SITE-B
 match identity remote address 203.0.113.2 255.255.255.255
 authentication remote pre-share
 authentication local pre-share
 keyring local KR
crypto ipsec transform-set TS esp-gcm 256
 mode tunnel
crypto ipsec profile IPSEC-SITE-B
 set transform-set TS
 set ikev2-profile IKEV2-SITE-B
!
interface Tunnel10
 ip address 172.16.10.1 255.255.255.252
 ip mtu 1400
 ip tcp adjust-mss 1360
 tunnel source GigabitEthernet0/0/0
 tunnel destination 203.0.113.2
 tunnel mode ipsec ipv4
 tunnel protection ipsec profile IPSEC-SITE-B
!
ip route 10.20.0.0 255.255.0.0 Tunnel10

Documented example, not captured output. Both peers need mirrored settings.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docProtocol standard + deployed implementation RFC 4301

Authoritative/upstream documentation reviewed for bounded claims in Virtualization & Overlays → IPsec → Site-to-Site VPN. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.rfc-editor.org/rfc/rfc4301.html · confidence 94%
Confirmation

Confirm action

Continue?