Contact Info

Atlas Cloud LLC 600 Cleveland Street Suite 348 Clearwater, FL 33755 USA

support@dedirock.com

Client Area
Recommended Services
Supported Scripts
WordPress
Hubspot
Joomla
Drupal
Wix
Shopify
Magento
Typeo3

Subnetting is a method of dividing an IP address space into smaller, manageable networks or subnets, each with a specific range of addresses. Understanding how to calculate subnet ranges and host addresses is essential for network management, as it helps allocate IP addresses efficiently, improves security, and optimizes network performance. In this guide, we’ll explore the steps to calculate subnet ranges and host addresses for both IPv4 addresses.


Key Concepts in Subnetting

Before diving into calculations, here are some essential subnetting terms:

  • IP Address: A unique address assigned to each device on a network.
  • Subnet Mask: A 32-bit number that separates the network and host portions of an IP address.
  • CIDR Notation: A shorthand notation for expressing IP addresses and their associated routing prefix (e.g., 192.168.1.0/24).
  • Network Address: The starting address of a subnet, which identifies the subnet.
  • Broadcast Address: The last address in a subnet, used to communicate with all devices within that subnet.
  • Host Addresses: The range of usable IP addresses within a subnet, excluding the network and broadcast addresses.

Step 1: Identify the IP Address and Subnet Mask

To calculate the subnet ranges and host addresses, you need the IP address and subnet mask. For example, let’s work with the following:

  • IP Address: 192.168.1.0
  • Subnet Mask: 255.255.255.0 or /24 in CIDR notation.

Step 2: Determine the Network Address and CIDR Notation

CIDR notation simplifies subnet masks. Each CIDR prefix (e.g., /24) indicates how many bits in the subnet mask are set to “1.” For example:

  • /24 means the first 24 bits are for the network (255.255.255.0).
  • /25 means the first 25 bits are for the network (255.255.255.128).

The network address for 192.168.1.0/24 is 192.168.1.0, as the first 24 bits specify the network.


Step 3: Calculate the Number of Hosts per Subnet

The number of host addresses is determined by the remaining bits in the subnet mask, which represent the hosts. For a /24 subnet:

  1. Subtract the network bits from 32 (total bits in an IPv4 address):
    • 32 – 24 = 8 host bits.
  2. Calculate the number of addresses available using 2^host bits - 2 (the -2 is for the network and broadcast addresses):
    • 2^8 - 2 = 256 - 2 = 254 usable host addresses.

For /24, this means there are 254 addresses available in the range 192.168.1.1 to 192.168.1.254.


Step 4: Determine the Subnet Ranges

With a /24 subnet mask, each subnet increments by 256 addresses in the last octet. So, the subnet ranges would look like:

  • Subnet 1: 192.168.1.0/24 (Host Range: 192.168.1.1192.168.1.254)
  • Subnet 2: 192.168.2.0/24 (Host Range: 192.168.2.1192.168.2.254)
  • Subnet 3: 192.168.3.0/24 (Host Range: 192.168.3.1192.168.3.254)

Each /24 subnet has 254 usable host addresses, separated by increments of 256 in the last octet.


Example: Subnetting a /26 Network

Let’s calculate subnet ranges for a smaller network size, such as /26:

  1. Identify the Number of Host Bits:

    • 32 - 26 = 6 host bits.
  2. Calculate Usable Hosts:

    • 2^6 - 2 = 64 - 2 = 62 usable hosts per subnet.
  3. Subnet Ranges for 192.168.1.0/26:

    • Subnet 1: 192.168.1.0/26 (Host Range: 192.168.1.1192.168.1.62)
    • Subnet 2: 192.168.1.64/26 (Host Range: 192.168.1.65192.168.1.126)
    • Subnet 3: 192.168.1.128/26 (Host Range: 192.168.1.129192.168.1.190)
    • Subnet 4: 192.168.1.192/26 (Host Range: 192.168.1.193192.168.1.254)

Each /26 subnet increments by 64 in the last octet, providing 62 usable host addresses per subnet.


Summary Table: Example Subnetting Calculations

CIDR NotationSubnet MaskHosts/SubnetExample Subnets
/24255.255.255.0254192.168.1.0/24, 192.168.2.0/24
/26255.255.255.19262192.168.1.0/26, 192.168.1.64/26
/28255.255.255.24014192.168.1.0/28, 192.168.1.16/28

Calculating subnet ranges and host addresses allows network administrators to design efficient IP address schemes that accommodate current needs and future growth. Understanding subnetting will help you efficiently divide and assign IP addresses within a network, allowing for better security, performance, and management.

Share this Post
Tags:
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x