IP address classes: A, B, C, D and E
For years, the first number of an IP decided the size of its network. That is how classes worked, and why they still show up in exams and in many devices' settings.
What classes were
In the original IPv4 design (1981), the address space was divided into classes based on the first bits of the address. The class fixed where the network part ended and the host part began, with no mask needed: looking at the first octet was enough.
This system is called classful addressing and it was abandoned in 1993 with the arrival of CIDR, but the terminology lives on: many people say «a class C» when they mean a /24.
The ranges of each class
- Class A: from 0.0.0.0 to 127.255.255.255. Starts with bit 0. Default mask 255.0.0.0 (/8): 128 networks of 16.7 million addresses each.
- Class B: from 128.0.0.0 to 191.255.255.255. Starts with 10. Default mask 255.255.0.0 (/16): 16,384 networks of 65,536 addresses.
- Class C: from 192.0.0.0 to 223.255.255.255. Starts with 110. Default mask 255.255.255.0 (/24): over 2 million networks of 256 addresses.
- Class D: from 224.0.0.0 to 239.255.255.255. Starts with 1110. Reserved for multicast: not assigned to devices.
- Class E: from 240.0.0.0 to 255.255.255.255. Starts with 1111. Reserved for experimental use.
The first octet is enough to identify the class: 1–126 is A, 128–191 is B, 192–223 is C, 224–239 is D and 240–255 is E. 127 belongs to class A but is reserved for loopback (127.0.0.1).
Private addresses in each class
RFC 1918 reserved one block from each class for private networks, which are not routed on the Internet:
- 10.0.0.0/8 in class A (a huge network, common in companies).
- 172.16.0.0/12 in class B (from 172.16.0.0 to 172.31.255.255).
- 192.168.0.0/16 in class C (the one almost every home router uses).
That is why your home network is usually 192.168.1.0/24 or 192.168.0.0/24: it is a «private class C». The public vs private IP guide explains this in detail.
Why they were abandoned
The problem with classes was their rigidity. There were only three sizes and the jump between them was huge: 256, 65,536 or 16.7 million addresses. An organization with 300 devices did not fit in a class C and got a class B, wasting over 65,000 addresses. As the Internet grew, class B networks were running out fast.
CIDR removed classes: any network can now have any prefix, from /0 to /32. That same organization would get a /23 (512 addresses) today. Modern routers do not look at the class at all, only at the prefix.
Where they still show up
- In networking exams and courses (CCNA, college), as a basis for understanding masks.
- In devices and systems that suggest the class's default mask when you enter an IP: type 10.0.0.5 and you are offered 255.0.0.0.
- In old routing protocols such as RIPv1, which do not send the mask and infer it from the class.
- In everyday language: «we got a class C» almost always means «a /24».
Our subnet calculator shows the class of every IP, so you can practice with any address.
Frequently asked questions
What class is the IP 192.168.1.1?
Class C, because its first octet (192) is between 192 and 223. It is also private, part of the 192.168.0.0/16 block.
What class is 127.0.0.1?
By range, class A, but the whole 127.0.0.0/8 block is reserved for loopback: it lets a device talk to itself and never leaves it.
Are IP classes still used?
Not for routing: since 1993 the Internet has used classless CIDR. They remain as a teaching reference and in some default masks.
Does IPv6 have classes?
No. IPv6 was born classless and always uses prefixes. It distinguishes address types (global unicast, link-local, ULA, multicast), but not fixed network sizes.