IP Address Classes Explained: A, B, C, D and E With Ranges and Subnet Masks

Every IPv4 address belongs to a class, and the class is decided by a single number: the first octet. IP address classes explained in one line: Class A covers first octets 0 to 127, Class B covers 128 to 191, Class C covers 192 to 223, Class D covers 224 to 239 for multicast, and Class E covers 240 to 255 for experimental use. The class originally fixed how much of the address named the network and how much named the host, along with a default subnet mask.
Modern networks no longer route by class, yet classes remain the fastest way to read an address at a glance, and they are still core exam and interview material. This guide gives the full ip address classes range table, the leading bits behind each range, the private ranges hidden inside classes A, B and C, the special addresses, and the reason CIDR replaced the classful system in 1993.
What ip address classes are and why they existed
When the Internet Protocol was standardized in RFC 791 in 1981, networks came in wildly different sizes. A university might need thousands of host addresses, while a small lab needed a few dozen. The classful design solved this with one elegant rule: the first bits of the address announce its own format. A router reading the opening bits knew immediately how many of the following bits identified the network and how many identified the host, with no separate mask information needed.
Five classes were defined. Classes A, B and C are unicast classes for ordinary networks, sized large, medium and small. Class D was set aside for multicast, where one packet is delivered to a group of hosts. Class E was reserved for experimental use and was never released for general assignment. The official record of how the address space is divided today is maintained in the IANA IPv4 Address Space registry, and the class boundaries are still visible in that registry as the historical /8 allocations.
The ip address classes chart
The table below is the complete ip address classes range table with the values students and network engineers actually use: leading bits, default mask, network count and hosts per network.
| Class | First octet range | Leading bits | Default subnet mask | Networks available | Hosts per network | Typical use |
|---|---|---|---|---|---|---|
| A | 0 to 127 | 0 | 255.0.0.0 (/8) | 128 (126 usable) | 16,777,214 | Very large networks, major providers and early allocations |
| B | 128 to 191 | 10 | 255.255.0.0 (/16) | 16,384 | 65,534 | Universities, large companies, internet providers |
| C | 192 to 223 | 110 | 255.255.255.0 (/24) | 2,097,152 | 254 | Small networks, offices and home LANs |
| D | 224 to 239 | 1110 | None | Not applicable | Not applicable | Multicast groups for streaming and routing protocols |
| E | 240 to 255 | 1111 | None | Not applicable | Not applicable | Experimental and reserved, not assigned to hosts |
Two numbers in the table confuse people. Class A shows 128 networks but only 126 usable, because network 0 is reserved for special source addressing and network 127 is the loopback block. Host counts are always the power of two minus two, because the all zeros host address names the network itself and the all ones host address is the broadcast for that network.
Cisco's long running beginner documentation, IP Addressing and Subnetting for New Users, uses exactly these class ranges and natural masks, which is why they remain the standard reference values in certification material.
What a subnet mask explained in class terms
A subnet mask is a 32 bit pattern that separates the network portion of an address from the host portion. In the classful system each class carried a natural mask: /8 for A, /16 for B and /24 for C. Where the mask has 1 bits, the address bits belong to the network. Where the mask has 0 bits, the address bits belong to the host. That is why the phrase ip address classes and subnet mask appears in every course: the class told you the mask before anyone wrote masks down separately. Subnetting then means borrowing host bits to create smaller networks inside the class boundary, while CIDR, covered below, removes the boundary altogether.

