IPsec
IPsec: IKEv2 Key Exchange and ESP TunnelInternet layer · OSI 3Encrypting IP packets with IKEv2 negotiation and ESP
| No. | Time | Source | Destination | Protocol | Info | Size |
|---|---|---|---|---|---|---|
| Play the first step to capture packets. | ||||||
Overview
encrypts entire IP packets between laptops and corporate gateways or between offices. negotiates algorithms and certificates first, then carries encrypted traffic.
IKEv2 (RFC 7296) establishes Security Associations over UDP port 500 and shifts to UDP 4500 when NAT is detected (RFC 3948) so ESP (RFC 4303, IP protocol 50) passes home routers intact.
Key facts
- Layer
- Internet (OSI Layer 3)
- Control plane
- IKEv2 on UDP 500 -> UDP 4500
- Data plane
- ESP (IP proto 50 or UDP 4500)
- Auth options
- Certificates, EAP, pre-shared key
- Defined in
- RFC 7296, RFC 4303, RFC 3948
IKEv2 and ESP protected full IP packets
Four IKEv2 exchanges negotiated ciphers, spotted NAT to switch onto UDP port 4500, checked certificates, and launched directional ESP tunnels carrying encrypted IP packets.
IKE_SA_INIT (UDP 500), NAT-T shift (UDP 4500), authenticated IKE_AUTH, and bidirectional ESP Child SAs completed tunnel setup.
- Setup messages
- 4 IKEv2 packets (2 exchanges)
- NAT traversal
- UDP port 4500 (RFC 3948)
- Data tunnel
- Bidirectional ESP SPIs
- Assigned IP
- 10.8.0.2
Try it yourself
Check active IPsec Security Associations
On systems using strongSwan or native Windows IKEv2, print negotiated IKE/Child SAs.
netsh advfirewall monitor show mmsa