跳到主要内容

3.1.2. Tunnel Mode (隧道模式)

在隧道模式下, "内部" IP 头部携带最终的 (IP) 源地址和目标地址, 而 "外部" IP 头部包含 IPsec "对等体" 的地址, 例如, 安全网关的地址。允许混合的内部和外部 IP 版本, 即, IPv6 over IPv4 和 IPv4 over IPv6。在隧道模式下, AH 保护整个内部 IP 数据包, 包括整个内部 IP 头部。隧道模式下 AH 相对于外部 IP 头部的位置与传输模式下 AH 的位置相同。下图说明了典型 IPv4 和 IPv6 数据包的 AH 隧道模式定位。

    ----------------------------------------------------------------
IPv4 | | | orig IP hdr* | | |
|new IP header * (any options) | AH | (any options) |TCP| Data |
----------------------------------------------------------------
|<- mutable field processing ->|<------ immutable fields ----->|
|<- authenticated except for mutable fields in the new IP hdr->|

--------------------------------------------------------------
IPv6 | | ext hdrs*| | | ext hdrs*| | |
|new IP hdr*|if present| AH |orig IP hdr*|if present|TCP|Data|
--------------------------------------------------------------
|<--- mutable field -->|<--------- immutable fields -------->|
| processing |
|<-- authenticated except for mutable fields in new IP hdr ->|

* = if present, construction of outer IP hdr/extensions and
modification of inner IP hdr/extensions is discussed in
the Security Architecture document.