IP Address and Its Classes: A Complete Guide
Every device on a network needs an address, the same way every house on a street needs one so mail can find it. On the internet, that address is the IP address. If you have ever opened a router’s admin page and seen a string like 192.168.1.1, or typed ipconfig into a command prompt and stared at a number you didn’t fully understand, this guide is for you. We’ll cover what an IP address is, how it is written, and how the older “classful” system split addresses into Classes A through E.
What Is an IP Address?
An IP address (Internet Protocol address) is a unique number assigned to every device connected to a network, whether that’s your phone on Wi-Fi, a server in a data center, or a printer in an office. It is what lets devices find each other and exchange data.
There are two versions in use today:
- IPv4: a 32-bit address, usually written as four numbers separated by dots, like 192.168.1.10. Each of the four numbers (called an octet) can range from 0 to 255.
- IPv6: a newer, 128-bit address written in hexadecimal and split into eight groups separated by colons. IPv6 exists because IPv4 simply ran out of room, but IPv4 is still what most people mean when they say “IP address,” and it’s the focus of this article.
Dotted Decimal Notation
A 32-bit binary number is not something anyone wants to read or type, so IPv4 addresses are written in dotted decimal notation instead. The 32 bits are split into four 8-bit sections (octets), and each octet is converted to decimal.
A few rules to keep in mind:
- Each of the four segments must fall between 0 and 255.
- Leading zeros aren’t allowed. 054 is invalid; 54 is fine.
- The same address can also be written in hexadecimal (base 16), where each byte becomes a two-digit hex value, though this is rarely used outside of specific technical contexts.
Why IP Addresses Were Split Into Classes
In the early days of the internet, from 1981 to 1993, addresses were assigned using a system called classful addressing. The idea was simple: divide the 32-bit address space into a handful of fixed-size classes, so that a network could get either a small block, a medium block, or a huge block of addresses depending on its size, without needing complicated subnetting.
This worked well when the internet was small. A router could look at the very first few bits of an address and instantly know which class it belonged to and how to route it, which made routing tables fast and simple to manage.
The Five Classes of IP Addresses
Classful addressing splits the 32-bit space into five classes: A, B, C, D, and E. Classes A, B, and C are used for regular device-to-device (unicast) communication and cover the vast majority of addresses you’ll ever run into. Class D is reserved for multicasting, and Class E was set aside for research and experimentation.

