What Is an IP Address? Public vs Private Explained
IP Addresses: Your Device's Identity on the Network
An IP address is a numerical label assigned to every device connected to a computer network. It serves two essential purposes: identifying the device and providing its location within the network so data can be routed to and from it. Just as a postal address lets mail reach the right building, an IP address lets data packets reach the right device across the internet or a local network.
The most widely used version, IPv4, uses a 32-bit address space written as four numbers separated by dots, such as 203.0.113.25. Each number ranges from 0 to 255. This system provides roughly 4.3 billion unique addresses, which seemed abundant when it was designed in the 1980s but has since proven insufficient for the billions of devices now connected worldwide.
Public vs Private IP Addresses
Not all IP addresses are visible on the internet. Public IP addresses are globally unique and routable across the internet. Your internet service provider assigns your home or business a public IP address, and this is the address that websites and online services see when you connect to them. Every device directly accessible from the internet needs its own public address.
Private IP addresses are reserved for use within local networks and cannot be routed on the public internet. Three ranges are designated for private use:
- 10.0.0.0 to 10.255.255.255 (10.0.0.0/8) with over 16 million addresses
- 172.16.0.0 to 172.31.255.255 (172.16.0.0/12) with about 1 million addresses
- 192.168.0.0 to 192.168.255.255 (192.168.0.0/16) with about 65,000 addresses
Most home routers use the 192.168.x.x range, assigning addresses like 192.168.1.100 to your phone, laptop, and smart devices. These private addresses can be reused in millions of separate networks worldwide without conflict because they never appear on the public internet.
How NAT Bridges the Gap
Network Address Translation (NAT) is the technology that allows multiple devices with private IP addresses to share a single public IP address. Your home router performs NAT by maintaining a translation table that tracks which internal device initiated each outgoing connection. When a response comes back from the internet, the router consults this table and forwards the data to the correct private address.
NAT was originally a temporary solution to the IPv4 address shortage, but it became a permanent fixture of modern networking. It provides a basic layer of security because devices behind NAT are not directly accessible from the internet unless specific port forwarding rules are configured. However, NAT also complicates certain applications like peer-to-peer networking and online gaming that need direct inbound connections.
IPv4 vs IPv6
The exhaustion of available IPv4 addresses has driven the development and gradual adoption of IPv6, which uses 128-bit addresses. An IPv6 address looks quite different from IPv4, written as eight groups of four hexadecimal digits separated by colons, such as 2001:0db8:85a3:0000:0000:8a2e:0370:7334. This vastly larger address space provides approximately 340 undecillion unique addresses, enough for every grain of sand on Earth to have trillions of addresses.
IPv6 eliminates the need for NAT by giving every device a globally unique address. It also includes improvements like built-in security features, simpler header formats for faster routing, and better support for mobile devices. Despite these advantages, adoption has been gradual because IPv4 and IPv6 are not directly compatible, and organizations must run both protocols during the transition period.
Static vs Dynamic Addresses
IP addresses can be assigned statically or dynamically. A static IP address is manually configured and stays the same until someone changes it. Servers, printers, and network equipment typically use static addresses so other devices can always find them at a known location. A dynamic IP address is assigned automatically by a DHCP (Dynamic Host Configuration Protocol) server and may change periodically.
Most consumer internet connections use dynamic public IP addresses that change every few days or weeks. If you need a consistent public address for hosting a server or remote access, you can often request a static IP from your provider for an additional monthly fee. Alternatively, dynamic DNS services automatically update a domain name to point at your changing IP address, providing a stable way to reach your network without a static IP.
Finding Your IP Address
Knowing your IP address is useful for troubleshooting, setting up remote access, and verifying your VPN is working. Your private IP address can be found in your device's network settings. On Windows, the "ipconfig" command shows it. On Mac and Linux, "ifconfig" or "ip addr" displays it. Your public IP address is visible to any website you visit, and dedicated tools can show you what the outside world sees when you connect.
If your public IP address does not match what you expect, it could indicate that you are connected through a VPN, proxy, or that your ISP is using carrier-grade NAT, which adds another layer of address translation between your router and the internet. Understanding these layers helps you diagnose connectivity issues and configure services correctly. A quick way to see exactly what the outside world sees is to use a what is my ip tool, which displays your public address along with geolocation and ISP details.