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
| Exchange | Messages | Carries |
|---|---|---|
| IKE_SA_INIT | 1 and 2 | SA proposals, KE, nonces, NAT detection notifies, optional certificate request |
| IKE_AUTH | 3 and 4 | encrypted: identities, AUTH, certificates, Child SA proposal, TSi and TSr |
| CREATE_CHILD_SA | 2 per exchange | new Child SA, rekey of a Child SA or the IKE SA, optional KE for PFS |
| INFORMATIONAL | 2 per exchange | Delete, 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.
They will ask next
Does PFS apply to the first Child SA?
No. The first Child SA's keys come from the IKE_SA_INIT Diffie-Hellman exchange; IKE_AUTH carries no KE payload. The PFS group is used when that Child SA is rekeyed with CREATE_CHILD_SA. So a PFS mismatch often stays hidden until the first rekey, which is an hour later with IOS defaults.
How do you recognise IKEv2 in a capture?
UDP 500 or 4500, IKE header version 2.0, and exchange type 34 for IKE_SA_INIT, 35 for IKE_AUTH, 36 for CREATE_CHILD_SA and 37 for INFORMATIONAL.
Traps
- Saying IKEv2 still has main mode and aggressive mode.