IP Address Classes: A, B, C, D and E Explained

IP (Internet Protocol) address classes divide the 32-bit IPv4 (Internet Protocol version 4) address space into five categories, A through E, based on the first bits of the first octet, as originally defined in RFC 791. This classful scheme fixes the boundary between the network and host portions of an address, and ties each class to a default subnet mask. That’s different from the flexible boundaries you get with modern Classless Inter-Domain Routing (CIDR, formalized in RFC 4632) and Variable Length Subnet Mask (VLSM) designs.

In this lesson, I’ll show you how to identify each class by its first octet range and first bits. You’ll also see the default mask and network/host split for Classes A, B, and C, along with the special roles of Class D (multicast) and Class E (reserved for future use) addresses.

Key Takeaways

  • In classful addressing, an IP address’s class is determined by the first bits of its first octet:
    • Class A begins with 0.
    • Class B with 10.
    • Class C with 110.
    • Class D with 1110.
    • Class E with 1111.
  • The first octet’s decimal range gives you the same answer without converting to binary.
  • An address’s class comes from its first bits alone, and it never changes, even if you apply a subnet mask or CIDR that differs from the default.
  • Class A (1-126) uses mask 255.0.0.0 (/8):
    • 1 octet for network, 3 octets for host.
    • 126 networks, each with up to 16,777,214 usable hosts.
    • 127.0.0.0/8 is reserved for loopback and used by a device to test its own network stack via localhost (e.g., 127.0.0.1) and isn’t usable as a network address.
  • Class B (128-191) uses mask 255.255.0.0 (/16):
    • 2 octets for network, 2 octets for host.
    • 16,384 networks, each with up to 65,534 usable hosts.
  • Class C (192-223) uses mask 255.255.255.0 (/24):
    • 3 octets for network, 1 octet for host.
    • 2,097,152 networks, each with 254 usable hosts.
  • The RFC 1918 private ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) aren’t a separate classification system. They’re later-defined blocks within the Class A, B, and C ranges.
  • Class D (224-239) has no network/host split or default mask. It’s reserved for multicast, as defined in RFC 1112, where a single address represents a group of hosts instead of one device. It’s not assigned for public or standard host addressing.
  • 255.255.255.255 is reserved separately as the limited broadcast address.
  • Class E (240.0.0.0-254.255.255.255) is reserved for future use per RFC 791 and not “experimental,” a common but inaccurate label.

You need to know the class ranges and default masks to understand legacy addressing rules, even though modern networks rely on classless (CIDR) addressing.

Prerequisites

To follow this lesson, you need to understand binary and decimal number conversion. The first bits of the first octet are what determine an IP address’s class. You should also be comfortable with the structure of an IPv4 address as four octets, including how a subnet mask like 255.255.255.0 separates the network and host portions of an address.

Five IP Address Classes

This section covers the rule behind classful addressing and each of the five classes. You’ll see how first bits, address ranges, and default masks define Classes A through E. Let’s have a look.

Classful Addressing Structure

The first bits of the first octet determine which class an address belongs to, and therefore how its 32 bits split into network and host portions:

  • Class A starts with 0.
  • Class B starts with 10.
  • Class C starts with 110.
  • Class D starts with 1110.
  • Class E starts with 1111.

Each class has a fixed network/host boundary, which is what the default subnet mask is for. Here’s a summary of the first bits, first octet range, default mask, and network/host split for each class:

Class First Bits First Octet Range Default Mask Network/Host Split
A 0 1-126 255.0.0.0 (/8) 1 octet network / 3 octets host
B 10 128-191 255.255.0.0 (/16) 2 octets network / 2 octets host
C 110 192-223 255.255.255.0 (/24) 3 octets network / 1 octet host
D 1110 224-239 N/A (multicast) N/A
E 1111 240-255 N/A (reserved) N/A
Subnetting an address doesn’t change its class. An address like 30.10.10.1 is Class A by its first bits no matter what mask you put on it, even a /24. The class and the subnet mask are two independent pieces of information.

Class A Addresses

Class A reserves the largest host space per network. It’s meant for large organizations:

  • First octet range: 1-126 (0 and 127 reserved)
  • Default subnet mask: 255.0.0.0 (/8)
  • 1 octet for network, 3 octets for host
  • 126 networks of 16,777,214 usable hosts each
  • 127.0.0.0/8 matches the Class A bit pattern (first bit 0), but it’s reserved for loopback and used to let a device test its own network stack via localhost (e.g., pinging 127.0.0.1), and excluded from normal host and network assignment. That’s why usable Class A addresses are listed as 1-126, not 1-127.

Class B Addresses

Class B balances network and host counts. It’s aimed at medium-to-large networks:

  • First octet range: 128-191
  • Default subnet mask: 255.255.0.0 (/16)
  • 2 octets for network, 2 octets for host
  • 16,384 networks of 65,534 usable hosts each

Class C Addresses

Class C provides many small networks, each with a limited number of hosts. It’s suited to small organizations:

  • First octet range: 192-223
  • Default subnet mask: 255.255.255.0 (/24)
  • 3 octets for network, 1 octet for host
  • 2,097,152 networks of 254 usable hosts each
The RFC 1918 private address ranges aren’t a separate classification system. They’re specific blocks carved out of the classful ranges you already know: 10.0.0.0/8 sits inside Class A, 172.16.0.0/12 sits inside Class B, and 192.168.0.0/16 sits inside Class C. A private address still belongs to its original class. Private addresses aren’t globally routable, and as a best practice (BCP 38 / RFC 2827), ISPs filter packets with private or spoofed source addresses at the network edge. This is a recommended practice, not a guaranteed universal mechanism.

Class D Addresses

Class D isn’t used for standard host addressing. It’s reserved for multicast group communication, as defined in RFC 1112:

  • First octet range: 224-239
  • No network/host split and no default subnet mask
  • A Class D address identifies a group of hosts, and the network delivers packets to every member of that group.

Class E Addresses

Class E is reserved for future use per its original definition in RFC 791. It’s not used for general host addresses:

  • First octet range: 240-255
  • Usable reserved range: 240.0.0.0-254.255.255.255
  • 255.255.255.255 is the limited broadcast address, not part of the reserved block.
  • Not allocated for public or standard network host assignment.
The five address classes trace back to RFC 791 and are cataloged today in IANA’s special-purpose address registry (RFC 6890, obsoleting RFC 1700). Class E’s bit pattern (first four bits 1111) spans 240.0.0.0-255.255.255.255; since 255.255.255.255 is used separately as the broadcast address, Class E’s usable range is 240.0.0.0-254.255.255.255. Routers must not forward or originate traffic to/from these reserved addresses per RFC 1812 (Requirements for IP Version 4 Routers).

Sign up for FREE to Continue Reading

Here's what you'll get:

  • Full Access to this lesson + 394 more.
  • Learn CCNA, CCNP and CCIE R&S. Explained as simple as possible.
  • Unlock Access to 425 lessons by becoming a member.
  • New Lessons Added Regularly. You'll Be the First to Know.
  • Content created by Rene Molenaar (CCIE #41726)

Takes 1 minute - No credit card needed


Ask a question or start a discussion by visiting our Community Forum