In this CIDR tutorial we will learn about supernet calculation.
After this CIDR tutorial you will be able to find Subnet Mask, Wildcard Mask, Network Address, Broadcast Address, maximum host per subnet, number of subnets for any given IP Address.
Let's do calculation for IP address
188.8.131.52 /25 We will calculate stepwise.
Step # 1 : Find Subnetmask
How to calculate Subnet Mask from given prefix?
The prefix number represents the
We know that IPv4 address is made up of 32 bits binary number (4 Octets).
To get subnet mask, we will take a 32 bits binary number in which first 25 bits (here prefix /25) are '1' and remaining are '0'.
11111111 11111111 111111111 0000000 which is the Subnet Mask!!
255 . 255 . 255 . 128
So the Subnet Mask for prefix /25 is 255.255.255.128.
Step # 2 : Find Network bits and Host bits
How to find Network Bits and Host Bits?
Network Bits(NB) are same as the prefix#, and Host Bits(HB) are 32 - NB.
We know that SM = 32 (Subnetmask is 32 bit binary number). which means NB + HB = 32 (SM = NB + HB)
NB = 25
HB = 32 - 25
So Network Bits are 25 and Host Bits are 7 for /25 network.
Step # 3 : Find Maximum Hosts per Subnet.
How to get maximum hosts per subnet?
Hosts per subnet = 2^HB
Hosts = 2^7
126 valid hosts, excluding Network Address and Broadcast Address.
Step # 4 : Find total subnets in given Network.
How to find maximum number of possible subnets in network?
Number of subnets = 2^NB
Subnets = 2^25
With /25 network maximum 33554432 unique subnets possible.
Step # 5 : Find Network Address and Broadcast Address
How to find Network Address and Broadcast Address?
If you have IP address and Subnet Mask (or prefix) you can easily find the Network Address.
All we need to do is Bitwise AND operation between IP address and Subnetmask to get Network Address.
To get Broadcast Address we need to find Wildcard Mask, which is inverted Subnet Mask.
Perform Bitwise OR operation between IP Address and Wildcard Mask to get Broadcast Address.
This is it! We have found Subnetmask, Wildcard Mask, Hostbits, Networkbits, Maximum Hosts per Subnet, Total Subnets in Network, Network Address, and Broadcast Address.
|Maximum Hosts per Subnet||128 (126 Valid hosts)|
|Maximum Subnets in Network||33554432|
Hope you like this CIDR tutorial. Subnetting is foundation, you have to build it as strong as you can!!. You will be able to do subnetting on the fly, Practice is the key. You can verify your answers using CIDR Calculator while practicing.
If you have any questions regarding CIDR tutorial, feel free to Contact Us at any time.