Table comparing classful and classless addressing formats, with class types A to E, header labels, subnet mask information, and address ranges.

Classful vs Classless Addressing Definitive Guide 2025 – From Confusion to Confidence in IP Addressing

Classful addressing emerged in the early Internet (1980s) with fixed Class A, B, and C ranges, leading to IP address exhaustion. The introduction of CIDR in 1993 marked the shift to classless addressing, allowing flexible prefixes (e.g., /20) and supporting the IPv4-to-IPv6 transition

Classful and Classless addressing are terms describing IP address structure, with classless addressing gaining prominence in the IPv6 transition. Classless addressing has a two-part view, and classful addressing has a three-part view.  With classful addressing, the address always has an /8, /16, or /24 bit network prefix, based on the Class A, B, and C addressing rules.  The classful address includes a subnet part between the network and host portions, containing borrowed bits.

Classful Addressing

Each router interface connected to a network requires an IP address and a subnet mask. The IP address uniquely identifies the router or device in the network, and the subnet mask identifies the network broadcast. The prefix length and the subnet mask are different ways of determining the network portion of the IP address. For IPv4 subnetting, we borrow host bits and use them as network bits to create supplementary networks called subnetworks. We can subnet a network, either a classful or a classless subnet.

Borrowing more host bits can define more sub-networks. We already learned that an IPv4 address has 4 octets, and the octet boundaries are predefined:/8, /16, and /24. Network subnetting at octet boundaries is too easy. The table below identifies the prefix lengths and subnet masks equivalent to prefixes. The table also identifies the network and host bits, including the number of hosts each subnet can connect. The longer prefix lengths mean fewer hosts per network.

ClassHOBNET ID BitsHost ID BitsNo of NetworksHost Per NetworkStart AddressEnd Address
Class A08242⁷ = 1282²⁴ = 16,777,2160.0.0.0127.255.255.255
Class B1016162¹⁴ = 16,3842¹⁶ = 65,536128.0.0.0191.255.255.255
Class C1102482²¹ = 2,097,1522⁸ = 256192.0.0.0223.255.255.255
Class D1110224.0.0.0239.255.255.255
Class E1111240.0.0.0255.255.255.255

Note: network and broadcast addresses included

Classful Subnetting

Subnetting on the octet boundary is easy and is also known as classful subnetting. To understand the subnetting on the octet boundaries, examine the following example. Suppose you have an IP network 120.0.0.0/8 in a single broadcast domain. The number of hosts in the network is 16,777,214. This large network, with 16,777,214 hosts, generates excessive broadcast traffic, straining switch resources and degrading performance. So, this is not perfect.

You can subnet the network 120.0.0.0/8 address at the octet boundary of /16, as shown in the Figure below. Subnetting with /16 can provide 256 sub-networks (i.e., 120.0.0.0/16 – 120.255.0.0/16). Each subnet contains 65,534 hosts. The first two octets with the/16 prefix length identify the network portion of the address, and the last two octets are for the host portion of IP addresses. The figure below illustrates the subnetting of a /8 network into a /16 network.

Subnet Address or Subnet ID (/16)1st Usable IP AddressLast Usable IP AddressBroadcast Address
120.0.0.0/16120.0.0.1120.0.255.254120.0.255.255
120.1.0.0/16120.1.0.1120.1.255.254120.1.255.255
120.2.0.0/16120.2.0.1120.2.255.254120.2.255.255
120.3.0.0/16120.3.0.1120.3.255.254120.3.255.255
120.100.0.0/16120.100.0.1120.100.255.254120.100.255.255
120.101.0.0/16120.101.0.1120.101.255.254120.101.255.255
120.200.0.0/16120.200.0.1120.200.255.254120.200.255.255
120.201.0.0/16120.201.0.1120.201.255.254120.201.255.255
120.253.0.0/16120.253.0.1120.253.255.254120.253.255.255
120.254.0.0/16120.254.0.1120.254.255.254120.254.255.255
120.255.0.0/16120.255.0.1120.255.255.254120.255.255.255

As shown in the Figure below, you can also subnet the /8 prefix network into the /24 octet boundary. A/24 subnetting can provide 65536 sub-networks (i.e., 120.0.0.0/24 – 120.255.255.0/24), with each subnet containing 256 hosts. The first three octets identify the network portion of the address, while the last octets are for the host portion of IP addresses while using the/24 prefix.

