IPsec¶
IPsec(Internet Protocol Security)即互联网安全协议,在网络层保护IP数据报文。

IPsec是一系列协议的组合,包括IKE,ESP,AH等。
功能¶
- 保密性,对发送得数据进行加密。
- 完整性,通过计算报文特定字段得hash值,以判定报文是否被篡改。
- 可靠性,在IKE协商阶段对对方的身份进行认证。
- 防重放(Anti-replay ),防止恶意用户通过重复发送捕获到的数据包进行攻击,即接收方会拒绝旧的或重复的数据包(根据序列号判断)。
与其他加密协议对比¶
| 协议 | 在哪一层加解密 |
|---|---|
| IPsec | 网络层 |
| TLS | 传输层 |
| SSH | 应用层 |
实现方式¶
- 集成到TCP/IP协议栈,例如linux协议栈

- 在IP层和MAC层之间新增IPsec层

- 网络设备之间增加IPsec设备

流程预览¶

RFC¶
RFC 2367 - PF_KEY Key Management API, Version 2
RFC 2408 - Internet Security Association and Key Management Protocol (ISAKMP)
RFC 2409 - The Internet Key Exchange (IKE)
RFC 3329 - Security Mechanism Agreement for SIP Sessions
RFC 3947 - Negotiation of NAT-Traversal in the IKE
RFC 4109 - Algorithms for Internet Key Exchange version 1 (IKEv1)
RFC 4301 - Security Architecture for the Internet Protocol
RFC 4302 - IP Authentication Header
RFC 4303 - IP Encapsulating Security Payload (ESP)
RFC 4306 - Internet Key Exchange (IKEv2) Protocol
RFC 5996 - Internet Key Exchange Protocol Version 2 (IKEv2)
RFC 7296 - Internet Key Exchange Protocol Version 2 (IKEv2)
wiki¶
其他¶
Introduction to Cisco IPsec Technology - Cisco
ipsec体系结构及协议实现流程
CCIE Routing & Switching--IPsec
华为VPN
An Illustrated Guide to IPsec
Security