The Five IP Address Classes
RFC 791 defined the original three formats of IPv4 address by their high-order bits: Class A, Class B and Class C. RFC 1112 defines Class D for multicast host groups and reserves Class E. Each class is broken down below.
What is a Class A IP address?
A Class A IP address is an IPv4 address whose first bit is 0, so its first octet falls between 0 and 127.
Range: 0.0.0.0 to 127.255.255.255. Two blocks inside it are reserved, 0.0.0.0/8 (“this host on this network”) and 127.0.0.0/8 (loopback), which is why usable Class A networks start with 1–126 (RFC 6890). Default mask: 255.0.0.0 (/8) (Microsoft Learn). Purpose: RFC 791 splits a Class A address into a 7-bit network number and a 24-bit local address, the fewest networks and the most hosts per network of any class. The private block 10.0.0.0/8 (RFC 1918) is inside Class A.
You'll notice Class A goes from 1–126, not 1–127. 127 is reserved for loopback (127.0.0.1 = localhost). Which address tests the local TCP/IP stack? 127.0.0.1. The entire 127.0.0.0/8 range is loopback, but 127.0.0.1 is the specific address you need to know.
What is a Class B IP address?
A Class B IP address is an IPv4 address whose first two bits are 10, so its first octet falls between 128 and 191.
Range: 128.0.0.0 to 191.255.255.255. Default mask: 255.255.0.0 (/16) (Microsoft Learn). Purpose: RFC 791 gives Class B a 14-bit network number and a 16-bit local address, the middle ground between Class A and Class C. The private block 172.16.0.0/12 (RFC 1918) is inside Class B.
What is a Class C IP address?
A Class C IP address is an IPv4 address whose first three bits are 110, so its first octet falls between 192 and 223.
Range: 192.0.0.0 to 223.255.255.255. Default mask: 255.255.255.0 (/24) (Microsoft Learn). Purpose: RFC 791 gives Class C a 21-bit network number and an 8-bit local address, the most networks and the fewest hosts per network. The private block 192.168.0.0/16 (RFC 1918) is inside Class C.
What is a Class D IP address?
A Class D IP address is an IPv4 multicast address: its first four bits are 1110, so it falls between 224.0.0.0 and 239.255.255.255.
Range: 224.0.0.0 to 239.255.255.255 (RFC 1112). Default mask: none. Microsoft’s addressing guide gives default subnet masks only for Classes A, B and C, and notes that Classes D and E aren’t used by end users (Microsoft Learn). Purpose: a Class D address identifies a multicast “host group,” and a datagram sent to it is delivered to every member of that group on a best-effort basis. 224.0.0.1 is permanently assigned to the group of all IP hosts (RFC 1112).
What is a Class E IP address?
A Class E IP address is an IPv4 address whose first four bits are 1111, the block from 240.0.0.0 to 255.255.255.255, which is reserved and not assigned to hosts.
Range: 240.0.0.0 to 255.255.255.255 (240.0.0.0/4). Default mask: none (Microsoft Learn). Purpose: RFC 1112 reserved Class E “for future addressing modes,” and RFC 6890, which set up the IANA special-purpose address registry, lists 240.0.0.0/4 as Reserved. The limited broadcast address, 255.255.255.255, sits at the top of this block.
Private IP Address Ranges (RFC 1918)
RFC 1918 sets aside three blocks of address space for private networks. Private addresses are not routable on the public internet. They are used inside LANs and translated to a public IP by NAT when accessing the internet. Knowing the three private ranges cold is non-negotiable for both A+ and Network+.
| Class | Private Range | CIDR | Addresses Available |
|---|---|---|---|
| Class A | 10.0.0.0 – 10.255.255.255 | 10.0.0.0/8 | 16,777,216 |
| Class B | 172.16.0.0 – 172.31.255.255 | 172.16.0.0/12 | 1,048,576 |
| Class C | 192.168.0.0 – 192.168.255.255 | 192.168.0.0/16 | 65,536 |
The Class B private range doesn't cover all of 172.x.x.x — it only covers 172.16.x.x through 172.31.x.x. Watch for 172.15.x.x or 172.32.x.x presented as private addresses — both are public. If you see a 172.x address, check the second octet: it must be 16–31 to be private.
Special IP Ranges You Must Know
127.0.0.1 (localhost)
169.254.1.0 – 169.254.254.255
224.0.0.0 – 239.255.255.255
Public vs Private — How NAT Bridges Them
Private addresses can't be routed on the internet — routers drop packets with RFC 1918 source addresses. When your device (192.168.1.50) sends traffic to google.com, your router performs Network Address Translation (NAT): it replaces the private source IP with its own public IP before forwarding the packet. When the response comes back, it reverses the translation and delivers it to your device.
IPv4 has approximately 4.3 billion addresses — far too few for every device on earth to have a unique public IP. Private ranges + NAT allow millions of devices to share a small pool of public IPs. A single home router with one public IP can serve dozens of private devices simultaneously.
IPv6 solves this — its 128-bit address space provides ~340 undecillion addresses, enough for every device to have a globally unique public IP without NAT.
Quick Reference — All Ranges
| Address / Range | Type | Notes |
|---|---|---|
| 1.0.0.0 – 126.255.255.255 | Class A (public) | 10.x.x.x is private |
| 10.0.0.0/8 | Class A private | 10.0.0.0 – 10.255.255.255 |
| 127.0.0.0/8 | Loopback | 127.0.0.1 = localhost, tests local stack |
| 128.0.0.0 – 191.255.255.255 | Class B (public) | 172.16–31.x.x is private |
| 172.16.0.0/12 | Class B private | 172.16.x.x – 172.31.x.x only |
| 169.254.0.0/16 | APIPA / Link-local | DHCP failed — device self-assigned |
| 192.0.0.0 – 223.255.255.255 | Class C (public) | 192.168.x.x is private |
| 192.168.0.0/16 | Class C private | Most common home/office range |
| 224.0.0.0 – 239.255.255.255 | Class D — Multicast | Not assignable to hosts |
| 240.0.0.0 – 255.255.255.254 | Class E — Reserved | Experimental, never used in production |
| 255.255.255.255 | Limited broadcast | All hosts on local subnet, not routed |
Practice Scenarios
Master the A+ exam
See the best study guides, video courses, and practice tests for CompTIA A+ 220-1201/1202.
Classful vs Classless Addressing — Why Classes Are Now Legacy
IP address classes were the original system for allocating IP address space. Classes A, B and C were defined in RFC 791 in 1981, and Class D and the reserved Class E are described in RFC 1112. The system assigned blocks based on the first octet: Class A for large organizations needing millions of hosts, Class B for medium networks, Class C for small networks. In practice, this was extremely wasteful — a company needing 300 hosts had to receive a full Class B block (65,534 hosts) because Class C only provided 254. The resulting address exhaustion drove the shift to CIDR (Classless Inter-Domain Routing) in 1993.
CIDR replaced classful addressing by allowing any prefix length (e.g. /22, /26, /29) rather than forcing /8, /16, or /24 boundaries. A company needing 300 hosts can now be assigned a /23 (510 usable hosts) rather than a /16. This is why classful addressing is considered legacy — real networks use CIDR — but CompTIA A+ and Network+ still test classful knowledge because it underlies the private IP ranges, default gateway behavior, and APIPA concepts.
APIPA — Automatic Private IP Addressing
When a Windows computer that uses DHCP can’t reach a DHCP server, it assigns itself an address from 169.254.0.0/16, a feature called APIPA (Automatic Private IP Addressing). A device with a 169.254.x.x address can reach only other hosts on the same local segment, so the address is a symptom of a DHCP problem, not the root cause. For the full range rules, RFC 3927 and the fix sequence, see What Is APIPA?
Loopback and Localhost
The 127.0.0.0/8 range is reserved for loopback — testing the local TCP/IP stack without sending traffic to the network. ping 127.0.0.1 (or ping localhost) is always the first step in network troubleshooting — if this fails, the TCP/IP stack on the local machine is broken. If it succeeds, the stack works and the problem is elsewhere (physical cable, switch, router, DNS, or remote server).
The address 0.0.0.0 has a special meaning: in routing tables it represents the default route (send traffic here if no specific route matches). In a server binding context it means "listen on all available interfaces." You won't be assigned 0.0.0.0 as a host address, but you'll see it in routing tables and firewall rules.
IPv4 Exhaustion and the Transition to IPv6
The IPv4 address space (approximately 4.3 billion addresses) was officially exhausted at the IANA level in 2011. Regional internet registries have since allocated their remaining pools. NAT (Network Address Translation) has extended the life of IPv4 by allowing thousands of private IP addresses to share a single public IP, but IPv6 is the long-term solution. IPv6 uses 128-bit addresses (compared to IPv4's 32-bit), providing approximately 3.4 × 10^38 addresses — enough that every device on Earth can have a globally unique address.
For exam purposes: know that IPv4 uses 32-bit dotted decimal notation, IPv6 uses 128-bit hexadecimal colon notation, and that the coexistence mechanisms (dual-stack, tunneling, NAT64) exist for the transition period. The private IP ranges (10.x.x.x, 172.16–31.x.x, 192.168.x.x) are used internally and translated to public IPs at the network boundary via NAT.