← Lessons

quiz vs the machine

Gold1340

Networking

Private versus Public IP Addresses

Why private ranges exist and how NAT bridges them to the public internet.

4 min read · core · beat Gold to climb

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.

Check yourself

Answer to earn rating on the learn ladder.

1. Why can two home networks both use the same private address?

2. What does NAT do for private hosts?