This section describes how to configure dynamic NAT64 mapping. Dynamic NAT64 implements translation in either NAT64 address pool mode or port mode (hereafter referred to as easy IP mode). Dynamic NAT64 mapping is implemented when IPv6 hosts access an IPv4 network.
Before configuring dynamic NAT64 mapping, complete the following tasks:
Address pool-based dynamic NAT64 is implemented using NAT policies. The FW translates the IPv6 address with a specified NAT64 prefix in a packet of source IPv6 into an IPv4 address in the address pool.
You can also use the Easy IP mode. In this mode, NAT64 uses the source IPv4 address of the interface as the post-NAT IPv4 address. This mode saves IPv4 addresses.
interface interface-type { interface-number | interface-number.subinterface-number }
The interface in this command is the interface that connects the FW to the IPv6 network.
rule name rule_name
nat-type nat64
By default, all matching rules are "any." Only traffic that meets all configured rules can match the NAT64 policy.
Action |
Command |
|---|---|
Specify a source IPv6 address. |
source-address { address-set address-set-name &<1-6> | ipv4-address [ ipv4-mask-length | mask mask-address ] | ipv6-address ipv6-prefix-length | range { ipv4-start-address ipv4-end-address | ipv6-start-address ipv6-end-address } | mac-address &<1-6> | any } |
Specify a destination IPv6 address. |
destination-address { address-set address-set-name &<1-6> | ipv4-address [ ipv4-mask-length | mask mask-address ] | ipv6-address ipv6-prefix-length | range { ipv4-start-address ipv4-end-address | ipv6-start-address ipv6-end-address } | mac-address &<1-6> | any } |
Specify the source security zone to which an IPv6 intranet belongs. |
source-zone { zone-name &<1-6> | any } |
Specify the destination security zone to which an IPv4 network belongs. |
destination-zone zone-name |
Specify the type of service (ToS). The ToS field is carried in an IP header and describes the service type of a packet. |
service { service-name &<1-6> | any } |
firewall endpoint-independent filter enable
After the function is enabled, packets from IPv4 users to IPv6 users can match the destination server-map table. The FW performs NAT based on the destination server-map table and directly forwards the packets without querying security policies. If the function is disabled, the device applies the interzone packet filtering rules to filter the packets that pass the device.
Configure dynamic NAT64 mapping to enable NAT64 translation in address pool mode.
<FW> system-view [FW] nat64 prefix 3001:: 96 [FW] nat address-group pool_nat64 [FW-nat-address-group-pool_nat64] section 1 1.1.1.6 1.1.1.36 [FW-nat-address-group-pool_nat64] quit [FW] nat-policy [FW-policy-nat] rule name p_nat64 [FW-policy-nat-rule-p_nat64] nat-type nat64 [FW-policy-nat-rule-p_nat64] source-zone trust [FW-policy-nat-rule-p_nat64] destination-zone untrust [FW-policy-nat-rule-p_nat64] action source-nat address-group pool_nat64