This chapter covers IPv4 address classes and ranges, a foundational topic for the CompTIA A+ 220-1101 exam. Understanding the five classes (A through E) and their default subnet masks is essential for network configuration, troubleshooting, and exam success. Approximately 5-10% of the Networking domain questions will touch on IP addressing concepts, including class identification and range memorization.
Jump to a section
Think of IPv4 classful addressing like the U.S. Postal Service's zip code system. Class A is like a state (e.g., California). The first digit of the zip code (e.g., 9) identifies the state. Within that state, there are millions of possible local addresses. The post office only needs to look at the first digit to route mail to the correct state. Class B is like a major city (e.g., 90210 for Beverly Hills). The first two digits identify the city, and the post office uses those to route to the correct city distribution center. Class C is like a specific neighborhood block (e.g., 90210-1234). The first three digits identify the neighborhood, and the post office routes to the local post office. Class D is like a special 'bulk mail' code used for mass mailings to all addresses in a region (multicast). Class E is reserved for future use, like unassigned zip codes. The problem with this system is that if a state gets assigned only one first digit, it wastes millions of addresses if the state is small (e.g., Wyoming vs. California). This inefficiency led to classless addressing (CIDR), which is like allowing variable-length zip codes to better match population density.
What Are IPv4 Address Classes?
IPv4 addresses are 32-bit numbers, typically written in dotted decimal notation (e.g., 192.168.1.1). Originally, the Internet was designed with a classful addressing scheme that divided the address space into fixed-size blocks called classes. This system was defined in RFC 791 (1981) and was the standard until the introduction of Classless Inter-Domain Routing (CIDR) in 1993 (RFC 1518, 1519). While modern networks use CIDR, the CompTIA A+ 220-1101 exam still tests knowledge of the classful system because many legacy networks and exam questions reference it.
There are five classes: A, B, C, D, and E. Classes A, B, and C are used for unicast (one-to-one) communication and have different default subnet masks. Class D is for multicast (one-to-many) communication, and Class E is reserved for experimental use.
How to Identify the Class of an IP Address
The class is determined by the first few bits of the first octet (the first 8 bits of the address). The pattern is:
Class A: First bit is 0. Range of first octet: 0-127.
Class B: First two bits are 10. Range of first octet: 128-191.
Class C: First three bits are 110. Range of first octet: 192-223.
Class D: First four bits are 1110. Range of first octet: 224-239.
Class E: First four bits are 1111. Range of first octet: 240-255.
Memorize these ranges: 0-127 (A), 128-191 (B), 192-223 (C), 224-239 (D), 240-255 (E). Note that 127.x.x.x is a loopback address (127.0.0.1) and is not assigned to hosts, but it falls in Class A range.
Default Subnet Masks
Each class has a default subnet mask that defines the network and host portions of the address:
Class A: 255.0.0.0 (/8) — First octet is network, last three are hosts.
Class B: 255.255.0.0 (/16) — First two octets are network, last two are hosts.
Class C: 255.255.255.0 (/24) — First three octets are network, last octet is hosts.
Class D and E: No default subnet mask (not used for host addressing).
The subnet mask is critical because it tells a device which part of the IP address is the network ID and which part is the host ID. For example, with a Class B address 172.16.5.10 and mask 255.255.0.0, the network ID is 172.16.0.0, and the host ID is 5.10.
Number of Networks and Hosts per Class
Class A: 126 networks (2^7 - 2 = 126, because 0.0.0.0 is reserved for default route and 127.x.x.x is loopback). Each network supports 16,777,214 hosts (2^24 - 2, subtracting network and broadcast addresses).
Class B: 16,384 networks (2^14). Each network supports 65,534 hosts (2^16 - 2).
Class C: 2,097,152 networks (2^21). Each network supports 254 hosts (2^8 - 2).
The "-2" accounts for the network address (all host bits 0) and the broadcast address (all host bits 1). These cannot be assigned to hosts.
Private IP Address Ranges (RFC 1918)
For internal networks, three ranges are reserved as private addresses that are not routable on the public Internet:
Class A: 10.0.0.0 to 10.255.255.255 (10.0.0.0/8)
Class B: 172.16.0.0 to 172.31.255.255 (172.16.0.0/12)
Class C: 192.168.0.0 to 192.168.255.255 (192.168.0.0/16)
These are commonly used in home and enterprise networks. The exam may ask you to identify which of these ranges is private or public.
Special Addresses
0.0.0.0: Default route (any network).
127.0.0.0/8: Loopback (127.0.0.1 is the most common).
169.254.0.0/16: Link-local addresses (APIPA). Used when DHCP fails.
224.0.0.0/4: Multicast addresses (Class D).
240.0.0.0/4: Reserved (Class E).
255.255.255.255: Limited broadcast (all networks).
Why Classful Addressing Is Obsolete
The classful system wastes addresses. A Class A network with 16 million addresses is too large for most organizations; a Class C with 254 is too small. This led to subnetting (borrowing host bits for network bits) and eventually CIDR, which allows arbitrary prefix lengths (e.g., /23, /27). CIDR is what the modern Internet uses. However, the 220-1101 exam expects you to understand classful ranges and default masks.
How to Verify IP Address Class on a System
On Windows, use ipconfig to see your IP address and subnet mask. On Linux/macOS, use ifconfig or ip addr. The subnet mask tells you the class if it is a default mask. For example:
ipconfig
Ethernet adapter Ethernet:
IPv4 Address. . . . . . . . . . . : 192.168.1.10
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1The mask 255.255.255.0 is a default Class C mask, so the address is Class C.
Exam Traps
The loopback address 127.0.0.1 is in Class A range, but it is not a usable host address. The exam may list 127.0.0.1 as a Class A address — that is true by range, but it is not assignable to a network interface.
Private addresses: 172.16.0.0 to 172.31.255.255 is a /12 range, but many students think it is /16. The mask is /12 (255.240.0.0), not /16.
The limited broadcast address 255.255.255.255 is sometimes confused with a Class E address (240-255). It is not a class; it is a special address.
Class D addresses (224-239) are multicast, not unicast. They cannot be assigned to a host's NIC as a primary IP.
Summary of Key Numbers
Class A: 1-126 (0 and 127 reserved)
Class B: 128-191
Class C: 192-223
Class D: 224-239
Class E: 240-255
Private: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16
Loopback: 127.0.0.0/8
Link-local: 169.254.0.0/16
Memorize these ranges and masks cold. The exam will present an IP address and ask you to identify its class or default subnet mask.
Identify the First Octet
Given an IP address, look at the first octet (the number before the first decimal point). For example, 172.16.5.10 has first octet 172. This step requires no calculation — just read the value. The first octet determines the class because the high-order bits are fixed per class. If the first octet is between 0 and 127, it is Class A (but 0 and 127 are reserved). Between 128-191 is Class B, 192-223 is Class C, 224-239 is Class D, and 240-255 is Class E. This is the most basic step and the one most candidates get right, but the exam may use tricky values like 127.0.0.1 (Class A range but loopback) or 192.0.2.0 (Class C but documentation range).
Determine the Default Subnet Mask
Once the class is known, apply the default subnet mask: Class A = 255.0.0.0 (/8), Class B = 255.255.0.0 (/16), Class C = 255.255.255.0 (/24). The subnet mask separates the network portion from the host portion. For a Class B address like 172.16.5.10, the network is 172.16.0.0 and the host is 5.10. The default mask is used when no subnetting is applied. On the exam, you may be given an IP and mask and asked whether it is a default mask or a custom subnet mask. If the mask is not default, the address is still classful by range, but the network is subnetted.
Identify Network and Broadcast Addresses
For a given classful network, the network address has all host bits set to 0, and the broadcast address has all host bits set to 1. For a Class C network 192.168.1.0 with default mask /24, the network address is 192.168.1.0 and the broadcast is 192.168.1.255. These two addresses cannot be assigned to hosts. The exam may ask: 'Which of the following is a valid host address on a Class B network?' The answer must not be the network or broadcast address. For example, on 172.16.0.0/16, 172.16.0.0 is network, 172.16.255.255 is broadcast, so 172.16.0.1 is valid.
Check for Private or Special Addresses
After identifying the class, check if the address falls into a private range (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) or a special range (loopback 127.0.0.0/8, link-local 169.254.0.0/16, multicast 224.0.0.0/4). The exam often tests whether an address is public or private. For instance, 172.31.255.255 is private (part of 172.16.0.0/12), but 172.32.0.1 is public. Also, 192.168.1.1 is private, but 192.169.1.1 is public (since private is only 192.168.0.0/16).
Apply the Knowledge to Exam Questions
The CompTIA A+ 220-1101 exam will ask questions like: 'What class is the IP address 172.20.15.10?' Answer: Class B (first octet 172 is in 128-191). Or 'Which of the following is a private IP address?' Choices might include 10.0.0.1 (private), 172.15.0.1 (public — 172.16.0.0/12 is private, 172.15 is not), 192.168.0.1 (private). Also, questions about default subnet masks: 'What is the default subnet mask for a Class A address?' Answer: 255.0.0.0. And questions about the number of hosts: 'How many hosts can a Class C network support?' Answer: 254. Practice identifying the class from the first octet quickly.
In enterprise networking, understanding IPv4 classes is still relevant for troubleshooting legacy devices and for certification exams. For example, a network engineer might encounter an old router configured with a Class B address 172.16.0.1/16. If a new switch is added with an IP 172.16.1.1/24, communication works because both are on the same Class B network (172.16.0.0/16). However, if the subnet mask is misconfigured as 255.255.0.0 on one device and 255.255.255.0 on another, they may not communicate even if the IPs are in the same range. This is a common issue when classful thinking is applied to a classless environment.
Another scenario: A small business uses a Class C private range 192.168.1.0/24. They have 200 devices, so they need more than 254 addresses. They might subnet into /25 networks, but the exam expects you to know the default is /24. In production, you would use CIDR (e.g., /23) to get 510 addresses, but the classful system would consider that a supernet of two Class C networks.
A common misconfiguration: A technician assigns an IP address 10.0.0.1 with a subnet mask of 255.255.255.0, thinking it is a Class C address. But 10.x.x.x is Class A, so the default mask should be 255.0.0.0. With the wrong mask, the device thinks its network is 10.0.0.0/24 instead of 10.0.0.0/8, causing communication failures with other 10.x.x.x devices outside the /24 subnet. This is a frequent real-world error that the exam tests.
Performance considerations: Classful addressing wastes IP space. For example, a company with 300 hosts would need a Class B network (65,534 hosts) if they strictly followed classes, wasting 65,234 addresses. CIDR solves this by allowing a /23 (510 hosts). The exam wants you to understand why classful addressing is inefficient and why CIDR was developed.
When misconfigured, symptoms include: inability to reach certain hosts, incorrect routing, and DHCP allocation failures. Tools like ping and tracert can help isolate the issue, but verifying the subnet mask is critical. The command ipconfig /all on Windows shows the mask; if it is not the default for the class, the network is subnetted or misconfigured.
The 220-1101 exam tests IPv4 address classes under Objective 2.1: 'Explain common networking concepts.' Specifically, you must be able to identify the class of an IP address, its default subnet mask, and its range. The exam may also test private vs. public addresses and special addresses.
Common wrong answers: 1. Confusing Class A range (1-126) with Class B (128-191). Many candidates think 127 is Class A, but it is loopback, not a usable network. The exam may list 127.0.0.1 as a Class A address — it is technically in the range, but it is not a host address. The correct answer for 'Which class is 127.0.0.1?' is 'Class A (but reserved for loopback)'. 2. Thinking 192.168.0.0/16 is a Class B private range. It is Class C (192-223). The private range 192.168.0.0/16 is a single Class C network? No, it is a /16, which is a supernet of 256 Class C networks. The exam may ask 'What class is 192.168.0.1?' Answer: Class C. 3. Misremembering the number of hosts. For Class C, it is 254 (2^8 - 2). Some candidates say 256 or 255. Remember the -2 for network and broadcast. 4. Confusing the default subnet mask for Class B (255.255.0.0) with Class A (255.0.0.0).
Numbers and terms that appear verbatim:
First octet ranges: 1-126, 128-191, 192-223, 224-239, 240-255.
Default masks: /8, /16, /24.
Private ranges: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16.
Loopback: 127.0.0.1.
APIPA: 169.254.x.x.
Edge cases: - 0.0.0.0 is not a class; it is a default route. - 255.255.255.255 is limited broadcast, not Class E (even though 255 is in Class E range). - Addresses like 128.0.0.0 are Class B (first octet 128). - 223.255.255.255 is Class C (last address in Class C range).
How to eliminate wrong answers: If the question asks for the class of an IP, quickly check the first octet. If it is between 0 and 127, it is Class A (but remember 127 is loopback). If between 128-191, Class B. If 192-223, Class C. If 224-239, Class D (multicast). If 240-255, Class E (reserved). For private IP questions, memorize the three ranges. For default subnet mask, match the class to the mask. For host count, use 2^(number of host bits) - 2.
Practice: Given 172.31.0.1, what class? First octet 172 = Class B. Default mask? 255.255.0.0. Private? Yes (172.16.0.0/12 includes 172.31.0.0). Valid host? Yes (not network or broadcast).
Class A: first octet 1-126, default mask 255.0.0.0 (/8), 126 networks, 16,777,214 hosts per network.
Class B: first octet 128-191, default mask 255.255.0.0 (/16), 16,384 networks, 65,534 hosts per network.
Class C: first octet 192-223, default mask 255.255.255.0 (/24), 2,097,152 networks, 254 hosts per network.
Class D: first octet 224-239, multicast, no default subnet mask.
Class E: first octet 240-255, reserved, not used for host addressing.
Private IP ranges: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16.
Loopback address: 127.0.0.1 (127.0.0.0/8).
APIPA (link-local) range: 169.254.0.0/16.
Network and broadcast addresses cannot be assigned to hosts.
Classful addressing is obsolete but still tested on the 220-1101 exam.
These come up on the exam all the time. Here's how to tell them apart.
Classful Addressing
Fixed network/host boundaries based on class (A, B, C).
Default subnet masks: /8, /16, /24.
Wastes IP addresses due to fixed sizes.
Defined in RFC 791 (1981).
Used in legacy networks and certification exams.
Classless Addressing (CIDR)
Variable-length subnet masks (VLSM) allow arbitrary prefix lengths.
No default masks; prefix is specified (e.g., /23).
Efficient use of IP space by matching network size to need.
Defined in RFC 1518/1519 (1993).
Used on the modern Internet and in all current networks.
Mistake
127.0.0.1 is a Class A address that can be assigned to a host.
Correct
127.0.0.1 is in the Class A range (1-126), but it is reserved for loopback testing and cannot be assigned to a network interface. The entire 127.0.0.0/8 block is reserved for loopback.
Mistake
The private IP range 172.16.0.0 to 172.31.255.255 uses a /16 subnet mask.
Correct
The range is a /12 (255.240.0.0), not /16. While many use it with a /16 mask, the official RFC 1918 block is 172.16.0.0/12.
Mistake
Class D addresses can be used as host IPs.
Correct
Class D (224-239) is reserved for multicast groups. Hosts cannot be assigned a Class D address as a unicast IP. They are used for one-to-many communication.
Mistake
255.255.255.255 is a Class E address.
Correct
255.255.255.255 is the limited broadcast address, used to send a packet to all hosts on the local network. It falls in the Class E range (240-255) but is not a classful address; it is a special purpose address.
Mistake
192.168.0.0/16 is a Class B private network.
Correct
192.168.0.0/16 is a Class C block (first octet 192-223). It is a /16 supernet of 256 Class C networks, but the class is still C based on the first octet.
Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.
Class A addresses range from 1.0.0.0 to 126.255.255.255. The first octet is between 1 and 126 inclusive. 0.0.0.0 is reserved for default route and 127.0.0.0 is reserved for loopback, so they are not part of Class A host assignments.
A Class B network has 16 bits for hosts (since the default mask is /16). That gives 2^16 = 65,536 addresses, minus the network address (all host bits 0) and broadcast address (all host bits 1), leaving 65,534 usable host addresses.
No. The private range is 172.16.0.0 to 172.31.255.255 (172.16.0.0/12). 172.32.0.1 falls outside that range, so it is a public IP address.
The default subnet mask for Class C is 255.255.255.0, which is a /24 prefix. It means the first three octets are the network portion, and the last octet is for hosts.
No. Class D addresses (224.0.0.0 to 239.255.255.255) are reserved for multicast groups. They are used as destination addresses for one-to-many communication, not as source or host addresses.
127.0.0.1 is a specific loopback address, commonly used to test the local TCP/IP stack. 127.0.0.0 is the network address of the loopback block (127.0.0.0/8). Both are part of the reserved loopback range and cannot be assigned to a physical network interface.
The class is determined by the first octet (192-223 = Class C), not the subnet mask. 192.168.0.0/16 is a supernetted Class C block that includes 256 Class C networks. The classful system would treat it as multiple Class C networks, but CIDR allows it to be a single /16.
You've just covered IPv4 Address Classes and Ranges — now see how well it sticks with free 220-1101 practice questions. Full explanations included, no account needed.
Done with this chapter?