ip nat pool [name] [start-ip] [end-ip] netmask [mask]
Defines a pool of global IP addresses for dynamic NAT or PAT translation, used when translating multiple inside addresses to a range of outside addresses.
Definition: ip nat pool [name] [start-ip] [end-ip] netmask [mask] is a Cisco IOS global config command. Defines a pool of global IP addresses for dynamic NAT or PAT translation, used when translating multiple inside addresses to a range of outside addresses.
Overview
The `ip nat pool` command is a cornerstone of dynamic Network Address Translation (NAT) and Port Address Translation (PAT) configurations on Cisco IOS routers. It defines a contiguous range of global (outside) IP addresses that can be dynamically assigned to inside hosts when they initiate traffic to external networks. This command is essential for conserving public IPv4 addresses, as it allows multiple internal devices to share a smaller pool of external addresses, typically through PAT (also known as NAT overload).
The concept behind it is straightforward: internal hosts use private IP addresses (e.g., 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) that are not routable on the public internet. When a host sends traffic to an external destination, the router translates the source IP address (and often port) to one from the defined pool. The pool is referenced in a dynamic NAT rule using `ip nat inside source list <acl> pool <pool-name>`.
Without this command, you would need to configure static NAT entries for each internal host, which is impractical for large networks. Alternatively, you could use a single interface IP address for PAT with `ip nat inside source list <acl> interface <interface> overload`, which is simpler but offers less flexibility in address assignment. The `ip nat pool` command is typically used when you have a dedicated block of public IP addresses (e.g., from your ISP) and want to distribute them among internal users.
It fits into the broader NAT configuration workflow: first, define the pool; second, create an access list to identify which inside addresses are eligible; third, apply the translation rule under global config; and finally, designate inside and outside interfaces with `ip nat inside` and `ip nat outside`. Important IOS behaviors: the pool is stored in the running configuration and persists across reloads if saved. There is no buffered output; the command either succeeds or returns an error (e.g., overlapping addresses).
Privilege level 15 (privileged EXEC) is required to enter global configuration mode. The pool name is case-sensitive and must match exactly when referenced. If the pool is exhausted, new translations are dropped unless PAT is enabled (via the `overload` keyword in the NAT rule).
The netmask defines the subnet of the pool; all addresses in the range must belong to the same subnet. A common mistake is using a netmask that does not encompass the start and end IPs, or forgetting to include the `overload` keyword when PAT is intended. This command is fundamental for CCNA and CCNP candidates to understand, as NAT is a core topic in both certifications and a daily reality for network engineers managing internet connectivity.
ip nat pool [name] [start-ip] [end-ip] netmask [mask]When to Use This Command
- Translating a private LAN (e.g., 192.168.1.0/24) to a public IP range for internet access
- Providing a pool of addresses for a small office with multiple public IPs from ISP
- Configuring overload (PAT) with a pool of addresses for many internal users
- Reserving a specific range for NAT translations in a DMZ scenario
Parameters
| Parameter | Syntax | Description |
|---|---|---|
| name | WORD (1-64 characters) | A descriptive name for the NAT pool. This name is referenced in the `ip nat inside source list <acl> pool <name>` command. It must be unique on the router. Common mistakes include using spaces or special characters (only alphanumeric and hyphens/underscores are safe). |
| start-ip | A.B.C.D | The first IP address in the pool. This must be a valid unicast address and belong to the same subnet as defined by the netmask. It is typically a public IP address provided by your ISP. Ensure this address is not already in use elsewhere on the network. |
| end-ip | A.B.C.D | The last IP address in the pool. The range from start-ip to end-ip must be contiguous and within the same subnet. The total number of addresses is (end-ip - start-ip + 1). A common mistake is specifying an end-ip that is outside the subnet defined by the netmask. |
| netmask | A.B.C.D | The subnet mask for the pool, in dotted decimal format (e.g., 255.255.255.0). This defines the network and broadcast addresses. All addresses in the pool must belong to this subnet. The router will reject the command if the start-ip or end-ip is not within the subnet. Common mistake: using a mask that is too large (e.g., /24 when the pool only covers a /28 range) – while allowed, it may cause confusion. |
Command Examples
Basic NAT Pool for Dynamic Translation
ip nat pool MYPOOL 203.0.113.10 203.0.113.20 netmask 255.255.255.0This command creates a pool named MYPOOL with addresses from 203.0.113.10 to 203.0.113.20 using a 24-bit netmask. The pool is then referenced in an access-list-based dynamic NAT rule.
NAT Pool with Overload (PAT)
ip nat pool MYPOOL 203.0.113.10 203.0.113.20 netmask 255.255.255.0Same pool definition; when used with 'ip nat inside source list 1 pool MYPOOL overload', it allows multiple inside hosts to share the pool addresses using port numbers.
Understanding the Output
This command does not produce output on its own; it defines a pool. To verify, use 'show ip nat pool' or 'show ip nat translations'. In 'show ip nat pool', you'll see pool name, start/end IP, netmask, type (generic), and total addresses.
Good values show correct range and mask; bad values include overlapping pools or incorrect mask. In 'show ip nat translations', you'll see inside local/global and outside local/global mappings using pool addresses.
Configuration Scenarios
Dynamic NAT with a Pool of Public IPs for Branch Office
A branch office has a /28 public IP block (203.0.113.16/28) and 10 internal hosts using private IPs (192.168.1.0/24). The goal is to translate internal traffic to the public pool dynamically without PAT, so each internal host gets a unique public IP when accessing the internet.
Topology
Branch_Router(Gi0/0)---192.168.1.0/24---Internal_Hosts
Branch_Router(Gi0/1)---203.0.113.17/28---ISPSteps
- 1.Step 1: Enter global configuration mode: configure terminal
- 2.Step 2: Define the NAT pool with the public IP range: ip nat pool BRANCH_POOL 203.0.113.18 203.0.113.30 netmask 255.255.255.240
- 3.Step 3: Create an access list to match internal traffic: access-list 10 permit 192.168.1.0 0.0.0.255
- 4.Step 4: Apply dynamic NAT rule: ip nat inside source list 10 pool BRANCH_POOL
- 5.Step 5: Designate inside interface: interface GigabitEthernet0/0; ip nat inside
- 6.Step 6: Designate outside interface: interface GigabitEthernet0/1; ip nat outside
! ip nat pool BRANCH_POOL 203.0.113.18 203.0.113.30 netmask 255.255.255.240 access-list 10 permit 192.168.1.0 0.0.0.255 ip nat inside source list 10 pool BRANCH_POOL ! interface GigabitEthernet0/0 ip address 192.168.1.1 255.255.255.0 ip nat inside ! interface GigabitEthernet0/1 ip address 203.0.113.17 255.255.255.240 ip nat outside !
Verify: Use 'show ip nat translations' to see active translations. Expected output shows inside local IP (192.168.1.x) mapped to inside global IP (203.0.113.18-30). Use 'show ip nat statistics' to see pool usage.
Watch out: Without the 'overload' keyword, if the pool is exhausted (e.g., 13 internal hosts try to access the internet simultaneously), new translations will fail. Ensure the pool size matches the number of concurrent internal hosts.
PAT (NAT Overload) Using a Pool of Public IPs for a Large Office
A large office has 200 internal hosts but only 5 public IPs (209.165.200.225/29). The goal is to allow all internal hosts to share the pool using PAT, where the router translates both IP and port to multiplex connections.
Topology
Core_Router(Gi0/0)---10.0.0.0/8---Internal_Hosts
Core_Router(Gi0/1)---209.165.200.225/29---ISPSteps
- 1.Step 1: Enter global configuration mode: configure terminal
- 2.Step 2: Define the NAT pool: ip nat pool OFFICE_POOL 209.165.200.226 209.165.200.230 netmask 255.255.255.248
- 3.Step 3: Create an access list to match all internal traffic: access-list 100 permit ip 10.0.0.0 0.255.255.255 any
- 4.Step 4: Apply dynamic NAT rule with overload: ip nat inside source list 100 pool OFFICE_POOL overload
- 5.Step 5: Designate inside interface: interface GigabitEthernet0/0; ip nat inside
- 6.Step 6: Designate outside interface: interface GigabitEthernet0/1; ip nat outside
! ip nat pool OFFICE_POOL 209.165.200.226 209.165.200.230 netmask 255.255.255.248 access-list 100 permit ip 10.0.0.0 0.255.255.255 any ip nat inside source list 100 pool OFFICE_POOL overload ! interface GigabitEthernet0/0 ip address 10.0.0.1 255.0.0.0 ip nat inside ! interface GigabitEthernet0/1 ip address 209.165.200.225 255.255.255.248 ip nat outside !
Verify: Use 'show ip nat translations' to see translations with port numbers. Use 'show ip nat statistics' to see total active translations and pool usage. Expected: many inside hosts sharing the same inside global IP with different ports.
Watch out: PAT uses port numbers to differentiate connections, so protocols that do not use ports (e.g., GRE, IPsec) may fail. Also, ensure the access list does not inadvertently match traffic that should not be translated (e.g., traffic to internal servers).
Troubleshooting with This Command
When troubleshooting NAT pool issues, the primary commands are `show ip nat translations` and `show ip nat statistics`. Healthy output from `show ip nat translations` shows active translations with inside local, inside global, outside local, and outside global addresses. For PAT, you will see multiple inside local addresses mapped to the same inside global IP but with different port numbers.
Problem indicators include: no translations at all (suggests ACL not matching or interfaces not correctly designated), translations stuck in '---' state (incomplete), or pool exhaustion (no available addresses). Focus on the 'inside global' column: if it shows an address not in your pool, you may have a misconfiguration or overlapping pool. The 'idle' timer indicates how long the translation has been unused; if many are old, consider clearing them with `clear ip nat translation *`.
In `show ip nat statistics`, check the 'Pool' section: 'total addresses' should match your pool size, 'allocated' should be less than total, and 'misses' should be zero. A high 'misses' count indicates packets that could not be translated due to pool exhaustion or ACL mismatch. Common symptoms: users unable to access the internet – first verify the ACL with `show access-lists` to see if matches increment.
If matches increment but no translations appear, check that the pool is correctly defined and that the inside/outside interfaces are set. Use `debug ip nat` with caution in production to see real-time translations; look for 'NAT: translating' messages. Correlate with `show ip interface brief` to ensure interfaces are up and have correct IP addresses.
If using PAT, verify that the `overload` keyword is present in the NAT rule. Another common issue is the pool subnet overlapping with the outside interface subnet; the pool addresses must be different from the interface IP. Step-by-step diagnostic flow: 1) Verify interface NAT designations with `show ip nat statistics`. 2) Check ACL matches with `show access-lists`. 3) Check pool definition with `show running-config | include ip nat pool`. 4) View active translations. 5) If no translations, clear counters and generate test traffic. 6) If pool exhausted, consider increasing pool size or using PAT. 7) If using PAT and still failing, check for port exhaustion with `show ip nat statistics | include extended`.
Remember that NAT pool commands are global and affect all traffic matching the ACL; ensure the ACL is specific enough to avoid translating unwanted traffic.
CCNA Exam Tips
Remember that the netmask defines the range; the start and end IPs must be within the same subnet.
For PAT (overload), the pool can be smaller than the number of inside hosts; each translation uses a unique port.
The pool name is case-sensitive and must match exactly in the NAT rule.
If the pool is exhausted, new translations fail; 'show ip nat statistics' shows hits/misses.
Common Mistakes
Using a netmask that doesn't match the start/end IP range (e.g., start 10.0.0.1, end 10.0.0.10 with /24 is fine, but with /28 it's invalid)
Forgetting to apply the pool to an access list or inside/outside interfaces
Typo in pool name between definition and usage
ip nat pool [name] [start-ip] [end-ip] netmask [mask] vs ip nat inside source list [acl] interface [intf] overload
Both commands are used in dynamic NAT configurations and are often confused because they both translate multiple inside addresses to outside addresses, but they differ in address allocation: one uses a pool of global addresses, the other uses a single interface IP with port overload (PAT).
| Aspect | ip nat pool [name] [start-ip] [end-ip] netmask [mask] | ip nat inside source list [acl] interface [intf] overload |
|---|---|---|
| Address Allocation | Defines a range of global IPs for translation | Uses the interface IP address for all translations |
| Port Address Translation | Supports PAT when used with overload keyword | Implicitly uses overload (PAT) by design |
| Configuration Mode | Global configuration mode | Global configuration mode |
| Dependency | Used with ip nat inside source list ... pool ... [overload] | Directly tied to the access list and interface |
| Typical Use | When multiple public IPs are available for load distribution | When only one public IP is available (common in small offices) |
Use ip nat pool [name] [start-ip] [end-ip] netmask [mask] when you have a range of public IP addresses and need to allocate them dynamically to inside hosts, optionally with PAT.
Use ip nat inside source list [acl] interface [intf] overload when you have only one public IP address on an interface and need to translate many inside private IPs using port numbers.
Platform Notes
In IOS-XE (e.g., Catalyst 9000 switches, ISR 4000 series), the `ip nat pool` command syntax is identical to classic IOS. However, IOS-XE uses a modular QoS and feature set; ensure the 'ip nat' feature is enabled under the license. Output from `show ip nat translations` may include additional fields like 'Protocol' and 'Flags'.
In NX-OS (Cisco Nexus switches), NAT configuration is different. The equivalent command is `ip nat pool <name> <start-ip> <end-ip> netmask <mask>`, but NX-OS uses a different configuration model: NAT is configured under a VRF context or globally with `ip nat` commands. For example, on Nexus 9000, you would use `ip nat pool POOL1 209.165.200.226 209.165.200.230 netmask 255.255.255.248` followed by `ip nat inside source list ACL pool POOL1 overload`.
However, NX-OS requires the 'feature nat' to be enabled first. On Cisco ASA firewalls, NAT is configured differently using object groups and `nat` commands; there is no direct `ip nat pool` equivalent. Instead, you define a 'global' pool using `global (outside) 1 <start-ip>-<end-ip> netmask <mask>`.
In IOS-XR (Cisco ASR 9000, CRS), NAT is not natively supported in the same way; it requires a separate service card or is not available. For IOS versions: In 12.x, the command is the same as in 15.x and 16.x. However, in 12.x, the `overload` keyword was optional and often omitted; in later versions, PAT is more common.
There are no significant syntax changes across versions. Always verify the exact syntax with `?` in the CLI. On some platforms, the pool name is limited to 32 characters.
The netmask parameter can also be entered in CIDR format (e.g., /28) in newer IOS versions, but dotted decimal is universally supported.
Related Commands
ip nat inside source list [acl] interface [intf] overload
Configures dynamic NAT overload (PAT) to translate multiple inside private IP addresses to a single public IP address using the interface's IP, based on an access list.
show ip nat statistics
Displays statistics about NAT translations, including active translations, hit counts, and configuration parameters, used to verify NAT operation and troubleshoot translation issues.
show ip nat translations
Displays the current active Network Address Translation (NAT) translations on the router, used to verify NAT operations and troubleshoot connectivity issues.
Practice for the CCNA 200-301
Test your knowledge with practice questions covering all CCNA 200-301 exam domains.
Practice CCNA 200-301 Questions