← Back to list

Understanding IPv4 Classes and IP Address Allocation: Provisioning Virtual Machines (VMs)

In the world of networking, IP addresses are essential for identifying and communicating with devices across the internet and private…

NAGENDRA PARCHURI · 2024-09-27 05:45 · 0 claps · 3.1 min read
#aws #aws-vpc #networking #iana #devops
Open on Medium ↗
Wiki topics: ☁️ · DevOps & Cloud

Understanding IPv4 Classes and IP Address Allocation: Provisioning Virtual Machines (VMs)

In the world of networking, IP addresses are essential for identifying and communicating with devices across the internet and private networks. The Internet Assigned Numbers Authority (IANA) manages the allocation of these IP addresses globally, using two main versions: IPv4 and IPv6. This blog will explain the basics of IPv4, its address classes, and how to provision servers efficiently using the right IP address range — especially when you need to deploy a certain number of virtual machines (VMs).

IPv4 and IPv6 Overview

IPv4 and IPv6 are the two most commonly used Internet Protocols:

  • IPv4: Uses a 32-bit address format, allowing for around 4.3 billion unique addresses (2³²). It is structured into four octets, ranging from 0 to 255, each representing 8 bits. Example: 1.1.1.1 is broken down as 8 + 8 + 8 + 8 = 32 bits
  • IPv6: Uses a 128-bit address format, which supports a significantly larger address pool (2¹²⁸ addresses), addressing the limitations of IPv4 exhaustion. However, in this blog, we will focus on IPv4 address classes and their role in provisioning virtual servers, like Virtual Machines (VMs).

IPv4 Address Classes

IANA has divided the IPv4 address space into five major classes, which are designed to accommodate different types of networks: Class A, B, C, D, and E. Class A (0–126):

  • Address Range: 0.0.0.0 to 126.255.255.255
  • Default Subnet Mask: 255.0.0.0 (/8)
  • Network Bits: 8, Host Bits: 24
  • Number of Hosts: 2²⁴ — 2 = 16,777,214
  • Usage: Very large networks (e.g., large organizations, ISPs).

Class B (128–191):

  • Address Range: 128.0.0.0 to 191.255.255.255
  • Default Subnet Mask: 255.255.0.0 (/16)
  • Network Bits: 16, Host Bits: 16
  • Number of Hosts: 2¹⁶ — 2 = 65,534
  • Usage: Medium to large-sized networks (e.g., universities, large businesses).

Class C (192–223):

  • Address Range: 192.0.0.0 to 223.255.255.255
  • Default Subnet Mask: 255.255.255.0 (/24)
  • Network Bits: 24, Host Bits: 8
  • Number of Hosts: 2⁸ — 2 = 254
  • Usage: Small networks (e.g., small businesses, home networks).

Class D (Multicast): . Range: 224.0.0.0 to 239.255.255.255 . Default Subnet Mask: N/A (Multicast is not for individual hosts) . Usage: Reserved for multicast groups, allowing data to be sent to multiple destinations.

Class E (Experimental):

. Range: 240.0.0.0 to 255.255.255.255 . Default Subnet Mask: N/A . Usage: Reserved for experimental and future use, not used for general network traffic.

Special Addresses:

  • 127.0.0.0 to 127.255.255.255: Reserved for loopback testing.
  • 0.0.0.0: Refers to an unspecified address and is often used for default routes.

Class D (224–239) and Class E (240–255):

  • Class D is reserved for multicast groups, and Class E is reserved for experimental use. Neither is used for typical device addressing.

How we can provisioning the Servers

When provisioning servers or devices, we need to determine how many IP addresses we require, which depends on the number of host bits. For any given network class, the number of hosts that can be supported is calculated using the formula

IP Range=2^Host Bits−2

Class A (0–126):

For a Class A network, we have 8 bits for the network and 24 bits for the hosts. This means:

N:H:H:H 8:8:8:8 network bit we cannot change but host bit we can change N=8 H=24 Host Range=224−2=16,777,214 This class is designed for extremely large networks but is overkill for most purposes.

Class B (128–191):

In a Class B network, we have 16 bits for the network and 16 bits for the hosts. This allows:

N:N:H:H 8:8:8:8 N=16 H=16 network bit we cannot change but host bit we can change Host Range=216−2=65,534 This class is suitable for medium to large networks.

Class C (192–223):

For a Class C network, 24 bits are used for the network and 8 bits for the hosts:

N:N:N:H 8:8:8:8 H=8 N=24 network bit we cannot change but host bit we can change Host Range=28−2=254 This class is ideal for small networks, such as small businesses or home setups, and is also a perfect fit when provisioning a moderate number of virtual machines (VMs).

Provisioning 200 VMs Using Class C IP Range

Let’s assume you need to provision 200 VMs. Since the number of available hosts in a Class C network is 254 (after accounting for the network and broadcast addresses), a Class C network can comfortably support up to 254 devices or servers.

  • Network Bits: 24 (cannot be changed)
  • Host Bits: 8 (can be used to assign IP addresses to VMs)
  • Total IPs for Hosts: 254 Since you need 200 VMs, the 254 available IP addresses in a Class C range will suffice.

Private IP Address Ranges

  1. Class A:
  • Private IP Range: 10.0.0.0 to 10.255.255.255
  • Subnet Mask: 255.0.0.0 (/8)
  • Total Addresses: 16,777,216
  1. Class B:
  • Private IP Range: 172.16.0.0 to 172.31.255.255
  • Subnet Mask: 255.240.0.0 (/12)
  • Total Addresses: 1,048,576
  1. Class C:
  • Private IP Range: 192.168.0.0 to 192.168.255.255
  • Subnet Mask: 255.255.255.0 (/24)
  • Total Addresses: 65,536 These private IPs defined by the IANA

메타데이터
post_id
d49fec72dcfd
slug
understanding-ipv4-classes-and-ip-address-allocation-provisioning-virtual-machines-vms-d49fec72dcfd
url
https://medium.com/@nagendrap0820/understanding-ipv4-classes-and-ip-address-allocation-provisioning-virtual-machines-vms-d49fec72dcfd
canonical_url
https://medium.com/@nagendrap0820/understanding-ipv4-classes-and-ip-address-allocation-provisioning-virtual-machines-vms-d49fec72dcfd
author_url
https://medium.com/@nagendrap0820
status
ok
fetched_at
2026-06-27 08:54:08