The NAT64 function allows an IPv6 client to proactively access an IPv4 server. In some usage scenarios, IPv4 users need to access an IPv6 server. IPv4 users, however, cannot access IPv6 hosts in NAT64 mode.
The internal server function in a NAT64 instance can solve this problem. By configuring the mapping between an IPv4 address and a pair of an IPv6 address and an IPv6 prefix on a NAT64 device, the NAT64 device translates the IPv4 address into an IPv6 address, which enables IPv4 hosts to access servers on the IPv6 network.
In Figure 1
, the internal server function is implemented for the NAT64 device to map 2001:db8:cafe::101:101 of an IPv6 host to 126.96.36.199 so that an IPv4 host can initiate a request to the IPv4 address of the IPv6 server.
Figure 1 NAT64 internal server scenario
In Figure 1, the implementation of the internal server function in a NAT64 instance is as follows:
- Static NAT64 conversion is configured on the NAT64 device. The NAT64 device generates a static NAT64 server mapping entry and a UNR.
- An IPv4 host sends a request to access an IPv6 server to the NAT64 device.
- The NAT64 device searches for a NAT64 entry that matches the request packet's destination IPv4 address, generates a flow table for the entry, converts the IPv4 address to the IPv6 address, and sends the packet to the IPv6 internal server.
- After receiving a response packet from the IPv6 side, the NAT64 device searches the flow table based on the packet information, converts the IPv6 address into the IPv4 address, and sends the packet to the IPv4 host.