Configuration Guide Configuring NAT
Configuration
Example
The following configuration example describes configuration related to static translation of outside source address.
Static Translation of Outside Source Address
Configure ip nat inside on the inside interface.
Configure ip nat outside on the outside interface.
Configure a rule for dynamic translation of inside source address.
Configure a rule for static translation of outside source address.
A# configure terminal
A(config)# interface GigabitEthernet 0/0
A(config-if-GigabitEthernet 0/0)# ip address 192.168.12.1 255.255.255.0
A(config-if-GigabitEthernet 0/0)# ip nat inside
A(config-if-GigabitEthernet 0/0)# exit
A(config)# interface GigabitEthernet 0/1
A(config-if-GigabitEthernet 0/1)# ip address 200.198.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
A(config)# ip nat outside source static 192.168.12.3 172.16.10.1
A(config)# ip route 172.16.10.0 255.255.255.0 200.198.12.2
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 172.16.10.1:23 168.168.12.3:23
Common Errors
The inside or outside interface is not configured.
The ACL configuration is incorrect.