Module 5.2 50 minIntermediate

NAT and PAT

NAT translates private RFC 1918 addresses to a public address so private hosts can reach the Internet. PAT (overload) is the variant that maps many private hosts onto a single public IP via port numbers — the configuration almost every home and small office uses.

Course plan — preview

What you'll learn

  • Compare static NAT, dynamic NAT, and PAT.
  • Identify the inside/outside interface roles.
  • Configure PAT on a router for an entire LAN.

Three flavours of NAT

All three rewrite addresses in packets as they cross one router, between a private network and a public one. They differ in how many public addresses they need and in which direction a connection may start. This chapter follows one packet through PAT, then covers how the router selects the hosts to translate, how ports keep flows apart, pools, static mappings, timeouts and the faults you will meet.

  • Static NAT — one private IP ↔ one public IP, permanent. Used for inbound services (e.g. publishing a server).
  • Dynamic NAT — pool of public IPs allocated on demand. Old-school, rarely used today.
  • PAT (NAT overload) — many private IPs share one public IP via unique source port numbers. Default for the Internet edge.

Inside vs outside interfaces

Each interface participating in NAT must be marked: 'ip nat inside' on the LAN side, 'ip nat outside' on the WAN side. The router applies translation on packets crossing between them.

The four address roles: 'inside' and 'outside' say which network the host belongs to; 'local' and 'global' say which side of the router you are standing on when you read the address. Inside local is the inside host's own configured address (10.0.0.10); inside global is the address it wears on the public side (203.0.113.2). Outside global is the outside host's real public address; outside local is how that host appears to inside hosts — the same value unless destination NAT is in play.

9 more sections in this chapter, plus a 4-question quiz and a hands-on lab.

Course plan

Modules 2–8 are part of the Course & Lab Pass and All-Access Max — start with a free account

You can see the title, summary, learning objectives and the opening sections. The rest of this chapter, like all of modules 2–8, comes with the Course & Lab Pass and All-Access Max. A free account opens Module 1: How Networks Work end-to-end and saves your labs — start there, no card required.

  • Read every chapter in Module 1 — How Networks Work
  • Save labs of up to 5 devices
  • Save up to 3 topologies
  • See the full course syllabus + chapter titles

Free account · no card required · compare plans any time

Build it step by step