Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

IPsec

Direct answer

A site-to-site IPsec VPN authenticates peers and protects selected traffic with negotiated IKE and IPsec security associations.

When to use this

Use it to protect routed traffic across an untrusted underlay with policy-based crypto maps or route-based tunnel interfaces.

First 30 seconds

1. show crypto session — UP-ACTIVE?

2. Down → peers reach each other on UDP 500/4500 and ESP? show crypto ikev2 sa — any SA?

3. IKE fails → proposals and pre-shared key/certificate must match.

4. IKE up, no IPsec SA → traffic selectors (crypto ACL) must mirror each other.

5. show crypto ipsec sa — encaps rise but decaps do not → the far end or return path.

Operational verification

peer reachable → IKE proposal agreed → authentication → IKE SA → IPsec SA with mirrored selectors → interesting traffic encrypted → decrypted at the far end → reply returns

Evidence · next step

1. Verify peer underlay reachability and time/identity.
2. Verify IKE negotiation.
3. Compare selectors and proposals.
4. Generate controlled traffic.
5. Check encrypt/decrypt counters, drops, MTU and both directions.

Continue only after interpreting the current observation.
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
Scope / prerequisiteUse it to protect routed traffic across an untrusted underlay with policy-based crypto maps or route-based tunnel inter…
What next?3 suggested next steps
Child topics (this level)11
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.

3 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 First 30 seconds Verify boundary

Immediate answer: Separate peer reachability, IKE SA, IPsec SA/selectors and encrypt/decrypt counters with controlled interesting traffic.

Verification chain: Interesting traffic → IKE authentication → IPsec SA/selectors → encrypt → underlay → decrypt → routed delivery

Stop condition: IKE established does not show the required traffic matches a child SA or decrypts successfully.

Step 2 Verification and output interpretation Verify boundary

Verify peer reachability, IKE state, child/IPsec SAs, inbound/outbound packet counters and the route that selects protected traffic. Counter increments on both sides provide stronger evidence than an SA listed as established. Confirm selectors or route-based policy match the intended traffic and inspect drops/replay/authentication counters when packets do not progress. Application success remains beyond IPsec itself.

Step 3 Step-by-step troubleshooting Narrow the fault

Boundary rule: IKE established does not show the required traffic matches a child SA or decrypts successfully.

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.

command output · 1
Command lookup Jump straight to Cisco syntax
Drill down

Subtopics

Go one level deeper into this subject.

Subtopic Site-to-Site VPN

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

Subtopic Remote Access VPN concepts

Remote access VPN connects individual users (for example with Cisco Secure Client using IPsec/IKEv2 or SSL/TLS) to the corporate network, with user authentication and assigned addresses.

Subtopic IKE

Internet Key Exchange (IKE) authenticates IPsec peers and negotiates the keys and parameters (SAs) for the tunnel, using UDP 500 and UDP 4500 with NAT traversal.

Subtopic IKEv2

IKEv2 is the current IKE version: fewer messages, built-in NAT traversal and dead peer detection, EAP support, and on IOS FlexVPN configuration with proposals, policies, keyrings and profiles.

Subtopic IPsec SA

An IPsec security association (SA) is a one-way agreement on keys, algorithms and SPI for protecting traffic; each tunnel has a pair, visible with show crypto ipsec sa.

Subtopic ESP

Encapsulating Security Payload (ESP, IP protocol 50) is the IPsec protocol that encrypts and authenticates the payload; it is used in almost all IPsec VPNs.

Subtopic IPsec Encryption

IPsec encryption protects confidentiality with symmetric ciphers such as AES-GCM or AES-CBC, using keys negotiated by IKE.

Subtopic IPsec Integrity

IPsec integrity (HMAC-SHA or AES-GCM) detects any change to protected packets and, with sequence numbers, rejects replayed packets.

Subtopic IPsec Profile

An IPsec profile (crypto ipsec profile <name>) groups the transform set and IKEv2 profile and is applied to a tunnel interface with tunnel protection ipsec profile <name>.

Subtopic GRE over IPsec

GRE over IPsec reference for overlay/underlay separation, GRE multiprotocol transport, IPsec protection, MTU overhead, routing and verification boundaries.

Subtopic Verification

Verify IPsec with show crypto ikev2 sa (or show crypto isakmp sa), show crypto ipsec sa (encaps/decaps counters increasing on both sides) and show interfaces tunnel, then test with traffic that must use the tunnel.

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 — tunnel state per peer.
  • show crypto ikev2 sa / show crypto isakmp sa — IKE SA state.
  • show crypto ipsec sa — SAs, traffic selectors and encaps/decaps counters.
  • show crypto ikev2 proposal / show crypto ipsec transform-set — algorithms offered.
  • debug crypto ikev2 — negotiation errors (briefly).
ReferenceImportant terms & boundaries4 sections · depth on demand

In depth

IPsec: authenticated, encrypted IP traffic between peers

IPsec protects IP packets between two peers. Two parts work together: IKE (RFC 7296) authenticates the peers and negotiates keys, and ESP (RFC 4303) protects the traffic. RFC 4303 lists ESP's services as confidentiality, data origin authentication, connectionless integrity, anti-replay protection and limited traffic-flow confidentiality.

