Introduction
It is easy to create subnets when the required number of subnets is the power of 2. For example, when the required subnets are 1,2,4,8,16, and so on. You know how many bits to borrow from the host bits so that you can create the required subnets. But it becomes relatively difficult when the subnets are an odd number such as 3,5,7, and so on. Similarly when the subnets are not the power of 2. There are two methods to solve it. One method is by subnetting the subnets. If you don't know about it then you can check out my blog on Create subnets Which is Not Equal to 2^n[Click Me]. In this article, I will show you how to create an odd number of subnets using the supernetting method which is the second method to solve it.
What is Supernetting?
Supernetting is combining of multiple smaller networks into a bigger network. In short, it is the opposite of subnetting. It helps the network administrator to manage the network routing table very easily by reducing the routing table entries in the routers. Let's take a look into how you can supernet the network. Consider the 10.10.0.8/24 and 10.10.1.2/24 network. We will supernet these two networks into one bigger network.
Supernetting 10.10.0.8/24 and 10.10.1.2/24 Networks
The steps to convert the IP block into the supernet is given below.
- Convert the IP address into the binary form
- Compare the given IP address and count how many bits are similar in the given block of IP address. It will give you the network bit length and network block of the supernet.
- Find out the host bit in the given IP. Subtract the network bit from 32. It will give you a host bit.
- Now represent the IP address into the decimal format. To calculate the supernet block, convert the binary into decimal. Remember to make all the host bit into zero when you calculate the supernet block IP address.
Binary IP Address | ||||
Octet 1 | Octet 2 | Octet 3 | Octet 4 | |
OOOO1O1O | OOOO1O1O | OOOOOOO | O | OOOO1OOO |
OOOO1O1O | OOOO1O1O | OOOOOOO | 1 | OOOOOO1O |
Compare the two binary IP addresses given above, and count the number of bits that are the same. You can make out from the IP address that 23 bits are the same. Now represent the all host bit with zero | ||||
OOOO1O1O | OOOO1O1O | OOOOOOO | O | OOOOOOOO |
OOOO1O1O | OOOO1O1O | OOOOOOO | O | OOOOOOOO |
Now covert the binary number into the decimal number to know the supernet block of IP address. | ||||
10 | 10 | 0 | 0 |
Therefore the supernet block of IP address is 10.10.0.0/23
Note: In order to form a supernet you should have the contiguous block of IP address. If it is not contagious then remember the IP address available in between the given IP block should not be used by other networks. Then you can still supernet the given block of IP address( Private Network).
How to create an odd number of subnets using Supernetting
The logic is simple. You have to create the number of subnets which is greater than the required number of subnets. Then you simply combine the extra smaller subnets which are not required. We make use of the formula 2^n = Total Number of Subnets to know how many bits you have to borrow from the host bit to create the required number of subnets.
For example, let's take the IP address 10.10.10.0/24 and create 3 number of subnets from it.
Subnetting 10.10.10.0/24 Network into 3 Subnets
First, let's know how many bits you have to borrow in order to create the required number of subnets.
If n = 1, then 2^1 = 2,
If n = 2, then 2^2 = 4
Since you are doing with the supernetting method you need the total number of subnets greater than the required number of subnets. Therefore the borrowed bit value is 2. I have calculated the 4 subnets from the given block of IP address. If you don't know how to calculate it then you can check out my blog on Classless Supernetting Using IPv4 Address[Click Me]
Subnet 1:
Network ID: 10.10.10.0
Broadcast ID: 10.10.10.63
Subnet Mask: 255.255.255.192
Total Number of Usable IP Address: 2^(32-26) - 2 = 62
Range of IP Address: 10.10.10.1 - 10.10.10.62
Subnet 2:
Network ID: 10.10.10.64
Broadcast ID: 10.10.10.127
Subnet Mask: 255.255.255.192
Total Number of Usable IP Address: 2^(32-26) - 2 = 62
Range of IP Address: 10.10.10.65 - 10.10.10.126
Subnet 3:
Network ID: 10.10.10.128
Broadcast ID: 10.10.10.191
Subnet Mask: 255.255.255.192
Total Number of Usable IP Address: 2^(32-26) - 2 = 62
Range of IP Address: 10.10.10.129 - 10.10.10.190
Subnet 4:
Network ID: 10.10.10.192
Broadcast ID: 10.10.10.255
Subnet Mask: 255.255.255.192
Total Number of Usable IP Address: 2^(32-26) - 2 = 62
Range of IP Address: 10.10.10.193 - 10.10.10.254
The required number of subnets is 3 and you have created 4 subnets. Now you have to combine any two contagious networks so that there will be only 3 subnets as required. In this case, let's combine the subnet 3 and subnet 4.
Supernetting of 10.10.10.128/26 and 10.10.10.192/26 Subnets.
Binary IP Address | ||||
Octet 1 | Octet 2 | Octet 3 | Octet 4 | |
OOOO1O1O | OOOO1O1O | OOOO1O1O | 1O | OOOOOO |
OOOO1O1O | OOOO1O1O | OOOO1O1O | 11 | OOOOOO |
Compare the two binary IP addresses given above, and count the number of bits that are the same. You can make out from the IP address that 25 bits are the same. Now represent the all host bit with zero | ||||
OOOO1O1O | OOOO1O1O | OOOO1O1O | 1 | OOOOOOO |
OOOO1O1O | OOOO1O1O | OOOO1O1O | 1 | OOOOOOO |
Now covert the binary number into the decimal number to know the supernet block of IP address. | ||||
10 | 10 | 10 | 128 |
Therefore the supernet block of IP address is 10.10.10.128/25
The final three subnets are 10.10.10.0/26(subnet 1), 10.10.10.64/26(subnet 2), and 10.10.10.128/25(supernet)
Conclusion
In summary, you have learned about the following:
- What is supernetting?
- How to create the supernet?
- How to create an odd number of subnets using supernetting?
You can also use the same method to calculate the subnets when the required number of subnets is not equal to 2 power n(2^n). If you have any doubts or query please feel free to leave a query in the comment box given below.