In IPsec VPN deployment, NAT traversal (NAT-T) is a critical mechanism used when one or both IPsec gateways are located behind a NAT device. Traditional ESP packets use IP protocol number 50 and do not contain TCP or UDP port numbers, which causes problems for NAT devices that rely on port information to maintain session mappings. As a result, ESP packets may be dropped by the NAT device.
During IKE negotiation, the two gateways detect whether a NAT device exists between them by exchanging NAT-detection payloads. If NAT is detected,NAT traversal is automatically enabled. When NAT-T is active, ESP packets are encapsulated insideUDP packetsso that they can traverse the NAT device successfully.
According to HCIP Datacom Campus Network security documentation, when ESP is encapsulated using NAT-T,both the source and destination UDP port numbers are set to 4500. UDP port 4500 is the standardized port reserved specifically for IPsec NAT traversal. This allows NAT devices to correctly track sessions and forward packets based on UDP port information.
Initially, IKE negotiations use UDP port 500. After NAT detection and NAT-T activation, subsequent IKE and ESP traffic switches toUDP port 4500. This encapsulation ensures compatibility with NAT environments while maintaining IPsec security.
Therefore, the correct value that enables ESP packets to pass through NAT devices is4500, which is a key operational detail in secure campus network VPN deployments.