What is IPv4 ? | IPv4 Classes A, Classes B, Classes C, Classes D and Classes E

Rahul Ahir
4 min readMay 13, 2023

IPv4, or Internet Protocol version 4, is a widely used protocol for identifying and routing network traffic on the internet. It is the fourth version of the Internet Protocol and has been the predominant version for many years, although it is gradually being replaced by IPv6.

Here are some key aspects of IPv4:

  1. Address Format: IPv4 addresses are 32-bit binary numbers, typically represented in dotted-decimal notation for human readability. The address consists of four sets of numbers ranging from 0 to 255, separated by periods. For example, an IPv4 address could look like 192.168.0.1.
  2. Address Space: IPv4 has a limited address space due to its 32-bit structure. This means there is a finite number of unique IPv4 addresses available, which has led to address exhaustion as the demand for internet-connected devices has increased over time. IPv4 provides approximately 4.3 billion unique addresses.
  3. Classful Addressing: IPv4 initially employed a classful addressing scheme, which divided the address space into different classes (Class A, B, C, D, and E) based on the size of the network portion and host portion of the address. However, classful addressing has been largely replaced by classless inter-domain routing (CIDR), which allows for more flexible allocation of address space.
  4. Addressing and Routing: IPv4 uses IP addresses to uniquely identify devices on a network and facilitate packet routing. Each device connected to a network is assigned an IPv4 address, which is used to route packets between different networks. IPv4 addresses are hierarchical, with a network portion and a host portion, enabling efficient routing of packets across the internet.
  5. Address Resolution: IPv4 uses the Address Resolution Protocol (ARP) to map IP addresses to physical MAC addresses on a local network. ARP allows devices to determine the MAC address associated with a specific IP address, facilitating communication within the local network.
  6. Network Classes: IPv4 originally defined five network classes (A, B, C, D, and E) with different address ranges and default subnet masks. Class A addresses were allocated to large networks, while Class C addresses were assigned to smaller networks. Class D addresses are used for multicast, and Class E addresses are reserved for future use.
  7. Network Address Translation (NAT): Due to the limited availability of IPv4 addresses, Network Address Translation (NAT) is commonly used to allow multiple devices within a private network to share a single public IPv4 address. NAT translates the private IP addresses of devices within the network to the public IP address when communicating over the internet.

While IPv4 has been the backbone of internet communication for many years, the rapid growth of internet-connected devices has led to the depletion of available IPv4 addresses. To address this issue, IPv6 (Internet Protocol version 6) has been introduced, which provides a much larger address space and additional features compared to IPv4. However, the transition from IPv4 to IPv6 is an ongoing process and requires support from network infrastructure and devices.

In IPv4 addressing, the address space is divided into different classes: Class A, Class B, Class C, Class D, and Class E. These classes define the range of IP addresses and their intended use.

Here’s a breakdown of each class:

  1. Class A:
  • Address Range: 1.0.0.0 to 126.0.0.0
  • Network Portion: The first octet represents the network portion, and the remaining three octets represent the host portion.
  • Subnet Mask: Default subnet mask is 255.0.0.0.
  • Address Allocation: Class A addresses are used for large networks since the first octet provides a wide range of addresses. The first bit of a Class A address is always 0, which allows for 2⁷ or 128 possible networks.
  • Example: 10.0.0.0, 11.0.0.0, 126.0.0.0

2. Class B:

  • Address Range: 128.0.0.0 to 191.255.0.0
  • Network Portion: The first two octets represent the network portion, and the remaining two octets represent the host portion.
  • Subnet Mask: Default subnet mask is 255.255.0.0.
  • Address Allocation: Class B addresses are used for medium-sized networks. The first two bits of a Class B address are always 10, which allows for 2¹⁴ or 16,384 possible networks.
  • Example: 130.0.0.0, 150.0.0.0, 191.255.0.0

3. Class C:

  • Address Range: 192.0.0.0 to 223.255.255.0
  • Network Portion: The first three octets represent the network portion, and the last octet represents the host portion.
  • Subnet Mask: Default subnet mask is 255.255.255.0.
  • Address Allocation: Class C addresses are used for small networks. The first three bits of a Class C address are always 110, which allows for 2²¹ or 2,097,152 possible networks.
  • Example: 192.0.0.0, 200.0.0.0, 223.255.255.0

4. Class D:

  • Address Range: 224.0.0.0 to 239.255.255.255
  • Purpose: Class D addresses are reserved for multicast addresses, which are used to send data to a group of devices simultaneously.
  • Multicast Usage: Class D addresses are used for applications such as streaming video, audio, or other forms of group communication.
  • Example: 224.0.0.0, 230.0.0.0, 239.255.255.255

5. Class E:

  • Address Range: 240.0.0.0 to 255.255.255.255
  • Purpose: Class E addresses are reserved for experimental or future use.
  • Not Used: Class E addresses are currently not used for general IP addressing and are reserved for special purposes.
  • Example: 240.0.0.0, 250.0.0.0, 255.255.255.255

It’s worth noting that the concept of address classes and their restrictions has been largely replaced by Classless Inter-Domain Routing (CIDR), which allows for more flexible allocation of IP addresses. CIDR uses variable-length subnet masks (VLSM) to divide the address space more efficiently.

--

--

Rahul Ahir

YouTuber @ahirlog | Flutter Developer | Digital Creator