IP address classes are the five groups, A to E, that the original IPv4 design used to sort every address by its first few bits. Classes A, B and C were for networks of three fixed sizes, Class D is for multicast and Class E is reserved. This system is called classful addressing, and it comes from RFC 791, published in September 1981. CIDR replaced it in 1993, yet the classes still turn up in exam questions, older documentation and default subnet masks. The quick test is the first number of the address: 1 to 126 is Class A, 128 to 191 is Class B and 192 to 223 is Class C. Every IPv4 IP address falls into exactly one class, including the one your router gives you.
IP address classes chart (A, B, C, D, E)
The chart below lists the classful IP address ranges for all five classes and the leading bits that define each one. Class A covers first octets 0 to 127, Class B 128 to 191, Class C 192 to 223, Class D 224 to 239 and Class E 240 to 255. Only A, B and C are split into network and host parts.
| Class | Leading bits | First octet | Address range | Default mask | Network / host bits | Networks | Usable hosts per network | Used for |
|---|---|---|---|---|---|---|---|---|
| A | 0 | 0 to 127 (1 to 126 usable) | 0.0.0.0 to 127.255.255.255 | 255.0.0.0 (/8) | 8 / 24 | 126 | 16,777,214 | Very large networks |
| B | 10 | 128 to 191 | 128.0.0.0 to 191.255.255.255 | 255.255.0.0 (/16) | 16 / 16 | 16,384 | 65,534 | Medium networks |
| C | 110 | 192 to 223 | 192.0.0.0 to 223.255.255.255 | 255.255.255.0 (/24) | 24 / 8 | 2,097,152 | 254 | Small networks |
| D | 1110 | 224 to 239 | 224.0.0.0 to 239.255.255.255 | None | Not split | n/a | n/a | Multicast |
| E | 1111 | 240 to 255 | 240.0.0.0 to 255.255.255.255 | None | Not split | n/a | n/a | Reserved |
Two blocks inside Class A never went to ordinary networks. 0.0.0.0/8 means "this network," and 127.0.0.0/8 is the loopback block behind 127.0.0.1 localhost. That is why many charts start Class A at 1 and stop it at 126. At the very top of Class E, 255.255.255.255 is the limited broadcast address. It reaches every device on the local network, and routers never forward it.
The boundaries are easy to remember. Each class starts where one more leading bit turns to 1: 128 is 10000000, 192 is 11000000, 224 is 11100000 and 240 is 11110000. Classes A, B and C are defined in RFC 791, Classes D and E in RFC 1112, and the reserved blocks in the IANA IPv4 Special-Purpose Address Registry.
How to tell which class an IP address belongs to
IP classes are read from the first octet alone. Compare that first number with the chart: below 128 is Class A, 128 to 191 is B, 192 to 223 is C, 224 to 239 is D and 240 or higher is E. The other three octets never change the class, so 10.0.0.1 and 10.255.9.9 are both Class A.
| Address | Class | Why |
|---|---|---|
| 10.20.30.40 | A | 10 is below 128 |
| 172.16.0.1 | B | 172 is between 128 and 191 |
| 192.168.1.10 | C | 192 is between 192 and 223 |
| 224.0.0.251 | D | 224 opens the multicast range; IANA lists this address for mDNS |
| 240.0.0.1 | E | 240 and above is reserved |
What class is the IP address 172.16.0.1?
172.16.0.1 is a Class B address. Its first octet, 172, falls between 128 and 191. It is also a private address, because 172.16.0.0 to 172.31.255.255 is one of the three RFC 1918 private ranges. Every address that starts with 172 is Class B, private or public.
Finding the class from the first byte in binary
Exam questions sometimes give the first byte in binary instead of decimal. Read the leading bits from the left: 0 means A, 10 means B, 110 means C, 1110 means D and 1111 means E. Take 203. In binary it is 11001011. It starts with 110, so 203.0.113.5 is a Class C address.
You can try this on your own connection. Check your IP address and read the first number. A public IP can sit in Class A, B or C, and today the class says nothing about how large your ISP's network really is.
Network bits and host bits in each class
Every Class A, B or C address has two parts: a network ID shared by the whole network and a host ID that names one device on it. In classful addressing the boundary between them is fixed by the class. Class A splits after the first octet, Class B after the second and Class C after the third.
- Class A: N.H.H.H, with 8 network bits and 24 host bits
- Class B: N.N.H.H, with 16 network bits and 16 host bits
- Class C: N.N.N.H, with 24 network bits and 8 host bits
So the Class C address 198.51.100.40 has the network ID 198.51.100 and the host ID 40.
Does a class C IP address have 24 or 21 network bits?
Both numbers appear in textbooks, and both are correct. A class C IP address has 24 bits in its network portion. The first 3 of those bits are always 110, because that pattern is what marks the address as Class C. That leaves 21 bits free to number different networks. RFC 791 describes it this way too: the high-order bits are "one-one-zero" and "the next 21 bits are the network."
The same logic gives Class A 8 network bits with 7 free, and Class B 16 network bits with 14 free. Read exam questions carefully. "How many bits are in the network portion?" wants 24. "How many Class C networks exist?" wants 221, which is 2,097,152.
How to count networks and hosts per class
Two formulas answer almost every classful question:
- Networks = 2 raised to the number of free network bits.
- Usable hosts per network = 2 raised to the number of host bits, minus 2.
The 2 addresses you remove are the network address (host bits all 0) and the broadcast address (host bits all 1). In the Class C network 192.0.2.0, the network address is 192.0.2.0, the broadcast address is 192.0.2.255 and devices use .1 to .254. That is 28 - 2 = 254 hosts. Class B gives 216 - 2 = 65,534 and Class A gives 224 - 2 = 16,777,214.
Class A is the odd one out for network counts. Its 7 free bits give 128 values. Network 0 and network 127 are reserved, so only 126 Class A networks were ever usable.
IP address classes and default subnet masks
Each of the three unicast classes has a default subnet mask that matches its network bits. Class A uses 255.0.0.0 (/8), Class B uses 255.255.0.0 (/16) and Class C uses 255.255.255.0 (/24). Classes D and E have no default mask, because they are never split into network and host parts.
Most home routers hand out 192.168.x.x addresses with the mask 255.255.255.0. That matches the Class C default, but the router maker picked a /24 because 254 devices is plenty for a home. The class rules play no part in that choice.
A common mistake is thinking a 10.x.x.x address must use a /8 mask. Since CIDR, any prefix length works with any address, so 10.0.0.0/24 is a valid network with 254 hosts. How masks and prefix lengths work is covered in the guide to subnet masks and CIDR notation.
Private IP ranges in each class
RFC 1918 set aside one private range inside each unicast class: a single Class A network, 16 Class B networks and 256 Class C networks. These addresses work only inside local networks. They are never routed on the public internet.
| Class | Private range | CIDR block | Classful networks inside it |
|---|---|---|---|
| A | 10.0.0.0 to 10.255.255.255 | 10.0.0.0/8 | 1 (network 10) |
| B | 172.16.0.0 to 172.31.255.255 | 172.16.0.0/12 | 16 (172.16 to 172.31) |
| C | 192.168.0.0 to 192.168.255.255 | 192.168.0.0/16 | 256 (192.168.0 to 192.168.255) |
The Class B block is written /12 because CIDR groups those 16 Class B networks into one prefix. Two other ranges often get mixed up with these. 169.254.0.0/16 sits in Class B and is link-local, the address a device gives itself when DHCP fails. 100.64.0.0/10 sits in Class A and is shared address space for carrier-grade NAT under RFC 6598. Neither is an RFC 1918 private range. The practical difference is explained in public vs private IP addresses.
Why classful addressing was replaced by CIDR
Classful addressing handed out IPv4 space in blocks of only three sizes, and that wasted addresses. A network got 254, 65,534 or 16,777,214 hosts, with nothing in between. By the early 1990s Class B space was running out and routing tables were growing faster than routers and people could manage, according to RFC 4632.
Picture a company that needed 2,000 addresses. A Class C was too small, so it got a Class B and left more than 63,000 addresses unused. Under CIDR the same company gets a /21 with 2,046 usable hosts. RFC 1519 introduced CIDR in 1993, and RFC 4632 replaced it in 2006, describing the decision to "deprecate the Class A/B/C network address assignment system." IPv6 never used classes at all.
Where you still see IP address classes today
IP address classes no longer decide how addresses are assigned or routed on the internet, but the names survive in a few places. When you meet "Class C" in a modern document, read it as "a /24 network" and you will almost always be right.
- Courses and certification study guides, which still ask you to identify a class and count its hosts.
- Hosting and SEO talk, where "Class C IP" loosely means addresses that share their first three octets, the same /24.
- Old routing protocols. RIP version 1 (RFC 1058, 1988) carries no subnet mask in its route entries, which is why it is called a classful protocol and why RIP version 2 added a mask field.
Frequently asked questions
Are IP address classes still used?
Not for assigning or routing addresses. Since 1993, registries and routers have worked with CIDR prefixes of any length, from /8 down to /32. Classes live on in textbooks, exam questions and the three default masks. The one class boundary still in daily use is Class D, because the multicast range 224.0.0.0 to 239.255.255.255 never changed.
What class is 192.168.1.1?
Class C, because 192 falls between 192 and 223. It is also a private address from the RFC 1918 block 192.168.0.0/16, which is why so many home routers use it as their own LAN address. Its usual /24 mask matches the Class C default, though nothing forces that choice on a modern network.
Why is 127 not in Class A or Class B?
127 is part of Class A, since its first bit is 0. The whole 127.0.0.0/8 block is reserved for loopback, so a computer uses it only to talk to itself and it never appears on a real network. Charts that list Class A as 1 to 126 leave 127 out for that reason, which makes it look like a gap between A and B.
Which IP class is used for multicast?
Class D, the range 224.0.0.0 to 239.255.255.255. A multicast packet goes to every device that joined a group, not to one host. The IANA multicast registry lists 224.0.0.1 as "All Systems on this Subnet" and 224.0.0.251 as mDNS, the address printers and other local devices use to announce themselves on a home network.
Can I use Class E addresses?
Not on a normal network. RFC 1112 reserved addresses starting with 1111 "for future addressing modes," and no registry assigns them to hosts. Support for them varies between operating systems and network equipment, so a device set to a 240.x.x.x address may fail to send or receive traffic. Stick to the private ranges for any local network.








