What is Subnetting ?

Today our topic is very important, What is subnetting ? .You will easily understand subnetting in this topic.In previous post we have learn basic concept of subnetting.You can refer that basic concepts  so that you will understand why subnetting is necessary in network. I will suggest you to go through basic concept of subnetting

Subnetting means ?

Subnetting is a technique to partition a single physical network into more than one smaller logical sub-networks. An IP address include two parts one is network part and other is host part.
Each IP address consist of the subnet mask. All the class types such as Class A, Class B, Class C include the subnet mask know as default subnet mask.

How to do subnetting ?

Suppose you want to setup five different network, Then you have two choices first buy five different network ID, But this network ID will be very costly so will not prefer to buy five different network. Second buy a single network ID and divide this single network ID into five different sub-network ID, Which is called subnetting. Hence we will prefer subnetting as shown in below picture.  What is Subnetting ?

Here five different sub-network made by a single network. Now we will see how it is done for that to do suppose we have buy a network ID of class C, Which is 197.10.10.0/24, Here 24 is CIDR for class C because 24 bits are reserved for network ID in class C.If you are not understanding why 24 CIDR please refer previous post.

Now from this network ID we have to provide five different sub-network of different PC users group. 10 PC will required ten different IP.
Similarly 30 PC will required thirty IP.

Method for subnetting

1 write down the given IP like 197.10.10.0, Now check which class IP is this, For example this is class C IP, Hence we know that for class C three Octet is reserved for network and one octet for host.

2 Now convert host ID into binary then we can write IP 197.10.10.0 like this given below.

197.10.10.00000000, since host id is zero so eight times zeros for binary.

3 Find the Maximum number of IP required in which network area, So from the figure first 4th network area required 40 PC, 5th network required only two IP for router to router connection, Hence 4th network required maximum 40 IP.
Hence write down the equation like this

2ⁿ -2 ≥ Maximum number of IP required in given network   ( Here 2ⁿ -2 ≥ 40 )

There are two method for subnetting, First is according to host requirement and second is according to network requirement. Now we are doing according to host requirement, According to which network how many PC requirement that IP requirement rather than how many network requirement. So it is clear that we are doing according to host requirement.

Now 2ⁿ -2 ≥ 40 this mathematical condition must satisfy.
2ⁿ → represent binary number of bits available in host, Minus 2 because first network ID and last network ID are reserved for Network and broadcast respectively.

Now put n=1,2 ,3 ,4 ……… and check for which value of n the above equation  2ⁿ -2 ≥ 40 satisfy.
Suppose if we put n=1 then 2¹ -2 ≥ 40 0r 0  ≥ 40 which does not satisfy
if we put n=2 then 2² -2 ≥ 40 or 2 ≥ 40 which does not satisfy  and so on check for condition

Here if we put n = 6 then 2⁶ -2 ≥ 40  or 64-2 ≥ 40 or 62 ≥ 40 ( this condition satisfy ).
So final value of n =6 satisfy

4 Write down the taken IP  197.10.10.00000000  (written host part in binary ).
Now n=6 so count 6 bits from right side in host part binary for host and give remaining two bits to network this is important point.

N   Host
197.10.10.00000000
←

Means here 6 bits is reserved for host and 2 bits given to network.
In previous post we have already discussed host bits are represented by 0 and Network bits are represented by 1. You can refer the previous post link given above.
Hence we can write now IP  197.10.10.11000000 in place of network bits 1,1 and in place of host bits 0,0.

Now convert the binary bits to decimal value, So we have already learn in previous post binary to decimal conversion.
Hence decimal value of  11000000 = 2⁷ +2⁶ +0+0+0+0+0+0 = 128+64 = 192

So decimal value IP  197.10.10.192  Here subnetting is done.
Hence subnetting is binary bits given from host to network is called subnetting .

Now for subnet mask we know that the IP 197.10.10.0/24  is class C IP address hence by default its subnet mask is 255.255.255.0  for Class C. But for IP after subnettting done

5 Write down the by default subnet mask and at place of 0 put the decimal value after subnetting done so IP address 197.10.10.192 subnet mask will be 255.255.255.192 .

How to make Subnet ?

6  Now here start from first network ID  197.10.10.0/26 why 26 ? because two host bits added in network bits.
Hence Subnet ID  197.10.10.0/26  ( Subnet ID -1 )

Now for Subnet ID -2  you have to pick binary bits first 1 from left see below

↓
11000000  and calculate the decimal value of this 1 its value is 64 we have seen above .
Hence  197.10.10.64/26  ( Subnet ID  -2 )
again    197.10.10.128/26 ( Subnet ID -3 )
again    197.10.10.192/26 ( Subnet ID -4 )

Now we can not make more subnet ID in this network because 192 +64 = 256 which is not possible maximum value is 255.
If you are thinking making 10 to 11 like 197.10.11.0 this is also not possible because here network ID is changed because in Class C three octet reserved for network.

Hence we can’t make more subnet ID in this network, Only four subnet ID are possible mentioned above.

Subnetting examples

From first figure we were suppose to make five different Network by doing subnetting. But only four subnet ID made taking Class C Network ID.
So it is clear that taking Class C network ID we can’t make five different network only four network are possible.
But taking Class B Network ID we will be able to make five different network that will be Subnet ID -1, Subnet ID -2, Subnet ID -3 …… and so on .

Here we have learn how to do subnetting ?. I hope you have enjoyed to learn subnetting and now your concept and doubt is clear about subnetting.
We will continue in next post .If you like comment and share, Thanks for reading and sharing keep learning more and more.

Dated 27th Oct 2018