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.
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.
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.
One thought on “Subnetting”