IP Address Classes (A, B, C, D, E) – Detailed Explanation
Introduction to IP Address Classes
Historically, IPv4 address space was divided using a classful addressing scheme to simplify routing and address allocation. This divided the 32-bit IPv4 addresses into five classes—A, B, C, D, and E—each with distinct purposes and address ranges.
Class A Addresses
- Address Range: 1.0.0.0 to 126.255.255.255
- First Octet: 1 to 126
- Default Subnet Mask: 255.0.0.0 (/8)
- Number of Networks: 128 (some reserved)
- Hosts per Network: 16,777,214 (very large!)
- Typical Use: Very large organizations, early internet giants, government agencies
- Example: 10.0.0.1 (commonly used private Class A address)
- Binary Identification: First bit of the first octet is always 0
Class B Addresses
- Address Range: 128.0.0.0 to 191.255.255.255
- First Octet: 128 to 191
- Default Subnet Mask: 255.255.0.0 (/16)
- Number of Networks: 16,384
- Hosts per Network: 65,534
- Typical Use: Medium to large organizations, universities, ISPs
- Example: 172.16.0.1
- Binary Identification: First two bits are 10
Class C Addresses
- Address Range: 192.0.0.0 to 223.255.255.255
- First Octet: 192 to 223
- Default Subnet Mask: 255.255.255.0 (/24)
- Number of Networks: 2,097,152
- Hosts per Network: 254
- Typical Use: Small businesses, local area networks
- Example: 192.168.1.1 (very common private Class C address)
- Binary Identification: First three bits are 110
Class D Addresses
- Address Range: 224.0.0.0 to 239.255.255.255
- First Octet: 224 to 239
- Purpose: Multicast addressing, sending packets to multiple hosts simultaneously
- Example: 224.0.0.5 (used by OSPF routing protocol multicast)
- Binary Identification: First four bits are 1110
- Not used for unicast communication.
Class E Addresses
- Address Range: 240.0.0.0 to 255.255.255.255
- First Octet: 240 to 255
- Purpose: Reserved for experimental or future use
- Binary Identification: First four bits are 1111
- Not used in general networking or public internet.
Special Addresses and Exceptions
- Loopback: 127.0.0.0/8 (e.g., 127.0.0.1) – used for internal host communication (localhost)
- Broadcast: 255.255.255.255 – broadcast to all devices on local network
- Private Address Spaces:
- Class A: 10.0.0.0 – 10.255.255.255
- Class B: 172.16.0.0 – 172.31.255.255
- Class C: 192.168.0.0 – 192.168.255.255
Limitations of Classful Addressing
- Inefficient Allocation: Large address blocks are wasted if an organization doesn’t need all addresses (e.g., a company needing 300 addresses would require a whole Class B block).
- Fixed Boundaries: Classful masks do not adapt to varying organizational sizes.
- Solution: Classless Inter-Domain Routing (CIDR) replaced classful addressing, enabling flexible subnetting and efficient IP usage.
Identifying IP Class from Address
Based on the first octet:
- 1 – 126: Class A
- 128 – 191: Class B
- 192 – 223: Class C
- 224 – 239: Class D
- 240 – 255: Class E
Transition from Classful to Classless Addressing
CIDR allows custom subnet masks (e.g., 192.168.1.0/27), enabling efficient use of address space. Despite this, understanding classful addressing remains useful for legacy systems, troubleshooting, and exams.
Summary Table for Quick Reference
Class | First Octet Range | Default Subnet Mask | Max Hosts per Network | Used For |
---|---|---|---|---|
A | 1 – 126 | 255.0.0.0 (/8) | 16,777,214 | Large organizations, ISPs |
B | 128 – 191 | 255.255.0.0 (/16) | 65,534 | Medium to large organizations, universities |
C | 192 – 223 | 255.255.255.0 (/24) | 254 | Small businesses, home networks |
D | 224 – 239 | N/A | N/A | Multicast |
E | 240 – 255 | N/A | N/A | Experimental |
Key Points & Exam Tips
- Know IP address ranges and default subnet masks for each class.
- Understand the obsolescence of classful addressing but its continued relevance in legacy systems and exams.
- Class D is used for multicast; Class E is reserved for experimental use.
- Be able to identify IP class from the first octet.
- Recognize private address ranges within classes.
- Understand the reasons that led to CIDR replacing classful addressing.
- Classful addressing forms a foundation for basic IP networking knowledge.
Practical Use
Classful addressing is rarely used in modern networks but is important for foundational understanding, legacy system troubleshooting, and certain certification exams.
CIDR with variable length subnet masks is the standard for all current IPv4 networks.