Knowledge

Network Class: IPv4 Classes A, B, C, D, and E Explained

A network class is the legacy method used to organize IPv4 addresses by size and purpose. Under this classful system, an address belonged to Class A, B, C, D, or E based on its first bits—and, in practice, its first number (octet). Network classes are still useful for learning IP-addressing fundamentals and understanding older documentation. However, modern network design uses CIDR (Classless Inter-Domain Routing) and prefix lengths such as /24 or /16, rather than relying on address classes alone.

What Is a Network Class?

An IPv4 address contains 32 bits, commonly written as four numbers separated by periods, such as 192.168.1.10. Early Internet standards divided this address space into predefined classes.

Each class determined:

  • The address range
  • The default subnet mask
  • The number of network bits and host bits
  • Its intended use

Classes A, B, and C were designed for unicast networks of different sizes. Classes D and E were reserved for specialized purposes. The original IPv4 specification describes the Class A, B, and C formats according to their leading bits.

network class

IPv4 Network Classes at a Glance

Network class First-octet range Default mask Default prefix Traditional purpose
Class A 0–127* 255.0.0.0 /8 Very large unicast networks
Class B 128–191 255.255.0.0 /16 Medium-sized unicast networks
Class C 192–223 255.255.255.0 /24 Small unicast networks
Class D 224–239 N/A N/A Multicast
Class E 240–255 N/A N/A Reserved/experimental

*Some addresses in this range, including 0.0.0.0/8 and 127.0.0.0/8, have special purposes and are not assigned as ordinary Class A networks.

Class A Network

A Class A network has a first octet from 0 to 127 and uses the default subnet mask 255.0.0.0, also written as /8.

In a traditional Class A address, the first 8 bits identify the network, and the remaining 24 bits identify hosts. This creates a very large address block—up to 16,777,214 usable host addresses under the traditional network-and-broadcast convention.

Example:

10.0.0.0/8

Class A was intended for organizations that needed exceptionally large networks. The private range 10.0.0.0/8 is a familiar modern example, although it is now used with flexible CIDR subnetting rather than as one flat Class A network.

Class B Network

A Class B network uses first-octet values from 128 to 191. Its default subnet mask is 255.255.0.0, or /16.

The first 16 bits represent the network, while the final 16 bits represent hosts. A traditional Class B network can contain up to 65,534 usable host addresses.

Example:

172.16.0.0/16

Class B addresses were historically aimed at medium-sized organizations. Today, networks often use more precise prefixes—such as /20, /22, or /24—to avoid wasting addresses.

Class C Network

A Class C network uses first-octet values from 192 to 223 and has the default subnet mask 255.255.255.0, or /24.

Here, the first 24 bits identify the network, and the final 8 bits identify hosts. A default Class C network supports up to 254 usable host addresses.

Example:

192.168.1.0/24

Class C became common for smaller office and home networks. Many people associate 192.168.x.x addresses with Class C, but the important modern notation is the prefix length: 192.168.1.0/24.

Class D and Class E Networks

Classes D and E are not traditional host-network classes.

Class D

Class D covers 224.0.0.0 through 239.255.255.255. It is used for IP multicast, where one sender can deliver traffic to multiple subscribed receivers.

Multicast can support uses such as network discovery, streaming, and routing protocols. A Class D address does not identify a standard network-and-host allocation like Classes A through C.

Class E

Class E covers 240.0.0.0 through 255.255.255.255 and was historically reserved for experimental or future use. It is not used for ordinary public unicast addressing. Specific addresses within this area, such as the limited broadcast address 255.255.255.255, have special handling.

Private IP Addresses and Network Classes

Private IPv4 addresses are often described using the old class terminology, but private addressing is defined by CIDR blocks:

  • 10.0.0.0/8
  • 172.16.0.0/12
  • 192.168.0.0/16

These ranges can be reused inside separate private networks and are not globally routable on the public Internet.

For example, 172.16.0.0/12 spans what would historically have been multiple Class B networks, showing why CIDR is more flexible than the old class model.

Why Network Classes Were Replaced by CIDR

The classful model was simple, but it wasted IPv4 addresses. An organization that needed 500 addresses could not fit into one default Class C network, which offered only 254 usable addresses. A default Class B network, however, was far larger than necessary.

CIDR solved this problem by using variable-length prefixes. Instead of choosing only a Class A /8, Class B /16, or Class C /24 block, network administrators can choose an appropriately sized subnet, such as:

192.168.10.0/26

A /26 contains 64 total addresses, making it far more efficient for a small network segment than a /24. CIDR also enables route aggregation, which helps keep Internet routing tables manageable. The IETF describes legacy classful addressing as obsolete in its CIDR guidance.

Network Class vs. Subnet Mask: The Key Difference

A network class is inferred from the historical IPv4 address range. A subnet mask—or CIDR prefix—defines the actual network boundary used today.

For example:

Address: 192.168.10.25
Prefix:  /27
Network: 192.168.10.0

Although 192.x.x.x would historically be associated with Class C, the /27 prefix is what determines that network’s real size. Never assume a network mask solely from the first octet in a modern environment.

Final Takeaway

Network classes explain the early structure of IPv4 addressing: Class A for large networks, Class B for medium networks, Class C for smaller networks, Class D for multicast, and Class E for reserved use. Today, CIDR has replaced classful addressing because it provides the flexibility and address efficiency modern networks require.

Knowledge

Address Space Layout Randomization (ASLR): How It Works and Why It Matters

Address space layout randomization (ASLR) is a security technique that makes memory-based attacks harder to...

Wormhole Switching: How It Works, Benefits, and Limits

Wormhole switching is a network flow-control technique that divides a packet into small pieces called...

Cut-Through Switching: How It Works, Benefits, and Trade-Offs

Cut-through switching is a network switching method designed to reduce latency. Instead of waiting for...