Subnetting

The first question is why we need Subnetting. Subnetting is very 
important term in Network. Let’s say we have 10 devices on which
we need to assign the IP address on them. Let’s say we have a
Class C IP address range and will have 254 usable IP address
but we need only 10. So rest of IP address will be waste. So to
make sure we will have minimal wastage of IP address, we divide
the networks into smaller parts. And this is called Subnetting.
So basically, Subnetting allows network administrators to
divide a large network into smaller, more manageable
sub-networks”.
Let’s go through steps of Subnetting.
  • Convert the subnet mask into binary format
  • Now determine the number of host’s bits to be borrowed.
  • Find increment.
  • Add increment to get the new subnets.
Take an example now:
We are taking an example of network “192.168.10.0/24” to 4
networks. We are in step 1 where we need to find binary format
of subnet mask.
Decimal: /24 = 255.255.255.0
Binary: 11111111.11111111.11111111.00000000
Now we will move to second step where we need to find out the 
borrowed bits from hosts. When we need to break into more
networks then we need to borrow more network bits. And formula
for this is:
2x >= required number of subnets.
Here we are requiring 4 number of subnets.
So 2x >= 4, you can decide X value from 0, 1, 2 and so on. Here X will 2 as 22 >= 4. 

/24 = 11111111.11111111.11111111.00000000
The value of X is 2 so we need to borrow 2 bits from host. So new subnet mask will be /24+2 = /26.

/26 = 11111111.11111111.11111111.11000000
Now we will convert it into decimal format. We already have 
three octets and write down the last octet to find its
decimal value.
1    1   0    0   0   0   0   0

27  26  25  24 23  23  21  20

128 64 0  0   0   0   0   0	= 192	(We will consider only 1’s value)

/26 = 255.255.255.192
Now we have new subnet mask and will go to next step to 
determine the network. So we have new subnet mask which /26
and you can write its last octet.
Last Octet: 	1	1	0	0	0	0	0	0
Power of 2:	128	64	0	0	0	0	0	0
So least significant bit is here is highlighted 1 and its power 
of 2 is 64. So our increment will be 64.

Last step is to find network and you can add 64 to your first
address and you can found out all networks. And these are:
192.168.10.0/26
192.168.10.64/26
192.168.10.128/26
192.168.10.192/26
Below is network table for above Subnetting.
Network Address	Usable Host Range	            Broadcast Address
192.168.10.0	192.168.10.1 – 192.168.10.62	192.168.10.63
192.168.10.64	192.168.10.65 – 192.168.10.126	192.168.10.127
192.168.10.128	192.168.10.129 – 192.168.10.190	192.168.10.191
192.168.10.192	192.168.10.193 – 192.168.10.254	192.168.10.255
Now you can go ahead with some more examples. 
Take another example. Let’s divide 124.0.0.0/8 in such a way 
that each network has 500 hosts.

Till today we have did the Subnetting on the basis of network
but here we need to divide on the basis of hosts. The steps
will be the same.

We are in step 1 where we need to find binary format of subnet
mask.
Decimal: /8 = 255.0.0.0
Binary: 11111111.00000000.00000000.00000000
Now we will move to second step where we need to find out the 
value if X and here formula is:
2x >= required number of hosts + 2
So 2x >= 500 + 2. Here X will 2 as 29 >= 512. So 9 has been 
satisfied the condition. Now we need to fix here hosts bits
not network bit. So the value of X is 9. So we will have 9
zeros which will be the value of hosts we are looking for.
/8 = 11111111.00000000.00000000.00000000
The value of X is 9 so we will keep 9 zeros. So new mask will 
be /23.
/23 = 11111111.11111111.11111110.00000000
Now we will convert it into decimal format. And we will write 
the third octet to find the increment.
1    1   1    1   1   1   1   0

27  26  25  24 23  23  21  20

128 64 32 16  8  4  2 0	= 254	(We will consider only 1’s value)

/23 = 255.255.254.0
Now we have new subnet mask and will go to next step to 
determine the network. So we have new subnet mask which /26 and
you can write its last octet.
Last Octet: 	1	1	1	1	1	1	1	0
Power of 2:	128	64	32	16	8	4	2	0
So least significant bit is here is highlighted 1 and its power 
of 2 is 2. So our increment will be 2.

Last step is to find network and you can add 2 to your third
octet and you can found out all networks. And these are:
124.0.0.0
124.0.2.0
124.0.4.0
----
----
124.0.254.0
124.1.0.0
124.1.20
----
----
124.254.0.0
124.254.2.0
---
---
124.254.254.0 (Last possible network)
So total number of subnets will be 2N = 215 = 32768

We have borrowed 15 bits if you will see “from /8 to /23”. And
hosts per subnet will 512 as the value if H is 9 and 2N = 29
= 512.

And usable IP is 512-2 = 510.

One thought on “Subnetting

  • Leave a Reply

    Your email address will not be published. Required fields are marked *