Skip to content
We areTOP 1%

What are public and private IP addresses, and which IPv4 addresses are special?

EasyConceptIP Addressing & Subnetting
Track your progress
First attempt
Re-solve after a few days
Final pass before interviews

Answer

A public IP address is globally unique and reachable on the internet; it is allocated through internet service providers (ISPs). A private IP address is reserved for use inside homes and organisations: any network may reuse it, and it is never routed on the public internet.

  • Private ranges (RFC 1918): 10.0.0.0/8, 172.16.0.0/12 (172.16.0.0 to 172.31.255.255) and 192.168.0.0/16.
  • Devices with private addresses reach the internet through NAT (Network Address Translation), which replaces the private source address with the router's public address.
  • Special addresses: 127.0.0.1 is loopback (the host itself); 169.254.x.x is link-local, self-assigned when DHCP fails; 0.0.0.0 means "this host" or "any address". In every subnet, the first address is the network address and the last is the broadcast address, so neither is given to a host.

Example: At home, your laptop may have 192.168.1.7 and your phone 192.168.1.8 on the same Wi-Fi. A website you visit sees neither address. It sees only your router's single public address, such as 203.0.113.25, which the router shares between both devices using NAT.

More in IP Addressing & Subnetting

Sign in to track your progress

Your checkboxes, streak and activity heatmap are saved to your account and sync across devices. It is free.
Sign in with email

New here? Create an account