IP Subneting
IP Subneting
” Subnets
provide each group of devices with their own space to communicate, which ultimately helps the
network to work easily. This also boosts security and makes it easier to manage the network, as each
subnet can be monitored and controlled separately. In this article, we will discuss Subnetting in
detail.
Introduction to Subnet
A subnet is like a smaller group within a large network. It is a way to split a large network into
smaller networks so that devices present in one network can transmit data more easily. For
example, in a company, different departments can each have their own subnet, keeping their data
traffic separate from others. Subnet makes the network faster and easier to manage and also
improves the security of the network.
Let’s consider a company that follows classful addressing, it has a Class C network
(192.168.1.0/24) with 256 IP addresses. It has three departments:
Sales: 20 devices
HR: 10 devices
IT: 50 devices
Without subnetting, all departments share the same network, and all 256 IP addresses are available
to everyone, which leads to:
IP Waste: Only 80 devices are needed (20 + 10 + 50), but all 256 addresses are allocated,
wasting 176 addresses.
Performance Issues: Since all departments are on the same network, any data sent between
devices floods the entire network, slowing communication for everyone. For example, heavy
data transfer in IT can impact Sales and HR.
Security Risks: Without subnets, anyone in Sales can access HR or IT devices, exposing
sensitive data like payroll systems.
With Subnetting, we split the network into three subnets, allocating just enough IP addresses for
each department:
By subnetting, we:
Save IP addresses (Efficiency): Only 112 addresses are used (80 + some spare), leaving 144
unused for future growth.
Keep networks faster (Better Performance): Data within each department stays in its
subnet. For example, HR traffic stays in HR, reducing network congestion for Sales and IT.
Protect sensitive data (Improved Security): Each department is isolated. If someone in Sales
tries to access HR systems, subnet restrictions block them.
IP Addressing
An IP address is made up of different parts, each serving a specific purpose in identifying a device on
a network. An IPv4 address consists of four parts called “octets,” separated by dots (e.g.,
192.168.1.1). It has two main sections:
IPv4 addresses are divided into classes based on the length of the network and host portions:
A subnet mask is a 32-bit number used in IP addressing to separate the network portion of an IP
address from the host portion. It helps computers and devices determine which part of an IP address
refers to the network they are present, and which part refers to their specific location or address
within that network.
The working of subnets starts in such a way that firstly it divides the subnets into smaller subnets.
For communicating between subnets, routers are used. Each subnet allows its linked devices to
communicate with each other. Subnetting for a network should be done in such a way that it does
not affect the network bits.
For Subnet-1: The first bit which is chosen from the host id part is zero and the range will be
from (193.1.2.00000000 till you get all 1’s in the host ID part i.e, 193.1.2.01111111) except
for the first bit which is chosen zero for subnet id part.
For Subnet-2: The first bit chosen from the host id part is one and the range will be from
(193.1.2.100000000 till you get all 1’s in the host ID part i.e, 193.1.2.11111111).
Finally, after using the subnetting the total number of usable hosts is reduced from 254 to 252.
Note:
1. To divide a network into four (2 2 ) parts you need to choose two bits from the host id part
for each subnet i.e, (00, 01, 10, 11).
2. To divide a network into eight (2 3 ) parts you need to choose three bits from the host id
part for each subnet i.e, (000, 001, 010, 011, 100, 101, 110, 111) and so on.
3. We can say that if the total number of subnets in a network increases the total number of
usable hosts decreases.
The network can be divided into two parts: To divide a network into two parts, you need to choose
one bit for each Subnet from the host ID part.
In the above diagram, there are two Subnets.
Note: It is a class C IP so, there are 24 bits in the network id part and 8 bits in the host id part.
1. 201.35.2.129
2. 201.35.2.191
3. 201.35.2.255
Solution:
Converting the last octet of the netmask into the binary form: 255.255.255.11000000
Converting the last octet of option 1 into the binary form: 201.35.2.10000001
Converting the last octet of option 2 into the binary form: 201.35.2.10111111
Converting the last octet of option 3 into the binary form: 201.35.2.11111111
From the above, we see that Options 2 and 3 are not valid host IP addresses (as they are broadcast
addresses of a subnetwork), and OPTION 1 is not a broadcast address and it can be assigned to a
host IP.
Example 2: An organization has a class C network address of 201.32.64.0. It uses a subnet mask of
255.255.255.248. Which of the following is NOT a valid broadcast address for any subnetworks?
1. 201.32.64.135
2. 201.32.64.240
3. 201.32.64.207
4. 201.32.64.231
Solution:
Converting the last octet of the netmask into the binary form: 255.255.255.11111000
Converting the last octet of option 1 into the binary form: 201.32.64.10000111
Converting the last octet of option 2 into the binary form: 201.32.64.11110000
Converting the last octet of option 3 into the binary form: 201.32.64.11001111
Converting the last octet of option 4 into the binary form: 201.32.64.11100111
From the above, we can see that in OPTION 1, 3, and 4, all the host bits are 1 and give the valid
broadcast address of subnetworks.
and OPTION 2, the last three bits of the Host address are not 1 therefore it’s not a valid broadcast
address.
Advantages of Subnetting
It provides security to one network from another network. For example: In an Organization,
the code of the Developer department must not be accessed by another department.
It may be possible that a particular subnet might need higher network priority than others.
For example, a Sales department needs to host webcasts or video conferences.
Disadvantages of Subnetting
In the case of a single network, only three steps are required to reach a Process i.e Source
Host to Destination Network, Destination Network to Destination Host, and then Destination
Host to Process.
In the case of a Single Network only two IP addresses are wasted to represent Network Id
and Broadcast address but in the case of Subnetting two IP addresses are wasted for each
Subnet.
To learn all the basic to advanced subnetting concepts, refer to Subnet Mask Cheat Sheet.
What is IP Addressing?
IP addressing is a method used to identify and locate devices on a network, allowing them to
communicate with each other over the internet.
A point-to-point subnet is a network configuration that connects two devices directly to each other,
typically using a dedicated link. This type of subnet is often used for communication between routers
or other network devices without any other devices on the same link.
IPv6 subnetting is the process of dividing an IPv6 address space into smaller, manageable subnets. It
allows organizations to efficiently allocate and manage their IP addresses within the larger IPv6
framework.
Dreaming of M.Tech in IIT? Get AIR under 100 with our GATE 2026 CSE & DA courses! Get
flexible weekday/weekend options, live mentorship, and mock tests. Access exclusive features
like All India Mock Tests, and Doubt Solving—your GATE success starts now!