What is an IP Address? IPv4, IPv6, Public vs Private Explained
Every device connected to the internet has an IP address — a unique numerical label that identifies it on the network. It's the fundamental building block that makes all online communication possible, from loading a webpage to sending an email.
Table of Contents
- What is an IP Address?
- IPv4 — The Original Standard
- IPv6 — The Next Generation
- IPv4 vs IPv6 Comparison
- Public vs Private IP Addresses
- Static vs Dynamic IP Addresses
- How IP Communication Works
- Subnets & CIDR Notation
- NAT — How Multiple Devices Share One IP
- IP Geolocation — What Your IP Reveals
- Protecting Your IP Address
- How to Find Your IP Address
What is an IP Address?
An IP address (Internet Protocol address) is a unique numerical identifier assigned to every device connected to a computer network that uses the Internet Protocol for communication. Think of it as the mailing address for your device— without it, data wouldn't know where to go.
The Internet Protocol was defined by Vint Cerf and Bob Kahn in 1974 as part of the TCP/IP suite. IP addresses serve two primary functions:
- Host identification — Uniquely identifying a device on a network
- Location addressing — Providing a path for data to reach that device across interconnected networks
There are two versions of IP addresses in use today: IPv4 (the original, still dominant) and IPv6 (the newer standard designed to replace it).
IPv4 — The Original Standard
IPv4 (Internet Protocol version 4) has been the backbone of the internet since 1983. An IPv4 address is a 32-bit number written as four decimal numbers separated by dots, called dotted-decimal notation.
IPv4 Format: X.X.X.X (each X is 0–255)
Examples:
192.168.1.1 ← Private (home router)
8.8.8.8 ← Public (Google DNS)
10.0.0.1 ← Private (corporate network)
172.217.14.206 ← Public (google.com)
127.0.0.1 ← Loopback (localhost — your own machine)
Binary representation:
192.168.1.1 = 11000000.10101000.00000001.00000001
Each octet: 8 bits × 4 octets = 32 bits total
Total possible addresses: 2³² = 4,294,967,296 (~4.3 billion)While 4.3 billion addresses seemed like plenty in the 1980s, the explosion of internet-connected devices — smartphones, IoT devices, cloud servers — has completely exhausted the available pool. IANA allocated the last blocks of IPv4 addresses in 2011, which is why IPv6 was created.
IPv4 Address Classes
IPv4 addresses were originally divided into classes, though this system has largely been replaced by CIDR (Classless Inter-Domain Routing):
| Class | Range | Default Mask | Purpose |
|---|---|---|---|
| A | 1.0.0.0 – 126.255.255.255 | 255.0.0.0 | Large networks (16M hosts each) |
| B | 128.0.0.0 – 191.255.255.255 | 255.255.0.0 | Medium networks (65K hosts each) |
| C | 192.0.0.0 – 223.255.255.255 | 255.255.255.0 | Small networks (254 hosts each) |
| D | 224.0.0.0 – 239.255.255.255 | — | Multicast |
| E | 240.0.0.0 – 255.255.255.255 | — | Reserved / experimental |
IPv6 — The Next Generation
IPv6 (Internet Protocol version 6) was designed in the 1990s to solve IPv4 address exhaustion. It uses 128-bit addresses, providing an almost incomprehensibly large address space.
IPv6 Format: Eight groups of four hexadecimal digits, separated by colons
Full notation:
2001:0db8:85a3:0000:0000:8a2e:0370:7334
Simplified (drop leading zeros, :: replaces consecutive zero groups):
2001:db8:85a3::8a2e:370:7334
More examples:
::1 ← Loopback (localhost)
fe80::1 ← Link-local address
2606:4700:4700::1111 ← Cloudflare DNS
2001:4860:4860::8888 ← Google DNS
Address space:
128 bits = 2¹²⁸ = 340,282,366,920,938,463,463,374,607,431,768,211,456
≈ 340 undecillion addresses
≈ 667 quadrillion addresses per mm² of Earth's surfaceIPv6 doesn't just offer more addresses. It also includes improvements over IPv4:
- No more NAT — Every device can have a globally unique address, simplifying peer-to-peer connections
- Simplified headers — Faster routing because routers process less overhead
- Built-in IPsec — Encryption and authentication support is mandatory
- Auto-configuration — Devices can automatically generate their own IPv6 address (SLAAC)
- No broadcast — Uses multicast and anycast instead, reducing network noise
IPv4 vs IPv6 Comparison
| Feature | IPv4 | IPv6 |
|---|---|---|
| Address size | 32 bits | 128 bits |
| Address count | ~4.3 billion | ~340 undecillion |
| Format | Dotted decimal (192.168.1.1) | Colon-hex (2001:db8::1) |
| Header size | 20–60 bytes (variable) | 40 bytes (fixed) |
| NAT required? | Yes (address shortage) | No (enough addresses for all) |
| IPsec | Optional | Mandatory support |
| Auto-configuration | DHCP only | SLAAC + DHCPv6 |
| Adoption (2026) | Still dominant | ~45% of Google traffic |
Public vs Private IP Addresses
Not all IP addresses are visible on the public internet. The IP system distinguishes between public (routable on the internet) and private (used only within local networks) addresses.
Public IP Address
Your public IPis the address the rest of the internet sees. It's assigned by your Internet Service Provider (ISP) and is unique across the entire internet. When you visit a website, the server sees your public IP address.
Private IP Address
Your private IP is used within your local network (home, office). Your router assigns it via DHCP. These addresses are not routable on the public internet — they only work within your LAN.
Private IPv4 Ranges (RFC 1918):
10.0.0.0 – 10.255.255.255 (10.0.0.0/8) ← 16.7M addresses
172.16.0.0 – 172.31.255.255 (172.16.0.0/12) ← 1M addresses
192.168.0.0 – 192.168.255.255 (192.168.0.0/16) ← 65K addresses
Typical home network:
Router (gateway): 192.168.1.1 (private)
Your laptop: 192.168.1.100 (private)
Your phone: 192.168.1.101 (private)
Public IP (shared): 73.42.115.200 (public — assigned by ISP)
All devices share the same public IP via NAT.Special IP Addresses
| Address | Name | Purpose |
|---|---|---|
127.0.0.1 | Loopback | Refers to the local machine itself (localhost) |
0.0.0.0 | Unspecified | All interfaces / default route / "any address" |
255.255.255.255 | Broadcast | Send to all devices on the local network |
169.254.x.x | Link-local | Auto-assigned when DHCP fails (APIPA) |
::1 | IPv6 Loopback | IPv6 equivalent of 127.0.0.1 |
Static vs Dynamic IP Addresses
| Feature | Static IP | Dynamic IP |
|---|---|---|
| Assignment | Manually configured or permanently assigned | Automatically assigned by DHCP |
| Changes? | Never (unless manually changed) | May change on each connection or lease renewal |
| Cost | Usually extra cost from ISP | Included with standard service |
| Best for | Servers, remote access, DNS hosting | Home users, mobile devices, general browsing |
| Privacy | Easier to track (never changes) | Slightly harder to track (changes periodically) |
Most home internet connections use dynamic IPs — your ISP assigns you an IP from a pool, and it may change periodically (often lasting days or weeks between changes). Businesses typically pay for static IPs when they need to host servers or set up reliable VPN connections.
How IP Communication Works
When you load a webpage, here's what happens at the IP level:
You type: www.example.com
1. DNS resolves www.example.com → 93.184.216.34
2. Your computer creates an IP packet:
┌──────────────────────────────────────┐
│ Source IP: 73.42.115.200 │ (your public IP)
│ Destination IP: 93.184.216.34 │ (web server)
│ Protocol: TCP │
│ Payload: "GET / HTTP/1.1..." │
└──────────────────────────────────────┘
3. The packet travels across routers (hops):
Your PC → Router → ISP → Internet backbone → Server's ISP → Server
4. The server responds:
┌──────────────────────────────────────┐
│ Source IP: 93.184.216.34 │ (web server)
│ Destination IP: 73.42.115.200 │ (your public IP)
│ Protocol: TCP │
│ Payload: "<html>...</html>" │
└──────────────────────────────────────┘
5. Your router uses NAT to forward the response to
the correct device on your local network.Subnets & CIDR Notation
A subnet (subnetwork) is a logical subdivision of an IP network. The subnet mask determines which part of an IP address identifies the network and which part identifies the individual host.
IP Address: 192.168.1.100
Subnet Mask: 255.255.255.0
Binary:
IP: 11000000.10101000.00000001.01100100
Mask: 11111111.11111111.11111111.00000000
├── Network (24 bits) ──┤├ Host ─┤
Network address: 192.168.1.0 (the subnet itself)
Broadcast: 192.168.1.255 (send to all hosts in subnet)
Usable hosts: 192.168.1.1 – 192.168.1.254 (254 hosts)
CIDR Notation:
192.168.1.0/24 means "24 bits for network, 8 bits for hosts"
Common CIDR blocks:
/8 = 16,777,214 hosts (255.0.0.0)
/16 = 65,534 hosts (255.255.0.0)
/24 = 254 hosts (255.255.255.0)
/32 = 1 host (a single IP address)NAT — How Multiple Devices Share One IP
NAT (Network Address Translation) is the technology that allows your entire household — laptops, phones, tablets, smart TVs — to share a single public IP address. Your router performs NAT, translating between private and public addresses.
Private Network │ Internet
│
Laptop (192.168.1.100:54321) ──┐ │
Phone (192.168.1.101:49876) ──┤ │
Tablet (192.168.1.102:60123) ──┘ │
│ │
┌────┴────┐ │
│ Router │ NAT translates: │
│ (NAT) │ private ↔ public │
└────┬────┘ │
│ │
73.42.115.200 ───────────────── Internet
(public IP) │
Outgoing: 192.168.1.100:54321 → NAT → 73.42.115.200:12345
Incoming: 73.42.115.200:12345 → NAT → 192.168.1.100:54321NAT was originally a temporary fix for IPv4 exhaustion, but it's now deeply embedded in how the internet works. While NAT provides a layer of obscurity (devices behind NAT aren't directly reachable), it also complicates peer-to-peer applications, gaming, video calls, and server hosting.
IP Geolocation — What Your IP Reveals
Your public IP address can reveal a surprising amount about you. IP geolocation databases map IP addresses to approximate physical locations:
| Information | Accuracy | Details |
|---|---|---|
| Country | ~99% accurate | Almost always correct |
| Region / State | ~80% accurate | Usually correct for non-mobile connections |
| City | ~50-80% accurate | May show ISP hub city rather than your exact city |
| ISP / Organization | ~95% accurate | Identifies your internet provider |
| Exact street address | Not possible | Only your ISP knows this (with a legal request) |
Good to Know
IP geolocation cannot pinpoint your house or apartment. It typically identifies the general area where your ISP routes traffic from — often a nearby city. Websites use this data for content localization, ad targeting, fraud detection, and compliance with regional regulations.
Protecting Your IP Address
Since your IP address reveals your general location and ISP, you may want to protect it for privacy. Here are common methods:
| Method | How It Works | Trade-offs |
|---|---|---|
| VPN | Routes traffic through an encrypted tunnel to a VPN server; websites see the VPN server's IP instead of yours | Slight speed reduction; must trust VPN provider |
| Tor | Bounces traffic through 3+ relays worldwide; extremely difficult to trace back | Significantly slower; some sites block Tor exit nodes |
| Proxy server | Forwards requests through an intermediary server | Usually unencrypted; less reliable than VPN |
| Mobile data | Uses carrier's IP pool (CGNAT); IP changes frequently | Shared IP with other subscribers; data costs |
How to Find Your IP Address
There are different ways to find your public and private IP addresses:
Public IP (what the internet sees)
# Using our tool:
→ Visit webtoolsonline.org/tools/my-ip
# Command line:
curl ifconfig.me
curl ipinfo.io/ip
curl api.ipify.org
# PowerShell:
(Invoke-WebRequest -Uri "https://api.ipify.org").ContentPrivate IP (your local network address)
# Windows:
ipconfig
# macOS / Linux:
ifconfig
# or
ip addr show
# macOS quick:
ipconfig getifaddr en0Check Your IP Address Now
Use our free What Is My IP tool to instantly see your public IP address, geolocation, ISP, timezone, and more — no signup required.
Check My IP Address →References
- Postel, J. (1981). RFC 791 — Internet Protocol. https://datatracker.ietf.org/doc/html/rfc791
- Deering, S. & Hinden, R. (2017). RFC 8200 — Internet Protocol, Version 6 (IPv6) Specification. https://datatracker.ietf.org/doc/html/rfc8200
- Rekhter, Y., et al. (1996). RFC 1918 — Address Allocation for Private Internets. https://datatracker.ietf.org/doc/html/rfc1918
- Srisuresh, P. & Egevang, K. (2001). RFC 3022 — Traditional IP Network Address Translator. https://datatracker.ietf.org/doc/html/rfc3022
- Google. IPv6 Adoption Statistics. https://www.google.com/intl/en/ipv6/statistics.html