Pcornel
Security · IPsec

IKE Phase 1

Cheat sheet · https://pcornel.dk/topic.php?topic=4655

Back to the Topic

Answer

IKE Phase 1 (IKEv1) authenticates the peers with pre-shared keys or certificates and builds a secure IKE SA using Diffie-Hellman, which protects the Phase 2 negotiation. It runs in main or aggressive mode.

Remember

  • Phase 1 authenticates peers and builds the IKE SA.
  • Main mode is preferred over aggressive mode.
  • Authentication uses PSK or certificates.

First checks

  • show crypto ikev2 sa / show crypto isakmp sa — IKE SA
  • Phase 1 proposal: encryption, integrity/PRF, DH group, auth — settings
  • swanctl --log — negotiation

Commands

show crypto isakmp sa

Verify in this order

peers → proposal match → DH → authentication → IKE SA

Where it usually breaks

First mismatch in endpoint/identity → path/reachability → policy selection → enforcement/session → protected flow → telemetry/detection; preserve identity/policy/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4655

Confirmation

Confirm action

Continue?