For a classful network total bits is 8. So Total bits = Tb = 8.
Sub-net mask can be 0, 128, 192, 224, 240, 248, 252, 254 and 255.
Below table gives you the "Number of bits used for subnetting"(n) to their corresponding subnet mask.
For subnet mask 255 is default, so it'll not consider for subnet masking.
For example: Let, IP address = 210.1.1.100 and Sub-net mask = 255.255.255.224
Total bits = Tb = 8 Number of bits used for subnetting = n = 3 (as subnet mask = 224 and its corresponding "No. of bits used for Subnetting" is 3 from above table)
2ide
From the previous step, you got the "Number of bits used for subnetting"(n) and you know the "Tb", then you can get "Number of bits left for host"(m) = Tb - n as total bits is the summation of number of bits used for subnetting and number bits left for host i.e.Tb = m+n.
Number of bits left for host = m = Tb - n = 8 - 3 = 5
3this
Now you have to calculate "Number of subnets" = 2n and "Value of last bit used for subnet masking"(Δ) = 2m. Number of host per subnet = 2m - 2.
Number of subnets = 2n = 23 = 8
Value of last bit used for subnet masking = Δ = 2m = 25 = 32
4spa
Now you can find previously calculated number of subnets by separating subnets each having "Value of last bit used for subnet masking" or Δ addresses.
The 8 subnets (as calculated in previous step) are shown above.
Each of them has 32 addresses.
53d
Now you have to find that your IP address is in which subnet, that subnet's first address is network address and last address is broadcast address.
Here the taken IP address is 210.1.1.100 . 210.1.1.100 comes in 210.1.1.96 - 210.1.1.127 subnet (see the previous step table). So 210.1.1.96 is network address and 210.1.1.127 is broadcast address for the taken IP address i.e. 210.1.1.100 .
Method 2orm
For CIDRblog
1ci
In CIDR, you have a IP address followed by bit-length prefix separated by slash(/). Now you have to convert bit-length prefix to quad-dotted decimal representation. To do this follow below steps.
Write the the bit-prefix in below format.
If it's 27, then write it as 8 + 8 + 8 + 3 .
If it's 12, then write it as 8 + 4 + 0 + 0 .
Default is 32, which is 8 + 8 + 8 + 8.
Convert the corresponding bit according to the below table and represent in quad-dotted decimal format.
Let an IP address be 170.1.0.0/26 . Using above table, you can write:
26
=
8
+
8
+
8
+
2
255
.
255
.
255
.
192
Now the IP address is 170.1.0.0 and subnet mask in quad-dotted decimal format is 255.255.255.192 .
2get
Total bits = Tb = 8.
Sub-net mask can be 0, 128, 192, 224, 240, 248, 252, 254 and 255.
Below table gives you the "Number of bits used for subnetting"(n) to their corresponding subnet mask.
For subnet mask 255 is default, so it'll not consider for subnet masking.
From the previous step, you got IP address = 170.1.0.0 and Sub-net mask = 255.255.255.192
Total bits = Tb = 8 Number of bits used for subnetting = n = 2 (as subnet mask = 192 and its corresponding "No. of bits used for Subnetting" is 2 from above table)
3it
From the previous step, you got the "Number of bits used for subnetting"(n) and you know the "Tb", then you can get "Number of bits left for host"(m) = Tb - n as total bits is the summation of number of bits used for subnetting and number bits left for host i.e.Tb = m+n.
Number of bits left for host = m = Tb - n = 8 - 2 = 6
4io
Now you have to calculate "Number of subnets" = 2n and "Value of last bit used for subnet masking"(Δ) = 2m. Number of host per subnet = 2m - 2.
Number of subnets = 2n = 22 = 4
Value of last bit used for subnet masking = Δ = 2m = 26 = 64
5
Now you can find previously calculated number of subnets by separating subnets each having "Value of last bit used for subnet masking" or Δ addresses.
The 4 subnets (as calculated in previous step) are
Each of them has 64 addresses.
6
Now you have to find that your IP address is in which subnet, that subnet's first address is network address and last address is broadcast address.
Here the taken IP address is 170.1.0.0 . 170.1.0.0 comes in 170.1.0.0 - 170.1.0.63 subnet (see the previous step table). So 170.1.0.0 is network address and 170.1.0.63 is broadcast address for the taken IP address i.e. 170.1.0.0 .