Subnetting in Computer Networks
Finding a network and delivering data to it was simpler when the IP (Internet Protocol)
system was initially implemented since there were fewer individuals online. Sending a
data packet to the desired machine in a network is getting more and more challenging
these days due to the rise in internet users. Network performance becomes a major
issue once a network is large enough to serve an enterprise.
Introduction to Subnetting
Subnetting is a combination of two words i.e. Sub and Netting. Here Sub word means
Substitute and netting word means Network. The Substitute Network created for a
function to happen is known as Subnetting.
Here, Substitute Network does not mean a new network is created. A full piece of
network is broken into small pieces and each piece a different is assigned.
Subnet is the name given to piece of the broken network or can also be called as the
Substitute network is known as Subnet. Subnets are the legal small parts of IP (Internet
Protocol) Addressing process
Subnetting should be done in such a way that network does not gets affected. This
means that we can divide the network into different parts but all when put together
should perform the same task when done before splitting in to small parts.
Subnets reduce the need for traffic to use unnecessary routes, which speeds up the
network. To help with the lack of IP addresses on the internet, subnets were developed
Subnetting is the process of dividing a large network into smaller networks
called as “subnets.” Subnets provides each group of devices have thier
own space to communicate, that ultimately helps 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.
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 transmits 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.
Advantage of Subnetting
o Efficiency of the Network
By removing the need for extra routers, subnetting makes network traffic simpler. This
makes sure the data being transmitted can get to its destination as fast as possible,
eliminating or avoiding any potential diversions that may slow it down.
o Provides Network Security
By isolating or removing vulnerable network regions and making it harder for intruders to
move through a company's network, subnetting helps the network managers in reducing
network-wide risks.
o Internet Protocol (IP) Addressing Relocation
Each class has a finite amount of possible host allocations; for instance, networks with
more than 254 devices require a Class B allocation. Assume that you are a network
administrator. Now, you have a task of allocating 150 hosts among three physical
networks in three distinct cities for a Class B or C network. If so, we must either ask for
additional address blocks for each network or split the single big network into small parts
named subnets so that we could utilize a single address block across a number of
physical networks.
o Reduction of Network Traffic
Placing all of the computers on the same subnet can assist minimize network traffic if a
significant amount of an organization's traffic is intended to be shared routinely among a
number of devices. Without a subnet, all computers and servers on the network would
be able to see data packets from every other machine.
o Network Speed Improvement
The main network is divided into smaller subnets through the process of subnetting, and
the goal of these smaller, linked networks is to split the large network into a collection of
smaller, less-busy networks. Subnets reduce the need for traffic to use unnecessary
routes, which speeds up the network.
o Division of IP Addresses
An IP address is split into its network address and host address via subnetting.
Subnetting Necessary
● Subnetting helps in organizing the network in an efficient way which
helps in expanding the technology for large firms and companies.
● Subnetting is used for specific staffing structures to reduce traffic and
maintain order and efficiency.
● Subnetting divides domains of the broadcast so that traffic is routed
efficiently, which helps in improving network performance.
● Subnetting is used to increase network security.
Different Parts of IP Address
An IP address is made up of different parts, each serving a specific
purpose in identifying a device on a network. In an IPv4 address, there are
four parts, called “octets,” which are separated by dots (e.g., [Link]).
● Network Portion: The first few sections (octets) of an IP address
identify the network that the device belongs to. This part of the IP
address is common among all devices on the same network, allowing
them to communicate with each other and share resources.
● Host Portion: The remaining sections of the IP address specify the
individual device, or “host,” within that network. This part makes each
device unique within the network, allowing the router to distinguish
between different devices.
The 32-bit IP address is divided into sub-classes. These are given below:
● Class A: The network ID is 8 bits long and the host ID is 24 bits long.
● Class B: The network ID is 16 bits long and the host ID is 16 bits long.
● Class C: The network ID is 24 bits long and the host ID is 8 bits long.
Subnetting Work
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.
In class C the first 3 octets are network bits so it remains as it is.
● 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.
Thus, the range of subnet 1 is: [Link] to [Link]
Subnet id of Subnet-1 is : [Link]
The direct Broadcast id of Subnet-1 is: [Link]
The total number of hosts possible is: 126 (Out of 128,
2 id's are used for Subnet id & Direct Broadcast id)
The subnet mask of Subnet- 1 is: [Link]
● 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).
Thus, the range of subnet-2 is: [Link] to [Link]
Subnet id of Subnet-2 is : [Link]
The direct Broadcast id of Subnet-2 is: [Link]
The total number of hosts possible is: 126 (Out of 128,
2 id's are used for Subnet id & Direct Broadcast id)
The subnet mask of Subnet- 2 is: [Link]
The best way to find out the subnet mask of a subnet
is to set the fixed bit of host-id to 1 and the rest to 0.
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.
Example 1: An organization is assigned a class C network
address of [Link]. It uses a netmask of [Link] to
divide this into sub-networks. Which of the following is/are
valid host IP addresses?
1. [Link]
2. [Link]
3. [Link]
4. Both (A) and (C)
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
[Link]. It uses a subnet mask of [Link]. Which of
the following is NOT a valid broadcast address for any
subnetworks?
1. [Link]
2. [Link]
3. [Link]
4. [Link]
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.
What is a Subnet Mask?
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.
Advantages of Subnetting
● It provides security to one network from another network. eg) In an
Organisation, 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.
● In the case of Small networks, maintenance is easy.
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.
● The cost of the overall Network also increases. Subnetting requires
internal routers, Switches, Hubs, Bridges, etc. which are very costly.