What is NAT and how does it conserve IP addresses?

· Category: Networking

Short answer

NAT translates private IP addresses inside a local network into one or more public IP addresses for internet communication. It allows many devices to share a single public IP.

How it works

When an internal device sends a packet outward, the NAT device replaces the private source IP with its public IP and records the mapping in a translation table. When the response returns, NAT reverses the process, forwarding the packet to the correct internal host.

Common types include: - Static NAT: One-to-one mapping for servers. - Dynamic NAT: Pools public IPs mapped on demand. - PAT (Port Address Translation): Many-to-one mapping using unique source ports.

Example

A home router with PAT allows a laptop, phone, and smart TV to browse the internet simultaneously, all appearing as the single public IP assigned by the ISP.

Why it matters

NAT dramatically slowed IPv4 exhaustion. It also adds a layer of obscurity since internal IP schemes are hidden from the public internet, though it is not a substitute for a firewall.