Recognize the historical classes. Use the supplied prefix to find the actual boundary.

You already know how a subnet mask separates the network and host portions of an Internet Protocol Version 4 (IPv4) address. Before we begin calculating subnets, there is one more set of terms to recognize: Class A, B, C, D, and E.

These labels come from the older classful addressing system. They explain the phrase default mask and still appear in learning materials and older documentation. Modern classless addressing uses an explicit subnet mask or Classless Inter-Domain Routing (CIDR) prefix instead. 

The Rule to Carry Forward

Use the subnet mask or CIDR prefix provided with the address. Its first octet alone does not tell you the configured network/host boundary.

Why Address Classes Existed

The original unicast addressing scheme offered three fixed network sizes. Class A left more bits for hosts, Class C left fewer, and Class B fell between them. Those large steps between sizes did not fit every network well. CIDR replaced class-based allocation with more flexible prefix lengths and supported route aggregation. 

The Five Classes at a Glance

The first octet is the number before the first dot. In 172.16.40.25, it is 172. The table below is a historical reference, not a way to infer a modern configuration.

Class A's leading bit pattern covers 0–127. Introductory tables commonly list 1–126 because 0.0.0.0/8 has special local network meaning and 127.0.0.0/8 is loopback space. A class range does not mean every address in it is available for assignment. 

Classes A, B, and C: the Default Boundaries

Under the historical defaults, Class A used one octet for the network portion, Class B used two, and Class C used three. Every octet contains eight bits, so those boundaries correspond to /8, /16, and /24. 

The default boundary was a starting point: a classful network could still be subnetted with a longer mask. Calling a mask "default" does not mean every address in that class used it.

Classes D and E Have Different Roles

Class D is multicast space, 224.0.0.0/4. A multicast destination identifies a group of receivers rather than one individual interface. It does not use the traditional A/B/C host-and-network split. The /4 describes the multicast block; it is not a default host subnet mask. 

Class E is the historical name for 240.0.0.0/4. IANA (Internet Assigned Numbers Authority) lists that block as reserved. One specific address within it, 255.255.255.255, is designated for limited broadcast. Do not treat the whole range as ordinary assignable host space or label that broadcast address as experimental. 

In a Modern Configuration, Read the Prefix

Consider 10.20.30.45/24. The first octet places the address in the historical Class A range, but the supplied /24 gives it 24 network bits and 8 host bits. Its mask is 255.255.255.0.

Same address, different prefixes.

Likewise, 172.16.40.25/20 uses 255.255.240.0: 20 network bits and 12 host bits. Although 172 falls in the historical Class B range, the actual boundary is four bits into the third octet. CIDR prefixes do not have to end between octets. 

Class and private addressing are separate ideas

The private blocks are:

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

They are specific reserved blocks and not synonyms for Classes A, B, and C. For example, not every address beginning with 172 is private. 

Check your understanding

  1. An interface uses 10.20.30.45/24. Which mask applies: 255.0.0.0 or 255.255.255.0?
  2. What is the purpose of an address beginning with 230?
  3. Can you find the actual subnet mask from 172.16.40.25 alone?

Check your answers

  1. 255.255.255.0. The supplied /24 determines the boundary.
  2. Multicast. 230 falls in the 224–239 range, historically Class D.
  3. No. You need the configured mask or prefix. A historical class is not enough.

Where this leads

Next, we will calculate subnet sizes, host capacity, and subnet counts. When you hear "borrowing host bits," think of extending a given parent prefix to create smaller subnets. That parent prefix must be supplied; it need not be a historical /8, /16, or /24.

Keep the class names as reference vocabulary. Use the actual prefix for the calculations.