Two kinds of address
Public IP addresses are globally unique and routable across the internet. Private addresses are reserved ranges that anyone may reuse inside their own network. Routers on the public internet will not forward packets whose destination is a private address.
The reserved ranges
Three blocks are set aside for private use, and a host in one home network can share the exact same private address as a host in another:
- The ten dot block, a large slash eight.
- The one seventy two dot sixteen block through one seventy two dot thirty one.
- The one ninety two dot one sixty eight block, common on home routers.
Because they are not globally unique, private addresses must be translated before they reach the internet. That job belongs to NAT, network address translation, usually running on the edge router.
How NAT bridges them
The NAT router rewrites the private source address to its single public address and remembers the mapping in a table. Replies arrive at the public address, and the router uses the table to send each one back to the right private host. This conserves scarce public addresses while letting many devices share one.
Key idea
Private addresses are reusable and non routable, so NAT translates them to a shared public address to reach the internet.