LESSON PURPOSE Build a practical understanding of IPv4 Network Address Translation (NAT) and Port Address Translation (PAT), including how Cisco routers translate private inside addresses to globally routable addresses and how static mappings, dynamic address pools, and overload are configured, verified, and troubleshot. |
Lesson Overview
Enterprise networks commonly use private IPv4 addressing internally while Internet-facing traffic requires globally routable addressing. NAT changes IPv4 address information at a boundary router so inside devices can communicate with outside networks while preserving the internal addressing plan.
This lesson compares one-to-one Static NAT, temporary one-to-one Dynamic NAT using a public address pool, and PAT (NAT overload), where many inside hosts share one or a small number of public addresses by using unique Layer 4 port mappings. It also covers NAT terminology, inside/outside interface roles, translation-table behavior, verification, and common failure conditions.
Learning Objectives
• Explain why IPv4 NAT is used and distinguish address translation from normal routing and packet forwarding.
• Identify and interpret inside local, inside global, outside local, and outside global IPv4 addresses.
• Compare Static NAT, Dynamic NAT pools, and PAT/NAT overload, including the mapping behavior and common use case for each.
• Configure Cisco IOS interfaces with ip nat inside and ip nat outside in the correct traffic direction.
• Configure and verify a one-to-one inside-source Static NAT mapping.
• Configure Dynamic NAT by defining the inside source addresses, creating a global address pool, and binding the ACL to the pool.
• Configure PAT using either an outside-interface address or a NAT pool with the overload keyword.
• Explain how PAT distinguishes simultaneous sessions by using transport-layer port numbers and maintains entries in the NAT translation table.
• Verify operation with show ip nat translations, show ip nat statistics, ping, traceroute, and appropriate clear/debug commands when required.
• Troubleshoot common NAT/PAT problems including incorrect inside/outside placement, ACL mismatches, pool exhaustion, missing overload, routing/return-path issues, and stale translations.
CCNA ALIGNMENT — Supports CCNA-level IP services skills by covering inside-source NAT using static mappings and address pools, PAT/overload behavior, and the ability to interpret and verify translations on Cisco IOS. |
1. What is NAT?
Network Address Translation (NAT) lets a router or firewall rewrite the source and/or destination IP address (and often the port) of packets as they cross a boundary — typically between a private internal network and the public internet. NAT was originally developed to conserve public IPv4 addresses, but it also provides a degree of address-hiding and topology obscurity.
Three main flavors are covered here:
Type | Mapping | Address Ratio | Typical Use |
Static NAT | One private IP ↔ one fixed public IP | 1:1 | Servers that must be reachable from outside, such as web, mail, or VPN servers |
Dynamic NAT (Pool) | Private IP ↔ any available public IP from a pool | Many:Many (pool-limited) | Outbound access for a group of hosts sharing a limited public IP pool |
PAT (NAT Overload) | Many private IPs ↔ one public IP, differentiated by port numbers | Many:1 | Typical home/office Internet sharing where many devices use one public IPv4 address |
2. NAT Fundamentals and Why NAT Is Used
Network Address Translation (NAT) changes IPv4 address information as traffic crosses a NAT-capable device, most commonly an enterprise edge router or firewall. Inside-source NAT translates the source address of packets originating from an inside network before those packets are forwarded toward an outside network.
- Conserves public IPv4 addresses by allowing private RFC 1918 networks to communicate with public networks.
- Separates internal addressing from public-facing addressing, allowing enterprises to use private address plans internally.
- Provides predictable public mappings for selected inside services through static NAT.
- Allows temporary one-to-one public address allocation with dynamic NAT pools.
- Allows many simultaneous inside sessions to share one or a few public addresses through PAT (NAT overload).
|
Important: NAT is not a security policy by itself. A firewall/ACL still determines which traffic is permitted. NAT changes addresses and, with PAT, Layer 4 identifiers. |
Figure 2. NAT terminology and the inside/outside address perspectives.
3. NAT Address Terminology
|
Term |
Meaning |
Example |
|
Inside local |
Actual address assigned to the inside host; typically private. |
10.10.10.10 |
|
Inside global |
Address representing the inside host to the outside network. |
203.0.113.10 |
|
Outside global |
Actual globally routable address of the outside host. |
198.51.100.10 |
|
Outside local |
Address used to represent the outside host as seen from inside. Often equals outside global. |
198.51.100.10 |
Inside and outside are interface roles
Cisco IOS NAT uses `ip nat inside` and `ip nat outside` on interfaces to identify which side of the translation boundary traffic is entering or leaving. These commands do not create a translation by themselves; they define the NAT direction used by the translation rules.
Basic NAT interface roles
|
interface GigabitEthernet0/0 description INSIDE-LAN ip address 10.10.10.1 255.255.255.0 ip nat inside no shutdown ! interface GigabitEthernet0/1 description OUTSIDE-ISP ip address 203.0.113.2 255.255.255.0 ip nat outside no shutdown |
|
Memory aid: Local = address seen on the local side. Global = address meaningful in the global/outside context. Inside = the device being translated; outside = the remote endpoint. |
4. Static NAT - Concept and Use Cases
Static NAT creates a permanent one-to-one mapping. The translation exists even before traffic is generated, so the inside host can consistently appear as the same public IP address. This is commonly used for servers, appliances, or management endpoints that must be reachable through a stable public address.
Characteristics:
- 1:1, bidirectional mapping.
- Always active, whether or not traffic is flowing.
- Needed when a device must be initiated to from the outside (e.g., a public-facing server), since dynamic methods only work for traffic initiated from the inside.
- Consumes one public IP per mapped host — doesn't save address space, but adds a layer of address translation/hiding.
Figure 4. Static NAT provides a permanent one-to-one address mapping.
4.1 Static NAT configuration
|
R1(config)# interface GigabitEthernet0/0 R1(config-if)# ip nat inside R1(config-if)# exit R1(config)# interface GigabitEthernet0/1 R1(config-if)# ip nat outside R1(config-if)# exit R1(config)# ip nat inside source static 10.10.10.10 203.0.113.10 |
The command reads from left to right: translate the inside source address `10.10.10.10` to the inside-global address `203.0.113.10`. Return traffic sent to 203.0.113.10 is translated back to 10.10.10.10.
4.2 Static NAT - Verification and Packet Walk
Core verification
|
R1# show ip nat translations Pro Inside global Inside local Outside local Outside global --- 203.0.113.10 10.10.10.10 --- ---
R1# show ip nat statistics R1# show running-config | include ip nat |
Inside-to-outside packet walk
PC 10.10.10.10 sends a packet toward a public destination and forwards it to R1.
The packet enters an interface marked `ip nat inside`.
R1 matches the static mapping and changes source 10.10.10.10 to 203.0.113.10.
R1 updates affected checksums and forwards the packet out the `ip nat outside` interface.
The return packet addressed to 203.0.113.10 matches the permanent translation and is rewritten to 10.10.10.10.
|
Exam point: Static NAT uses one public address for one inside-local address. It does not multiplex many hosts behind one address unless static PAT/port forwarding is configured separately. |
5. Dynamic NAT Pools - Concept
Dynamic NAT automatically maps an inside-local private IPv4 address to an available inside-global public IPv4 address from a configured pool.
Unlike Static NAT, the mapping is not permanently assigned to a particular host. The NAT router creates the translation when traffic requires it and returns the public address to the available pool after the translation expires.
Characteristics:
- Many private hosts share a smaller set of public addresses — but only one host per public address at a time.
- Mapping is temporary — torn down after the NAT translation timeout (default varies, often 24 hours for TCP idle, less for UDP).
- Cannot support unsolicited inbound connections (no fixed address to target).
- If more hosts try to go out than there are pool addresses, connections fail until an address frees up.
Figure 5. Dynamic NAT allocates an available address from a public pool.
|
Capacity rule: Without overload, one active inside host requires one available pool address. If the pool is exhausted, new translations fail until addresses are freed. |
5.1 Dynamic NAT Pool - Configuration
|
R1(config)# interface GigabitEthernet0/0 R1(config-if)# ip nat inside R1(config-if)# exit R1(config)# interface GigabitEthernet0/1 R1(config-if)# ip nat outside R1(config-if)# exit ! R1(config)# ip nat pool PUBLIC_POOL 203.0.113.100 203.0.113.110 netmask 255.255.255.0 R1(config)# access-list 1 permit 10.10.10.0 0.0.0.255 R1(config)# ip nat inside source list 1 pool PUBLIC_POOL |
5.2 What each line does
|
Command |
Purpose |
|
ip nat pool PUBLIC_POOL ... |
Defines the usable inside-global address range. |
|
access-list 1 permit 10.10.10.0 0.0.0.255 |
Identifies inside-local sources eligible for NAT. |
|
ip nat inside source list 1 pool PUBLIC_POOL |
Binds the source match to the dynamic public pool. |
|
ip nat inside / ip nat outside |
Defines the direction of the NAT boundary. |
|
Critical point: The ACL used by "ip nat inside source list" is a classification ACL for NAT. It is not automatically filtering or permitting transit traffic like an interface ACL. |
5.3 Dynamic NAT - Translation Lifecycle and Verification
|
R1# show ip nat translations Pro Inside global Inside local Outside local Outside global --- 203.0.113.100 10.10.10.20 --- --- --- 203.0.113.101 10.10.10.21 --- ---
R1# show ip nat statistics R1# show access-lists 1 |
When an eligible host creates traffic, the router checks the NAT rule, reserves a free address from the pool, creates a translation entry, and reuses that mapping while it remains active. Dynamic entries age out when no longer needed according to NAT timers.
5.4 Pool exhaustion example
If a pool contains 11 addresses (.100 through .110), at most 11 simultaneous one-to-one dynamic host translations can exist at that moment. A twelfth new inside host cannot obtain an address until a pool entry is released. This limitation is one reason PAT is more common for user Internet access.
|
R1# clear ip nat translation * ! Clears dynamic translations. Use carefully in production because active sessions can be disrupted. |
6. PAT / NAT Overload - Concept
Port Address Translation (PAT), commonly called NAT overload, lets many inside sessions share a single inside-global IPv4 address. The router tracks each flow using protocol information and unique translated Layer 4 source ports. For ICMP, an identifier can be translated instead of a TCP/UDP port.
Characteristics:
- Many:1 — the most space-efficient form of NAT.
- Uses the transport-layer port number (16-bit field → theoretically up to ~65,536 concurrent sessions per public IP, practically fewer due to reserved ranges).
- The default/most common NAT mode for home routers and small-office internet edge devices.
- Like dynamic NAT, sessions are outbound-initiated only — no unsolicited inbound support without additional port-forwarding (static PAT) rules.
Figure 6. PAT multiplexes many inside sessions onto one public IP address.
6.1 How Nat Translattion Happens
|
Inside flow |
Translated flow |
|
10.10.10.10:49152 → 198.51.100.10:443 |
203.0.113.2:30001 → 198.51.100.10:443 |
|
10.10.10.11:49153 → 198.51.100.10:443 |
203.0.113.2:30002 → 198.51.100.10:443 |
|
10.10.10.12:49154 → 198.51.100.10:53 |
203.0.113.2:30003 → 198.51.100.10:53 |
6.2. PAT Using the Outside Interface Address
|
R1(config)# interface GigabitEthernet0/0 R1(config-if)# ip nat inside R1(config-if)# exit R1(config)# interface GigabitEthernet0/1 R1(config-if)# ip nat outside R1(config-if)# exit ! R1(config)# access-list 1 permit 10.10.10.0 0.0.0.255 R1(config)# ip nat inside source list 1 interface GigabitEthernet0/1 overload |
The keyword `overload` enables PAT. Instead of allocating a unique public IP to each inside host, IOS uses the outside interface address and differentiates simultaneous sessions by translated ports or identifiers.
Example PAT table
|
R1# show ip nat translations Pro Inside global Inside local Outside local Outside global tcp 203.0.113.2:30001 10.10.10.10:49152 198.51.100.10:443 198.51.100.10:443 tcp 203.0.113.2:30002 10.10.10.11:49153 198.51.100.10:443 198.51.100.10:443 |
|
CCNA focus: Be able to identify the inside-local, inside-global, outside-local, and outside-global columns and explain why multiple inside hosts can share one inside-global address. |
6.3 PAT Using a Public Address Pool
PAT can also overload a pool instead of the outside interface address. This is useful when an organization owns several public addresses and wants many sessions to share them while keeping the router interface address separate.
|
R1(config)# ip nat pool PAT_POOL 203.0.113.100 203.0.113.110 netmask 255.255.255.0 R1(config)# access-list 10 permit 10.20.20.0 0.0.0.255 R1(config)# ip nat inside source list 10 pool PAT_POOL overload |
With overload, each public address in the pool can support many translations. IOS selects addresses and translated ports as needed.
|
Do not confuse: Dynamic NAT pool without `overload` is one-to-one while active. A pool with `overload` is PAT and supports many sessions per public address. |
7. NAT/PAT Packet Processing - Step by Step
NAT and PAT operate at the network edge by translating IPv4 addressing information as traffic moves between the inside and outside networks.
Figure 7. Inside-to-outside packet-processing workflow.
Detailed sequence
1. Routing determines the intended egress path, and the packet crosses the NAT boundary from an inside interface toward an outside interface.
2. IOS checks applicable inside-source NAT rules. Static mappings are deterministic; dynamic/PAT rules use an ACL or route-map match.
3. The router obtains or creates a translation entry. Dynamic NAT allocates a pool address; PAT also chooses a unique translated port/identifier.
4. The source IP, and for PAT the Layer 4 source port/identifier, is rewritten. Relevant checksums are updated.
5. The packet is forwarded. The translation table is retained so returning packets can be mapped back to the original inside-local endpoint.
|
Forwarding note: NAT depends on routing. If the router has no route toward the outside destination or no return route to the translated public range upstream, NAT alone cannot make the session work. |
8. Static NAT vs Dynamic NAT vs PAT
|
Feature |
Static NAT |
Dynamic NAT Pool |
PAT / Overload |
|
Mapping |
Permanent 1:1 |
Temporary 1:1 |
Many:1 or many:few |
|
Public IP usage |
One per inside host |
One per active translated host |
Many sessions share each public IP |
|
Best use |
Published server / fixed identity |
Temporary host translation when public pool exists |
User Internet access / address conservation |
|
ACL required |
No for simple static mapping |
Yes, normally standard ACL |
Yes, normally standard ACL |
|
Port translation |
No (unless static PAT) |
No |
Yes |
|
Pool exhaustion |
Not applicable to fixed mapping |
Possible when all pool IPs are in use |
Much less likely; ports/session scale becomes the limit |
|
Decision rule: If the question says “one server always uses the same public IP,” think static NAT. If it says “borrow one of several public IPs,” think dynamic pool. If it says “many users share one public IP,” think PAT/overload. |
9. Routing, Return Traffic, and NAT Reachability
Successful NAT requires both translation logic and correct routing. The edge router must know how to reach the outside destination, and the upstream network must know how to return traffic to the inside-global address or pool.
For interface PAT, return traffic naturally targets the edge router outside-interface address.
For static NAT or a separate dynamic pool, the ISP/upstream router must route the public translated addresses toward the NAT router.
If the public range is directly connected to the outside segment, normal Layer 2 resolution may be sufficient; otherwise a static or dynamic route may be required upstream.
NAT does not replace a default route. The inside edge normally still needs a default route toward the ISP.
Typical routing checks
|
R1(config)# ip route 0.0.0.0 0.0.0.0 203.0.113.1 R1# show ip route 0.0.0.0 R1# show ip route 198.51.100.10 |
10. NAT Troubleshooting Workflow
Figure 10. A practical NAT troubleshooting sequence.
High-value faults
|
Symptom |
Likely cause |
Check / fix |
|
No translations appear |
Wrong inside/outside role or ACL does not match |
show run interface; show access-lists; verify source subnet |
|
Translation exists but no Internet response |
Routing or return path problem |
show ip route; verify ISP route / next hop |
|
Dynamic NAT works for some hosts only |
Pool exhausted |
show ip nat statistics; enlarge pool or use PAT |
|
PAT entry exists but app still fails |
Firewall, application, DNS, MTU, or upstream issue |
Verify connectivity beyond NAT; inspect policy/path |
|
Static public address not reachable inbound |
Upstream does not route/ARP for public mapping, or policy blocks traffic |
Verify upstream route/ARP and security policy |
11. Debugging and Clearing NAT State
Use debugging only when normal show commands are insufficient. NAT debugging can generate substantial output on a busy production router, so enable it briefly and disable it immediately after collecting the required evidence.
Basic NAT debug
|
R1# terminal monitor R1# debug ip nat ! generate test traffic R1# undebug all |
Clear translations - use with care
|
R1# clear ip nat translation * ! Clears dynamic/PAT translations and can interrupt active sessions. |
|
Safe workflow: First use `show ip nat translations`, `show ip nat statistics`, ACL counters, interface roles, and routing. Debug only after those checks narrow the problem. |
Quick knowledge check
1. Which NAT type should be used when an internal server must always appear as 203.0.113.10?
Answer: Static NAT.
2. What happens if a dynamic NAT pool has no free public addresses?
Answer: New eligible hosts cannot create a new dynamic translation until an address is released.
3. Which keyword enables PAT?
Answer: Overload.
4. A PAT entry exists but users still cannot reach the Internet. What should you check next?
Answer: Routing, return path, upstream reachability, and security policy in addition to NAT.
