What Is an IP Address? IPv4, IPv6, and How They Work

May 27, 20266 min read

What Is an IP Address?

An IP address (Internet Protocol address) is a unique number assigned to every device connected to a network. It tells other devices where to send data — like a postal address for your computer or phone.

Without IP addresses, the internet cannot deliver emails, load web pages, or stream video. Every request you make travels from your IP to a server's IP, and the response travels back.

IPv4: The Original Standard

IPv4 is the most widely used IP format. It uses a 32-bit address space, written as four decimal numbers separated by dots.

Format

192.168.1.1
8.8.8.8
172.217.14.206

Each number ranges from 0 to 255 (8 bits per segment), giving a total of approximately 4.3 billion unique addresses.

The Problem

4.3 billion sounds like a lot — but the world has far more devices than that. Phones, laptops, servers, IoT sensors, and smart appliances all need IPs. The IPv4 address pool was officially exhausted by regional registries between 2011 and 2019.

IPv6: The Next Generation

IPv6 solves the shortage with a 128-bit address space, written as eight groups of hexadecimal numbers separated by colons.

Format

2001:0db8:85a3:0000:0000:8a2e:0370:7334
fe80::1ff:fe23:4567:890a

Leading zeros and consecutive zero groups can be shortened:

  • 2001:0db8:0000:0000:0000:0000:0000:00012001:db8::1

How Many Addresses?

IPv6 provides 340 undecillion addresses (3.4 × 10³⁸). That is more than enough for every grain of sand on Earth to have its own IP — many times over.

IPv4 vs IPv6 Comparison

FeatureIPv4IPv6
Address length32 bits128 bits
Total addresses~4.3 billion~340 undecillion
FormatDotted decimalColon-separated hex
Header size20–60 bytesFixed 40 bytes
Built-in securityOptional (IPsec)Required (IPsec)
ConfigurationManual or DHCPAuto (SLAAC)

Public vs Private IP Addresses

Not every device needs a globally unique IP. Networks use private IP addresses internally and share a public IP for internet access.

Private IP Ranges

ClassRangeUsed By
Class A10.0.0.0 – 10.255.255.255Large enterprises
Class B172.16.0.0 – 172.31.255.255Medium networks
Class C192.168.0.0 – 192.168.255.255Home routers

Your home router assigns private IPs (like 192.168.1.x) to every phone and laptop. The router itself holds one public IP facing the internet.

Why This Matters

Private IPs are not routable on the internet. They allow millions of networks to reuse the same address ranges without conflict — which is exactly why IPv4 still works despite running out of public addresses.

Static vs Dynamic IP Addresses

Static IP

A static IP never changes. Servers, websites, and email hosts need static IPs so other devices can always find them.

  • Use cases: Web servers, DNS servers, VPN endpoints
  • Drawback: Slightly more expensive; a fixed target for attackers

Dynamic IP

A dynamic IP changes periodically. Most home and mobile connections use dynamic IPs.

  • Use cases: Home Internet, mobile data, casual browsing
  • Benefit: Better security (moving target); efficient address reuse

How DHCP Assigns IP Addresses

DHCP (Dynamic Host Configuration Protocol) automatically hands out IP addresses to devices on a network. The process takes four steps:

  1. Discover — Your device broadcasts "I need an IP address!"
  2. Offer — The DHCP server responds with an available address
  3. Request — Your device confirms it wants that address
  4. Acknowledge — The server reserves the address and sends configuration details (subnet mask, gateway, DNS)

Leases typically last 24 hours to several days. When a lease expires, the device requests a new one.

NAT: How IPv4 Survives

NAT (Network Address Translation) lets multiple devices share one public IP. Your router translates private IPs to the public IP when traffic goes out — and translates back when responses arrive.

How NAT Works

[Phone 192.168.1.5] → [Router 203.0.113.10] → [Internet Server]
        Private IP              Public IP

The router maintains a translation table mapping each internal device and port to an external port. Responses come back to the correct device based on this table.

Limitations

  • Incoming connections require explicit port forwarding
  • Breaks end-to-end connectivity (some protocols need workarounds)
  • IPv6 eliminates the need for NAT by providing enough addresses for every device

Common Misconceptions

❌ "My IP address reveals my exact location"

IP geolocation shows your approximate area — usually the city or region. It cannot pinpoint your house or GPS coordinates.

❌ "Hiding my IP makes me completely anonymous"

A VPN or proxy hides your IP from websites, but the VPN provider can still see your traffic. True anonymity requires multiple layers — not just IP masking.

❌ "IPv4 is obsolete"

IPv4 still carries the majority of internet traffic. Dual-stack environments (running both IPv4 and IPv6) are the norm, and full IPv6 adoption is still years away.

❌ "Two devices cannot share the same IP"

Private IPs are reused across millions of networks. Even public IPs can be shared through NAT. What matters is that no two devices on the same network have the same IP at the same time.

Key Takeaways

  • An IP address is a numeric identifier that enables network communication
  • IPv4 uses 32-bit addresses (4.3 billion total — now exhausted)
  • IPv6 uses 128-bit addresses (virtually unlimited supply)
  • Private IPs are reused across networks; public IPs are globally unique
  • DHCP automates IP assignment; NAT extends IPv4's lifespan
  • IPv6 adoption grows steadily, but IPv4 remains dominant

Try It Yourself

Curious about your own IP address? Use these free tools to explore: