Octet

Describe the IKEv2 exchanges. How many messages does it take to bring up a tunnel?

Show the answer

Say this first

Four messages. IKE_SA_INIT (two messages) negotiates the IKE SA algorithms, exchanges Diffie-Hellman values and nonces, and detects NAT. IKE_AUTH (two messages, encrypted) exchanges identities and authentication and also creates the first Child SA, the IPsec SA, with its traffic selectors. After that, CREATE_CHILD_SA exchanges add Child SAs or rekey, and INFORMATIONAL exchanges carry deletes, errors and liveness checks.

Go deeper

ExchangeMessagesCarries
IKE_SA_INIT1 and 2SA proposals, KE, nonces, NAT detection notifies, optional certificate request
IKE_AUTH3 and 4encrypted: identities, AUTH, certificates, Child SA proposal, TSi and TSr
CREATE_CHILD_SA2 per exchangenew Child SA, rekey of a Child SA or the IKE SA, optional KE for PFS
INFORMATIONAL2 per exchangeDelete, Notify, or an empty message used as a liveness check

Reliability

Every exchange is a request and a response with a message ID. Only the initiator of an exchange retransmits, so lost packets are handled cleanly.

Anti-DoS cookie

A responder under load can answer IKE_SA_INIT with a COOKIE notify and keep no state. The initiator repeats its first message with the cookie, proving its source address is real. That makes the setup six messages.

Longer cases

EAP authentication for remote-access users adds round trips inside IKE_AUTH. The standard is RFC 7296.

Traps

  • Saying IKEv2 still has main mode and aggressive mode.
How did you do?Book 8.5 Example SystemsBook 8.4 Authentication Protocols