AH Transport and Tunnel Mode
Figure 9-10 compares AH Transport mode versus AH
Tunnel mode. In AH Transport mode, AH authentication and
integrity services protect the original IP packet by hashing the header fields
that don’t change in transit through the network, plus the data payload. Fields
like TTL aren’t included.
The AH header, which is the result of the hashing algorithm, is
inserted after the IP header and before the data payload (higher layer fields)
in the original packet. Because no encryption is involved, the IP header
destination address is readable by any Layer 3 device encountered in transit and
any fields, such as TTL, are still available for required changes. One advantage
of Transport mode is it only adds a few bytes to each packet.
In AH Tunnel mode, the entire original IP
header and data becomes the “payload” for the new packet: a new IP header
reflecting the end points of the VPN tunnel is added and the hash is performed
on the resulting packet. The new IP header is protected exactly the same as the
IP header in Transport mode. The fields that change in transit are excluded. The
hash result again becomes the AH header following the new IP header.
Remember, both AH methods provide sender authentication and
integrity verification that nothing in the data has been changed, but neither
mode prevents the information from being read by an eavesdropper or a packet
capture device.
A second, more serious concern is this: AH is incompatible with
NAT. This is an issue if NAT occurs after the AH packet has been built because
NAT changes the source IP address. This can cause the hash value stored in the
AH header not to match the one generated at the destination peer and cause the
packets to be rejected. This would always be a problem with AH Transport mode
because the host computer is the source and, therefore, NAT would have to occur
in transit. With planning, Tunnel mode would work if NAT were performed before
the AH packet was built, for example, if NAT was performed at the firewall and
IPSec at the perimeter router. Figure 9-11 shows how AH and NAT can be implemented
to work together.
AH
implementation to work with NAT