Master NAT and PAT โ the technologies that connect billions of private devices to the public internet through address reuse, port multiplexing, and dynamic translation tables.
The internet uses IPv4 addresses โ and there aren't enough to go around. NAT and PAT are engineering solutions that allow organizations to use private (non-routable) addresses internally while sharing a small pool of public addresses for internet access.
IPv4 provides only ~4.3 billion addresses. With billions of devices online, NAT extends the effective address space by allowing multiple private devices to share a single public IP.
NAT hides internal IP addresses from external networks, adding a layer of protection against direct targeting of internal hosts and reducing the attack surface.
Organizations can change ISPs without renumbering internal devices. The internal network remains stable; only the external (public) address changes at the NAT boundary.
Fewer public IP addresses are needed โ and registered IP addresses cost money. PAT allows thousands of hosts to share a single public IP, dramatically reducing costs.
Understanding NAT requires precise vocabulary. Cisco's implementation distinguishes four address types and three operational directions.
| Term | Location | Type | Example | Routable? |
|---|---|---|---|---|
| Inside Local | Inside network | Private | 192.168.1.10 | โ No |
| Inside Global | Outside perspective of inside host | Public | 203.0.113.1 | โ Yes |
| Outside Local | Inside perspective of outside host | Usually Public | 8.8.8.8 | โ Yes |
| Outside Global | Outside network | Public | 8.8.8.8 | โ Yes |
When an inside host initiates a session to an outside server, the NAT router intercepts the packet and performs translation:
When the outside server replies, it sends to 203.0.113.1:49152. The NAT router looks up this Inside Global address and port in its translation table, finds the mapping to 192.168.1.10:1024, replaces the destination with the Inside Local address, and forwards the packet to the internal host.
The NAT translation table (maintained in router memory) is the heart of NAT. Each entry maps an inside session to an outside representation.
| Protocol | Inside Local (Src) | Inside Global (Translated) | Outside Global (Dest) | State | Timeout |
|---|---|---|---|---|---|
| TCP | 192.168.1.10:1024 | 203.0.113.1:49152 | 93.184.216.34:80 | ESTABLISHED | 86400s |
| TCP | 192.168.1.11:2048 | 203.0.113.1:49153 | 93.184.216.34:443 | ESTABLISHED | 86400s |
| UDP | 192.168.1.12:1025 | 203.0.113.1:49154 | 8.8.8.8:53 | TRANSIENT | 300s |
| TCP | 192.168.1.10:3000 | 203.0.113.1:49155 | 151.101.1.140:443 | SYN_SENT | 120s |
PAT is the most common form of NAT in home and enterprise networks. It maps multiple Inside Local addresses to a single Inside Global address by using unique source port numbers to distinguish sessions.
TCP and UDP support 65,535 ports each. A single public IP can theoretically support over 65,000 simultaneous PAT sessions โ enough for any typical network.
| Inside Local IP | Local Port | โ | Inside Global IP | Global Port |
|---|---|---|---|---|
| 192.168.1.10 | 1024 | โ | 203.0.113.1 | 49152 |
| 192.168.1.11 | 1025 | โ | 203.0.113.1 | 49153 |
| 192.168.1.12 | 1026 | โ | 203.0.113.1 | 49154 |
| 192.168.1.13 | 2048 | โ | 203.0.113.1 | 49155 |
| All use the SAME public IP โ differentiated by unique port number | ||||
NAT operates in three distinct modes, each suited to different network requirements and administrative goals.
Static NAT creates a permanent, fixed mapping between one Inside Local address and one Inside Global address. The mapping exists whether or not any traffic is flowing.
Primary Use Case: Hosting servers that must be reachable from the internet โ web servers, mail servers, VPN concentrators, FTP servers.
| Inside Local | Inside Global |
|---|---|
| 10.0.0.10 | 203.0.113.10 |
| 10.0.0.11 | 203.0.113.11 |
| 10.0.0.12 | 203.0.113.12 |
ip nat inside source static 10.0.0.10 203.0.113.10
Dynamic NAT maps Inside Local addresses to Inside Global addresses from a configured address pool. Mappings are created on-demand when a host initiates traffic and removed after a timeout period.
Primary Use Case: Environments where internal hosts need occasional internet access and the pool is large enough to accommodate simultaneous users.
| Inside Local | Inside Global | Status |
|---|---|---|
| 192.168.10.1 | 203.0.113.20 | IN USE |
| 192.168.10.5 | 203.0.113.21 | IN USE |
| โ | 203.0.113.22 | AVAILABLE |
| โ | 203.0.113.23 | AVAILABLE |
| โ | 203.0.113.24 | AVAILABLE |
PAT extends dynamic NAT by using port numbers to differentiate sessions, allowing hundreds or thousands of internal hosts to share a single public IP address simultaneously.
Primary Use Case: Home routers, small business networks, enterprise access networks โ essentially every network that connects multiple devices through one ISP-assigned IP.
| Inside Local:Port | Inside Global:Port |
|---|---|
| 192.168.1.10:1500 | 203.0.113.1:49152 |
| 192.168.1.11:1500 | 203.0.113.1:49153 |
| 192.168.1.10:2000 | 203.0.113.1:49154 |
| 192.168.1.12:1500 | 203.0.113.1:49155 |
ip nat inside source list 1 interface g0/0 overload
| Feature | Static NAT | Dynamic NAT | PAT (Overload) |
|---|---|---|---|
| Mapping Type | 1:1 Fixed | 1:1 From Pool | Many:1 With Ports |
| Public IPs Required | 1 per host | 1 per concurrent host | 1 total (minimum) |
| Inbound Connections | โ Supported | โ Not supported | โ Not supported |
| Port Translation | No | No | Yes |
| Mapping Persistence | Permanent | Dynamic (timeout) | Dynamic (session) |
| Best For | Servers | Medium-size orgs | Home/SMB/Enterprise |
| Cisco IOS Keyword | static | pool | overload |
| RFC Reference | RFC 3022 | RFC 3022 | RFC 3022 / RFC 4787 |
Watch a live simulation of NAT/PAT in action. The simulator shows packet translation events, builds the translation table in real time, and illustrates the difference between outbound and inbound translation.
Construct a realistic NAT/PAT translation record by filling in the fields below. The builder generates both the original (pre-translation) and translated (post-translation) packet headers, highlighting what changes during NAT processing.
| Version (4) | IHL | DSCP/ECN | Total Length | ||||||||||||||||||||||||||||
| Identification | Flags | Fragment Offset | |||||||||||||||||||||||||||||
| TTL โก | Protocol | Header Checksum ๐ | |||||||||||||||||||||||||||||
| Source IP Address โ CHANGED by NAT ๐ | |||||||||||||||||||||||||||||||
| Destination IP Address (unchanged for outbound) | |||||||||||||||||||||||||||||||
| Source Port โ CHANGED by PAT ๐ | Destination Port (unchanged) | ||||||||||||||||||||||||||||||
Network administrators must be proficient in configuring NAT on Cisco routers. The following examples cover the three primary NAT configurations used in production environments.
ip nat insideip nat outsidetcp or udp and port numbersip nat inside source static tcp 10.0.0.10 80 203.0.113.10 80
overload to the NAT source command enables PAT. Without it, dynamic NAT is configured (one-to-one from pool).
Verify inside/outside interface designations. Check the ACL permits the source subnet. Confirm the route to the destination exists out the outside interface.
Dynamic NAT fails when the pool is full. Use show ip nat statistics to check "miss" count. Switch to PAT (overload) to fix the problem without adding IPs.
Old NAT entries can block new connections using the same port. Use clear ip nat translation * to flush the table. Tune timeout values with ip nat translation timeout.
Protocols like FTP, SIP, and H.323 embed IP addresses in the payload. NAT Application Layer Gateways (ALGs) must be enabled to handle these protocols correctly.
show ip interface brief) โ 2) Check ACL matches (show access-lists) โ 3) Inspect translation table (show ip nat translations) โ 4) Use debug (debug ip nat) โ 5) Check routing (show ip route)
A comprehensive reference of NAT/PAT terminology for certification exam preparation and professional reference.
overload keyword.Test your understanding of NAT and PAT concepts. Select the best answer for each question.