Introduction
It is easy to create a subnet that is equal to 2 power n(i.e, 2^n). It becomes confusing when you want to create the subnets which are not equal to 2^n. So today I will let you know how to create such subnets. You can achieve it by two methods. The first one is with the help of supernetting. In the supernetting method first, you create the subnets which is more than required one with formula 2^n = Total number of subnets. Then you club the excess subnets and make it one supernet. If you want to know about it in details then check out my blog on How to create an odd number of subnets using supernetting[Click Me]. The second method is by subnetting the subnets. In this article, I will write about the second method. Creating the subnets which are not equal to 2^n by subnetting the subnets method.Subnets That are not equal to 2 Power N (2^N).
For example, consider the following question for our demonstration.
You are given the block of IP address as 132.2.1.a/n.
Replace the 'a' with the value of your registration's last two digits. For example, if your registration number is 12170057 then your block of IP address will be 132.2.1.57. In case if the last two digits are zeros then exclude the preceding zero. For example, if your registration number is 12170007 then your block of IP address will be 132.2.1.7
Improve your skills in networking by purchasing networking books from amazon from the link given below.
Replace the value of 'n' with your last two digits of your registration number with the modulus of 32. If the value of modulus 32 is less than or equal to 8 then add 9 to it and use it as the value of 'n'.If the value of modulus 32 is greater than or equal to 28, then subtract 4 from it and use it as the value of 'n'. For example, if your registration number is 12170057, then to calculate the value of n, first select the last two digits of your registration number(i.e, 57). Now find the modulus of 57(i.e, 57 mod 32). It will give you 25. Therefore the value of n is 25. If your registration number is 12170007 then 7 mod 32 will give you 7. Since 7 is less than 8. Now add 9 to it (i.e, 7 + 9). Now the value of n is 16. If your registration number is 12170031, then 31 mod 32 will give you 31. Since 31 is greater than 28 now subtract 4 from it(i.e, 31 - 4). Therefore the value of n will be 27.
a) Calculate the Network ID, Total Usable IP Address, Range of IP Address( First Usable IP Address and Last Usable IPAddress), Broadcast IP Address, and Subnet Mask from the above block of IP Address.
b) Design and simulate the network diagram in a packet tracer based on the following information. Create three subnets from the above block of IP Address. Find the Network ID, Total Usable IP Address, Range of IP Address( First Usable IP Address and Last Usable IP Address), Broadcast IP Address, and Subnet Mask for each subnet. Now design the network with the use of 3 routers( router connection should be in ring topology). Assign the 10.10.10.0/29, 10.10.11.0/29, and 10.10.12.0/29 network IP address to each router network respectively. Each router should be assigned with one subnet. It should have two PC's connected to it. Implement the static routing in the network so that the end devices can communicate across the network. Confirm the connectivity with ping commands.
Answer
Let say that the registration number is 0215558, Now as per the question the value of 'a' is 58 and the value of 'n' is (58 mod 32) 26. Therefore the block of network address will be 132.2.1.58/26
a) It is assumed that you know how to calculate Network ID, Total Usable IP Address, Range of IP Address( First Usable IP Address and Last Usable IPAddress), Broadcast IP Address, and Subnet Mask. So I will show the calculation in tabular form. If you do not know how to calculate it then refer to my blog post on Classless Subnetting using IPv4 Address[Click Me].
Network ID
Octet 1 | Octet 2 | Octet 3 | Octet 4 |
132 | 2 | 1 | 58 |
Since the network bit length is 26, the first, second, and third octet remain as it is. Represent the 4th octet in binary. 2 bits from the 4th octet is used as network bit length. | |||
132 | 2 | 1 | OO 111O1O |
To calculate the Network ID turn all the host bits to zero | |||
132 | 2 | 1 | OO OOOOOO |
132 | 2 | 1 | 0 |
Therefore the Network ID is 132.2.1.0
Total Usable IP Address
The formula to calculate the total number of the usable IP address is 2^(32-n) -2.
2(32-26) - 2 = 2^(6) - 2 = 64 - 2 = 62
Therefore the total number of usable IP addresses is 62.
Range of IP Address
First Usable IP Address | 132.2.1.1 |
… | |
… | |
Last Usable IP Address | 132.2.1.62 |
Broadcast IP Address
Octet 1 | Octet 2 | Octet 3 | Octet 4 |
132 | 2 | 1 | 58 |
Since the network bit length is 26, the first, second, and third octet remain as it is. Represent the 4th octet in binary. 2 bits from the 4th octet is used as network bit length. | |||
132 | 2 | 1 | OO 111O1O |
To calculate the Broadcast ID turn all the host bits to one | |||
132 | 2 | 1 | OO 111111 |
132 | 2 | 1 | 63 |
Therefore the Broadcast IP Address is 132.2.1.63
Subnet Mask
Octet 1 | Octet 2 | Octet 3 | Octet 4 |
11111111 | 11111111 | 11111111 | 11OOOOOO |
255 | 255 | 255 | 192 |
Therefore the subnet mask is 255.255.255.192
b) Now in order to create the 3 subnets from the given block of IP address, find the number of bits that need to be borrowed from the host bits. You can make use of 2^n = Total Number of Subnets. In order to create 3 subnets, you can not have the exact value of n since 2^n != 3. So select the value of n such that it will have the 2^n value close to 3.
2^1 = 2 and 2^2 = 4. Since we need three subnets, the value of n will be 1 because if we select the value of n as 2 then the total subnets are crossing the required subnets.
Therefore the total subnets at the first phase will be 2. The details of each subnet are given below. If you want to know how to calculate the subnets details then please check out my blog on Classless Subnetting using IPv4 Address[Click Me].
Subnet 1
Network ID: 132.2.1.0
Broadcast IP Address: 132.2.1.31
Subnet Mask: 255.255.255.224
Total Usable IP Address: 2^(32-27) - 2 = 32 - 2 = 30
Range of IP Address: 132.2.1.1 - 132.2.1.30
Subnet 2
Network ID: 132.2.1.32
Broadcast IP Address: 132.2.1.63
Subnet Mask: 255.255.255.224
Total Usable IP Address: 2^(32-27) - 2 = 32 - 2 = 30
Range of IP Address: 132.2.1.33 - 132.2.1.62
Now since our requirements are of 3 subnets, still one more subnet is required to have 3 subnets. In order to achieve it, either subnet 1 or subnet 2 needs to be further split into 2 more subnets. So that there will be in total 3 subnets as required.
Therefore, in this case, subnet 2 will be further split into 2 more subnets. The details of each subnet of the subnet are given below.
Subnet 2.1
Network ID: 132.2.1.32
Broadcast IP Address: 132.2.1.47
Subnet Mask: 255.255.255.240
Total Usable IP Address: 2^(32-28) - 2 = 16 - 2 = 14
Range of IP Address: 132.2.1.33 - 132.2.1.46
Subnet 2.2
Network ID: 132.2.1.48
Broadcast IP Address: 132.2.1.63
Subnet Mask: 255.255.255.240
Total Usable IP Address: 2^(32-28) - 2 = 16 - 2 = 14
Range of IP Address: 132.2.1.49 - 132.2.1.62
Therefore the final 3 subnets are subnet 1, subnet 2.1, and subnet 2.2.
Router Network of 10.10.10.0/29
Octet 1 | Octet 2 | Octet 3 | Octet 4 |
10 | 10 | 10 | 0 |
Since the network bit length is 26, the first, second, and third octet remain as it is. Represent the 4th octet in binary. 5 bits from the 4th octet is used as network bit length. | |||
10 | 10 | 10 | OOOOO OOO |
To calculate the Network ID turn all the host bits to zero | |||
10 | 10 | 10 | OOOOO OOO |
10 | 10 | 10 | 0 |
To calculate the Broadcast ID turn all the host bits to one | |||
10 | 10 | 10 | OOOOO 111 |
10 | 10 | 10 | 7 |
Therefore the router network will have the following information.
Network ID: 10.10.10.0
Broadcast IP Address: 10.10.10.7
Usable IP Address: 2^(32-29) - 2 = 2^3 - 2 = 8 - 2 = 6
IP Range: 10.10.10.1 - 10.10.10.6
Subnet Mask: 255.255.255.248
Similarly, router 10.10.11.0/29 and 10.10.12.0/29 will have the following network information.
Router Network of 10.10.11.0/29
Network ID: 10.10.11.0
Broadcast IP Address: 10.10.11.7
Usable IP Address: 2^(32-29) - 2 = 2^3 - 2 = 8 - 2 = 6
IP Range: 10.10.11.1 - 10.10.11.6
Subnet Mask: 255.255.255.248
Router Network of 10.10.12.0/29
Network ID: 10.10.12.0
Broadcast IP Address: 10.10.12.7
Usable IP Address: 2^(32-29) - 2 = 2^3 - 2 = 8 - 2 = 6
IP Range: 10.10.12.1 - 10.10.12.6
Subnet Mask: 255.255.255.248
Network Diagram |
Configuring Static Route from each Router
It will contain the command used to configure the static route from each router. Run the command from the configuration terminal mode(configure terminal). The command used is
ip route network_id network_mask next_hop_ip
Router 0:
ip route 132.2.1.48 255.255.255.240 10.10.10.3
ip route 132.2.1.0 255.255.255.224 10.10.12.3
Router 1:
ip route 132.2.1.32 255.255.255.240 10.10.12.2
ip route 132.2.1.48 255.255.255.240 10.10.11.2
Router 2:
ip route 132.2.1.32 255.255.255.240 10.10.10.2
ip route 132.2.1.0 255.255.255.224 10.10.11.3
Ping Command Output |
Ping Command Output |
Conclusion
In a nutshell, the article is about how to calculate the subnets, when the number of subnets is not equal to the power of 2(2^n) such as 3,5,7,6, etc... The method that is used above is the subnetting of the subnet. First, find the nearest subnets using the formula 2^n = Total number of subnets then based on requirements the subnets are further split into smaller subnets. The network diagram and configuration of the network in packet tracer are also shown. Basically, it contained how to configure the static route in the router. If you have any queries feel free to drop a comment in the comment box below.