Configuration Guide Configuring NAT
A(config-if-GigabitEthernet 0/0)# exit
A(config)# interface GigabitEthernet 0/1
A(config-if-GigabitEthernet 0/1)# ip address 200.168.12.1 255.255.255.0
A(config-if-GigabitEthernet 0/1)# ip nat outside
A(config-if-GigabitEthernet 0/1)# exit
A(config)# ip nat pool net200 200.168.12.2 200.168.12.100 netmask 255.255.255.0
A(config)# ip nat inside source list 1 pool net200
A(config)# access-list 1 permit 192.168.12.0 0.0.0.255
Use the show command to display the configuration.
Ruijie# show ip nat translations
Pro Inside global Inside local Outside local Outside global
tcp 200.168.12.200:2063 192.168.12.65:2063 168.168.12.1:23 168.168.12.1:23
Common Errors
The inside or outside interface is not configured.
The ACL configuration is incorrect.
10.4.2 Configuring NAPT
Networking
Requirements
In general, traditional NAT is one-to-one address mapping, which, however, cannot meet the requirements of all hosts in
intranets to communicate with extranets. For example, when the intranet is in short of global IP addresses or even does
not apply for global IP addresses but has only one global IP address to connect to an Internet Service Provider (ISP) while
a large number of hosts in the intranet need to access the Internet, NAPT is required in this scenario.
Multiple inside local addresses can map to one inside global address using NAPT.
Notes
At least one inside interface and one outside interface need to be configured for NAPT.
The newly configured NAT rules take effect on new flows only but not on any existing flows.
Configuration Steps
Configuring the NAT Inside Interface
Mandatory configuration.
Unless otherwise noted, the interface connecting intranet should be configured as the NAT inside interface.
Configuring the NAT Outside Interface
Mandatory configuration.
Unless otherwise noted, the interface connecting extranet should be configured as the NAT outside interface.
Configuring Static NAPT