background image
344 Chapter 11: Scaling IP Addresses with NAT
Again, the successful CCNP candidate should review each of the configurations presented.
While reviewing the configurations here, it can be helpful to identify each of the four elements
in the configurations.
Simple Dynamic NAT Configuration
The simplest form of configuration is a one-to-one translation in which the IP address of the
Inside Local address in the network header is replaced by an Inside Global address. The
replacement can be done statically or dynamically. Example 11-1 shows a simple NAT
translation with the assignments done dynamically.
The access list defines what addresses to translate using the permit statement. The two key
commands are ip nat pool and ip nat inside. The ip nat pool statement can be read as:
ip nat uses the pool called simple-nat-pool, which has the addresses 123.123.123.1--
123.123.123.254 and which uses a network mask of 255.255.255.0.
Each address that matches the criteria stipulated by the access list can use the pool of addresses
specified in the previous statement. To decide which addresses are to be translated, the ip nat
inside (or outside) statement is used. This statement can be read as:
ip nat, if an interface is declared as inside, and the source address of a packet matches the
access-list 1, then use the pool called my-natpool to replace the IP address when the
traffic destination is located beyond an interface that has been declared outside.
Example 11-1
Simple NAT Translation
!define what addresses are to be converted
access-list 1 permit 10.0.0.1 0.0.0.255
!define the pool of addresses to use for translation and
!what interfaces and addresses to use
ip nat pool simple-nat-pool 123.123.123.1 123.123.123.254 netmask 255.255.255.0
ip nat inside source list 1 pool simple-nat-pool
!declare inside interfaces
interface e0
ip address 10.0.0.1 255.255.255.0
ip nat inside
!declare outside interface
interface s0
ip address 144.144.144.1 255.255.255.0
ip nat outside