Internet Key Exchange
Summary
Before IPsec can protect traffic, the two ends must authenticate each other and agree on keys and algorithms. The Internet Key Exchange (IKE) protocol does this, creating security associations that define how traffic will be protected. IKEv2 is the current, more efficient version.
In plain words
IKE sets up IPsec. It authenticates both peers (with certificates or a pre-shared key) and negotiates the security association (SA): which ciphers, keys and modes to use. Phase I authenticates the peers and uses Diffie-Hellman to build a secure channel. Phase II agrees the ciphers and key sizes for AH/ESP. IKEv2 adds EAP user authentication, simpler setup, NAT traversal, and MOBIKE for roaming between networks.
Detailed explanation
- Internet Key Exchange (IKE): The protocol that negotiates IPsec settings and keys, using UDP port 500.
- Security association (SA): A one-way agreement on the algorithms, keys and lifetime used to protect traffic; each direction needs its own.
-
IKE phase 1: Authenticates the peers and builds a secure channel using Diffie-Hellman key agreement.
- Authentication methods: Preshared keys, digital certificates or, in IKEv2, EAP.
- IKE phase 2: Uses the protected channel to agree the IPsec SAs, including ciphers and key sizes.
- IKEv2: Simpler and faster, with built-in NAT traversal, support for EAP and MOBIKE for moving between networks, which suits mobile VPN clients.
Important terms
taken from the text above- Internet Key Exchange (IKE)
- The protocol that negotiates IPsec settings and keys, using UDP port 500.
- Security association (SA)
- A one-way agreement on the algorithms, keys and lifetime used to protect traffic; each direction needs its own.
- IKE phase 1
- Authenticates the peers and builds a secure channel using Diffie-Hellman key agreement.
- Authentication methods
- Preshared keys, digital certificates or, in IKEv2, EAP.
- IKE phase 2
- Uses the protected channel to agree the IPsec SAs, including ciphers and key sizes.
- IKEv2
- Simpler and faster, with built-in NAT traversal, support for EAP and MOBIKE for moving between networks, which suits mobile VPN clients.
Examples & real-world scenarios
- Two gateways authenticating with certificates from a shared CA.
- A pre-shared key configured on both peers of a small VPN.
- A phone keeping its IPsec VPN up while moving from Wi-Fi to cellular (MOBIKE).
Scenario
Remote users' laptops sit behind home routers and switch networks often. IKEv2 suits them better than IKEv1 thanks to NAT traversal, MOBIKE and EAP authentication against RADIUS.
Common mistakes
- Mixing up the phases: Phase I authenticates and does key agreement; Phase II selects the IPsec ciphers.
- Thinking IKEv1 is designed for remote access. It needs an extra protocol for that.
Practical skills
- Describe the two IKE phases.
- Explain why IKEv2 suits remote-access VPNs.
What I should remember
- IKE: Negotiates IPsec keys and settings on UDP port 500.
- Security association: One-way set of agreed protection parameters.
- Phase 1: Peer authentication and secure channel.
- IKEv2: Current version with mobility and EAP support.