Fundamentals 4 min read

Why Subnetting Is Needed and How to Perform IPv4 Subnet Division, VLSM, and CIDR Calculations

This article explains the purpose of subnetting, introduces IPv4 subnet division and aggregation techniques such as VLSM and CIDR, and provides step‑by‑step calculations for determining network, broadcast, and usable IP ranges using examples like the 202.106.1.0/24 address block.

Practical DevOps Architecture
Practical DevOps Architecture
Practical DevOps Architecture
Why Subnetting Is Needed and How to Perform IPv4 Subnet Division, VLSM, and CIDR Calculations

1. Why divide into subnets?

IPv4 addresses, if only divided by class (A, B, C), lead to significant waste or shortage. To address this, the host portion of an IP address can be further split, moving part of it into the network portion, enabling networks of various sizes.

2. IPv4 Subnet Division and Aggregation

To overcome IPv4 limitations and increase flexibility, two important technologies were created: VLSM (Variable Length Subnet Mask) and CIDR (Classless Inter‑Domain Routing). They transform the traditional classful network model into a more efficient classless one.

VLSM is used for subdividing a large network into multiple smaller subnets, while CIDR is used for aggregating subnets, mainly in routing, by summarizing several small network routes into a single larger route, thereby reducing the number of routing entries and improving router efficiency.

3. IP Subnet Calculation

Algorithm: Number of usable hosts = 2 Y − 2 (subtract 2 for network and broadcast addresses), where Y is the count of “0” bits in the subnet mask.

Example: 202.106.1.0/24 is a C‑class public address block. How many IP addresses does this block contain?

Network address: 202.106.1.0 + 1 = 202.106.1.1

What is the last usable IP? It is 202.106.1.128.

Algorithm: Next network address (202.106.1.128) − 2 = 202.106.1.126

Broadcast address: Next network address − 1 = 202.106.1.127

The largest practical subnet size is /30; beyond that there are no usable host addresses.

networkingIPv4CIDRSubnettingVLSMIP addressing
Practical DevOps Architecture
Written by

Practical DevOps Architecture

Hands‑on DevOps operations using Docker, K8s, Jenkins, and Ansible—empowering ops professionals to grow together through sharing, discussion, knowledge consolidation, and continuous improvement.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.