NETLEARN
Lesson 04Layer 3 · Network

NAT: Sharing a Public Address

Follow a connection as a router translates its source address and port, keeps a mapping, then uses that state to deliver the reply to the right device.

Layer
Network edge · IPv4
Reference
RFC 3022
Steps
4
Laptop192.168.1.10
Home routerNAT table
Web server198.51.100.20:443
legendrequestresponsemessage in flight

Common misunderstandings

  • NAT is address/port translation with state, not encryption and not a replacement for a firewall.
  • NAT is common in IPv4 networks but is not performed by every router or on every packet path.

Key notes

PAT / NAPT
Port translation lets many private flows share one public IPv4 address; implementations differ.
Inbound traffic
An unsolicited inbound connection usually has no mapping to identify an internal device; port forwarding or another mechanism is needed.
IPv6
IPv6's large address space reduces the need for address sharing, though firewalls and other translation designs still exist.