⚡ Quick Answer
IPv4 addresses are divided into five classes (A–E) based on the first octet. Classes A, B, and C are used for unicast hosts. Class D is multicast. Class E is reserved for research. For the exam, the critical numbers are: Class A starts with 1–126, Class B with 128–191, Class C with 192–223. Private ranges (RFC 1918) are 10.x.x.x, 172.16–31.x.x, and 192.168.x.x. Loopback is 127.0.0.1. APIPA is 169.254.x.x.

The Five IP Address Classes

Class A Large networks
First octet range1 – 126
Default subnet mask/8 — 255.0.0.0
Network bits8
Host bits24
Hosts per network16,777,214
Number of networks126
First bit pattern0xxxxxxx
Class B Medium networks
First octet range128 – 191
Default subnet mask/16 — 255.255.0.0
Network bits16
Host bits16
Hosts per network65,534
Number of networks16,384
First bit pattern10xxxxxx
Class C Small networks
First octet range192 – 223
Default subnet mask/24 — 255.255.255.0
Network bits24
Host bits8
Hosts per network254
Number of networks2,097,152
First bit pattern110xxxxx
Class D Multicast
First octet range224 – 239
PurposeMulticast groups
Subnet maskN/A
Assignable to hosts?No
Example useOSPF (224.0.0.5), streaming
First bit pattern1110xxxx
Class E Reserved / Research
First octet range240 – 255
PurposeExperimental / reserved
Assignable to hosts?No
Used in practice?Never (limited broadcast: 255.255.255.255)
First bit pattern1111xxxx
🎯 Exam Tip — The Missing 127

You'll notice Class A goes from 1–126, not 1–127. 127 is reserved for loopback (127.0.0.1 = localhost). The exam commonly asks "which address tests the local TCP/IP stack?" — the answer is always 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.

Private IP Address Ranges (RFC 1918)

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+.

ClassPrivate RangeCIDRAddresses 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
🎯 Exam Trap — 172.x.x.x

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. A common exam trick is to present 172.15.x.x or 172.32.x.x as a private address — 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

Loopback
127.0.0.0/8
127.0.0.1 (localhost)
Tests the local TCP/IP stack without sending traffic on the network. Ping 127.0.0.1 to verify TCP/IP is installed and functioning.
APIPA
169.254.0.0/16
169.254.1.0 – 169.254.254.255
Automatic Private IP Addressing — self-assigned when DHCP fails. A 169.254.x.x address means the device cannot reach a DHCP server.
Limited Broadcast
255.255.255.255
Broadcasts to all hosts on the local subnet. Not forwarded by routers. Used by DHCP Discover — a client with no IP can still broadcast.
This Network
0.0.0.0/8
Represents the current network. Used in routing tables as the default route (0.0.0.0/0 = default gateway — match anything).
Link-Local (IPv4)
169.254.0.0/16
Same as APIPA range. RFC 3927. Not routable beyond the local link. Also used for AWS instance metadata (169.254.169.254).
Multicast
224.0.0.0/4
224.0.0.0 – 239.255.255.255
Class D. Sent to a group of subscribers. OSPF uses 224.0.0.5/6. RIP uses 224.0.0.9. EIGRP uses 224.0.0.10.

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.

Why Private Addresses Exist

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 / RangeTypeNotes
1.0.0.0 – 126.255.255.255Class A (public)10.x.x.x is private
10.0.0.0/8Class A private10.0.0.0 – 10.255.255.255
127.0.0.0/8Loopback127.0.0.1 = localhost, tests local stack
128.0.0.0 – 191.255.255.255Class B (public)172.16–31.x.x is private
172.16.0.0/12Class B private172.16.x.x – 172.31.x.x only
169.254.0.0/16APIPA / Link-localDHCP failed — device self-assigned
192.0.0.0 – 223.255.255.255Class C (public)192.168.x.x is private
192.168.0.0/16Class C privateMost common home/office range
224.0.0.0 – 239.255.255.255Class D — MulticastNot assignable to hosts
240.0.0.0 – 255.255.255.254Class E — ReservedExperimental, never used in production
255.255.255.255Limited broadcastAll hosts on local subnet, not routed

Exam Scenarios

💬 "A technician runs ipconfig and sees the IP address 169.254.45.12. What does this indicate?" → DHCP failure — APIPA address. The device cannot reach a DHCP server and has self-assigned a 169.254.x.x address. Check: Is the DHCP server running? Is the network cable connected? Is the switch port up?
💬 "A user is assigned 172.20.5.100/16 as their IP address. Is this a private or public address?" → Private. 172.20.x.x falls within the 172.16.0.0–172.31.255.255 private range. Had it been 172.15.x.x or 172.32.x.x, it would be public.
💬 "Which command tests whether the local TCP/IP stack is installed and functional?" → ping 127.0.0.1 — the loopback address. If this fails, TCP/IP is not functioning on the local machine regardless of network connectivity.
💬 "A network admin is designing an office network for 300 workstations. Which IP class provides enough hosts in a single network without wasting addresses?" → Class B — provides up to 65,534 hosts per network. Class C only provides 254. A single 192.168.0.0/16 block (technically spanning multiple Class C networks) or 172.16.0.0/16 would work cleanly.
💬 "A router's routing table shows a 0.0.0.0/0 entry. What does this represent?" → The default route — packets with no more specific match are forwarded using this entry. It points to the default gateway and matches all destinations.
💬 "Which IP address class uses the first octet range 192–223?" → Class C — default /24 mask, 254 usable hosts per network. Most home and small office networks use Class C private space (192.168.x.x).

Master the A+ exam

See the best study guides, video courses, and practice tests for CompTIA A+ 220-1201/1202.

See A+ Resources →

Classful vs Classless Addressing — Why Classes Are Now Legacy

IP address classes (A, B, C, D, E) were the original system for allocating IP address space, defined in RFC 791 in 1981. The system assigned blocks based on the first octet: Class A for large organisations 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 behaviour, and APIPA concepts that appear on every exam.

APIPA — Automatic Private IP Addressing

When a device cannot reach a DHCP server, Windows automatically assigns itself an address in the 169.254.0.0/16 range (169.254.0.1 through 169.254.255.254). This is APIPA (Automatic Private IP Addressing). A device with an APIPA address can communicate with other APIPA devices on the same segment but cannot reach the internet or default gateway because 169.254.x.x is not routable.

On the exam: if a user reports they cannot access the internet and you run ipconfig and see a 169.254.x.x address, the problem is that the device failed to get a DHCP lease. Troubleshoot the DHCP server, network connectivity to the DHCP server, or the DHCP client service on the device itself. The 169.254.x.x address is a symptom, not the root cause.

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 on the exam.

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, tunnelling, 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.

Related Articles