Open In App

Introduction To Subnetting

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Share
Report issue
Report

When a bigger network is divided into smaller networks, to maintain security, then that is known as Subnetting. So, maintenance is easier for smaller networks. For example, if we consider a class A address, the possible number of hosts is 224 for each network, it is obvious that it is difficult to maintain such a huge number of hosts, but it would be quite easier to maintain if we divide the network into small parts. 

Uses of Subnetting

  1. Subnetting helps in organizing the network in an efficient way which helps in expanding the technology for large firms and companies.
  2. Subnetting is used for specific staffing structures to reduce traffic and maintain order and efficiency.
  3. Subnetting divides domains of the broadcast so that traffic is routed efficiently, which helps in improving network performance.
  4. Subnetting is used in increasing network security.

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.

 

Subnetting

 

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.

How Does 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: 193.1.2.0 to 193.1.2.127 

Subnet id of Subnet-1 is : 193.1.2.0
The direct Broadcast id of Subnet-1 is: 193.1.2.127
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: 255.255.255.128
  • 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: 193.1.2.128 to 193.1.2.255 

Subnet id of Subnet-2 is : 193.1.2.128
The direct Broadcast id of Subnet-2 is: 193.1.2.255
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: 255.255.255.128
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 (22) 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 (23) 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.

Along with the advantage, there is a small disadvantage to subnetting that is, before subnetting to find the IP address first the network id is found then the host id followed by the process id, but after subnetting first network id is found then the subnet id then host id and finally process id by this the computation increases.

Example 1: An organization is assigned a class C network address of 201.35.2.0. It uses a netmask of 255.255.255.192 to divide this into sub-networks. Which of the following is/are valid host IP addresses?

  1. 201.35.2.129
  2. 201.35.2.191
  3. 201.35.2.255
  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 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

The advantages of Subnetting are mentioned below:

  1. 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.
  2. 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.
  3. In the case of Small networks, maintenance is easy.

Disadvantages of Subnetting

The disadvantages of Subnetting are mentioned below:

  1. 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.
  2. 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.
  3. The cost of the overall Network also increases. Subnetting requires internal routers, Switches, Hubs, Bridges, etc. which are very costly.

Last Updated : 21 Mar, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads