How it works · 23 of 36 Core

What is NAT, and how do many devices share one IP address?

Many devices, one public address

NAT: The router swaps each device's private address for its own public one on the way out, and keeps notes so replies go to the right device.

Loading the animation…

Say it like this NAT lets many devices share one public address: the router rewrites each outgoing request with its own address and a port number, notes the swap in a table, and uses the table to send each reply back to the right device.

Under the hood — for builders
Real case: the standard's own example
The NAT standard's worked example is a small office: one public address from the provider, every desk on private 10.x.x.x addresses. One translation, copied from it:
How many conversations one address can hold
The router tells conversations apart by port number. A port is 16 bits, so one public address has room for tens of thousands at once:
How long a row lasts
A row that sees no traffic is wiped. The standard for NAT behaviour sets a floor and a recommendation for UDP rows:
Port forwarding
A row you add by hand, so outsiders can reach one home device: a camera, a game server. Every one is an open door.
Measure it
Your router's admin page often lists the live NAT table: each row is one device's conversation right now.
Watch out
If your provider puts you behind carrier NAT (100.64.x.x), port forwarding at home can't work at all.
Sources
RFC 3022 (Traditional NAT, §2.2). RFC 4787 (REQ-5). RFC 6335 (port ranges). RFC 6598 (100.64/10). Read 28 Nov 2026.

What happens in the NAT animation, step by step?

  1. Phone, laptop and TV have private addresses that only work inside your home. The router has the one public address the internet can reach.
  2. When the phone opens a site, the router swaps its private address and port for the public address and a fresh port, and writes the swap down.
  3. The reply comes back to the public address on that port. The router reads its table and passes the reply to the phone.
  4. Your turn: send something out from a device, or let a stranger knock from the internet.
  5. Rows don't last for ever: an idle one is wiped after a few minutes. That's also why outsiders can't start a conversation with a home device.
  6. The router swaps private addresses for its one public address and keeps track of who asked what. Next: what's the difference between a firewall and a VPN?

What everyday example explains NAT?

A building's front desk forwarding post to the right flat.

Why should a team care about NAT?

Explains why home devices can't be reached from outside without port forwarding.