# Classes of IP Addresses
## What is Classful Addressing
In the early days of the internet, IPv4 addresses were divided into classes. This system, called classful addressing, assigned different portions of the 32-bit address space to different classes based on the leading bits of the address. Each class was designed for networks of a different size. Although classful addressing has been replaced by classless inter-domain routing, understanding the classes remains important for networking exams and for understanding historical network design.
## Class A
Class A addresses have a first bit of 0. The first octet ranges from 1 to 126. The first octet identifies the network, and the remaining three octets identify the host. This gives Class A networks a very large number of possible hosts, specifically 2 to the power of 24 minus 2, which equals 16,777,214 usable hosts per network. However, there are only 126 possible Class A networks. Class A addresses were assigned to very large organizations and governments that needed millions of IP addresses. The default subnet mask for Class A is 255.0.0.0, written as /8 in CIDR notation.
## Class B
Class B addresses have first two bits of 10. The first octet ranges from 128 to 191. The first two octets identify the network and the last two octets identify the host. Class B supports 16,384 networks with 65,534 usable hosts per network. Class B addresses were assigned to large organizations such as universities and large corporations. The default subnet mask for Class B is 255.255.0.0, written as /16 in CIDR notation.
## Class C
Class C addresses have first three bits of 110. The first octet ranges from 192 to 223. The first three octets identify the network and the last octet identifies the host. Class C supports over 2 million networks but only 254 usable hosts per network. Class C addresses were assigned to small organizations. The default subnet mask for Class C is 255.255.255.0, written as /24 in CIDR notation.
## Class D
Class D addresses have first four bits of 1110. The first octet ranges from 224 to 239. Class D addresses are reserved for multicast communication. They are not assigned to individual hosts but are used as group addresses. A packet sent to a Class D multicast address is delivered to all hosts that have joined that multicast group.
## Class E
Class E addresses have first four bits of 1111. The first octet ranges from 240 to 255. Class E addresses are reserved for experimental purposes and are not used in normal network communication.
## Problems with Classful Addressing
Classful addressing was wasteful and inflexible. An organization needing 300 hosts was forced to use a Class B network with 65,534 host addresses, wasting the vast majority. An organization needing 300 hosts could not use two Class C networks and have them appear as a single network without special configuration. These problems led to the development of classless inter-domain routing, which allows the network and host portions to be divided at any bit boundary rather than only at the 8-bit octet boundaries imposed by classful addressing.Back to Subject