This section provides an example for configuring NAT444.
Public IPv4 addresses of carrier A are insufficient. Therefore, private IPv4 addresses are allocated to users, and users also use private IP addresses. To enable these users to access the Internet, the users' private IP addresses need to be converted to the carrier's private IP addresses and then to public IP addresses, as shown in Figure 1.
Item |
Data |
|
|---|---|---|
CPE |
GE0/0/1 |
Security zone: Trust |
GE0/0/0 |
Security zone: Untrust |
|
NAT |
Translation mode: Easy IP Outbound interface: GE0/0/0 |
|
CGN |
GE0/0/1 |
Security zone: Trust |
GE0/0/0 |
Security zone: Untrust |
|
NAT |
Translation mode: NAPT Address pool: 1.1.1.11-1.1.1.20 |
|
Configure the PC address and specify a gateway. The configuration methods of PC addresses and routes vary with the PC operating systems. Therefore, the configuration methods are not described here.
Choose and check Matching Count.


Choose and check Matching Count.


The CPE configuration script is as follows:
# sysname CPE # interface GigabitEthernet0/0/0 ip address 10.1.1.1 255.255.255.0 # interface GigabitEthernet 0/0/1 ip address 192.168.0.1 255.255.255.0 # firewall zone trust set priority 85 add interface GigabitEthernet 0/0/1 # firewall zone untrust set priority 5 add interface GigabitEthernet0/0/0 # ip route-static 0.0.0.0 0.0.0.0 10.1.1.2 # security-policy rule name policy_sec_1 source-zone trust destination-zone untrust source-address 192.168.0.0 24 action permit # nat-policy rule name policy_nat_1 source-zone trust destination-zone untrust source-address 192.168.0.0 24 action source-nat easy-ip # return
The CGN configuration script is as follows:
# sysname CGN # interface GigabitEthernet0/0/0 ip address 1.1.1.1 255.255.255.0 # interface GigabitEthernet 0/0/1 ip address 10.1.2.1 255.255.255.0 # firewall zone trust set priority 85 add interface GigabitEthernet 0/0/1 # firewall zone untrust set priority 5 add interface GigabitEthernet0/0/0 # ip route-static 0.0.0.0 0.0.0.0 1.1.1.2 ip route-static 10.1.1.1 255.255.255.255 10.1.2.2 # nat address-group address_1 mode pat route enable section 0 1.1.1.11 1.1.1.20 # security-policy rule name policy_sec_1 source-zone trust destination-zone untrust source-address 10.1.1.0 24 action permit # nat-policy rule name policy_nat_1 source-zone trust destination-zone untrust source-address 10.1.1.0 24 action source-nat address-group address_1 # return