IKEv1 or IKEv2: which should you use for your VPN?
IKEv2 has been the standard for new IPsec tunnels for years, and IKEv1 is now formally deprecated. Here's what actually changed between them, and the few cases where you still need the old version.
The short answer
Use IKEv2 for every new site-to-site tunnel. Keep IKEv1 only for a peer that can't do IKEv2, and plan to upgrade or replace that peer. The IETF deprecated IKEv1 in RFC 9395, and most vendors already treat it as legacy.
What IKEv2 changed
IKE (Internet Key Exchange) is the protocol two IPsec peers use to authenticate each other and agree on keys. IKEv1 dates from 1998 (RFC 2409). IKEv2 was first published in 2005 and is defined today by RFC 7296. These are the differences that matter in practice:
| IKEv1 | IKEv2 | |
|---|---|---|
| Messages to bring up a tunnel | 9 with main mode + quick mode (6 with aggressive mode) | 4 (IKE_SA_INIT + IKE_AUTH) |
| NAT traversal | Added later as an extension (RFC 3947) | Built in |
| Liveness checks | Dead peer detection as an extension (RFC 3706) | Built in |
| Extra authentication | XAUTH and mode config, non-standard | EAP and configuration payloads, built in |
| Changing client IP | Tunnel must be rebuilt | MOBIKE (RFC 4555) keeps it up |
| Reliability | Lost messages could leave peers out of sync | Every request is acknowledged and retransmitted |
Fewer round trips mean tunnels come up faster and there are fewer places for a negotiation to fail. Built-in NAT traversal and liveness checks mean less vendor-specific behaviour to debug.
IKEv1 and IKEv2 don't interoperate. Both peers must use the same version, so changing one side always means changing the other at the same time.
Where IKEv1 still shows up
- Older firewalls and routers whose firmware predates solid IKEv2 support.
- Networks you don't control, such as a partner or supplier that only offers IKEv1.
In each case IKEv1 is a compatibility setting, not a choice. Use the strongest proposals the peer supports and set a date to revisit it.
Moving a tunnel from IKEv1 to IKEv2
- Confirm the peer supports IKEv2 and note which proposals it offers.
- Agree on a maintenance window with whoever runs the other side.
- Switch the IKE version on both ends together, keeping subnets and keys unchanged.
- Bring the tunnel up and check both the IKE SA and the child SAs.
- Once traffic flows, tighten any weak proposals you inherited from the IKEv1 setup.
On a strongSwan peer, the version is one setting in the connection definition:
connections {
branch-office {
version = 2 # was 1
proposals = aes256gcm16-prfsha384-ecp384
# ...
}
}
TunnelYard tunnels use IKEv2 only, so move the peer to IKEv2 first, then export its config from the tunnel so both sides match. The same applies when several offices share one gateway.
Bottom line
Default to IKEv2. Treat every remaining IKEv1 tunnel as technical debt with an owner and a date.