– Configure overload with a specific IP address
Router(config) # ip nat pool (pool_name) (ip_global_inside) (subnet mask)
Router(config) # ip nat inside source list (# ACL) pool (pool_name) overload
Router(config) # access-list (#ACL) permit (IP) (wildcard mask)
For example:
Router(config) # ip nat pool nat-pool2 179.9.8.20 255.255.255.240
Router(config) # ip nat inside source list 2 pools nat-pool2 overload
Router(config) # access-list 2 permit 10.0.0.0 0.0.0.255
– Configure overload using the output port address (More often used than the above case)
Router(config) # ip nat inside source list (#ACL) interface (output_port) overload
Router(config) # access-list (#ACL) permit (IP) (wildcard mask)
For example:
Router(config) # ip nat inside source list 3 interface serial 0 overload
Router(config) # access-list 3 permit 10.0.0.0 0.0.0.255
Apply: Use the following simple network:
This is the most frequently used form of NAT in IP networks. It uses the concept of translation “many-to-one” in which multiple connections from different internal servers are “multiplexed” into a single registered (public) IP address using different source ports.
This type of NAT allows up to 65,536 internal connections to be translated into one public IP. This type of NAT is useful in situations where the ISP assigns us only one public IP address, as shown on the diagram above.
All LAN IP addresses (192.168.1.0/24) will be translated using the router’s public IP (20.20.20.1).
Configuration:
interface FastEthernet0/0
ip address 20.20.20.1 255.255.255.0
ip nat outside
!
interface FastEthernet0/1
ip address 192.168.1.1 255.255.255.0
ip nat inside
!
access-list 1 permit 192.168.1.0 0.0.0.255
ip nat inside source list 1 interface FastEthernet0/0 overload
For details see here: Configure NAT and PAT on Cisco Router devices
Xem tiếp...