IPv4
Internet Protocol Version 4
The original 32-bit internet addressing system — written as four numbers like 192.168.1.1 — that provides approximately 4.3 billion unique addresses and still carries the majority of internet traffic.
IPv4 has been the backbone of the internet since 1983. A 32-bit address is written as four decimal octets separated by dots (dotted-quad notation): each octet represents 8 bits and ranges from 0 to 255. The address simultaneously identifies the host and, combined with a subnet mask, the network it belongs to. Despite its address exhaustion, IPv4 continues to dominate traffic volume thanks to NAT.
IPv4 address structure
A 32-bit IPv4 address is divided into four 8-bit octets and written in dotted-decimal notation: 192.168.1.100. Each octet spans 0–255. The address has two logical parts: the network portion (identifies which network the host is on) and the host portion (identifies the specific device within that network). A subnet mask defines where the network portion ends and the host portion begins. The mask 255.255.255.0 (or /24 in CIDR notation) means the first 24 bits are the network and the last 8 bits are the host — allowing 254 usable host addresses on that subnet.
Classful addressing history
Early IPv4 divided the address space into fixed classes based on the first octet. Class A networks (first octet 1–126) gave each registered organisation a /8 block with 16.7 million host addresses — wasteful for any organisation that did not need millions of IPs. Class B (128–191) allocated /16 blocks with 65,534 hosts. Class C (192–223) allocated /24 blocks with 254 hosts. This classful system wasted enormous swaths of the address space because a company needing 300 hosts had to take a wasteful Class B rather than two Class C blocks. CIDR (Classless Inter-Domain Routing), introduced in 1993, replaced classful addressing with variable-length subnet masks, allowing precise allocation of exactly the block size needed.
RFC 1918 private address ranges
RFC 1918 reserves three IPv4 ranges for private use — they are not routed on the public internet and can be used freely inside any private network:
| Range | CIDR | Addresses | Typical use |
|---|---|---|---|
| 10.0.0.0 – 10.255.255.255 | 10.0.0.0/8 | 16,777,214 | Large enterprise, ISP CGN |
| 172.16.0.0 – 172.31.255.255 | 172.16.0.0/12 | 1,048,574 | Medium networks |
| 192.168.0.0 – 192.168.255.255 | 192.168.0.0/16 | 65,534 | Home and small office |
Special-purpose addresses
| Address / Range | Purpose |
|---|---|
| 0.0.0.0 | "This network" or "any address" — used in routing and server binding |
| 127.0.0.0/8 | Loopback — routes back to the local machine; 127.0.0.1 is conventional |
| 169.254.0.0/16 | APIPA (link-local) — auto-assigned when DHCP is unavailable |
| 224.0.0.0/4 | Multicast — packets delivered to a group of subscribed receivers |
| 255.255.255.255 | Limited broadcast — delivered to all hosts on the local segment |
IPv4 exhaustion timeline
The 32-bit address space yields 2³² = 4,294,967,296 total addresses. After reserving private, loopback, multicast, and other special ranges, fewer than 3.7 billion are usable publicly. The internet now connects far more than 4 billion devices. The IANA (Internet Assigned Numbers Authority) exhausted its unallocated IPv4 pool in February 2011. Regional Internet Registries followed: APNIC (Asia-Pacific) in April 2011, RIPE NCC (Europe) in September 2012, LACNIC (Latin America) in June 2014, and ARIN (North America) in September 2015. AFRINIC (Africa) held out the longest. Today, IPv4 addresses are traded on a secondary market at significant cost per address.
NAT as the workaround
Network Address Translation extended IPv4's practical life by allowing many devices to share a single public IP address. Your router holds one public IPv4 address from your ISP. Every device on your home network gets a private address (192.168.x.x). When a device initiates a connection, the router rewrites the source IP to its public IP and records the mapping in a NAT table. Replies arrive at the public IP and the router uses the table to forward them to the correct internal device. NAT breaks the end-to-end principle — devices behind NAT cannot be reached directly from the internet without port forwarding. This complicates peer-to-peer applications, VoIP, gaming, and self-hosted services, which is why IPv6 — with its vast address space eliminating the need for NAT — was developed.
How to read an IPv4 address and subnet
Given 192.168.1.50/24: the address is 192.168.1.50, the /24 means the first 24 bits (192.168.1) are the network, and the last 8 bits (.50) identify the host. The network address is 192.168.1.0, the broadcast address is 192.168.1.255, and valid host addresses run from 192.168.1.1 to 192.168.1.254 — 254 usable hosts. A /25 subnet halves this to 126 usable hosts; a /16 expands it to 65,534. CIDR notation compactly expresses both the network base address and the prefix length in a single string.
IPv4 vs IPv6 — why IPv4 persists
IPv6 has been available since 1998 and offers 128-bit addresses (3.4 × 10³⁸ — effectively unlimited), eliminates NAT, simplifies the packet header, and includes built-in address autoconfiguration. Despite this, IPv4 still carries the majority of internet traffic because the transition requires every piece of infrastructure — routers, firewalls, applications, ISP equipment — to support IPv6. Most modern networks run dual-stack: both IPv4 and IPv6 simultaneously, with clients preferring IPv6 when both are available. The full replacement of IPv4 will take many more years.
Frequently Asked Questions
Why are IPv4 addresses running out?
IPv4 provides 4.3 billion addresses. The internet has far more than 4 billion connected devices. The public IPv4 pool was officially exhausted by regional registries between 2011 and 2019. NAT extends the life of IPv4 but breaks true end-to-end connectivity.
What is the difference between IPv4 and IPv6?
IPv4 uses 32-bit addresses (4.3 billion). IPv6 uses 128-bit addresses (340 undecillion — effectively unlimited). IPv6 also eliminates the need for NAT and simplifies packet headers. Most ISPs and websites now support both via dual-stack.
What are the IPv4 private address ranges?
RFC 1918 defines three: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. These are not routed on the public internet. Your home devices use 192.168.x.x or 10.x.x.x addresses assigned by your router's DHCP server.