// Lesson 34 of 49 · IP services
NAT and PAT
Network Address Translation rewrites IP addresses as packets cross a router. Its everyday job: let many hosts with private (RFC 1918) addresses share one or a few public addresses.

The four address names
| Term | Meaning | Example |
|---|---|---|
| Inside local | The inside host's real (private) address | 192.168.10.25 |
| Inside global | The address it appears as on the outside | 203.0.113.5 |
| Outside global | The external host's real address | 198.51.100.80 |
| Outside local | The external host as seen from inside (usually the same) | 198.51.100.80 |
Mark the interfaces
R1(config)# interface GigabitEthernet0/0
R1(config-if)# ip nat inside
R1(config)# interface GigabitEthernet0/1
R1(config-if)# ip nat outside
Forgetting ip nat inside / outside is the number one NAT mistake.
Static NAT — one to one
For a server that must be reachable from outside:
R1(config)# ip nat inside source static 192.168.10.50 203.0.113.10
! or only one port (port forwarding):
R1(config)# ip nat inside source static tcp 192.168.10.50 443 203.0.113.10 443
Dynamic NAT — a pool, one to one
R1(config)# access-list 10 permit 192.168.10.0 0.0.0.255
R1(config)# ip nat pool PUBLIC 203.0.113.20 203.0.113.29 netmask 255.255.255.240
R1(config)# ip nat inside source list 10 pool PUBLIC
When the pool is empty, new hosts cannot get out.
PAT (NAT overload) — many to one
PAT adds the source port to the translation, so thousands of inside hosts share one public address:
R1(config)# access-list 10 permit 192.168.0.0 0.0.255.255
R1(config)# ip nat inside source list 10 interface GigabitEthernet0/1 overload
This is what almost every internet edge router uses.
Verify
R1# show ip nat translations
Pro Inside global Inside local Outside local Outside global
tcp 203.0.113.5:51834 192.168.10.25:51834 198.51.100.80:443 198.51.100.80:443
--- 203.0.113.10 192.168.10.50 --- ---
R1# show ip nat statistics
R1# clear ip nat translation *
Test with traffic from an inside host — a ping from the router itself is not sourced from an inside interface unless you use ping 8.8.8.8 source g0/0.
Common faults
| Symptom | Cause |
|---|---|
| No translations at all | Missing ip nat inside/outside, or ACL does not match the inside hosts |
| Some hosts work, others not | ACL too narrow, or dynamic pool exhausted |
| Translations exist but no reply | No route back for the public address at the ISP side, or the outside ACL/firewall blocks it |
NAT also breaks protocols that embed addresses inside the payload, and hides the real source of connections — a reason IPv6 avoids it.
Key points
- Inside local = private address; inside global = public address it appears as.
- Mark
ip nat insideandip nat outside. - Static = 1:1 permanent; dynamic = from a pool; PAT/overload = many:1 using ports.
- Verify with
show ip nat translationswhile generating traffic from inside.
Sign in to save your lesson progress across devices. You can read every published lesson without an account.