NAT IP pools are a range of IP addresses that are allocated for NAT translation as needed. To define a pool, the configuration command is used:
IP-NAT-пул <имя> <start-ip> <end-ip> {netmask <netmask> | prefix-length <prefix-length>} [type {rotary}]
Example 1
The following example translates between inside hosts addressed from either the 192.168.1.0 или 192.168.2.0 network to the globally unique 10.69.233.208/28 network:
ip nat pool net-208 10.69.233.208 10.69.233.223 prefix-length 28 ip nat inside source list 1 pool net-208 ! interface ethernet 0 ip address 10.69.232.182 255.255.255.240 ip nat outside ! interface ethernet 1 ip address 192.168.1.94 255.255.255.0 ip nat inside ! access-list 1 permit 192.168.1.0 0.0.0.255 access-list 1 permit 192.168.2.0 0.0.0.255
Example 2
In the following example, the goal is to define a virtual address, connections to which are distributed among a set of real hosts. The pool defines the addresses of the real hosts. The access list defines the virtual address. If a translation does not already exist, TCP packets from serial interface 0 (the outside interface) whose destination matches the access list are translated to an address from the pool.
ip nat pool real-hosts 192.168.15.2 192.168.15.15 prefix-length 28 type rotary ip nat inside destination list 2 pool real-hosts ! interface serial 0 ip address 192.168.15.129 255.255.255.240 ip nat outside ! interface ethernet 0 ip address 192.168.15.17 255.255.255.240 ip nat inside ! access-list 2 permit 192.168.15.1