IP Address Classes
โก Smart Summary
IP Address Classes divide the IPv4 address space into five groups, A through E, based on the first octet. Each class defines its own address range, default subnet mask, and intended network size.

What is an IP Address?
An IP (Internet Protocol) address is a numerical label assigned to the devices connected to a computer network that uses the IP for communication.
An IP address acts as an identifier for a specific machine on a particular network. It also helps you to establish a virtual connection between a destination and a source. The IP address is also called an IP number or internet address. It helps you to specify the technical format of the addressing and packet scheme. Most networks combine TCP with IP.
An IP address consists of four numbers, and each number contains one to three digits. A single dot (.) separates each number or set of digits, as the image below illustrates.
An IP Address is divided into two parts:
- Prefix: The prefix part of an IP address identifies the physical network to which the computer is attached. The prefix is also known as the network address.
- Suffix: The suffix part identifies the individual computer on the network. The suffix is also called the host address.
How does IP address work?
An IP address works like a postal address. A postal address combines your area, represented by a PIN code, and your house address. The area address is shared by every house in that locality, while the house address is unique to your home.
In the same way, the network address identifies all hosts that belong to a specific network, while the host address uniquely identifies a particular host within it.
Next, let us see how this address space was organized into classes.
What is Classful Addressing?
Classful addressing is the network addressing architecture the Internet used from 1981 until Classless Inter-Domain Routing (CIDR) was introduced in 1993.
This addressing method divides the IPv4 address space into five separate classes based on the leading bits of the first octet.
Here, classes A, B, and C offer addresses for networks of three distinct sizes. Class D is only used for multicast, and Class E is reserved exclusively for experimental purposes, as the image below shows.
IP Header Classes
The following table summarizes the first octet range, default subnet mask, and typical application of each IPv4 class:
| Class | First Octet Range | Default Subnet Mask | Example IP | Leading Bits | Max Number of Networks | Hosts per Network | Application |
|---|---|---|---|---|---|---|---|
| IP Class A | 1 to 126 | 255.0.0.0 | 1.1.1.1 | 0 | 126 | 16,777,214 | Used for very large networks. |
| IP Class B | 128 to 191 | 255.255.0.0 | 128.1.1.1 | 10 | 16,384 | 65,534 | Used for medium-size networks. |
| IP Class C | 192 to 223 | 255.255.255.0 | 192.1.11.1 | 110 | 2,097,152 | 254 | Used for local area networks. |
| IP Class D | 224 to 239 | NA | 224.0.0.1 | 1110 | NA | NA | Reserved for multicasting. |
| IP Class E | 240 to 255 | NA | 240.0.0.1 | 1111 | NA | NA | Reserved for research and development purposes. |
Note: First octet 0 is reserved, and the 127 block is reserved for loopback, so the usable Class A range is 1 to 126.
Let us look at each class in detail:
Class A Network
This IP address class is used when a network contains a large number of hosts. In a Class A network, the leading bit is 0, the first 8 bits (also called the first octet) identify the network, and the remaining 24 bits identify the host within that network.
An example of a Class A address is 102.168.212.226. Here, “102” helps you identify the network and “168.212.226” identifies the host.
Class A addresses from 127.0.0.0 to 127.255.255.255 cannot be assigned to devices because this block is reserved for loopback and diagnostic functions.
Class B Network
In a Class B IP address, the binary address starts with the leading bits 10, so the decimal value of the first octet falls between 128 and 191. The first 16 bits (known as two octets) help you identify the network. The remaining 16 bits indicate the host within the network.
An example of a Class B IP address is 168.212.226.204, where “168.212” identifies the network and “226.204” identifies the host on that network.
Class C Network
Class C is a type of IP address that is used for small networks. In this class, three octets are used to identify the network, and the first octet ranges between 192 and 223.
In this type of network addressing method, the leading bits are set to 110, which makes the first 24 bits of the address the network address and the remaining 8 bits the host address. Most local area networks use Class C IP addresses to connect with the network.
Example of a Class C IP address:
192.168.178.1
Class D Network
Class D addresses are only used for multicasting applications and never for regular networking operations. In this class, the first three bits are set to “1” and the fourth bit is set to “0”, giving the leading bits 1110. All the values within the range 224.0.0.0 to 239.255.255.255 are used to identify multicast groups uniquely.
Therefore, there is no need to extract a host address, so Class D does not have any subnet mask.
Example of a Class D IP address:
227.21.6.173
Class E Network
A Class E IP address is defined by the first four bits of the address being set to 1, which covers addresses from 240.0.0.0 to 255.255.255.255. However, Class E is reserved and its usage has never been defined, so many network implementations discard these addresses as undefined or illegal.
Example of a Class E IP address:
243.164.89.28
How to Identify the Class of an IP Address
You do not need software to find the class of an IPv4 address. The first octet alone tells you the class, the default subnet mask, and how the address splits into network and host portions. Follow these steps:
- Read the first octet: Take the number before the first dot. For the address 172.20.10.5, the first octet is 172.
- Match it to a class range: A first octet of 1 to 126 means Class A, 128 to 191 Class B, 192 to 223 Class C, 224 to 239 Class D, and 240 to 255 Class E.
- Apply the default subnet mask: Since 172 falls in the Class B range, the default mask is 255.255.0.0.
- Split the address: With a Class B mask, the network portion is 172.20 and the host portion is 10.5.
Private and Reserved IP Address Ranges
Within Classes A, B, and C, RFC 1918 sets aside one block each as private address space. Public Internet routers do not forward packets from these ranges, making them ideal for home and office networks. Network Address Translation (NAT) maps them to a public address for Internet access.
| Class | Private Address Range | CIDR Notation | Number of Addresses |
|---|---|---|---|
| A | 10.0.0.0 to 10.255.255.255 | 10.0.0.0/8 | 16,777,216 |
| B | 172.16.0.0 to 172.31.255.255 | 172.16.0.0/12 | 1,048,576 |
| C | 192.168.0.0 to 192.168.255.255 | 192.168.0.0/16 | 65,536 |
Two other reserved ranges: 127.0.0.0/8 for loopback testing and 169.254.0.0/16, which devices assign themselves when no DHCP server responds.
Rules for assigning Network ID
The network ID will be assigned based on the below-given rules:
- The network ID cannot start with 127 because 127 belongs to the Class A range and is reserved for internal loopback functions.
- A network ID with all bits set to 1 is reserved for use as an IP broadcast address and cannot be assigned.
- A network ID with all bits set to 0 denotes a particular host on the local network and should not be routed. Admins who want to hide IP address details from external scans usually combine these reserved ranges with a privacy tool.
Limitations of classful IP addressing
Here are the drawbacks/cons of the classful IP addressing method:
- Risk of running out of address space soon
- Class boundaries did not encourage efficient allocation of address space
These inefficiencies are why CIDR replaced classful addressing in 1993.