Subnet Address or Subnet ID (/24)1st Usable IP AddressLast Usable IP AddressBroadcast Address
120.0.0.0/24120.0.0.1120.0.0.254120.0.0.255
120.0.1.0/24120.0.1.1120.0.1.254120.0.1.255
120.0.2.0/24120.0.2.1120.0.2.254120.0.2.255
120.0.255.0/24120.0.255.1120.0.255.254120.0.255.255
120.1.0.0/24120.1.0.1120.1.0.254120.1.0.255
120.1.1.0/24120.1.1.1120.1.1.254120.1.1.255
120.2.0.0/24120.2.0.1120.2.0.254120.2.0.255
120.255.0.0/24120.255.0.1120.255.0.254120.255.0.255
120.255.1.0/24120.255.1.1120.255.1.254120.255.1.255
120.255.254.0/24120.255.254.1120.255.254.254120.255.254.255
120.255.255.0/24120.255.255.1120.255.255.254120.255.255.255

This breakdown offers a clear look at address allocation within a /24 subnet structure. If you’re building educational content around this or want help calculating address ranges dynamically, I’d be glad to assist!

Classless Subnetting

Classful subnetting uses the default Class A, B or C networks, including the default mask for its classes (A, B, C). The default subnet mask for Classes is:

Class-A: 0 – 127 with a mask of 255.0.0.0 or /8

Class-B: 128 – 191 with a mask of 255.255.0.0 or /16

Class-C: 192 – 223 with a mask of 255.255.255.0 or /24

Class-D: (224 – 239): Used for multicast groups (e.g., 224.0.0.1 for all hosts), not for host addressing.

Class E: (240 – 255): Reserved for experimental use, not routable.

Routers configured with classful ip addresses do not include subnet mask information with routing updates. The router assumes its subnet mask or defaults to the classful subnet mask.

However, classless subnetting allows the use of Variable-Length Subnet Masks (VLSM). The classless IP address uses a CUSTOM subnet mask. Routers running a classless IP address, for example, include subnet mask information with their routing updates.

120.210.0.0/17

20.6.150.0/28

172.31.16.0/21

172.16.16.0/20

Subnetting Formulas – Valid for Classful and Classless Addressing

To calculate the number of subnets produced by the bits borrowed from the host portion, use formula (1), and for the number of hosts per network, use formula (2).

Network Subnetting Formula
Classful vs Classless Addressing Definitive Guide 2025 - From Confusion to Confidence in IP Addressing 3

The “n” is the number of borrowed bits from the host portion. The first formula will produce the number of possible networks. The “h” is the number of bits remaining in the host portion. The second formula will produce the number of usable host addresses for each sub-network. Two addresses cannot be assigned to any host: the network address(the first address of the subnet) and the broadcast address(the last address of the subnet), so we must subtract 2 for usable host addresses.

FAQs

  • What is the difference between classful and classless addressing?

    Classful addressing uses fixed /8, /16, or /24 prefixes based on IP classes, while classless addressing (CIDR) allows custom masks (e.g., /20), offering flexibility for CCNA students.

  • How does classful subnetting work at octet boundaries?

    Classful subnetting divides networks at octet boundaries (e.g., /8 to /16), creating subnetworks like 120.0.0.0/16 with 65,534 hosts, a key CCNA skill.

  • What is VLSM and how is it used in classless addressing?

    VLSM (Variable Length Subnet Masking) allows different subnet sizes (e.g., /30, /24) within a network, optimizing address use in CCNP designs.

  • Why is classless addressing preferred in modern networks?

    Classless addressing with CIDR reduces IP wastage and supports routing efficiency, critical for IPv6 transition as of June 2025.

  • How do I calculate the number of subnets and hosts?

    Use 2^n for subnets (n = borrowed bits) and 2^h-2 for hosts (h = remaining bits), a fundamental formula for CCNA subnetting. You can also calculate using our online subnet calculator

  • What tools can help with classful and classless subnetting?

    Subnet calculators and Cisco IOS commands like show ip route assist in planning and verifying address schemes.

  • How can I troubleshoot classful addressing misconfigurations?

    Check subnet masks with ipconfig or show running-config, and ensure routing updates include masks in classless environments.

Avatar of Asad Ijaz

Asad Ijaz

NetworkUstad's lead networking architect with CCIE certification. Specializes in CCNA exam preparation and enterprise network design. Authored 2,800+ technical guides on Cisco systems, BGP routing, and network security protocols since 2018. Picture this: I'm not just someone who writes about tech; I'm a certified expert in the field. I proudly hold the titles of Cisco Certified Network Professional (CCNP) and Cisco Certified Network Associate (CCNA). So, when I talk about networking, I'm not just whistling in the dark; I know my stuff! My website is like a treasure trove of knowledge. You'll find a plethora of articles and tutorials covering a wide range of topics related to networking and cybersecurity. It's not just a website; it's a learning hub for anyone who's eager to dive into the world of bits, bytes, and secure connections. And here's a fun fact: I'm not a lone wolf in this journey. I'm a proud member and Editor of Team NetworkUstad. Together, we're on a mission to empower people with the knowledge they need to navigate the digital landscape safely and effectively. So, if you're ready to embark on a tech-savvy adventure, stick around with me, Asad Ijaz Khattak. We're going to unravel the mysteries of technology, one article at a time!"