The first thing most engineers do when a site-to-site IPsec tunnel drops is clear the security association and re-initiate. It works often enough — call it seven times out of ten — that it becomes the entire procedure, and the cause never gets named. That is a problem, because tunnel down is not a diagnosis. It is a status column, and on most platforms that column collapses at least six failure modes into one word. Automation that only restarts tunnels inherits the same blind spot.
Six failure modes hide behind one status column
Nearly every IPsec outage lands in one of six buckets, and each leaves a different fingerprint in output you already have.
- Phase 1 never establishes. Proposal mismatch on encryption, hash or PRF, or DH group; a PSK that drifted after rotation; an unrecognized identity; UDP 500 and 4500 filtered along the path.
- Phase 1 up, Phase 2 down. The child SA never arrives — usually a traffic-selector or proxy-ID mismatch, a PFS disagreement, or a lifetime longer than the peer accepts.
- Rekey failure. The tunnel came up and dropped after exactly one lifetime. The original negotiation worked; the rekey did not.
- DPD false positive. Dead Peer Detection kills a tunnel on a path that was only jittering: a default 10-second interval with three retries is 30 seconds of tolerated loss.
- No interesting traffic. Nothing matches the selectors, so the SA never comes up or idles out — indistinguishable from a failure in the status column.
- MTU and fragmentation. IKE negotiates, pings succeed, real payloads vanish. ESP adds roughly 40 to 70 bytes of overhead, more with UDP encapsulation.
Work the ladder from Phase 1 downward
If the IKE SA is down, child SA counters tell you nothing — stop reading them. Confirm peer reachability on UDP 500 and 4500, confirm the proposals intersect on all four attributes, then confirm local and remote identities match what each side expects. A NAT device rewriting an identity fails Phase 1 with no useful log line at all.
Once Phase 1 is up, compare traffic selectors as mirror images: your local /24 is the peer's remote /24, and a /24 against a /25 produces a silent Phase 2 failure — no error, just no SA.
Then read counters directionally. Encapsulation climbing while decapsulation stays flat means the return path is broken: routing, an ACL, NAT, or ESP blocked upstream. Both counters moving while traffic stalls points at MTU. Both flat after a rekey points at lifetime or PFS.
Lifetimes give the cause away through regularity. Common defaults put the IKE SA at 28,800 seconds (8 hours) and the child SA at 3,600 seconds (1 hour), with a rekey margin near 10%. A tunnel that drops on a clean interval is not flapping; it is failing to rekey.
| Observation | Most likely rung | Fix tier |
|---|---|---|
| IKE SA down, no peer reply | Reachability, UDP 500 or 4500 | 1 |
| IKE SA down, peer replies | Proposal, PSK, or identity | 2 to 3 |
| Child SA fails while IKE is up | Proxy ID or PFS | 3 |
| Drops at a regular interval | Rekey or lifetime | 1 to 2 |
| Encapsulation up, decapsulation flat | Return path routing or ACL | 3 |
| Counters move, payloads die | MTU or fragmentation | 2 |
One flap, hundreds of alerts
A hub with 200 spokes and two tunnels per spoke holds 400 SA state objects on one headend. A WAN flap, a firewall reload, or a single ISP path withdrawal drops all of them inside one DPD window — 30 to 90 seconds. The NOC gets 400 alerts and, under a per-tunnel runbook, runs 400 clear-SA actions. Roughly one addresses the cause.
That is why correlation must happen before remediation. Group by physical path, hub interface, peer, and timestamp. If 200 tunnels drop inside one 90-second window and share an upstream circuit, per-tunnel remediation cannot help — you will be clearing SAs until the circuit returns.
If two hundred tunnels drop in the same ninety seconds, you do not have two hundred incidents. You have one, and a hundred and ninety-nine symptoms.
Tier the fixes before you automate them
Not every rung deserves the same autonomy. A workable split:
- Auto-execute. Re-initiate IKE, clear and rebuild a single SA, flap one tunnel, reset DPD state, force a rekey. Reversible in seconds, no configuration change, no peer coordination.
- Auto-execute in a change window or with approval. MSS clamping and tunnel MTU adjustment, DPD interval tuning, lifetime alignment between peers.
- Never unattended. Proposal and PSK changes, traffic-selector edits, firewall rules on an edge you do not own, and routing changes that cross an administrative boundary. These need a second engineer and often a peer who has to agree.
Add two guardrails. Cap remediation at something like five tunnels per minute per headend so a correlated event cannot become a configuration storm. Trip a circuit breaker when one peer fails three times in an hour — that is a configuration defect, not an availability incident, and automation that keeps fixing it is only hiding it.
Verification is counters, not colors
A tunnel is not fixed because a status column turned green. Define success as conditions that must all hold inside a 60-second window: the IKE SA established, at least one child SA up, encapsulation and decapsulation both incrementing, and a synthetic probe crossing the actual selectors — not an ICMP to the peer's outside interface, which says nothing about whether traffic flows.
If verification fails, roll back and escalate. Capture state first: counters, SA lifetimes, the last rekey result, peer-side logs. Clearing an SA destroys the evidence of why it failed, which is why the same tunnel drops every Tuesday and nobody can say why.
Where this is heading
IPsec is deterministic. Each of those six failure modes leaves a distinguishable signature — a proposal that did not intersect, a selector that did not mirror, a lifetime that expired without a rekey, a counter moving in one direction only. That determinism is what makes the ladder automatable: a decision tree with observable leaves, not a judgment call.
Expect the tiers to shrink. As peer-side telemetry gets easier to pull and path MTU discovery gets more reliable, more of tier two migrates into tier one, and human attention narrows to what is genuinely negotiated: proposal matrices, path diversity, and MTU policy across heterogeneous carriers. The ordering will not change. Instrument the tunnel before you automate it.

