What is an IP Address? IPv4, IPv6, Public vs Private Explained
Every device connected to the internet has an IP address: a unique network label that helps data find the right destination. IP addresses are the routing foundation behind loading websites, sending email, streaming video, gaming online, and connecting apps to servers.
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 and 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, short for Internet Protocol address, is a numerical identifier assigned to a device on a network. It works like a return address and destination address for digital traffic.
The Internet Protocol gives packets enough addressing information to move across local networks, internet service providers, data centers, and global backbone networks.
There are two main versions in daily use: IPv4, the older and still very common version, and IPv6, the newer version designed to provide vastly more addresses.
IPv4 - The Original Standard
IPv4 has been the backbone of the internet since the early TCP/IP era. It uses 32-bit addresses written as four decimal numbers separated by dots.
IPv4 format: X.X.X.X (each X is 0-255)
Examples:
192.168.1.1 -> Private address, often a home router
8.8.8.8 -> Public address, Google DNS
10.0.0.1 -> Private address, common in offices
172.217.14.206 -> Public address, a Google server
127.0.0.1 -> Loopback address, your own machine
Binary representation:
192.168.1.1 = 11000000.10101000.00000001.00000001
Each octet: 8 bits x 4 octets = 32 bits total
Total possible addresses: 2^32 = 4,294,967,296IPv4 can represent about 4.3 billion addresses. That once sounded huge, but phones, laptops, servers, virtual machines, routers, and IoT devices quickly consumed the available space. This shortage is why private addresses, NAT, and IPv6 matter.
IPv4 Address Classes
IPv4 addresses were originally grouped into address classes. Modern networks usually use CIDR instead, but the old classes are still useful background knowledge.
| Class | Range | Default mask | Purpose |
|---|---|---|---|
| A | 1.0.0.0 - 126.255.255.255 | 255.0.0.0 | Large networks |
| B | 128.0.0.0 - 191.255.255.255 | 255.255.0.0 | Medium networks |
| C | 192.0.0.0 - 223.255.255.255 | 255.255.255.0 | Small networks |
| D | 224.0.0.0 - 239.255.255.255 | N/A | Multicast |
| E | 240.0.0.0 - 255.255.255.255 | N/A | Reserved or experimental |
IPv6 - The Next Generation
IPv6 uses 128-bit addresses written in hexadecimal. It was created to solve IPv4 exhaustion and make modern networking easier to scale.
IPv6 format: eight groups of hexadecimal digits
Full notation:
2001:0db8:85a3:0000:0000:8a2e:0370:7334
Compressed notation:
2001:db8:85a3::8a2e:370:7334
Examples:
::1 -> Loopback address
fe80::1 -> Link-local address
2606:4700:4700::1111 -> Cloudflare DNS
2001:4860:4860::8888 -> Google DNS
Address space:
128 bits = about 340 undecillion addresses- Much larger address space for global connectivity
- Cleaner auto-configuration for devices joining a network
- Simplified packet headers for routing efficiency
- Better support for end-to-end addressing without heavy NAT
- Built-in support for modern network security features
IPv4 vs IPv6 Comparison
| Feature | IPv4 | IPv6 |
|---|---|---|
| Address size | 32 bits | 128 bits |
| Address count | About 4.3 billion | About 340 undecillion |
| Format | 192.168.1.1 | 2001:db8::1 |
| Notation | Decimal with dots | Hexadecimal with colons |
| NAT usage | Common because addresses are scarce | Less necessary because addresses are abundant |
| Adoption | Still widely used everywhere | Growing steadily across ISPs, cloud, and mobile networks |
Public vs Private IP Addresses
A public IP address is reachable on the internet. A private IP address is used inside a local network and is not directly routed on the public internet.
| Type | Meaning | Examples |
|---|---|---|
| Public IP | Assigned by an ISP, cloud provider, or hosting network | Web servers, VPN gateways, home router WAN address |
| Private IP | Used only inside local networks | Home Wi-Fi devices, office laptops, printers, cameras |
| Loopback IP | Points back to the same device | 127.0.0.1 or ::1 for localhost testing |
Common private IPv4 ranges
| Range | Address span | Common use |
|---|---|---|
| 10.0.0.0/8 | 10.0.0.0 - 10.255.255.255 | Large corporate and cloud networks |
| 172.16.0.0/12 | 172.16.0.0 - 172.31.255.255 | Medium internal networks |
| 192.168.0.0/16 | 192.168.0.0 - 192.168.255.255 | Home and small office networks |
Static vs Dynamic IP Addresses
An IP address can be static or dynamic. The difference is how the address is assigned and whether it changes over time.
| Type | How it works | Best for | Trade-off |
|---|---|---|---|
| Static IP | Manually assigned or reserved so it stays the same | Servers, VPNs, remote access, DNS records | Usually costs more or needs more management |
| Dynamic IP | Assigned automatically, often by DHCP | Homes, phones, laptops, normal browsing | Can change after reconnects or lease renewal |
How IP Communication Works
When you open a website, your device does not send data to a name directly. It resolves the name to an IP address, then sends packets toward that destination.
1. You enter www.example.com in a browser
2. DNS resolves the name to an IP address such as 93.184.216.34
3. Your device creates packets with:
Source IP: your device or router public IP
Destination IP: 93.184.216.34
4. Routers forward the packets hop by hop across networks
5. The web server sends response packets back to your IP
6. Your router uses NAT to deliver the response to the correct deviceSubnets and CIDR Notation
A subnet divides an IP network into smaller ranges. CIDR notation, such as /24, describes how many bits identify the network portion of an address.
Example network:
IP address: 192.168.1.100
Subnet mask: 255.255.255.0
CIDR notation: 192.168.1.0/24
Network address: 192.168.1.0
Broadcast: 192.168.1.255
Usable hosts: 192.168.1.1 - 192.168.1.254
Common CIDR blocks:
/8 -> 16,777,214 usable IPv4 hosts
/16 -> 65,534 usable IPv4 hosts
/24 -> 254 usable IPv4 hosts
/32 -> one exact IPv4 addressNAT - How Multiple Devices Share One IP
NAT, or Network Address Translation, lets many private devices share one public IPv4 address. It became essential because public IPv4 addresses are limited.
Private network:
Laptop 192.168.1.20
Phone 192.168.1.21
Game console 192.168.1.22
Router private IP: 192.168.1.1
Router public IP: 73.42.115.200
To websites, all three devices can appear as:
73.42.115.200
The router tracks connections and forwards replies back
to the correct private device.NAT is useful, but it can also complicate peer-to-peer connections, inbound hosting, gaming, VoIP, and remote access because outside systems cannot directly reach private devices without port forwarding or related techniques.
IP Geolocation - What Your IP Reveals
Your IP address can reveal approximate network location and provider details. It usually cannot identify your exact street address by itself.
| Data point | Typical accuracy | Notes |
|---|---|---|
| Country | High | Usually accurate for fixed broadband and mobile providers |
| Region or state | Medium | Can be wrong when traffic exits through another region |
| City | Low to medium | Often approximate and ISP-dependent |
| ISP or organization | High | Usually visible from address allocation records |
| Exact street address | Not available from IP alone | Requires ISP records and legal process |
Protecting Your IP Address
You cannot make normal internet use work without an IP address, but you can reduce how much your public IP exposes.
| Method | What it does | When to use it |
|---|---|---|
| VPN | Routes traffic through a VPN provider IP | General privacy from websites and public Wi-Fi observers |
| Tor | Routes traffic through several volunteer relays | Higher anonymity needs with slower performance |
| Proxy | Sends selected app or browser traffic through another server | Testing, scraping controls, location-specific checks |
| Mobile data | Uses a carrier network IP instead of home broadband | Quick separation from a home network IP |
| Firewall | Blocks unwanted inbound traffic | Protecting devices and servers |
How to Find Your IP Address
Your public IP is the address websites see. Your private IP is the address your device uses on the local network.
Find your public IP:
Browser:
Use a What Is My IP tool
Terminal:
curl ifconfig.me
curl ipinfo.io/ip
curl https://api.ipify.org
PowerShell:
(Invoke-WebRequest -Uri "https://api.ipify.org").ContentFind your private IP:
Windows:
ipconfig
macOS:
ifconfig
ipconfig getifaddr en0
Linux:
ip addr
hostname -ICheck Your IP Address Now
Use our free What Is My IP tool to see your public IP address, approximate location, ISP, timezone, browser details, and network information instantly.
Check My IP AddressReferences
- RFC 791 - Internet Protocol
- RFC 8200 - Internet Protocol, Version 6 (IPv6)
- RFC 1918 - Address Allocation for Private Internets
- RFC 3022 - Traditional IP Network Address Translator
- Google IPv6 adoption statistics