“Without subnetting, your network is like a house without partitions; everyone can peek in, and traffic becomes chaotic. It’s time you learned how IPv4 subnetting works!”
Think of your computer network as a crowded city. Without proper planning, data traffic will be chaotic, broadcast storms will disrupt performance, security will be vulnerable, and IP allocation will be inefficient. This is where Subnetting IPv4 acts as a digital “city planner,” dividing large networks into small, organized subnets.
For those of you who are new to the world of networking, terms such as subnet masks, CIDR notation, or network bits may sound complicated. But calm down! This article will guide you to understand how IPv4 subnetting works in practical terms, from the basic concepts, subnet sharing steps, to real-world examples that can be applied right away.
What Is IPv4 Subnetting and Why Is It Needed?
Subnetting IPv4 is a technique of dividing one large block of IP address into several smaller tissues called subnet. Imagine dividing an office building into several floors, each department (HR, IT, Marketing) gets its own space with controlled access.
3 Main Reasons Subnetting Is Needed
1. Reduce Network Traffic (Broadcast Domain)
- Without subnetting, broadcast traffic (e.g., ARP requests) floods the entire network.
- Example: On the /24 network (254 hosts), the broadcast will be sent to all devices, even though only 10 devices may be needed.
2. Improve Security
- Isolation of subnets prevents attacks from spreading (e.g., malware in the Marketing division does not directly infect HR).
- Practical example: The subnet for guest WiFi is separated from the company’s internal network.
3. Optimize IP Address Allocation
Avoid IP wastage. Example:
- The 192.168.1.0/24 network (254 hosts) is used for only 20 devices → 234 IPs are wasted.
- With subnetting, it is possible to create /27 (30 hosts per subnet) → more efficient.
“What if your company has 5 departments but only /24 available? Can subnetting still be done?”
The Basic Components of IPv4 Subnetting: A Must-Master Foundation
a. IP Address and Subnet Mask – Two Sides of Currency That Complement Each Other
An IPv4 address is a unique 32-bit address written in 4 decimal octets (example: 192.168.1.0). However, this address is only meaningful when paired with a subnet mask, which serves as a “glass” to identify which parts are the network ID and host ID.
Example:
- Address 192.168.1.10 with subnet mask 255.255.255.0 (/24) means:
- Network ID: 192.168.1.0
- Host ID: 10
Subnet masks always consist of a series of ‘1’ bits sequentially on the left (network) and ‘0’ on the right (host). It’s like a firm dividing line between the network address and the device.
b. CIDR Notation – Efficient Short Language
CIDR (Classless Inter-Domain Routing) notation is a more efficient modern way to write subnet masks. The /24 format is much more practical than having to write 255.255.255.0.
Illustration:
- /24 = 24 bits for the network (or 255.255.255.0)
- /26 = 26 bit network (255.255.255.192)
The larger the CIDR number (e.g. /28), the smaller the subnet generated because more bits are allocated to the network portion.
c. Network Bits vs Host Bits – Power Sharing in the IP World
Network bits (network bit) are the part that defines the identity of a subnet, while host bits (host bit) define the address of devices within that subnet.
1. Network bits:
- Like an area code in a phone number
- All devices in the same subnet have identical network bits
- Example: In 192.168.1.0/24, the first 24 bits are network bits
2. Host bits:
- Such as a unique phone number within the same area
- Must be unique to each device in a subnet
- Example: In /24, 8 bits are left for the host (2⁸-2 = 254 possible hosts)
Network bits are the name of the street, and host bits are the house number on that street. Subnetting means dividing a large city into many small streets.