Free tech learning for everyone, from basics to pro

Networking LabsLabsIntermediate

Lab: NAT and PAT to a simulated internet

In short: Network Address Translation (NAT) lets private addresses use public ones. In this lab you build a fake internet with documentation addresses, publish one internal server with static NAT, let the LAN browse with Port Address Translation (PAT), and read the translation table.

Aim and what you need

The aim is to see NAT working from both directions: inside users reaching an outside web server through one shared address, and outside users reaching one inside server through its own public address. The "internet" here is just another router in your simulator, so nothing leaves your lab.

  • Packet Tracer or your own lab: R1 (edge router), an ISP router, a switch, two PCs and two servers.
  • Addresses from the documentation ranges 203.0.113.0/24 and 198.51.100.0/24, which are reserved for examples and never used on the real internet.

Design

NAT and PAT labInside LAN192.168.10.0/24R1 insideG0/0R1 outside203.0.113.2/29ISP router203.0.113.1Web server198.51.100.10
Figure 1. R1 translates private inside addresses to its public outside address; the ISP router stands in for the internet.
DeviceAddressRole
R1 G0/0192.168.10.1/24inside, LAN gateway
R1 G0/1203.0.113.2/29outside, public link
ISP G0/0203.0.113.1/29provider router
ISP G0/1198.51.100.1/24"internet" LAN
Internal web server192.168.10.50published as 203.0.113.5
Outside web server198.51.100.10target for browsing
Static NAT versus PATStatic NATOne inside to one publicFixed, always presentLets outside reach a serverUses a public address eachPAT (overload)Many inside to one publicCreated on demandOutbound connections onlyTracks source ports
Figure 2. Static NAT publishes a server; PAT lets a whole LAN share one public address.

Steps

  1. Address all devices. The ISP router needs no routes to your private network: that is the point.
  2. On R1, add a default route to the ISP and mark the inside and outside interfaces.
  3. Create static NAT for the internal server.
  4. Create an access control list (ACL) matching the LAN and enable PAT on the outside interface.
! R1
ip route 0.0.0.0 0.0.0.0 203.0.113.1
interface g0/0
 ip nat inside
interface g0/1
 ip nat outside
exit
ip nat inside source static 192.168.10.50 203.0.113.5
access-list 1 permit 192.168.10.0 0.0.0.255
ip nat inside source list 1 interface g0/1 overload

If your provider gave you a small block, you could instead use a pool with overload. Here the interface address is enough.

Verify

From a PC, browse to http://198.51.100.10 (Desktop, Web Browser) and ping it. From the outside server, browse to http://203.0.113.5. Then read the table on R1. Success means you see dynamic entries with inside local 192.168.10.x and inside global 203.0.113.2 plus port numbers, and a permanent static entry for 192.168.10.50 to 203.0.113.5.

show ip nat translations
show ip nat statistics
clear ip nat translation *
debug ip nat
undebug all

Tip: use debug only in a lab or with great care; on a busy production router it can overload the CPU.

Troubleshooting and clean-up

  • No translations appear: ip nat inside and ip nat outside are swapped or missing.
  • Some hosts translate, others do not: the ACL does not match their subnet; check the wildcard mask.
  • Outside cannot reach the published server: the ISP router must reach 203.0.113.5. It does here because that address is inside its connected /29.
  • Ping works but web does not: check the server's HTTP service is on and its gateway is 192.168.10.1.

To clean up, remove the NAT statements with no ip nat inside source ... (you may need to clear translations first) and delete ACL 1. Remember that NAT is not a firewall: it hides addressing, but you still need filtering rules. The ACL lab adds that layer.

Practice

In NAT terms, what is the "inside global" address?
The public address that represents an inside host to the outside world, here 203.0.113.2 or 203.0.113.5.
How can PAT let many hosts share one address?
It tracks each session by source port number and rewrites ports where needed, so replies go back to the correct inside host.
Why does the ISP router not need a route to 192.168.10.0/24?
It never sees private addresses; R1 replaces them with 203.0.113.x before packets leave.

Key takeaways

  • Mark interfaces as ip nat inside or ip nat outside before anything works.
  • Static NAT maps one inside host to one public address, so outsiders can reach it.
  • PAT (overload) lets a whole LAN share one public address using ports.
  • Use documentation ranges such as 203.0.113.0/24 for lab internets.
  • Verify with show ip nat translations and statistics; NAT is not a firewall.
Tracks your learning on this device only. See your progress on the learning paths.

About the author

Mohamed Fayas

Founder of FM TecHub. CCNA certified, with a BTEC HND in Network Engineering, and BEng (Hons) in Computer Networking and Cloud Security. He writes practical, plain-English guides on networking, security and cloud.

More about the author

Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.

Stay up to date by email

New notes, tools and security news from FM TecHub, explained simply. Free.

We only use your email to send these updates. See our privacy policy.