in previous videos we've looked at the process for manually subnetting an ip address for example let's take a common question like this one where we have a network that has given us an ip address assignment of 192.16 but we need an ip addressing scheme with more than one network address and the support of 40 devices per subnet how can we subnet this network address to give us multiple networks but still allow for 40 devices per subnet you could certainly calculate this manually by writing down the cider notation determining what the decimal mask would be associated with that cider block notation and then manually writing out what the binary version of that subnet mask is you could also calculate the number of networks and the number of hosts per network based on that particular subnet mask and then you can calculate additional networks by adding on to the cider notation and performing the same calculations for each possible scenario this question asked for 40 devices per subnet so after creating this chart we can then look at the host per subnet we can see that a slash 27 only supports 30 devices per subnet but a slash 26 allows for four networks with a total of 62 hosts per network on each of those four subnets we could then perform the same calculations that we did in a previous video where we had that ip address and subnet mask we then wrote down the binary version of both of those and designated what portion of the subnet mask was the network part of the mask the subnet bits that we were able to borrow and then the host bits that were left over at the end you can see in this example there were 24 network bits there are two subnet bits and six host bits now we can perform those calculations that we did from the previous video to determine the total subnets we take the two to the second power because we had two subnets available that gives us a value of four total subnets and then we can calculate hosts per subnet which in this case is six bits in length which would be two to the sixth power minus two or sixty four minus two which gives us sixty two after performing that entire process you now have everything you need to be able to answer that question but part of the challenge with this is that it takes quite a bit of time to perform these conversions ultimately we're looking for four very important addresses we want the network address or subnet id this is the first address that is in the subnet we want the broadcast address which is the last ip address in the subnet range we want the first available host address which is one more than the subnet id and then we want the last available host address which is one fewer than the broadcast address to be able to calculate this in binary we would have to write out all of the binary combinations for that network address and subnet mask to be able to determine what all of the different networks are all of their broadcast addresses the first host and the last host for each of those individual subnets and as you can see just doing a very small number of subnets four separate subnets can result in a large amount of calculations and conversions between decimal and binary and on your exam you don't have time to create these large and extensive charts so we need some type of shortcut that can make this process much quicker one popular shortcut that's used for the subnetting process is called the magic number method this is a relatively straightforward process where you can do most of the math in your head or the minimal amount of math that you would need to be able to calculate this particular subnet you may find that there are some charts that might help you and in this video we'll show you how to perform these calculations in your head and we'll show you what these calculations would look like if you had a chart available if you were to write down all of the different cider block notations and their correlating decimal subnet mask you could create an extensive chart with all of that information inside of it but one of the things you'll notice is that there are some repeating values for example a slash nine is 255.128.0.0 and if we look down at the slash 17 we can see that that 128 shows up again there's a lot of repeating processes involved in calculating these subnet masks and we can take advantage of this by using that as a shortcut in this magic number method if you want to create a very quick chart that could help you calculate the cider block notation to decimal version then you can write out something like this that uses the slash nine slash 17 and slash 25 to show you in the interesting octet that the number you would use to convert to decimal is a 128. we can use a chart like this as we go through the magic number method or really any method that you use to perform any type of subnetting shortcut if you wanted to create a complete chart for the magic number method you would add another row for the magic number here we've turned this on its side so we can see the cider block notation for what we call our interesting octet number two number three and number four and you can see all the slash values associated with those octets then for each of those octets you can see the subnet mask that would be used for that interesting octet and as you'll find out in a moment you'll be able to use a magic number value for each of those and we can calculate that in this row the magic number method is starting at 128 and then you divide that in two for each one of these so it would be 128 64 32 16 8 4 2 and 1. this chart will give you almost everything you need to perform the magic number method without having to calculate a lot of these details in your head if you're someone who is able to memorize the cider block notations very well then you could easily have all of these values in the first three rows and the last row committed to memory then the only thing you would have to remember is the magic number row another chart that's useful to have for calculating host ranges is one that separates out all of these different ranges and gives you the starting and ending numbers for example in a host range of 128 we have two separate blocks of hosts that we could use between 0 and 127 and then 128 to 255 the next block would be a block of 64 addresses 0 64 128 and 192 this might be relatively easy to remember until you get into the smaller blocks for example if it's an address range of eight hosts per subnet then you'd have to remember 0 8 16 24 32 40 48 56 64 and so on if you're very good at multiplication and division then you may not need this chart but if you're someone like me that needs a chart to give you the answer without having to perform the math you might want to spend a minute or two at the beginning of the exam to create this chart however with the magic number process you may find that these charts are unnecessary and you can perform most of the calculations in your head the steps involved at learning how to subnet with the magic number process are these we start by converting the subnet mask to decimal so if you've been giving a cider block notation you need to understand what the decimal notation of that would be we would then need to identify what we call the interesting octet and i'll explain more of that in just a moment we would then calculate our magic number based on the values in that interesting octet and that's very often a calculation of 256 minus the interesting octet value you would from there calculate the host range calculate the network address and calculate the broadcast address let's run through the magic number process now and see how it differs from performing exactly the same subnetting process in binary the first thing we want to do is to identify the subnet id we would need four octet columns and in each one of these rows we're going to add the subnet mask we'll determine an action that will perform to that subnet mask we'll put the ip addresses in that we will be subnetting and we'll determine what the subnet id is in this bottom row let's start with the ip address of 165.245.77.14 and that device has a subnet mask of 255.255.240.0 so let's add our subnet mask to 55 255 to 40.0 and let's add our ip address 165.245.76 our first step in finding the subnet id is to look at the subnet mask and if that subnet mask is 255 we want to perform a copy action on the ip address and simply copy the i p address down to the last row we'll do this with all of the subnet masks that are 255 and in this case that would be our first two octets then we want to find any octet of the subnet mask that happens to be zero we're going to also copy down not the ip address but we're going to copy that zero so now we have numbers that are in our first and second octet and another value in the fourth octet the only one that we haven't touched is our third octet where the subnet mask happens to be the value of 240. if there is a value that's not 255 and it's not zero then we are going to identify that octet as our interesting octet now that we know our interesting octet and we know what subnet mask happens to be in the interesting octet we need to perform a calculation let's take the number 256 subtract from that the subnet mass value that's in our interesting octet and in this example it would be 256 minus 240 which gives us a value of 16. we call this value of 16 our magic number this magic number is the number of hosts that are on this particular subnet if we look at the chart that we created earlier for the values of 16 we can see that they range from 0 16 32 48 64 and so on we know that the value for our ip address is 77. so if we look in our range for where 77 might sit it is between 64 and 80. this means that our subnet id in this particular example is 64 and we can bring that down to show the subnet id of 165.245.64.0 now that we know our subnet id we need to calculate our broadcast address and we've changed our chart just a little bit we have our subnet mask at the top and the action row as second but our third row is now the subnet id that we just identified which is 165.245.64.0 and we're going to try to determine the broadcast address this process is very similar to what we just did to perform that subnet id calculation we're going to look at the subnet mask and if it's 255 we copy down the subnet id so in this case that first column would be copied down the 165. since the second column also shows a 255 we will copy that 245 and bring it down into the last row if our subnet mask happens to have a 0 we'll identify that as a zero subnet mask and instead of bringing down the zeros since this is the broadcast address we're going to bring down the value of 255. this means that we have three of the four numbers we need and since one of these numbers in our subnet mask was not a 255 and it was not a zero then we again have an interesting octet of course we knew that the third octet was the interesting octet based on the previous calculation that we did in the last slide now we need to calculate the broadcast address and this follows exactly the same process we did earlier to find the magic number we take the value 256 we subtract from that the subnet mask and in this case we come up with the value of 16. in this case we're going to calculate a broadcast address and the way that we calculate that is by using this magic number by taking the subnet id adding to that the magic number and then subtracting one from that value this means that the value for the broadcast address in that interesting octet would be 64 plus 16 which is 80 you subtract 1 and you get the value of 79. our broadcast address then is 165.245.79.255. as you can probably tell already there are a lot of opportunities to be able to perform some shortcuts and in our next example we'll take advantage of some of those opportunities we now know our ip address our subnet mask our subnet id and our broadcast let's find out what the host range would be for this particular network we don't have to refer back to our chart at all for this instead we'll find the subnet id and add one to it we know that our subnet id is 165.245.64.0 which means that the first host would be 165.245.64.1 the last host is the broadcast address minus one so again we can do this with no additional calculations we simply take 165.245.79.255. subtract 1 and that gives us the value of 165.245.79.254 now we have all of the values that we need to be able to perform our calculations we have our ip address our subnet mask our subnet id our broadcast address the first host and the last host on that subnet let's perform another subnetting example except this time let's take advantage of a few shortcuts that might be available we'll use the ip address of 10.180.122.244 and a subnet mask of 255.248.0.0 we'll start by adding our subnet mask into our chart and our ip address into our chart we'll identify all of the masks that have a 255 and copy down the ip address from there and we'll look at any subnet mask octets that have a zero we'll bring down the zero for each of those columns our interesting octet in this case would be the second octet that has the value of 248. we'll perform our magic number calculation by taking 256 subtracting the subnet mask of 248 and determine that our magic number is eight if we are able to look at our chart of all of those values of eight or you're able to calculate the multiples of eight in your head you can see that the 180 is the ip address we're looking for so we need to find the starting address for that particular block 180 is down in this chart under the block that starts with 176 so we'll put the 176 into our chart which means our subnet id is 10.176.0.0 we perform a similar process to find the broadcast address and we've replaced the ip address with the subnet id row and of course we're going to look at any of the subnet masks that have a 255 or a zero if there's a 255 we bring down the subnet id and if there is a 0 we bring down the value of 255. in this particular case the first column we bring down the subnet id of 10 and the third and fourth octet we bring down the values of 255 and of course as we saw previously our interesting octet is the second octet we perform our magic number calculation again 256 minus 248 gives us the same magic number of eight since we already knew that we could have possibly skipped this step at this point and we need to calculate the broadcast address for that second octet by taking our subnet id adding the magic number and subtracting one in this case our subnet id is 176 we add the value of 8 subtract 1 from that to give us a value of 183 so our broadcast address for this subnet is 10.183.255.255. calculating the first available host and last available host then is simply adding one to the subnet id and subtracting one from the broadcast which means that our first host is 10.176.0.1 and the last host is 10.183.255.254. if we refer back to the chart that i mentioned earlier in the video we can speed this process up a bit let's take the ip address of 172.16.242 let's first find the slash 27 and we can see that the subnet mask for that interesting octet is 224 so our subnet mask would be 255.255 because we know that the interesting octet was octet 4. we can then either calculate the magic number which would be 256 minus that 224 or we can refer to our chart where we've already written in the magic number is 32. we know from our chart that a slash 27 means that our interesting octet is octet 4 and in that octet we have the value of 133. if we go to a chart that shows us those 32 hosts per subnet we can calculate where that 133 might be and it starts with a subnet that has a 128 that means that the 128 is the beginning of the subnet and 1 minus 160 would be the end of that subnet let's now summarize all of this subnetting information that we've discovered we started with this ip address of 172.16.242.133.22 we converted the slash 27 from that cider block notation to decimal which means that our subnet mask is 255.255.255.224. we also calculated our magic number and we know that our magic number is 32. we also calculated based on where our 133 sits in those values of 32 devices per subnet that the network starts with a 128 so your subnet id is 172.16.242.128 and the broadcast address is 128 plus 32 minus 1 meaning that your broadcast would be 172.16.242 we can then now based on the subnet id and the broadcast address add one to the subnet id to get your first ip address and subtract one from the broadcast to get our last ip address so we now have all of the values we need to understand this particular subnet of 172.16.242.133 27. if you think the magic number method is one that works best for you then grab some additional ip address ranges and cidr block notations and run through this process a number of times you'll find very quickly that you're able to find your own shortcuts identify where you can speed through this process and you'll be able to perform these subnetting tasks very quickly on your exam you