< Home

Configuring a NAT64 Prefix

The FW performs NAT64 translation on an IPv6 packet when the IPv6 packet contains a NAT64 prefix.

Context

NAT64 prefixes have the following types:

  • Well-known prefix: 64:FF9B::/96. It exists by default.
  • Predefined prefix: The length can be 32, 40, 48, 56, 64, or 96.

Procedure

  1. Access the system view.

    system-view

  2. Set the prefix of NAT64.

    nat64 prefix prefix prefix-length

    • prefix-length indicates the length of the NAT64 prefix. The value can be 32, 40, 48, 56, 64, or 96. The prefix-length value determines the location where the IPv4 address is embedded to the IPv6 address. If an IPv4 address is 192.168.0.1 and the NAT64 prefix is 3000::/64, then the IPv6 address mapped to the IPv4 address is 3000:0000:0000:0000:00C0:A800:0100:0000, which can be abbreviated to 3000::C0:A800:100:0.
    • NAT64 prefix cannot be the same as the IPv6 address prefix of any interface on the device. Otherwise, the FW considers the packets with the destination IPv6 addresses being in the same network segment of the interface as NAT64 packets and starts the NAT64 packet processing process.
    • In case of multiple NAT64 prefixes:
      • If you apply a dynamic NAT64 mapping, all prefixes are available in NAT64 translation.
      • If you apply a static NAT64 mapping, the FW randomly selects a prefix from the list of prefixes.

    By default, no NAT64 prefix is configured. The NAT64 translation uses the well-known prefix 64:FF9B::/96.

Example

# Set two NAT64 prefixes, 3001::/96 and 2011::/64.

<FW> system-view
[FW] nat64 prefix 3001:: 96
[FW] nat64 prefix 2011:: 64

Follow-up Procedure

Run the display nat64 prefix command to verify the NAT64 prefixes.

<FW> display nat64 prefix
                                                                                
Total NAT64 Prefix number is 2                                                  
NAT64 Prefix Information:                                                       
--------------------------------------------                                    
Prefix                        Prefix_Length                                     
--------------------------------------------                                    
3001::                             96                                           
2011::                             64 
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
Next topic >