# Network Address Translation (NAT)

> A trick in the router. It lets many devices share one public address.

**Field:** Infrastructure  
**Category:** Networking  
**Also known as:** NAT, IP Masquerading, Port Address Translation

## Think of it like

It is like the front desk of a school. All the mail goes out with the school address. The desk gives each reply to the right person.

## Definition

Network address translation, or NAT, swaps one IP address for another as packets pass a router. At home, all your devices have private addresses. When their packets go out, the router puts its one public address on them. It keeps a table of who asked for what. When answers come back, it hands each one to the right device.

## Example

Emma's phone, laptop and TV all browse at once. To the outside world, all three look like one address, the router's.

## Why it matters

NAT is a big reason the internet still works on IPv4. It also hides home devices from strangers by default.

## Common mistake

Treating NAT as a firewall. It blocks unasked traffic as a side effect, not by rule, so a real firewall is still needed.

## Three principles

- **Swaps addresses.** Private inside, public outside.
- **Keeps a table.** It remembers who asked.
- **Shares one.** Many devices, one public address.

## Related terms

- [Private IP Address](https://learn.benibix.com/term/infrastructure/private-ip-address)
- [Public IP Address](https://learn.benibix.com/term/infrastructure/public-ip-address)
- [Router](https://learn.benibix.com/term/infrastructure/router)
- [Firewall](https://learn.benibix.com/term/infrastructure/firewall)
- [Network Port](https://learn.benibix.com/term/infrastructure/port)

## Taught in

- [Private IPs, NAT and DHCP](https://learn.benibix.com/learn/infrastructure-networking/private-ips-nat-and-dhcp): Computer Networking, 4/13

![Inside a home network marked 192.168.1.0/24, three devices hold private addresses that the router handed out. One laptop has a small loop marked 127.0.0.1 that turns back on itself. At the router, the private addresses are swapped for one public address, 203.0.113.7, which is the only address the internet sees.](https://learn.benibix.com/diagrams/inf2-addresses.svg)

---

Source: https://learn.benibix.com/term/infrastructure/network-address-translation
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