How to identify the class from the first octet
You only need the first octet and a few seconds. Work through these examples the way an exam expects.
- Read the first octet of the address.
- Match it against the ranges: 0 to 127 is A, 128 to 191 is B, 192 to 223 is C, 224 to 239 is D, 240 to 255 is E.
- If it is A, B or C, apply the matching default mask to split network and host portions.
Worked examples:
- 10.45.8.21: first octet 10, Class A. With the /8 mask the network is 10.0.0.0 and the host portion is 45.8.21. This address is also private, as the next section explains.
- 172.20.14.5: first octet 172, Class B. With the /16 mask the network is 172.20.0.0 and the host portion is 14.5.
- 200.100.50.25: first octet 200, Class C. With the /24 mask the network is 200.100.50.0 and the host portion is 25.
- 229.0.0.15: first octet 229, Class D. There is no network and host split, because the whole address names a multicast group.
- 250.10.1.1: first octet 250, Class E. Reserved, so you will not meet it as a real host address.
The leading bits give the same answer in binary. A first octet starting with bit 0 must be 127 or lower, which is Class A. The pattern 10 gives 128 to 191, 110 gives 192 to 223, 1110 gives 224 to 239, and 1111 gives 240 to 255. Converting addresses between dotted decimal, binary and a single decimal number is easier with a tool, and the IP to Decimal converter shows, for example, that 192.168.1.1 equals the single decimal value 3232235777.
Private ranges inside classes A, B and C
Classes describe size. They do not decide whether an address is public or private. Inside each unicast class, one block was reserved by RFC 1918 for private networks, free for anyone to use behind a router and never routed on the public internet.
| Class | Private range | CIDR form | Size |
|---|---|---|---|
| A | 10.0.0.0 to 10.255.255.255 | 10.0.0.0/8 | 16,777,216 addresses |
| B | 172.16.0.0 to 172.31.255.255 | 172.16.0.0/12 | 1,048,576 addresses |
| C | 192.168.0.0 to 192.168.255.255 | 192.168.0.0/16 | 65,536 addresses |
The Class B private block is the one people misread. Only 172.16.0.0 to 172.31.255.255 is private. An address such as 172.32.0.1 is public, even though it starts with 172. Home routers almost always use the Class C block, which is why 192.168.1.1 and 192.168.0.1 appear on so many login pages. The full comparison of what public and private addresses do, and how NAT connects them, is covered in the guide to public vs private IP addresses. Note also that the Class A private block is a single classful network, while the Class C private space contains 256 separate classful Class C networks used as one block, an early hint that the class boundaries were already bending.
Special addresses that break the simple rules
A few ranges sit inside the class structure but follow their own rules, and they appear in exams and troubleshooting alike.
- Loopback, 127.0.0.0/8. The whole Class A block from 127.0.0.0 to 127.255.255.255 points back at your own device. In practice everyone uses 127.0.0.1. Traffic to it never leaves the machine, which makes it the standard test that the local network stack works.
- This network, 0.0.0.0/8. Addresses starting with 0 are used as source addresses only during startup, for example when a device asks for an address by DHCP before it owns one. The single value 0.0.0.0 also appears in routing tables as the default route placeholder.
- Link local, 169.254.0.0/16. A Class B range reserved for automatic self assignment when DHCP fails. Seeing a 169.254 address on a device is a reliable sign it could not reach a DHCP server.
- Broadcast, 255.255.255.255. The last Class E value is the limited broadcast address, delivered to every host on the local network. It is a special use inside a class that is otherwise unassigned.
- Documentation ranges. 192.0.2.0/24, 198.51.100.0/24 and 203.0.113.0/24 are Class C blocks reserved for examples in books and guides, so they are safe to print. Several examples in this article use them for that reason.
Why CIDR replaced classful addressing
The classful system wasted addresses on a huge scale. An organization needing 300 hosts was too big for a Class C network with 254 hosts, so it received a Class B network with 65,534 addresses and left most of them unused. At the same time the internet was running out of Class B networks, and global routing tables were growing with every new classful assignment. The fix arrived in 1993, when RFC 1519 introduced Classless Inter Domain Routing (CIDR), later updated by RFC 4632. CIDR discards the class boundaries and lets any prefix length, such as /20 or /27, define the split between network and host portions.
CIDR brought two practical tools with it. Variable Length Subnet Masking (VLSM) allows one block to be divided into subnets of different sizes, so a point to point link can take a /30 while a busy office takes a /23 from the same allocation. Route aggregation, sometimes called supernetting, lets providers summarize many small blocks into one routing table entry, which keeps global routing manageable. This is also why your router login page shows masks such as 255.255.255.0 on a home LAN regardless of class history, and why a lookup result may show a provider block like /18 that matches no class at all.
Classful vs classless today
| Aspect | Classful system | Classless system (CIDR) |
|---|---|---|
| Network size | Fixed by class: /8, /16 or /24 | Any prefix length from /0 to /32 |
| Address waste | High, blocks rarely fit the need | Low, blocks sized to the need |
| Mask information | Implied by the first bits | Carried explicitly with the address |
| Routing table size | One entry per classful network | Aggregated entries cover many blocks |
| Where you still see it | Exams, defaults, terminology | All production routing and allocation |
Classes survive as vocabulary and as defaults. Operating systems still suggest the natural mask when you type an address, documentation still calls a /24 a Class C sized block, and the private ranges are still described by their parent class. If you want to practice the arithmetic, generating sample addresses inside each class with the Random IP Generator and classifying them by first octet is a fast drill. For the bigger picture of how the newer protocol redesigned addressing entirely, see the comparison of IPv4 vs IPv6.
Exam style quick reference
| Question pattern | Fast answer |
|---|---|
| First octet 1 to 126 | Class A (127 is loopback, 0 is special) |
| Leading bits 10 | Class B |
| Default mask 255.255.255.0 | Class C, /24, 254 hosts |
| 224.0.0.5 | Class D, a multicast address used by OSPF |
| Usable hosts formula | 2 to the power of host bits, minus 2 |
| Private Class B range | 172.16.0.0 to 172.31.255.255 only |
| Year CIDR replaced classful routing | 1993, RFC 1519 |
Frequently asked questions
What are the 5 classes of ip addresses?
The five classes are A, B, C, D and E. Classes A, B and C are for ordinary unicast networks of decreasing size. Class D is reserved for multicast, where traffic goes to a group of hosts at once. Class E is reserved for experimental use and is not assigned to normal networks.
How do you tell the class of an ip address?
Look only at the first octet. Values 0 to 127 mean Class A, 128 to 191 mean Class B, 192 to 223 mean Class C, 224 to 239 mean Class D and 240 to 255 mean Class E. The same answer comes from the leading bits: 0, 10, 110, 1110 and 1111 in that order.
What is the default subnet mask for each class?
Class A uses 255.0.0.0, which is /8. Class B uses 255.255.0.0, which is /16. Class C uses 255.255.255.0, which is /24. Classes D and E have no default mask, because they are not divided into network and host portions.
Are ip address classes still used today?
Not for routing or allocation. CIDR replaced the classful system in 1993, and providers now assign blocks of any prefix size. Classes remain in teaching, certification exams, default mask suggestions and everyday terminology, so they are still worth knowing even though the live internet is classless.
Is 192.168.1.1 a Class C address?
Yes. Its first octet, 192, falls in the Class C range of 192 to 223. It also sits inside the RFC 1918 private block 192.168.0.0/16, which is why it is the most common router login address in homes, while never appearing as a public address on the internet.
What is the difference between classful and classless addressing?
Classful addressing fixes the network size by the first bits of the address, giving only /8, /16 and /24 options. Classless addressing, meaning CIDR, allows any prefix length, so a block can be sized to fit the actual number of hosts. Classless systems also carry the mask explicitly instead of implying it from the address.
Conclusion
The ip address classes chart is a small table with a long shadow: first octet ranges, leading bits, default masks and host counts explain how the early internet was organized, why certain ranges are private or special, and why CIDR had to replace the system. Keep the quick reference nearby for study, and use the IP to Decimal converter when you want to see the same address in the decimal and binary forms that the class rules were built on.