Octet

Walk me through IKE phase 1 and phase 2.

Show the answer

Say this first

Phase 1 builds an authenticated, encrypted control channel between the two gateways, the IKE SA (the ISAKMP SA in IKEv1). They agree on encryption, hash, Diffie-Hellman group, authentication method and lifetime, run Diffie-Hellman and prove their identity with a pre-shared key or a certificate. Phase 2 runs inside that channel and negotiates the IPsec SAs that carry user data: the transform set, the traffic to protect (proxy IDs), lifetimes and optional PFS. It produces a pair of one-way IPsec SAs.

Go deeper

Phase 1 parameters

Hash, Authentication method, DH Group, Lifetime, Encryption. Some people remember it as HAGLE.

Phase 2 parameters

  • Protocol and algorithms: ESP cipher and integrity (the transform set)
  • Mode: tunnel or transport
  • Proxy IDs (traffic selectors): local and remote networks
  • PFS group, if any
  • Lifetime in seconds and kilobytes

Cisco IOS defaults

The ISAKMP SA lifetime defaults to 86400 seconds. IPsec SA lifetimes default to 3600 seconds and 4,608,000 kilobytes.

Where to look

show crypto isakmp sa for IKEv1 phase 1, show crypto ikev2 sa for IKEv2, and show crypto ipsec sa for the IPsec SAs.

Traps

  • Saying user data flows over the phase 1 SA. The IKE SA only carries IKE messages.
How did you do?Book 8.5 Example SystemsBook 8.3 Key Predistribution