Sources & Methodology
IP Class: determined by first octet value (1-126=A, 128-191=B, 192-223=C, 224-239=D, 240-255=E) Type: matched against IANA special-purpose registry and RFC 1918 private ranges Binary: each octet converted to 8-bit binary, padded with leading zeros Default subnet mask is the classful mask for the detected class. Network range is derived from applying the default class mask. Modern CIDR-based networking ignores classful boundaries, but class remains relevant for exam study and legacy documentation.
Last reviewed: April 2026
IPv4 Address Classes, Types & Ranges: Complete Guide 2026
Every IPv4 address carries information beyond just its four octets. Its value tells you which class it belongs to, whether it is private or public, whether it is a special-purpose address, and what its default subnet mask is. Understanding IP address classification is fundamental for network design, troubleshooting, certification exams, and cloud architecture. This guide covers every IPv4 address type with full range tables and practical use cases.
IPv4 Address Classes: Complete Reference Table
The classful addressing system divides the entire IPv4 address space into five classes based on the value of the first octet. While modern networking uses CIDR and ignores class boundaries, IP classes are still tested on the Cisco CCNA and CompTIA Network+ exams and appear in legacy documentation.
| Class | First Octet Range | Default Mask | CIDR | Networks | Hosts/Network | Purpose |
|---|---|---|---|---|---|---|
| A | 1 – 126 | 255.0.0.0 | /8 | 126 | 16,777,214 | Large enterprises, ISPs |
| B | 128 – 191 | 255.255.0.0 | /16 | 16,384 | 65,534 | Medium enterprises |
| C | 192 – 223 | 255.255.255.0 | /24 | 2,097,152 | 254 | Small networks, home LANs |
| D | 224 – 239 | N/A | N/A | N/A | N/A | Multicast groups only |
| E | 240 – 255 | N/A | N/A | N/A | N/A | Reserved for research |
Private vs Public IP Addresses: What the Difference Means
Not all IP addresses are equal. The IANA and RFC 1918 define certain ranges as private — reserved for internal use inside homes, offices, and cloud networks. Private addresses are not routable on the public internet. Devices with private IPs connect to the internet through NAT (Network Address Translation), where a router substitutes the private address with a public one.
| Range | CIDR | Class | Total Addresses | Typical Use |
|---|---|---|---|---|
| 10.0.0.0 – 10.255.255.255 | 10.0.0.0/8 | A | 16,777,216 | Enterprise, AWS VPCs, data centers |
| 172.16.0.0 – 172.31.255.255 | 172.16.0.0/12 | B | 1,048,576 | Medium networks, Docker, Kubernetes |
| 192.168.0.0 – 192.168.255.255 | 192.168.0.0/16 | C | 65,536 | Home routers, small offices |
Special-Purpose IPv4 Addresses: Every Reserved Range
Beyond private ranges, IANA defines many other special-purpose address blocks. Understanding these prevents misconfiguration and helps in troubleshooting unexpected network behavior.
| Address / Range | Type | Purpose |
|---|---|---|
| 0.0.0.0/8 | This network | Default route, source before DHCP assignment |
| 127.0.0.0/8 | Loopback | Localhost (127.0.0.1 most common), never leaves host |
| 169.254.0.0/16 | Link-local / APIPA | Auto-assigned when DHCP fails (Windows APIPA) |
| 224.0.0.0/4 | Multicast | Multicast groups, routing protocols (OSPF, RIPv2) |
| 240.0.0.0/4 | Reserved | Reserved by IANA, not usable in production |
| 255.255.255.255 | Limited broadcast | Broadcast to all hosts on local segment (DHCP discover) |
| 100.64.0.0/10 | Shared address | Carrier-grade NAT (RFC 6598), ISP internal use |
| 198.51.100.0/24 | Documentation | TEST-NET-2, examples in RFCs and documentation only |
| 203.0.113.0/24 | Documentation | TEST-NET-3, examples in RFCs and documentation only |
How to Convert an IP Address to Binary
Every IPv4 address is ultimately a 32-bit binary number. Network operations like subnetting, subnet masking, and route matching happen at the binary level. Converting an IP to binary helps you understand why subnet boundaries fall where they do and how subnet masks work.
192 = 128+64 = 11000000
168 = 128+32+8 = 10101000
10 = 8+2 = 00001010
50 = 32+16+2 = 00110010
Full binary: 11000000.10101000.00001010.00110010
What Is 127.0.0.1 and Why Is It Called Localhost?
The entire 127.0.0.0/8 range is reserved for loopback. Any packet sent to a loopback address is immediately processed by the local network stack without ever leaving the machine or reaching a physical network interface. The address 127.0.0.1 is the universally recognized localhost address used to connect to services running on the same computer — web servers, databases, APIs during development. You cannot ping a router, another device, or the internet by sending to 127.0.0.1.
Understanding APIPA: Why You See 169.254.x.x
When a Windows or macOS device cannot reach a DHCP server, the operating system automatically assigns an address in the 169.254.0.0/16 range using a process called APIPA (Automatic Private IP Addressing). The OS picks a random address, checks via ARP that no other device is using it, and assigns it. An APIPA address means the device cannot reach a DHCP server and is isolated from the wider network. This usually indicates a failed network cable, a misconfigured switch port, or an unreachable DHCP server.
ipconfig /release and ipconfig /renew on Windows forces a fresh DHCP request.Multicast IP Addresses (Class D) Explained
Class D addresses (224.0.0.0 to 239.255.255.255) are used for multicast — delivering a single packet to multiple receivers simultaneously without broadcasting to everyone. Important well-known multicast addresses include 224.0.0.5 for all OSPF routers, 224.0.0.9 for RIPv2 routers, 224.0.0.10 for EIGRP routers, and 239.0.0.0/8 for the organizationally-scoped multicast range used in enterprise applications. Multicast-enabled routers running PIM (Protocol Independent Multicast) are required to forward multicast traffic across subnets.
IPv4 Address Exhaustion and the Transition to IPv6
The IPv4 address space contains approximately 4.3 billion addresses (2^32). IANA distributed the last free IPv4 blocks to regional registries in February 2011. Regional registries exhausted their pools between 2012 and 2020. Today, IPv4 addresses are only available through transfers and lease markets. IPv6 solves this with 128-bit addresses providing approximately 340 undecillion unique addresses, effectively unlimited for any practical purpose. Despite IPv6 availability, IPv4 remains dominant in most enterprise and home networks due to the cost and complexity of migration.