Building blocks

ElementRole
IKE SAProtected control channel between the peers (RFC 7296)
Child SA / IPsec SAOne-way ESP SAs that protect traffic, created under the IKE SA
SPI32-bit value in each ESP packet that identifies the SA at the receiver
ESPIP protocol 50: encryption, integrity and anti-replay
Transport vs tunnel modeProtect the payload only, or the whole original packet inside a new IP header

Ports and protocols

TrafficProtocol
IKEUDP 500
IKE and ESP through NATUDP 4500 (NAT traversal; ESP is encapsulated in UDP)
ESPIP protocol 50
R1# show crypto session
Crypto session current status
Interface: Tunnel100
Profile: SITE-B
Session status: UP-ACTIVE
Peer: 203.0.113.2 port 500
  Session ID: 1
  IKEv2 SA: local 198.51.100.2/500 remote 203.0.113.2/500 Active
  IPSEC FLOW: permit ip 0.0.0.0/0.0.0.0 0.0.0.0/0.0.0.0
        Active SAs: 2, origin: crypto map
R1# show crypto ikev2 sa
R1# show crypto ipsec sa

Ways to apply IPsec on Cisco IOS XE

MethodTraffic selection
Crypto map on the physical interfaceCrypto ACL (policy-based)
Static VTI (tunnel mode ipsec ipv4)Routing into the tunnel (route-based)
GRE over IPsec (tunnel protection on a GRE tunnel)Routing; GRE adds multicast and multiprotocol support
DMVPN, FlexVPNHub-and-spoke and spoke-to-spoke at scale

Choosing algorithms

Use IKEv2 and AES-GCM (combined encryption and integrity) with a strong Diffie-Hellman group, such as group 19, 20 or 21. Avoid DES, 3DES, MD5 and DH groups 1, 2 and 5.

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

IPsec protects IP traffic with authentication, integrity and encryption. IKE (preferably IKEv2) authenticates the peers and negotiates keys; ESP then protects the data. It is used for site-to-site VPNs and remote access.

ComponentRole
IKEv2 SAAuthenticated control channel
Child SA (IPsec SA)Protects data, one per direction
ESP (IP 50)Encryption + integrity
NAT-T (UDP 4500)ESP inside UDP through NAT
ProposalsAES-GCM, SHA-256/384, DH group 19/20/21

Prefer route-based VPNs (VTI) over crypto maps; routing decides what enters the tunnel and dynamic routing can run over it.

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

State model and protocol mechanics

IPsec protects IP traffic with negotiated security associations that define authentication, integrity and encryption parameters. IKE establishes and maintains keying/control state, while ESP commonly carries protected data. The forwarding path therefore depends on both ordinary IP reachability and valid cryptographic policy/state.

Limits and common misconceptions

An established IKE session does not show an IPsec child SA protects the desired flows, and an IPsec SA does not show bidirectional routing. Encryption counters can increase while the remote side lacks a return route. IPsec also adds overhead that affects effective MTU. Separate underlay reachability, key negotiation, data-plane SA, route selection and application behavior.

ReferenceConfiguration & state1 section · depth on demand

Design and configuration model

Design peers, identities, proposals, authentication, protected traffic selectors or route-based interfaces, lifetimes and routing together. Use modern cryptographic algorithms and IKEv2 where supported by the environment. Keep underlay reachability to the peer independent from overlay route selection; a VPN cannot establish reliably if the endpoint path depends recursively on the tunnel being built.

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. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.rfc-editor.org/rfc/rfc4301.html · confidence 94%
2026-09-13 · vendor docCisco IOS XE current

Official Cisco vendor documentation reviewed for bounded reference claims: IPsec/VTI security association and routed tunnel boundaries. This is documentation-based technical verification, not lab or production-runtime proof. Deployment-specific applicability and runtime outcome remain separate evidence.

Basis: https://www.cisco.com/c/en/us/td/docs/routers/ios-xe/security-vpn/security-vpn/m_sec-ipsec-virt-tunnl-0.html · confidence 94%
Technical changelog & impact

What changed and what may be affected

Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.

Related reference impactReview these references after material technical changes when their shared boundary is affected.
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
site to site vpnIKEv2IPsec SA
Embedded reference data

Quick lookup tables

IPsec / Site-to-Site VPN evidence chain

Configuration, operational state, counters and downstream proof remain separate.

BoundaryQuestionEvidenceDoes not prove
DefinitionWhat is configured or intended?running configuration / controller policylive operation
Local stateIs the feature active at the expected scope?show crypto ipsec saremote success
CountersDid controlled traffic or an event reach this stage?scoped counters/timestampscomplete return path
Next boundaryWhat consumes or transports this state?interesting traffic → IKE authentication → IPsec SA/selectors → encrypt/ESP → underlay → decrypt → routed deliveryapplication success

IPsec · operational reference

Compact state and interpretation boundaries for fast lookup.

State / evidenceInterpretation
IKE SAKey/control relationship
IPsec/child SAData protection state
CountersActual protected traffic
Route/selectorWhich traffic enters VPN
Confirmation

Confirm action

Continue?