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.

IP Address Classes Quiz

1. What is the default subnet mask for Class A IP addresses?

Correct answer is C. Class A addresses use 255.0.0.0 as the default subnet mask.

2. What is the first octet range for Class B IP addresses?

Correct answer is A. Class B IP addresses have their first octet between 128 and 191.

3. Which class of IP address is reserved for multicast?

Correct answer is D. Class D addresses (224.0.0.0 to 239.255.255.255) are used for multicast.

4. How many hosts per network does a Class C IP address support by default?

Correct answer is B. Class C networks support 254 hosts by default due to the /24 subnet mask.

5. Which IP address is reserved for loopback testing?

Correct answer is C. 127.0.0.1 is the standard loopback address used for local testing.

6. Which class IP range is used for private networks within 172.16.0.0 to 172.31.255.255?

Correct answer is A. The private address block from 172.16.0.0 to 172.31.255.255 belongs to Class B.

7. What is the first bit pattern of the first octet for Class C IP addresses?

Correct answer is D. Class C IP addresses start with binary bits 110 in the first octet.

8. Why was classful addressing replaced by CIDR?

Correct answer is B. CIDR allows variable-length subnet masking and better IP address utilization.

9. What is the purpose of Class E IP addresses?

Correct answer is A. Class E addresses (240.0.0.0 to 255.255.255.255) are reserved for experimental use.

10. Which of the following is a private IP address range for Class C?

Correct answer is C. The 192.168.0.0 – 192.168.255.255 range is private for Class C networks.

← Back to Home