all right guys so welcome back to the channel in today's video I want to go over subnetting subnetting subnetting subnetting i want to explain to you guys the easiest possible way to subnet the easiest possible way i've coined it the magic number method uh and we'll get straight into this right now so let's go straight in all right guys so welcome back so let's talk about subnetting everyone's favorite topic in networking right so um when it comes to subnitting you're going to be asked a certain number of questions right um some of the questions you're going to be asked is the number of hosts that's one question you're going to be asked what's the network address the network the broadcast as well like these are things that you're going to be asked right to to find so the network the broadcast the number of host i'll put here the total number of hosts and then I'll put here the usable number of host um so that's what you're going to be looking for um and then also in terms of that um there are some I think that pretty much covers that and then I would say the last thing is also the range uh so like the range of of uh uh of the subnet of the subnet i guess I would put like something to this regard um and then you you would be like you know you'd get like an IP range or something like that so they're looking for an IP range okay hopefully that makes sense um and that's kind of what what you need to be looking for so um so now let's kind of just like quickly um sort of just jump in here real quick so um basically the given so most likely you're going to be given maybe an uh like an IP address or something to that regard um so you're going to be given probably an IP um and the IP can just be 192.16810 uh let's just say uh 10 let's just say 40 so you're given this range and then you may be also given a subnet like SL28 so now you're given this and you're you're asked hey how can we find the uh how can we subnite this right so basically you're you're going to essentially want to look for everything here you need to find everything here essentially right everything here is what you're going to be working with um and and what you need to find right these are the things that they're probably going to ask you these are the top five things right here okay and these are the givens you're either given an IP or subnet um and and the the question if they are if they give you an IP then they're definitely going to ask you about the range that you that's something you you would have to know um if they're not giving you an IP they may just ask you hey how many how many hosts are in this subnet something to that regard but but this tactic is going to answer each one of those questions so um all you got to do is simple formula and let's just look at this subnet mass that you're given we're given a slash28 all you have to do is and this example is going to be for class C addresses all you have to do is 28 or 32 right 32 is going to be the number we're going to be sub subtracting from um because this is a class C address so just remember that number for class C and we'll do 32 minus 28 and what does that give you it gives you four right so you got four um and then all you have to do now is just two to the power of four which is all that is is 2 * 2 * 2 * 2 * 2 right which is going to give you 16 um and that's pretty much it right there that's the magic number um that it gives you and now all you have to do is create a table right you create this table right here or I call it a I call it a T-chart rather so I'm going to just go here i create a T-chart and I'm on one side I'm going to put uh network on the other side I'm going to put broadcast okay I just put NNB and then all I have to do is I'm just going to put a zero here this is the this is the beginning it's always going to be zero here no matter what you put zero here and all I have to do is now we have this number of 16 we're going to just add it by 16 16 here and then we're going to add by 30 we're going to do 32 we're going to keep adding by 16 uh then we're going to do 48 and then we're going to keep going um and really you want to keep going until this number is is higher than the last octed because this is a class C right so the last octed is 40 so we could pretty much stop right here now all we have to do is on the broadcast side we're just going to do 16 minus one we're always going to do this number minus one so 16 - 1 is going to be what 15 32 minus 1 is going to be what 31 right 48 minus 1 is going to be 47 and then we could kind of just stop there right so that will cover that now all you have to do in this particular case is look for this last octet and see where where in this range does this last octet fall within and as you can see it falls within this range right here right this is where it falls within right so now this is what we're going to be looking at in particularly so this is what is known as the range the the range of the IP subnet so all this means is the range here is going to be from 192.168 10 dot and this last octet here which is 40 uh we'll just do 32 right to 47 so that is the range of the subnet that's very simple now the network address is going to be 32 so we can put right here 32 the broadcast address is going to be 47 the number of hosts right now we got to find the number of hosts all the number of hosts is just this magic number here by the way so that magic number is going to be the total number of host right and then now the number of usable host is just going to be this magic number minus two which is going to be 14 right and that's about it it's that simple that is how you subnet and you you pretty much do this this is the easiest way I found right and just to review this we have this is the given this is what you're given by the way you're given this 192.168.16.10.4.4028 then you do 32 minus 28 and that gives you four then you do 2 to the^ 4 that gives you 16 then you create this table here right all right where you go 0 15 16 31 you create this table the first thing you do is zero you keep adding by 16 here 0 16 32 48 then on this side all you have to do is this number minus one you would put it here this number minus one you would put it here this number minus one you would put it here right and that's how you create this sort of T-chart which gives you the network and broadcast address um ranges and then you just got to look at that last octet here once you look at this last octet and see where does it fall within this range which is this one then that's going to be your range of the subnet that then you got your network address you'll put it right here then your broadcast address you put it right here then the total number of the total number of hosts is just going to be 16 right that's this is already kind of gives you your answer so you can kind of fill it in right away and then the usable host all that's going to be is 16 minus 2 but we're subtracting the network and the broadcast address because those two addresses are not um usable addresses spaces that you can use so that's pretty much it very simple right so now let's go to another example so now let's do this so basically basically the things we're going to be looking for or the things we we're going to be looking for is number of host we'll say uh this is total this is usable number of hosts we'll say broadcast network and what's the next thing we want to look for is the range IP range these are these are the things they want you to find that's it these five things now all you have to do is you're given an IP address now so now let's pick a different IP we're going to pick 10 uh 50 dot 20 dot um let's do uh I don't know 100 slash actually in this case we're not going to use a slash i'm going to do in dotted notation because sometimes you are given it in dotted notation so we'll do for this for this to be in dotted notation it's going to be 255 dot.255.255 dot 255 um let's put this here um sometimes you may be given let's put let's just get a dot rotation number so we'll do 224 right sometimes you may be given it in do notation so it's very simple the process for do notation all you have to do is 256 minus this last octet right so we're going to do 224 then we got to find this number so that's going to be I believe 32 my Apple Pencil is kind of messing up right now that's why it's kind of drawing random lines but let's go and do this real quick so 32 um and that's going to be your magic number it's actually quicker to find your magic number here than rather than uh using the slash notation so now so now we have that basically that's going to give us our total number of hosts so that we've already gotten that down now usable host that's just going to be that same number here minus two which is going to be 30 and then now we just got to find the broadcast address so basically this is where you create that little T-chart right and you do network here you do broadcast here and we're going to be starting from zero then going 32 64 i'm adding by 32 right 96 um [Music] 28 right so I I'm basically just adding by 32 32 32 32 32 right so now that I added everything by 32 essentially what I can do now is I can basically do this side and now I'll just do 32 - 27 which is going to be 31 64 - 1 63 right so 32 - 1 31 64 - 1 63 96 - 1 what is it going to be here 95 128 minus one what is that going to be 127 and now we can stop why because the last octed here the last octed is in this range right here right it's in this magic range right here so now this is just going to be our IP range so it's just going to be 1050 20 from 96 to 127 now the network address is just going to be 90 uh the broadcast is going to be uh 127 127 right and when what I mean by 127 I'm basically saying I'm basically saying this so if I go here I'm basically saying no it's probably better if I do it this way just so you fully understand it i'm it's it's going to be I'm just the last dang basically the last octed here so 50 2027 right i'm just the last hawk that becomes that and then here is going to be 1050.20.96 and there we go and now if they ever ask you what's the usable range it's just going to be um basically 10.50 20 instead of 96 we can't use 96s to broadcast we'll just start off with 97 and we can't use 127 or sorry 96s the network we have to use 97 and then 127 we can't use as a broadcast so we'll do 126 so this is a usable range actually so I'll actually add this usable range so that's maybe another thing they may ask you is that usable range right there boom so go ahead and go to the other one um and the usable range here is just going to be the same thing is just going to be 33 to 40 uh6 right on that last octet and then same with this one it's just going to be 192.168 dot 1.10 uh 14 here and obviously the last octet here is going to be 47 on the broadcast um so that's pretty much how it works it's um that's networking for you hopefully this makes sense um this is how I've always done it and just to recap right so step one you would just if if you're given in dot notation all you got to do is two you would have to subtract 256 minus whatever this number is if you're given it in uh slash notation you would do 32 minus that number which right and then you have the other step would be 2 to the^ of 4 which would give you 16 and that gives you the magic number and then to find the magic number here all you have to do is just 256 minus 2224 that will give you 32 right very simple then that will give you the total number of hosts then you can find the usable host and then you create this table here and that pretty much it so it that's pretty much something that's how I like to do it this is for class C it works for class B i'll make another video on class B as well um but this is it guys very simple very easy to do and uh hopefully this makes sense and like I said try give it a go do some practice problems and uh it'll work out for you so thank you guys so much