Now that you understand the basics of IPv4 subnetting, you’ll probably find your own shortcuts and calculation methods that work best for you. In this video, I’ll show you the method I use during certification exams to quickly calculate subnet values with almost zero mathematical calculations.
<< Previous Video: Calculating IPv4 Subnets and Hosts Next: Assigning IPv4 Addresses >>
There’s a lot of videos out there that show you how to perform IP subnetting, but it usually involves some type of math. You have to understand the powers of 2. You need to understand how to convert from decimal to binary and back to decimal again. And one of the challenges that you’re going to have when you sit down for a certification exam is you may not have the time needed to be able to perform all of those mathematical calculations. You also have to keep in mind that you’re sitting down for an exam and that process can be rather stressful. It’s difficult to be able to calculate these things on the fly as the clock is ticking.
So I wanted to put together this video that showed the process that I use during a certification exam to be able to subnet very, very quickly without having to go through all of those mathematical processes. Well, there’s a little bit of math involved. You do have to be able to use some simple addition to create some tables prior to sitting down and starting the exam. And when you perform the actual subnetting, you have to be able to subtract one and add. One and during an exam, I don’t think that kind of math is something we need to worry too much about.
This is really a combination of a lot of different processes. I wanted to create a series of subnetting processes that got rid of the math and tried to make the process as simple as possible, removing all opportunities for you to make a mistake during an exam. Now, if you’re already familiar with subnetting, some of these processes may be oversimplified, and that’s fine. You can skip over the things that you already know. But if you’re like me and that stressful test situation is one where it’s very difficult to concentrate, then this seven second subnetting process is going to be for you.
Here’s a common subnetting problem you might be faced with on an exam. You’re given a network configuration. In this case, we have four separate networks. You’re given an IP address assignment, 192.168.1.0 with a /24 subnet mask. It says that we need an IP addressing scheme with more than one network address that can support 40 devices per subnet. So we’ve been given the single network address. We need to subnet it out into at least four networks, and those four networks need to at least have 40 devices per subnet that can be supported with that IP addressing scheme.
If we wanted to write this out in a longer form, we could, of course, write down all of the different subnet mask options. We could convert those to binary so we can use those for calculations later. We might want to reference that back to the CIDR block notation. And we’ll be able to see how many networks and how many hosts per network would be for each individual subnet mask. Obviously, on an exam you don’t have this kind of time to write out one of these extensive charts to be able to start calculating a subnet configuration.
To do this a little bit faster, we might want to use the power of 2’s. We can, of course, create a power of 2 chart, or memorize these powers of 2. And then we would look at our subnet mask, so /24. So we have 24 bits that are already masked. So we might want to borrow some bits from the ones that are left over. We might want to borrow 2 bits for a subnet mask, and then use 6 host bits to use on top of that.
Now, we know that with those 2 bits that we’re borrowing, those subnet bits we would calculate as 2 to the second power, since we’re borrowing 2 bits there. And that would give us a value of 4. So the total number of subnets would be 4. We’ve got 6 host bits, so it’d be 2 to the sixth power. And calculating that out would be a 64. And of course, we subtract 2 from that to subtract the broadcast address and the network address. And that leaves us with 62 as the number of hosts per subnet. And there’s the answer we were looking for. We now have 4 subnets and we have 62 possible hosts per subnet, all because we were able to remember that powers of 2.
But of course, even this process requires that you do a little bit of work. You need to convert things to binary. You need to figure out how many bits you’re going to borrow. You need to calculate this based on the powers of 2. And you either have to have a table already prepared or you need to remember those powers of 2’s so that you can use them very, very quickly on an exam.
Remember that when you’re subnetting, you’re really looking for four different addresses. The first one is going to be your network address, some people call this the subnet address, and it’s the very first address that is in a particular subnet. We also want to find the broadcast address. That is the last address in the subnet and it’s the one that is used when a broadcast is sent on an IP version 4 network.
We also need to know the first available host address on the network. This will be the one that our workstations and devices will use on that network. And obviously, we then need to know what the last available host address will be for that network so that we can determine the exact range to use for all of our devices.
Well, if we take our previous example, you can then see that we would have to write out all of these in binary. We would have to determine the different subnets by changing the binary from 00 to 01 to 10 and then 11, and then calculate all of the first host and last host addresses by comparing the differences in the binary settings for all of these different addresses. Obviously, on an exam you don’t have time to go through this entire process to create all of this information. That’s why I created the seven second subnetting process so that we could very quickly determine all of these in just a matter of seconds and then continue on with what we needed to do for the exam.
If you’ve looked at other subnetting videos or you’ve perform some subnetting yourself, you’ll notice there are certain patterns in the math. For example, a 255.255.255.0 subnet mask is a single subnet and it’s a range between 0 and 255. If we grab 1 extra bit off the end and make it 255.255.255.128, it effectively cuts that in half. So we have a range between 0 and 127, and another range between 128 and 255.
If we borrow another bit and make it adopt 192 at the end, you’ll notice we cut it up again into smaller pieces where you’re separating these in half every single time. So now we have a process that we can easily see is occurring every single time, and we are going to be able to take advantage of this very common theme whenever we’re trying to subnet. We’re going to create some tables, and from those tables we’ll be able to calculate exactly what the subnet might be without having to go through any of the binary math.
We’re going to make two charts to help with this subnetting process. The first chart is going to be one that will help us convert from a CIDR block notation to a dotted decimal notation. This is especially helpful when you’re given one of these questions that will require you to convert, and having this chart available will allow you to do that very quickly.
The way I like to lay this out is to make four separate columns, and each one is associated with one of the octets of the IP version 4 IP address. I put a /1 through /8 in the first column, /9 through /16 in the second, /17 through /24, and /25 through /32 in the fourth column. Then I want to calculate how many networks will be available in each one of these. And I put a 2 on the first row, and then I multiply that by 2 each time. 2 times 2 is 4. 4 times 2 is 8. 8 times 2 is 16. Until I get to the bottom and the last number should be 256.
Then I create an Addresses column, and I usually start at the bottom with the number 1. And again, I’m doubling each time. I double to 2, 2 times 2 is 4, 4 times 2 is 8, until I get to 128 addresses. And now the final column, which is going to help me make that conversion between the CIDR block notation and the decimal notation. I’ll start with 128 at the top, and then I’ll add in 64. So I’m effectively adding as I go down the Addresses column. 128 plus 64 is 192. 192 plus 32 is 224. 224 plus 16 is 240. Until you get to the bottom with 255.
The second chart I create is one that shows me the address groupings given a particular subnet mask. If the subnet mask has a 128 as that subnet mask, then I know that the subnet will be split into two. There will be a starting number of 0 and a starting number of 128. If it’s a 64 as the number of hosts in a subnet, then I know that my subnet boundaries will be 0, 64, 128, and 192.
And I write all of these out. It’s obviously pretty easy to memorize an address boundary at 128 addresses, or 64 addresses, or 32. But when you get into these smaller numbers, especially as it gets higher up in the list, it becomes a lot more difficult to remember where the exact boundary is. And remember, we’re trying to do this as quickly as possible. We don’t have time to calculate all of these on the fly. So I write everything out during this period so that it’s now sitting right in front of me and I can perform any type of subnetting now in seven seconds.
Of course, all of these charts are the ones that work for me. You may find a different layout or a different way of performing this might work a little bit better. The key for me is to get everything on the page, that way I don’t have to perform any of these calculations during the exam itself.
Now that we have our charts available, we’re able to subnet. The things that we’re going to be able to derive from these two charts is that we’re going to be able to convert the IP address and a CIDR block notation into the decimal form. That first chart that we created allows us to do this very quickly. That chart is also going to show us how many devices per subnet will be on this particular network.
The second step of the subnetting phase is to calculate the network address. Some people call this the subnet address. And that second chart that we created allows us to very quickly find the beginning and the end of that particular subnet.
Thirdly, we need to know the broadcast address. This will be the last address. And again, that second chart shows us what that ending boundary is. And lastly, we need to calculate the first usable and the last usable IP address of the subnet. That’s very easily done by simply adding 1 to the network address and subtracting 1 from the broadcast address.
Lets try doing a few of these and see if we can get the hang of it. The first subnetting that we’re going to do is address 188.8.131.52 with a /24 subnet mask. Generally, the subnet masks that end on the 8 bit boundaries, the /8, the /16, and the /24 are generally something that’s easy to calculate. But let’s go through this process to show you how it would flow, and then we’ll try some harder subnet masks after this.
The first thing we need to do is convert both the IP address and the subnet mask into a decimal format. The IP address is already in decimal format, but this /24 needs to be converted. If we look at our first chart, we need to find the /24. It’s in this third column. That’s important for later. And you’ll see that it converts to a 255. So let’s write these down.
We’ve got our IP address at 184.108.40.206, and my subnet mask has a 255 all the way into the third column. So we’re going to use 255’s all the way up until we hit that third column. And since we are in that third column, everything after that point will have zeros as the subnet mask. I’ll show you in a later example how this changes if the mask is not a 255 or a 0.
Now that we have both our address and our mask, we need to calculate the network address. If the mask is 255, you bring down the address value at the top. And if the mask is 0, you simply use a 0 in for the network address. That means that if we bring down the 165, the 245, and the 12, and then bring down a 0 where the mask is 0, our network address 220.127.116.11.
Now we need to calculate the broadcast address. For the broadcast address, if the mask is 255 we bring down the address number. Exactly the same process as if we were calculating the subnet address. But if the mask is 0, we make that value a 255 instead of a 0. So that means our broadcast address is 18.104.22.168.
Now, the process of determining the first usable IP address and the last usable IP address is simply adding a 1 and subtracting a 1. So the first usable IP is the network address plus 1. So with 165.245.12, plus 1 to that 0 is a 1. And the last IP has a broadcast address minus 1, which means it’s 22.214.171.124. And you can see they’re listed there. So for this example, you can see what the network broadcast first IP and last IP addresses would be for this particular IP address and subnet mask.
Now let’s try a subnetting problem that’s a little more difficult. This one falls into the fourth octet. It’s the same IP address, 126.96.36.199, but on this network this particular device is on a subnet /26. Let’s perform exactly the same process and see how quickly we can calculate the results.
The first step is to convert the IP address and the mask to a decimal. We know we have the IP address of 188.8.131.52, but we’ve got this /26. So we need to use our first chart to find the /26. And you can see that the /26 is in this fourth column. That means that whatever value we find here, which happens to be 192, is what we’re going to put into the fourth column of our subnet mask. Everything prior to this number will be 255’s. And if there were open octets after this, those octets will be 0. So for our subnet mask, since this is in the fourth octet, it’s 255.255.255.192 is that conversion for the /26.
Another thing to notice as we’re determining what the subnet mask is, it was a /26 that converted to a decimal 192, but notice that the number of addresses is listed as 64. That means we need to go down to our other chart where we have listed out all the addresses as 64 and determine where that number happens to sit on that particular column. That column was the fourth column. That was the one that was different than a 255 or a 0. And an 88 is the number in the address.
So we need to find in this particular row where an 88 would fall. And in this particular case, it falls into this range that begins with a 64. That will be very helpful when we start determining where the beginning of the subnet is and where the end of the subnet is.
So let’s do that. Let’s calculate the network address. If the mask is 255, we bring down the address value into a column. If the mask is 0, we’ll use a 0. We don’t have any zeros in our mask in this example. For any other number, we refer to the chart. And again, we had a 192 there, so we need to refer to our chart on that 64 row and determine where the 88 sits. And we know that that particular range starts at a 64. So our network address is going to be 184.108.40.206.
Our next step is to find the broadcast address. And we’ve already done the work up to this point. We really don’t even have to calculate anything because we know exactly where in this chart this particular range is for this subnet. We know that the network address is 64. So at the other end of this range is the number 127. We know it’s 127 because the next range, or the next subnet, starts at 128. So very easily we can then bring down 220.127.116.11 and we have our broadcast address.
And just like our previous example, to find the first usable IP address and the last usable IP address we add 1 to the network address and we subtract 1 from the broadcast address. That means that the first IP will be 18.104.22.168, and the last usable IP will be 22.214.171.124. And there’s the answer for the subnet 126.96.36.199/26.
Let’s run through another example. We’ll use exactly the same IP address, but notice the subnet mask is different again, 188.8.131.52. This particular IP address is on a subnet /20. Same process that we used before. We need to convert that /20 a decimal. So we’re going to bring down the address value. We’re going to find the /20 in our chart, and when we find that row we’ll see that it’s associated with 240.
But you’ll notice that the /20 is in the third column of our chart. That means that the 240 is going to fall into the third column of the subnet mask. Everything before that value is 255, everything after that value is a 0. We also know from our chart that there are 16 addresses in this subnet. So if we look at our row where all of the 16 delineations are, we need to find that number for that third column. Everything focuses on the column where that value is a little bit different.
So that 12 that is in the address needs to be put into this row where there’s all the 16’s. Now, 12 is certainly between 0 and 15, so it’s in that first section of that particular row. So we know now what the exact range is going to be for the network address and for the broadcast address by very quickly determining where it happens to sit.
So we want to be able to bring down any of the network addresses where the mask is 255. If the mask is 0, we use a 0. But for that column that has that 12, we know that it’s actually going to start this range at 0. So our network address is going to be 184.108.40.206.
The broadcast address works exactly the same way as the other examples as well. If there’s a 255 we bring down the address. If there is a 0, we bring down a 255. But again, we’ve got this third column. So we need to look to see what our range is for this column. And because it is the 16’s, we know that it goes from a 0 to a 15. So we can look at our chart and know immediately it’s 220.127.116.11 is our broadcast address.
From here, of course, to calculate the first usable IP and the last usable IP, we’re simply adding 1 and subtracting 1, which makes our first IP 18.104.22.168 and the last IP is 22.214.171.124. You can start to see how fast you may be able to make this work once you become accustomed to knowing where to look in the charts and where to find the information that you’re looking for.
Let’s try one last example. Let’s try an address 126.96.36.199/11. It’s the same process we used before. We’re going to convert that /11 to a decimal. So we need to find the 11 in our chart. It’s in the second column. You can see the /11 is a 224 with 32 addresses per subnet. So if we write this in, it’s 255.244 again. We put it in the second column because that’s where we found the /11. Everything prior to that column is 255. Everything after that column is a 0.
Now that we have the address and the subnet mask written in decimal, let’s find the network address. We know that we’re going to be using these 32 addresses per subnet. We’re going to look at our row where the 32 is and we’re going to look at our second column. That’s where we found the /11. The address values 172. So we need to find in our row where the 172 happens to be. And it’s in this range right here, between 160 and before the next subnet starts at 192. So it’ll be 160 through 191.
Well, now we already have the values we need to calculate the network address and the broadcast address. So we’ll use those numbers. With the 160 we’ll bring down the 18. We’ll use the 160. And of course, where there’s is a 0 we bring down the 0 for the network address. For the subnet address, we use the last value that’s in this range, which is a 191. So it would be 18.191. And of course, where there are zeros we bring down the 255 and that’s our broadcast address.
And for the last step where we want to find the first usable IP address and the last usable IP address, we’ll add 1 to the network address and subtract 1 from the broadcast address. That makes our first usable IP 188.8.131.52 and our last IP is 184.108.40.206. And there’s the answer for the IP address subnetting for this IP address of 220.127.116.11/11.
Now that you understand the process that I use to understand this during an exam, you can of course try this yourself. Write down your own charts, customize them to fit best for the way that you work, and try some IP address problems yourself. You may find that you’re able to perform these very quickly, in a very short period of time. And it’s certainly a good way to check your work when you’re in the middle of an exam.