Class A
Class A is built for networks that need an enormous number of hosts. Only the first bit of the address is fixed (it’s always 0), which leaves 7 bits for the network ID and a full 24 bits for host IDs.
- First octet range: 0 to 127 (with 0 and 127 reserved for special use, so usable addresses run from 1 to 126)
- Default subnet mask: 255.0.0.0
- Usable hosts per network: 2²⁴ − 2 = 16,777,214
Because a single Class A network can hold over 16 million hosts, these blocks were historically handed out to large ISPs and major organizations rather than individual companies.
Class B
Class B addresses always start with the bits 10, splitting the address into a 16-bit network ID and a 16-bit host ID.
- First octet range: 128 to 191
- Default subnet mask: 255.255.0.0
- Number of networks: 2¹⁴ = 16,384
- Usable hosts per network: 2¹⁶ − 2 = 65,534
This type of IP B sits in the middle: too big for a home network, but a reasonable fit for a mid-sized company or a large private network.
Class C
IP addresses in Class C start with the bits 110. The network ID takes up 24 bits, leaving only 8 bits, one octet, for host addresses.
- First octet range: 192 to 223
- Default subnet mask: 255.255.255.0
- Number of networks: 2²¹ = 2,097,152
- Usable hosts per network: 2⁸ − 2 = 254
This is the class you’ll actually recognize. Home routers, small offices, and most local networks use Class C-style addressing (think 192.168.1.x), simply because 254 hosts is plenty for a household or a small business.
Class D
Class D breaks from the network ID/host ID pattern entirely. It starts with the bits 1110, and the remaining 28 bits identify a multicast group rather than a specific host.
- First octet range: 224 to 239
- Purpose: multicasting, sending one packet to many interested recipients at once, rather than to one device (unicast) or to every device on the network (broadcast)
- No subnet mask is defined for Class D.
Class E
Class E starts with the bits 1111 and was reserved for experimental and research use. Like Class D, it has no network/host split and no subnet mask.
- First octet range: 240 to 255
Quick Reference Table
| Class | Leading Bits | First Octet Range | Default Subnet Mask | Usable Hosts / Network |
|---|---|---|---|---|
| A | 0 | 1 – 126 | 255.0.0.0 | 16,777,214 |
| B | 10 | 128 – 191 | 255.255.0.0 | 65,534 |
| C | 110 | 192 – 223 | 255.255.255.0 | 254 |
| D | 1110 | 224 – 239 | Not defined | Reserved for multicast |
| E | 1111 | 240 – 255 | Not defined | Reserved for research |
Rules for Assigning Network and Host IDs
A few restrictions apply no matter which class an address falls into:
- A host ID of all zeros represents the network itself, not an actual device, so it can’t be assigned to a host.
- A host ID of all ones is reserved for the broadcast address, used to reach every host on that network at once.
- A network ID can’t start with 127. That entire range is set aside for loopback testing (127.0.0.1 being the most familiar example, your own machine talking to itself).
- A network ID of all zeros refers to the current, local network and isn’t routed anywhere.
Special IP Address Ranges Worth Knowing
- 127.0.0.0 – 127.255.255.255: loopback addresses, used to test a device’s own network stack.
- 169.254.0.0 – 169.254.255.255: link-local addresses, assigned automatically when a device can’t reach a DHCP server.
- 0.0.0.0/8: represents “this network,” typically seen before a device has been assigned a real address.
A Word on Subnet Masks
A subnet mask tells a device which part of an IP address is the network portion and which part identifies the host. Take the mask 255.255.255.0. In binary that’s 11111111.11111111.11111111.00000000. Lining it up against an address like 192.168.123.132 splits the address cleanly: the first three octets (192.168.123) form the network address, and the last octet (132) identifies the specific host on that network.
Why Classful Addressing Didn’t Last
Classful addressing was simple, but simplicity came at a cost. A company that needed 300 addresses had no good option: a Class C network only offered 254 hosts, so it wasn’t enough, but the next size up, Class B, handed over 65,534 addresses, wasting more than 65,000 of them. Multiply that across thousands of organizations, and you get an internet running out of address space far faster than it should have. That inefficiency is what pushed the industry toward Classless Inter-Domain Routing (CIDR) in 1993, which allows networks to be sized far more precisely instead of being locked into one of five fixed boxes. Classful addressing isn’t used for real-world routing anymore, but understanding it still matters. It’s the foundation every networking course builds on, and concepts like subnet masks and address ranges only make sense once you’ve seen where they came from.
Frequently Asked Questions
There are five classes: A, B, C, D, and E. Classes A, B, and C are used for regular host addressing, on networks of decreasing size. Class D is reserved for multicasting, and Class E is set aside for research and experimentation.
Class A covers 0.0.0.0 to 127.255.255.255, based on a first octet between 0 and 127. In practice, 0 and 127 are reserved, so usable Class A addresses start at 1.0.0.0. The default subnet mask is 255.0.0.0, giving each network up to 16,777,214 usable hosts.
Class B covers 128.0.0.0 to 191.255.255.255. The default subnet mask is 255.255.0.0, which supports 16,384 networks with up to 65,534 hosts each.
Class C covers 192.0.0.0 to 223.255.255.255, with a default subnet mask of 255.255.255.0. This is the class most home and small-office networks use, since it supports 254 usable hosts per network, plenty for a household or a small business.
Class D (224.0.0.0 to 239.255.255.255) is used for multicasting, sending one packet to a group of interested devices at once. Class E (240.0.0.0 to 255.255.255.255) was reserved for research and experimental use. Neither class has a network ID/host ID split or a defined subnet mask.
By looking at the value of the first octet, or equivalently, the leading bits of the address. Class A starts with a 0 bit, Class B with 10, Class C with 110, Class D with 1110, and Class E with 1111. That maps to first-octet ranges of 1-126, 128-191, 192-223, 224-239, and 240-255.
Because it wasted address space. A network needing 300 hosts didn’t fit a Class C block (254 hosts) but jumping to Class B handed over 65,534 addresses, most of which went unused. That inefficiency led to Classless Inter-Domain Routing (CIDR) in 1993, which allocates addresses in sizes that actually match what a network needs.
Not for real-world routing. The internet runs on CIDR now. Classful addressing is still taught because it’s the easiest way to understand how network IDs, host IDs, and subnet masks relate to each other, and most classless concepts build directly on it.
Published September 2026. Last verified: September 2026.


