What is Advanced Subnetting?
defines advanced subnetting as when the network part of the subnet mask is neither 24, 16, nor 8 bits. (In other words: Subnet mask
s that contain numbers other than .255. and .0.)
Why use advanced subnetting?
Because the /24 (255.255.255.0), /16 (255.255.0.0), and /8 (255.0.0.0) subnetting-methods are limited. If you have only had 3 PCs, and you want to bring them on the net, the best subnet mask would be 255.255.255.0 (or /24). A /24 subnet provides room for 253 hosts within a subnet, and if you only have 3 PCs, 250 possible IP Address
es would go to waste.
That's an expression I made up myself, but it matches perfectly what I am going to describe: For each subnet, 2 IPs are wasted: Network Address
, and Broadcast Address
. In addition to these two, I prefer to eliminate one more IP Address, since most subnets also need a gateway
to communicate with the outside world.
Advanced Subnet Calculations
There are many things you can calculate regarding advanced subnetting. Some of these things include:
- Given an IP Address and a subnet mask.. What is the network address?
- Given an IP Address and a subnet mask.. What is the broadcast address?
- Given an IP Address and a subnet mask.. What available IPs exists within that subnet?
There are more than these, but these are the most common, so I will explain the algorithm for these here.
I assume that you know how to convert decimal numbers into binary numbers, so I will not explain that here.
To speed up your calculations, here are some translations from decimal to binary. Apart from 255 and 0, which are fairly simple to convert to binary, these numbers are the ones that can appear in a subnet masks. The octet that contains one of these numbers are to be considered as "The Interesting Octet
Given an IP Address and a subnet mask.. What is the network address?
The procedure isn't as hard as it looks. It might take time, yes, but when you get the hang of it, it'll only take a few seconds. Here we'll use 255.255.224.0 as subnet mask
, and 22.214.171.124 as IP Address
Convert the interesting octet of the subnet mask into binary. The interesting octet
is octet number three. As the above table shows, 224dec is 11100000bin.
Do the same with the IP Address
. As stated earlier, I assume that you already know how to convert from decimal to binary. To speed things up, I’ll do it for you. As you probably remember, the interesting octet
is octet number three ( .50. ). 50dec is 00110010bin.
Write the two binary
numbers above each other and start to calculate:
0 + 0 = 0
0 + 1 = 0
1 + 1 = 1
here it is:
subnet mask: 11100000
IP address: 00110010
Convert the result back to decimal
(00100000 = 32), and replace the interesting octet
of the IP Address with the decimal number. Enter 0 in any octets right of the Interesting Octet. Now you've got the Network Address (If you've done it right, it should be 126.96.36.199). Congratulations, you made it!
Given an IP Address and a subnet mask.. What is the broadcast address?
Do the same as if you were calculating the network address. After you've done that, it's time to do what separates these two things. We'll use the same subnet mask and IP Address as the previous example. Look at the table listed earlier. 224 is written 11100000 in binary. The three bits containing 1 means that it is reserved for the network-part. Those remaining bits are used for the host-part. Take the result from the calculation you made, and insert 1 in the 5 bits that define the host-part, and any remaining octet
s right of the interesting octet. This gives you 00111111.11111111, which is easily converted to 63.255 in decimal
. This gives you the answer 188.8.131.52.
Given an IP Address and a subnet mask.. Which available IPs exist within that subnet?
When you've calculated the network address
and the broadcast address
, this step is very simple. The Available IP addresses are those between the network address
and the broadcast address
(not including). In this case the answer is: every IP from 184.108.40.206 to 220.127.116.11.
That was about it, I guess. If you come across any flaws and errors in my w/u, please let me know, and I will correct them as fast as I can.
If not: I hope you found it useful.
Source: Cisco CCNA Training