IP address class

Also known as: classful addressing

On this page 7

An IP address class is one of the five fixed categories, labeled Class A through Class E, into which the original IPv4 scheme divided the 32-bit address space, with the class determined by the leading bits of the first octet. In Internet addressing, this system is known as classful addressing, and it decided where the network portion of an address ended and the host portion began without any separate mask.

Classful addressing was defined with IPv4 in RFC 791 in 1981 and was formally replaced by CIDR in 1993. It no longer governs routing or allocation, yet the class vocabulary survives in documentation, certification exams, legacy equipment and the informal habit of calling a /24 network a “Class C”. Understanding the classes explains why CIDR, private ranges and subnetting look the way they do today.

How the leading bits define each class

The class of an IPv4 address is read from its first one to four bits, which made the scheme cheap for early routers to evaluate. A router examined the high-order bits, identified the class and immediately knew the implicit network mask, so routing tables needed no prefix length at all.

The table below shows the bit patterns, the resulting first-octet ranges and the default division between network and host fields.

ClassLeading bitsFirst octet rangeNetwork / host bitsDefault mask
Class A00 to 1278 / 24255.0.0.0 (/8)
Class B10128 to 19116 / 16255.255.0.0 (/16)
Class C110192 to 22324 / 8255.255.255.0 (/24)
Class D1110224 to 239Not applicableNone (multicast)
Class E1111240 to 255Not applicableNone (reserved)
IPv4 address classes by leading bits

Classes A, B and C carried unicast host addresses and differed only in where the boundary fell. Class D was set aside for multicast group addresses, and Class E was reserved for experimental use; the address 255.255.255.255 inside that block serves as the limited broadcast address.

Network capacity of classes A, B and C

Each unicast class traded number of networks against hosts per network, and the steps between them were extremely coarse. Moving from Class C to Class B multiplied the host capacity by 256, with nothing in between.

ClassNumber of networksUsable hosts per networkTypical original holder
Class A126 usable16,777,214Large carriers, governments, early research institutions
Class B16,38465,534Universities and large enterprises
Class C2,097,152254Small organizations and sites
Usable networks and hosts per unicast class

Host counts subtract two addresses per network, because the all-zeros host field names the network itself and the all-ones host field is the directed broadcast address. Network 0 and network 127 in Class A were withheld: 0.0.0.0/8 means “this network”, and 127.0.0.0/8 is the loopback range, which is why only 126 Class A networks were assignable.

Why classful addressing was abandoned

Classful addressing failed because its three fixed block sizes matched almost no real organization. A company with 2,000 hosts was too large for a Class C and received a Class B, leaving more than 63,000 addresses unused; this pattern drained the Class B pool rapidly by the early 1990s.

The opposite workaround, giving such a company eight Class C networks, created a second problem: routing table growth. Every Class C network needed its own entry in backbone routers, and memory in that era could not absorb millions of routes. The combination of address waste and table explosion led the IETF to standardize Classless Inter-Domain Routing in RFC 1518 and RFC 1519, later consolidated in RFC 4632.

The following comparison summarizes how classful and classless designs differ in practice.

AspectClassful addressingCIDR
Prefix lengthImplied by leading bitsStated explicitly, /0 to /32
Block sizesOnly /8, /16 or /24Any power of two
Route aggregationNot possible across classesSupernets summarize many routes
Address efficiencyPoor, large unused blocksAllocation matches actual need
Routing protocolsRIPv1, IGRPOSPF, BGP-4, RIPv2, IS-IS
Classful addressing compared with CIDR

Where IP address classes still appear

Although routing has been classless for three decades, class boundaries still shape several parts of IPv4. The private address ranges defined in RFC 1918 were chosen along class lines: one Class A network, sixteen Class B networks and 256 Class C networks.

AreaClass-based originCurrent status
Private ranges10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16Defined in RFC 1918, still in daily use
Multicast blockFormer Class D, 224.0.0.0/4Still the IPv4 multicast range
Reserved blockFormer Class E, 240.0.0.0/4Largely unusable on common stacks
Default masksAuto-filled mask in configuration toolsConvenience feature, editable
Legacy /8 holdersEarly Class A grantsSome returned or sold, some retained
Legacy class traces in current IPv4 practice

Many operating systems and router interfaces still propose a default mask based on the first octet when an address is typed without a prefix. This is a convenience, not a rule, and an administrator should always verify the mask against the actual design. Proposals to open the Class E block for unicast use have surfaced repeatedly, but widespread hardware and software support is lacking, so it remains effectively unavailable.

Common misconceptions about address classes

Misunderstandings about classes are frequent because the terms outlived the mechanism. The most persistent errors concern masks, private space and IPv6.

  • “Class C” does not mean /24 today. A 192.168.x.x address can sit in a /16, /22 or /30 network; the prefix length is configured, not implied.
  • Private addresses are not a class. RFC 1918 ranges reuse class-aligned blocks, but privacy comes from that RFC, not from class membership.
  • IPv6 has no classes. IPv6 was classless from the start and uses prefixes, scopes and address types such as global unicast and unique local addresses.
  • Subnetting is not the same as classes. Subnetting divides a block further; under classful rules, subnets of one major network could not use different masks unless the protocol supported variable-length subnet masking.
  • Classful routing protocols are obsolete. RIPv1 and IGRP send no mask in updates, which breaks discontiguous networks and modern designs.

In plain words

Early on, every Internet address belonged to one of a few fixed size groups, a bit like apartments offered in only three sizes: a studio, a family flat or an entire tower block. The first few digits of the address told everyone which size it was.

The trouble was that most organizations needed something in between. A business that outgrew the studio had to take the whole tower, and most rooms stayed empty. Because addresses were running out, engineers replaced the system with one that lets blocks be cut to almost any size. Today the classes are mainly a history lesson, but their names still show up in everyday network talk.

A real-world example

A network technician at a regional clinic inherits an older router that was configured years ago. The internal network uses addresses such as 172.20.5.10, and the device automatically filled in the Class B default mask of 255.255.0.0, treating all 65,534 possible hosts as one flat segment. Broadcast traffic from medical devices reaches every workstation, and a newly added branch office cannot be routed separately.

The technician redesigns the space with CIDR prefixes: 172.20.0.0/24 for clinical workstations, 172.20.1.0/25 for imaging equipment and 172.20.2.0/26 for the branch link. The old classful RIPv1 routing is replaced by OSPF, which carries masks in its updates. Broadcast domains shrink to the size of each department, the branch becomes reachable, and the address plan now documents prefix lengths explicitly instead of relying on the first octet.