1 00:00:01,100 --> 00:00:08,160 Let's talk about sub netting so sub netting is important in networking you hear about it all the time 2 00:00:08,160 --> 00:00:10,680 you hear even people perhaps freaking out. 3 00:00:10,680 --> 00:00:17,580 I know I freaked out when I heard that I had to do it for exams like network plus or CCMA and I feel 4 00:00:17,580 --> 00:00:23,100 like there are a lot of complicated methods out there for submitting but there was a method that was 5 00:00:23,100 --> 00:00:27,450 shown to me middle of my career and it just blew my mind. 6 00:00:27,450 --> 00:00:34,110 It's really really fast submitting method and I really want to break down for you what sub meeting is 7 00:00:34,170 --> 00:00:37,770 why we do it and then show you the methodology behind it. 8 00:00:37,770 --> 00:00:43,920 So if we want to talk about submitting if we just come in here and just do an eye f config and we look 9 00:00:43,980 --> 00:00:50,970 at our IP address right we have our eye net which is our IP V4 and you can see here too we have this 10 00:00:51,000 --> 00:00:51,840 net mask. 11 00:00:51,840 --> 00:01:01,110 This is also known as a subnet mask or a subnet and it just says 2 5 5 5 5 2 5 5 0 doesn't really tell 12 00:01:01,110 --> 00:01:05,790 us a lot if we don't know much about it but this is what a subnet looks like. 13 00:01:05,790 --> 00:01:10,270 And we can think of subnets in ones and zeros it's all bits. 14 00:01:10,290 --> 00:01:10,650 Right. 15 00:01:10,680 --> 00:01:11,940 So we've got eight bits here. 16 00:01:11,940 --> 00:01:14,780 Just like an IP address IP before same thing. 17 00:01:14,880 --> 00:01:20,730 Eight bits eight bits eight bits and another eight bits and we've got ones and zeros if all the ones 18 00:01:20,730 --> 00:01:23,210 are switched on we've got two hundred and fifty five. 19 00:01:23,400 --> 00:01:26,480 If none of the ones are switched on we've got zero. 20 00:01:26,730 --> 00:01:32,940 And depending on how those ones and zeros are switched on or off determines a lot of things for us and 21 00:01:32,940 --> 00:01:35,510 that's why this net mass is important now. 22 00:01:35,550 --> 00:01:41,730 Attached to your resources for this course I've created an excel sheet that I think will be useful. 23 00:01:41,730 --> 00:01:47,910 So we look at the Excel sheet here is the cyber mentors submitting sheet and let's talk through this. 24 00:01:47,910 --> 00:01:50,940 It looks like a bunch of numbers and it might look crazy for you. 25 00:01:51,150 --> 00:01:55,560 And we're going to talk about how this breaks down how the bits break down and then how I would write 26 00:01:55,560 --> 00:02:01,070 this shorthanded for an exam or a test or do something that I do on a day to day basis. 27 00:02:01,080 --> 00:02:08,100 So first let's talk about the bit so come to the bits tab here and we have our 8 bits right wing countless 28 00:02:08,130 --> 00:02:14,400 across and there's eight here on the count and you can see that and it starts with 128 and descends 29 00:02:14,400 --> 00:02:17,760 down to one you just keep cutting it in half right. 30 00:02:17,790 --> 00:02:22,180 So 128 64 32 sixteen eight whatever. 31 00:02:22,200 --> 00:02:25,310 What's more important is why we get to these numbers. 32 00:02:25,410 --> 00:02:33,630 So if we have a one switched on here it adds to the value when all the ones are switched on it equals 33 00:02:33,630 --> 00:02:34,650 to 255. 34 00:02:34,650 --> 00:02:39,420 You see all the ones switched on here if we were to highlight overall this come down to the sun you 35 00:02:39,420 --> 00:02:40,790 see the sun is two fifty five. 36 00:02:40,800 --> 00:02:43,240 That's all this formula is doing here. 37 00:02:43,290 --> 00:02:48,930 So if we were to come through and you see all the zeros here nothing's flipped on to actually turn any 38 00:02:48,930 --> 00:02:50,330 value on here. 39 00:02:50,400 --> 00:02:56,580 How this actually works is the switch has to be on in order. 40 00:02:56,580 --> 00:02:56,880 Right. 41 00:02:56,910 --> 00:03:02,520 So if we were to switch on another bit we'd have to switch it on here and we'd have to switch another 42 00:03:02,520 --> 00:03:03,840 one on here. 43 00:03:03,840 --> 00:03:06,270 We could just come down here and switch it on here. 44 00:03:06,270 --> 00:03:08,710 It wouldn't make sense it doesn't work that way. 45 00:03:08,730 --> 00:03:10,050 Not with subnet. 46 00:03:10,140 --> 00:03:12,920 So we're going to take these back off and show zeros again. 47 00:03:13,050 --> 00:03:19,170 But you see how the values change if for example we had this network and you saw the default and I'm 48 00:03:19,170 --> 00:03:27,160 showing you the 2 5 5 2 5 5 2 5 5 0 this standard here because that is what's known as a slash 24 network. 49 00:03:27,180 --> 00:03:34,190 That's very very common and it's very common because it's used mostly in households and small businesses. 50 00:03:34,380 --> 00:03:38,160 And it's done this way because of the amount of hosts that it allows. 51 00:03:38,160 --> 00:03:45,150 Now if we talk about the host you can see that I have here two to the eight power why do I have that. 52 00:03:45,150 --> 00:03:50,340 Well we actually go by how many bits are switched off our how many hosts are available to us. 53 00:03:50,370 --> 00:03:56,070 So if a hosts here are a bit was switched on then we lose the amount of hosts we have available to us 54 00:03:56,130 --> 00:03:59,190 and the subnet gets smaller and smaller. 55 00:03:59,190 --> 00:04:01,850 Now don't worry too much about the ones and zeros. 56 00:04:01,860 --> 00:04:05,910 It's gonna make a lot more sense when we stop talking in these binary terms. 57 00:04:05,940 --> 00:04:11,580 I just kind of want to break down the math behind it first before we make it really really simplistic. 58 00:04:11,580 --> 00:04:17,220 So again we've we're talking about what's called this slash twenty four whack twenty four network and 59 00:04:17,220 --> 00:04:19,310 it's so standard because of the host. 60 00:04:19,320 --> 00:04:20,940 Again 256. 61 00:04:20,970 --> 00:04:26,400 Think of all the devices in your house you have cell phones you probably have computers you might have 62 00:04:26,400 --> 00:04:32,820 like a Roku or Amazon Fire or something along those lines you may have smart TV's or smart watches or 63 00:04:32,820 --> 00:04:34,930 something that connects to the Internet. 64 00:04:35,340 --> 00:04:40,950 Well again they're all connecting through net right and going out but the amount of hosts that you can 65 00:04:40,950 --> 00:04:45,830 have on your private network really depends on the subnet mask and how you set it. 66 00:04:45,840 --> 00:04:53,880 So we have this class C that you saw before the 1 9 2 1 6 8 dot 1 or dot 0 or however you want to have 67 00:04:53,880 --> 00:04:54,000 it. 68 00:04:54,000 --> 00:04:54,640 Right. 69 00:04:54,690 --> 00:05:00,120 Well it allows us to have two hundred and fifty six when we have a subset of slash 24. 70 00:05:00,120 --> 00:05:04,530 So that's very common for a household it's also common for a small business maybe there's a printer 71 00:05:04,770 --> 00:05:10,110 some few devices in there but they're never gonna get over this two hundred and fifty six hosts. 72 00:05:10,170 --> 00:05:10,680 OK. 73 00:05:11,130 --> 00:05:15,900 So when we come to the subnet cheat sheet let's break this down a little bit differently. 74 00:05:16,890 --> 00:05:19,420 So we have our hosts here. 75 00:05:19,440 --> 00:05:21,600 Let's start with the slash 24 we just were. 76 00:05:21,810 --> 00:05:29,370 And you saw that there is 256 available hosts as we start turning off bits OK. 77 00:05:29,460 --> 00:05:31,170 We turn off a bit here we turn off a bit. 78 00:05:31,170 --> 00:05:32,820 Keep going down the list. 79 00:05:32,970 --> 00:05:35,280 The host start getting bigger and that just corresponds. 80 00:05:35,280 --> 00:05:36,810 Here we have a slash 24. 81 00:05:37,320 --> 00:05:40,260 And the only reason I'm saying twenty four is I'm counting the ones across. 82 00:05:40,260 --> 00:05:40,620 Right. 83 00:05:41,130 --> 00:05:43,050 So we've got 24 bits switched on. 84 00:05:43,050 --> 00:05:45,250 If we had twenty three OK. 85 00:05:45,270 --> 00:05:48,630 It gets bigger and bigger and bigger. 86 00:05:48,650 --> 00:05:51,690 Now let's stay away from the ones and zeros. 87 00:05:51,690 --> 00:05:53,760 I think it's a little bit complicated. 88 00:05:53,760 --> 00:06:00,090 The better way to think about this is to look at the subnet mask down here and I'm going to replicate 89 00:06:00,090 --> 00:06:00,460 this. 90 00:06:00,480 --> 00:06:02,250 And then we're going to come back to it. 91 00:06:02,250 --> 00:06:07,620 So what I do here is we can have a possibility of 32 bits switched on. 92 00:06:07,620 --> 00:06:08,200 Right. 93 00:06:08,220 --> 00:06:13,200 So I'm just making a new tab and I'm just gonna go over here and I'm going to hit control and drag this 94 00:06:13,200 --> 00:06:16,420 across till it hits eight OK. 95 00:06:16,420 --> 00:06:21,670 And then I'm gonna do the same thing with nine on the drag and across all I'm doing is just making really 96 00:06:21,670 --> 00:06:28,640 quickly 30 to place holders and I'm just emulating here. 97 00:06:28,790 --> 00:06:33,340 If we had the possibility of thirty two different switched on bids. 98 00:06:33,370 --> 00:06:35,580 So imagine one bit of switched on. 99 00:06:35,600 --> 00:06:37,430 Imagine all 32 bits are switched on. 100 00:06:37,430 --> 00:06:38,680 That's the possibilities here. 101 00:06:38,690 --> 00:06:39,020 Right. 102 00:06:39,530 --> 00:06:46,280 So always for sure we're going to have an amount of host and we're gonna have a subnet mask. 103 00:06:46,280 --> 00:06:47,200 OK. 104 00:06:47,210 --> 00:06:53,350 So we'll just call it subnet their we always start here with 128. 105 00:06:53,350 --> 00:06:55,080 Just like the bits that you saw. 106 00:06:55,120 --> 00:06:57,300 You saw the 128 start in the bits. 107 00:06:57,370 --> 00:06:59,720 Let's just start also with 128. 108 00:06:59,860 --> 00:07:03,190 Now as you saw every bit that switched on. 109 00:07:03,190 --> 00:07:07,670 Remember when we switch a bit on over here it starts decreasing. 110 00:07:08,110 --> 00:07:10,850 So we're gonna decrease for the bits that are switched on. 111 00:07:10,900 --> 00:07:16,990 Sixty four thirty two 16 8 4 2 1. 112 00:07:17,020 --> 00:07:23,020 You come over here and when I like to actually do is I like to just add these numbers together and you 113 00:07:23,020 --> 00:07:29,500 could see one twenty and sixty four is one ninety two and then you can add these two together so you 114 00:07:29,500 --> 00:07:34,190 get one ninety two thirty two you just add diagonally is the way I've I actually always do it. 115 00:07:34,300 --> 00:07:42,840 So two twenty four to forty to forty eight to fifty two to fifty four and two fifty five. 116 00:07:43,010 --> 00:07:44,520 Now what does that correspond to. 117 00:07:44,530 --> 00:07:48,670 It corresponds to the possibilities of the bits being flipped on right. 118 00:07:48,700 --> 00:07:51,690 So this looks just like what you see here. 119 00:07:51,700 --> 00:07:52,870 Same deal. 120 00:07:52,870 --> 00:07:54,640 And if you had a one underneath of it. 121 00:07:54,750 --> 00:07:55,130 OK. 122 00:07:55,150 --> 00:07:59,140 Then you got 128 if you've got another one underneath of it. 123 00:07:59,530 --> 00:08:00,100 Well guess what. 124 00:08:00,100 --> 00:08:05,800 You've got one twenty eight plus sixty four which is one ninety two and this number keeps growing. 125 00:08:05,800 --> 00:08:06,630 Why is this important. 126 00:08:06,640 --> 00:08:09,000 This is still all ones and zeros right. 127 00:08:09,010 --> 00:08:11,040 Well let's start thinking about it. 128 00:08:11,320 --> 00:08:20,530 If we have a slash twenty four network we've got twenty four bits turn on our subnet mask is 2 5 5 2 129 00:08:20,530 --> 00:08:23,300 5 5 2 5 5 0. 130 00:08:24,160 --> 00:08:31,060 If we had a slash 16 it becomes 2 5 5 2 5 5 that 0 0. 131 00:08:31,120 --> 00:08:31,510 Why. 132 00:08:31,510 --> 00:08:32,920 Where are these changes coming from. 133 00:08:32,920 --> 00:08:34,450 Let me show you this. 134 00:08:34,760 --> 00:08:36,090 OK for a slash a. 135 00:08:36,100 --> 00:08:38,890 I'm just tying this into just this right here. 136 00:08:38,890 --> 00:08:44,160 Well this is coming from the number of bits that are turned on eight bits turned on. 137 00:08:44,160 --> 00:08:47,040 We've got 2 5 5 and the rest are zeros. 138 00:08:47,040 --> 00:08:50,460 You got another eight bits turned on 2 5 5 2 5 5. 139 00:08:50,460 --> 00:08:55,920 The rest are zeros come down to this slash twenty four which is that really common subnet that you see 140 00:08:56,250 --> 00:09:00,510 and you've got 2 5 5 2 5 5 2 5 5 0. 141 00:09:00,510 --> 00:09:02,190 Now this is very common. 142 00:09:02,280 --> 00:09:02,580 OK. 143 00:09:02,610 --> 00:09:07,260 And let's go back to the cheat sheet now and you could see that I've got X as a place holder in the 144 00:09:07,260 --> 00:09:08,230 subnet. 145 00:09:08,340 --> 00:09:14,790 So what I'm saying here is you look at this list and you say I've got a slash one well for this whole 146 00:09:14,790 --> 00:09:20,010 area here from one to eight the place holder is going to hold in place of this X.. 147 00:09:20,130 --> 00:09:28,170 So for a slash one if I've got one 28 then guess what it's going to become 1 28 0 0 0 because that's 148 00:09:28,170 --> 00:09:32,340 how it would be if you turned on just one bit here and made all of these zeros. 149 00:09:32,340 --> 00:09:32,790 Guess what. 150 00:09:32,790 --> 00:09:36,330 Just the 128 would be on the rest would be zeros. 151 00:09:36,340 --> 00:09:36,720 OK. 152 00:09:36,720 --> 00:09:38,410 If we had a slash 14. 153 00:09:38,730 --> 00:09:39,070 OK. 154 00:09:39,090 --> 00:09:44,210 So two five fives automatically flipped on you have a slash eight already you pass through it. 155 00:09:44,460 --> 00:09:44,750 OK. 156 00:09:44,760 --> 00:09:50,880 So you're starting on the second iteration here slash 14 corresponds down here to 252. 157 00:09:50,970 --> 00:09:55,830 So you'd have a 2 5 5 2 5 2 0 0. 158 00:09:55,860 --> 00:09:59,880 So all this is is place holders let's go back to the sheet here. 159 00:09:59,880 --> 00:10:01,610 So I make this quick and dirty list. 160 00:10:01,620 --> 00:10:06,120 This is what I write out when I'm just writing out something quick for an exam. 161 00:10:06,120 --> 00:10:11,310 All right out one thirty two I'll put the host here and I'll put the subnet here. 162 00:10:11,310 --> 00:10:18,600 So again if we know that once we cross through eight 16 24 32 that has a two five five in front of it 163 00:10:19,440 --> 00:10:21,930 all we've got to do then is we'll say slash twenty seven. 164 00:10:21,940 --> 00:10:29,370 Well we've come through three columns then I know for sure that we've got 255 255 255 got something 165 00:10:29,370 --> 00:10:30,180 right. 166 00:10:30,180 --> 00:10:31,510 You see the slash twenty seven. 167 00:10:31,530 --> 00:10:32,740 You come down here. 168 00:10:32,850 --> 00:10:36,570 The subnet would be to twenty four say 28. 169 00:10:36,890 --> 00:10:37,240 OK. 170 00:10:37,240 --> 00:10:40,130 2 5 5 2 5 5 2 5 5. 171 00:10:40,140 --> 00:10:41,220 Look at the 28. 172 00:10:41,280 --> 00:10:45,870 You've got a dot 240 and this is going to be confusing. 173 00:10:45,870 --> 00:10:51,770 This is subnet it is not necessarily easy once you get the chart down it makes a lot more sense. 174 00:10:51,810 --> 00:10:54,400 So let's start piecing some more things together. 175 00:10:54,630 --> 00:11:01,230 When I say that I've got host now the host I'm showing you only correspond to these first two rows but 176 00:11:01,230 --> 00:11:05,630 it's very common or very useful just to know this number right off the bat. 177 00:11:05,640 --> 00:11:10,920 Now if you look at the cheat sheet what you can do here is you just know that you start with a one or 178 00:11:10,920 --> 00:11:11,840 you start with the 128. 179 00:11:11,850 --> 00:11:17,820 You go down but every time you go up your doubling and why are we doubling do remember from the bits 180 00:11:17,820 --> 00:11:21,310 part every time a bit is turned off. 181 00:11:21,330 --> 00:11:25,940 So as we go up a number we take it to the next power. 182 00:11:26,000 --> 00:11:27,500 So we've got ape it's turned off. 183 00:11:27,500 --> 00:11:28,790 We take two to eight power. 184 00:11:28,800 --> 00:11:30,610 It's 256. 185 00:11:30,620 --> 00:11:32,730 Well here you go. 186 00:11:32,810 --> 00:11:35,560 Look come through here. 187 00:11:35,650 --> 00:11:36,850 Two fifty six. 188 00:11:36,890 --> 00:11:39,780 We go to the ninth power 512 to the tenth power. 189 00:11:39,800 --> 00:11:41,110 Ten twenty four. 190 00:11:41,150 --> 00:11:42,120 It just keeps doubling. 191 00:11:42,140 --> 00:11:42,490 OK. 192 00:11:42,500 --> 00:11:45,390 That's all you've got to think about in your mind is he keeps doubling. 193 00:11:45,470 --> 00:11:51,110 So on an exam for example you might have something like what. 194 00:11:51,320 --> 00:11:55,160 How many host could be potentially in a slash 20 network. 195 00:11:55,370 --> 00:12:00,110 And you come to your cheat sheet that you made or you have in your head and you say well four hundred 196 00:12:00,110 --> 00:12:04,310 ninety six and then we'll get to this in a minute but we have to subtract two. 197 00:12:04,310 --> 00:12:06,220 So four ninety four potential. 198 00:12:06,340 --> 00:12:07,860 And why is this all important. 199 00:12:07,860 --> 00:12:09,620 Why do we even care about any of this. 200 00:12:09,620 --> 00:12:11,300 Why am I rambling on. 201 00:12:11,300 --> 00:12:13,500 Well you need to know based on the network. 202 00:12:13,760 --> 00:12:14,140 OK. 203 00:12:14,150 --> 00:12:17,800 The slash twenty four is great for a small office home network. 204 00:12:17,840 --> 00:12:19,270 However you want to have it. 205 00:12:19,370 --> 00:12:21,470 But what if you're a large enterprise. 206 00:12:21,470 --> 00:12:24,290 Maybe you have thousands of devices. 207 00:12:24,440 --> 00:12:27,240 OK maybe you want to slash 16 network. 208 00:12:27,380 --> 00:12:32,780 That might make more sense for you or you even see some with a slash 8 network. 209 00:12:32,810 --> 00:12:37,580 It just depends on how big the company is the larger the company the greater chance that you're going 210 00:12:37,580 --> 00:12:40,140 to see that they're not using slash 24. 211 00:12:40,190 --> 00:12:47,900 Or they could even have submitted segments of their network where say they have just telephones and 212 00:12:47,900 --> 00:12:50,270 they've got five hundred employees and five hundred telephones. 213 00:12:50,270 --> 00:12:55,160 They might just have one slash twenty three network for nothing but telephones because that's the amount 214 00:12:55,160 --> 00:12:57,290 of hosts that fit in there. 215 00:12:57,290 --> 00:13:02,960 So what we're after with submitting is how many hosts can we fit and what is the mask that's behind 216 00:13:02,960 --> 00:13:03,460 it. 217 00:13:03,470 --> 00:13:05,600 So those are questions you might be asked in exam. 218 00:13:05,600 --> 00:13:09,440 And these are questions that you're just going to see and when you're given addresses see you're doing 219 00:13:09,440 --> 00:13:11,090 a pen test for a client. 220 00:13:11,090 --> 00:13:12,760 You might be given something like this. 221 00:13:12,770 --> 00:13:16,910 You might be given IP address 1 9 2 1 6 8 1 0 0 slash 24. 222 00:13:17,360 --> 00:13:17,750 OK. 223 00:13:17,750 --> 00:13:20,540 And immediately in your head you're like oh slash 20 for that standard. 224 00:13:20,540 --> 00:13:27,500 There could be up to two hundred and fifty six hosts or 250 for hosts or devices in this network. 225 00:13:27,500 --> 00:13:34,310 But if they gave you something like 1 9 2 1 6 8 1 8 0 0 slash 20 then you might look at your little 226 00:13:34,310 --> 00:13:37,690 chart and say four thousand ninety four hosts. 227 00:13:37,700 --> 00:13:41,570 Remember when you subtract two four thousand ninety four hosts in this network. 228 00:13:41,570 --> 00:13:47,570 Now I know if I'm scanning this I'm up against a lot more devices potentially than I am in this. 229 00:13:47,570 --> 00:13:47,900 OK. 230 00:13:47,900 --> 00:13:52,830 So when a client gives you your subnets they might just write it out like this. 231 00:13:52,850 --> 00:13:57,770 And depending how big your client is might depend on how big their subnets are for you. 232 00:13:57,770 --> 00:14:02,630 For example I just pen tested a client that was a slash 16 all the way across and it looks something 233 00:14:02,630 --> 00:14:05,780 like 10 dot 1 0 0 slash 16. 234 00:14:07,250 --> 00:14:07,670 OK. 235 00:14:07,670 --> 00:14:13,220 And your subnet mask for that would be something like 2 5 5 2 5 5 0 0. 236 00:14:13,250 --> 00:14:14,840 And how does this come into play. 237 00:14:15,170 --> 00:14:19,610 Well every time you have a two 5 five that number is locked in place. 238 00:14:19,610 --> 00:14:21,080 That's another way to think about this. 239 00:14:21,350 --> 00:14:23,680 So that 10 is always locked down. 240 00:14:23,690 --> 00:14:30,050 This one is always locked down the rest of the bits are fair game meaning we could have 10 dot 1 dot 241 00:14:30,050 --> 00:14:38,150 1 0 dot one die two to three we could actually have a zero here zero not one got to the three to four 242 00:14:38,390 --> 00:14:47,030 and that's how this number like a slash 16 gets so big because you have ten got one dot zero zero through 243 00:14:47,030 --> 00:14:51,860 two hundred fifty five on the possibilities which equals two hundred and fifty six hosts. 244 00:14:51,920 --> 00:14:55,000 Ok for one range you get 256. 245 00:14:55,010 --> 00:15:00,440 Well imagine you have to do that two hundred and fifty five other times. 246 00:15:00,440 --> 00:15:01,190 Right. 247 00:15:01,220 --> 00:15:04,810 And that number gets substantially bigger here. 248 00:15:05,030 --> 00:15:09,240 And then if you were to have a slash eight then of course it gets bigger and bigger. 249 00:15:09,260 --> 00:15:13,040 So what you need to realize are a few things here. 250 00:15:13,190 --> 00:15:16,610 We have these addresses and you see the slash ones. 251 00:15:16,600 --> 00:15:20,270 I say again we call them wax whack 24 is going to be very common. 252 00:15:20,300 --> 00:15:26,150 I would say whack 16 is probably your next common you might see some weird sub minted networks like 253 00:15:26,150 --> 00:15:28,160 this subnet networks like this. 254 00:15:28,160 --> 00:15:31,190 But typically it's slash 24 slash 16. 255 00:15:31,190 --> 00:15:38,000 Now your network I.D. is typically what is known as your first address and your broadcast diary I.D. 256 00:15:38,000 --> 00:15:39,530 is known as your last address. 257 00:15:39,530 --> 00:15:43,040 This is not always the case but it is very common. 258 00:15:43,070 --> 00:15:46,190 And let me log back into this Kallie machine here and I'll show you. 259 00:15:47,090 --> 00:15:53,590 So we have our IP address 1 9 2 1 6 8 fifty seven dot one thirty nine. 260 00:15:53,990 --> 00:15:58,350 And we've got a net mask of 255 255 255 0. 261 00:15:58,400 --> 00:16:03,170 What does that tell you from what we just learn that tells you we have a slash 24 network. 262 00:16:03,260 --> 00:16:03,590 OK. 263 00:16:03,590 --> 00:16:04,960 This is a common network. 264 00:16:05,000 --> 00:16:08,450 There are potentially two hundred and fifty four hosts. 265 00:16:08,450 --> 00:16:09,450 Why do I keep saying. 266 00:16:09,470 --> 00:16:10,970 Why do I keep subtracting two. 267 00:16:10,970 --> 00:16:16,250 Well we've got a network I.D. and a broadcast I.D. or broadcast IP here. 268 00:16:16,250 --> 00:16:20,510 Well what we need to know is we are dot one thirty nine. 269 00:16:20,510 --> 00:16:25,160 We could be anywhere from one to dot 254 within this network. 270 00:16:25,160 --> 00:16:27,070 That's our two hundred and fifty four possibilities. 271 00:16:27,080 --> 00:16:33,500 This zero means we have the flexibility to be any IP address range from one to two hundred and fifty 272 00:16:33,630 --> 00:16:39,810 war usually usually a dot 0 for this IP here in a dot two fifty five. 273 00:16:39,810 --> 00:16:44,190 Make up your network I.D. and your broadcast IP. 274 00:16:44,640 --> 00:16:51,630 OK usually so if we were to say something along the lines of let's go back to this Excel document and 275 00:16:51,630 --> 00:16:57,840 we were to say something along the lines of this let's say that we have a slash 24 network and we want 276 00:16:57,840 --> 00:17:07,200 to know how many host We want to know how what our network ideas and what our broadcast ideas for IP 277 00:17:07,200 --> 00:17:07,380 is. 278 00:17:07,410 --> 00:17:08,430 OK. 279 00:17:08,610 --> 00:17:11,790 We would say OK and we'll we'll get it one more. 280 00:17:11,790 --> 00:17:13,640 We'll say it's a slash 24. 281 00:17:13,980 --> 00:17:21,820 And the IP starts with 1 9 2 1 6 8 dot one dot zero. 282 00:17:22,370 --> 00:17:22,970 OK. 283 00:17:23,010 --> 00:17:24,460 Or we can even write it like this. 284 00:17:24,460 --> 00:17:28,090 1 2 1 6 a 1.0 slash 24. 285 00:17:28,200 --> 00:17:32,900 Delete this and we'll say what's our subnet mask. 286 00:17:33,750 --> 00:17:36,590 What's our host what's our network what's our broadcast. 287 00:17:36,600 --> 00:17:40,490 So subnet you come to your cheat sheet you say OK slash twenty four. 288 00:17:40,620 --> 00:17:46,930 I already know that I need to be filling in this area here on the X so I'm just in come in 255 255. 289 00:17:46,950 --> 00:17:48,210 What's the x. 290 00:17:48,210 --> 00:17:52,330 Well we know to come down this row to fifty five here. 291 00:17:52,350 --> 00:17:52,980 God zero. 292 00:17:53,920 --> 00:17:54,520 Okay. 293 00:17:54,540 --> 00:17:57,090 And then we've got host somebody can expand this a little bit. 294 00:17:57,600 --> 00:17:59,070 We've got the hosts OK. 295 00:17:59,120 --> 00:18:05,880 Hosts are right here 256 hosts potentially 254 though because we always subtract two from the hosts 296 00:18:05,880 --> 00:18:06,690 total. 297 00:18:06,690 --> 00:18:13,430 So our network I.D. is usually the first address available to us which is 1 9 2 1 6 8 1 0. 298 00:18:13,560 --> 00:18:22,390 The broadcast is 1 9 2 1 6 8 1 255 meaning available to us is anything from DOT 1 2 dot 254. 299 00:18:23,430 --> 00:18:24,710 Let's take a look at something else. 300 00:18:24,720 --> 00:18:26,840 That's a basic example. 301 00:18:26,850 --> 00:18:28,660 Let's do like a slash 28. 302 00:18:29,100 --> 00:18:32,140 Let's say we got 1 9 2 1 6 8 1. 303 00:18:32,160 --> 00:18:35,320 Got zero slash 28. 304 00:18:35,370 --> 00:18:35,850 Now what. 305 00:18:36,570 --> 00:18:38,510 Well you've got 16 hosts here. 306 00:18:39,120 --> 00:18:39,540 OK. 307 00:18:39,540 --> 00:18:45,420 So our subnet is then going to fill in 2 5 5 2 5 5 2 5 5 x. 308 00:18:45,420 --> 00:18:45,690 Right. 309 00:18:45,690 --> 00:18:52,800 Because we're in this row slash 28 says it's gonna be a 240 when we drop down to the subnet mask. 310 00:18:53,180 --> 00:18:58,550 I'm going to make this a little bigger how many host sixteen minus two. 311 00:18:58,620 --> 00:19:00,190 We have 14 hosts. 312 00:19:00,450 --> 00:19:00,790 Okay. 313 00:19:00,810 --> 00:19:06,350 So the first non host would be a 1 9 2 1 6 8 1 0. 314 00:19:06,360 --> 00:19:10,020 Again still the same thing first first address. 315 00:19:10,020 --> 00:19:12,400 Last address is going to be what. 316 00:19:12,660 --> 00:19:16,260 1 2 1 6 8 1 15. 317 00:19:16,800 --> 00:19:22,040 So it makes sense zero to 15 is sixteen addresses usable space is 14. 318 00:19:22,050 --> 00:19:25,290 Because we take out the network and the broadcast. 319 00:19:25,290 --> 00:19:31,920 Now you could see something like this and then guess what you're segmented so because you're only using 320 00:19:31,920 --> 00:19:41,880 this little bit of space you can then in turn have something like this 1 9 2 1 6 8 1 16 slash 28 and 321 00:19:41,880 --> 00:19:47,730 then it starts the same way your subnet mask is actually the same because you're using a slash 28 you 322 00:19:47,730 --> 00:19:48,490 come through. 323 00:19:48,600 --> 00:19:49,880 You can just copy and paste that. 324 00:19:49,890 --> 00:19:51,810 The hosts are still the same. 325 00:19:51,810 --> 00:19:55,850 What changes here well your first address 1 2 1 6 8. 326 00:19:55,850 --> 00:19:56,720 Got one. 327 00:19:56,760 --> 00:20:02,660 16 and then your last address which is 1 9 2 1 6 8 1. 328 00:20:02,670 --> 00:20:04,650 That thirty one. 329 00:20:05,150 --> 00:20:12,770 So because this is smaller on the slash 28 side we can actually have multiple networks within like say 330 00:20:12,770 --> 00:20:16,990 a dot 1 0 dot one dot sixteen dot one dot thirty two. 331 00:20:17,120 --> 00:20:22,490 You get a multiple little networks here with only a small amount of hosts so maybe you have just a few 332 00:20:22,490 --> 00:20:29,660 servers in this range and you have like servers a b and c they go in a slash 28 and then you have another 333 00:20:29,660 --> 00:20:37,210 one of servers DC in your DB D E and F however you want to say it and you have more in that range case 334 00:20:37,220 --> 00:20:42,530 you can subnet this out into different things and we see subnets we see all kinds of stuff we could 335 00:20:42,530 --> 00:20:49,280 see phone servers user computers wireless all different sort of thing some companies get really specific 336 00:20:49,280 --> 00:20:50,150 with their subnet. 337 00:20:50,360 --> 00:20:51,540 Now let's try one more. 338 00:20:51,540 --> 00:20:53,940 Let's say we have a slash twenty three. 339 00:20:54,050 --> 00:21:02,090 Now I want to put in 1 9 2 1 6 8 1 dot 0 slash twenty three but that would be wrong. 340 00:21:02,090 --> 00:21:03,670 Why would this be wrong. 341 00:21:03,680 --> 00:21:07,130 This is actually going to be a zero and I'll show you why in a second. 342 00:21:07,790 --> 00:21:12,100 So we're no longer locking in the this this number anymore right. 343 00:21:12,110 --> 00:21:19,160 When we get below the slash twenty for the two fifty five all the way across for three of them. 344 00:21:19,160 --> 00:21:24,700 Guess what we're now have the ability to change is no other than what's locked in. 345 00:21:24,770 --> 00:21:26,530 So let's do adopt zero. 346 00:21:26,540 --> 00:21:29,300 We'll talk about why it's hit enter here. 347 00:21:29,450 --> 00:21:30,680 So the subnet on a slash. 348 00:21:30,680 --> 00:21:31,450 Twenty three. 349 00:21:32,030 --> 00:21:36,440 Well we're gonna do a two fifty four which is going to be a place holder of the X here to come in and 350 00:21:36,440 --> 00:21:40,120 say 2 5 5 2 5 5 2 5 4 0. 351 00:21:40,790 --> 00:21:42,410 And now again we're not locked in. 352 00:21:42,410 --> 00:21:47,270 So remember this two fifty five would lock in this dot one that doesn't happen anymore. 353 00:21:47,360 --> 00:21:51,100 So we've got two fifty five to fifty five 254 dot zero. 354 00:21:51,140 --> 00:21:55,580 We're actually going to start at zero here and we're gonna say the number of hosts that are possible 355 00:21:56,280 --> 00:22:06,320 it's five 10 five twelve minus two will say our network idea is 1 9 2 1 6 8 0 0 and our broadcast would 356 00:22:06,320 --> 00:22:12,790 then be 1 9 2 1 6 8 got 1 2 fifty five why. 357 00:22:12,820 --> 00:22:19,610 OK so we have the possibility now that we're spanning two ranges we've got five hundred and ten hosts 358 00:22:19,700 --> 00:22:20,950 in this network. 359 00:22:21,310 --> 00:22:27,800 And we have the ability to go between zero and one we've got two options now zero and one. 360 00:22:27,920 --> 00:22:34,700 So if we were to say another network if we wanted to get to like two we'd actually have to say 1 9 2 361 00:22:34,700 --> 00:22:43,160 1 6 8 2 2 0 slash twenty three it would be the same subnet mask same number of hosts but then this would 362 00:22:43,160 --> 00:22:51,340 be 1 9 2 1 6 8 8 2 0 1 9 2 1 6 8 3 2 fifty five. 363 00:22:51,470 --> 00:22:56,290 Again there's five hundred five hundred ten possible hosts in between this. 364 00:22:56,300 --> 00:22:56,860 Right. 365 00:22:56,930 --> 00:23:04,640 Because you've got to think dot 0 dot 1 0 9 2 0 3 all the way through 254 and again one dot one one 366 00:23:04,640 --> 00:23:06,990 dot two all the way through 254. 367 00:23:07,160 --> 00:23:09,800 So that equals five hundred and ten. 368 00:23:09,800 --> 00:23:14,200 Once you've hit that maximum that one dot 255 five then guess what. 369 00:23:14,210 --> 00:23:15,290 You start to. 370 00:23:15,350 --> 00:23:19,820 You have a whole new network here just like these smaller segments you get whole new networks on the 371 00:23:19,820 --> 00:23:21,380 bigger side as well. 372 00:23:21,410 --> 00:23:28,880 So what you need to know is that when I if I would put something like a 1 9 2 1 6 8 dot 1.0 slash twenty 373 00:23:28,880 --> 00:23:35,120 three that would have fallen into line with the one in the zero in our actual network ideas still would 374 00:23:35,120 --> 00:23:42,280 have been 0 0 and a one dot 255 would have been the broadcast here and you can double check this anytime 375 00:23:42,290 --> 00:23:45,620 you're confused you can double check your site or notation. 376 00:23:45,770 --> 00:23:52,430 So I'm going to bring over a Web site that I will show you here and this is just an IP addressing guys 377 00:23:52,430 --> 00:23:54,780 called IP address guide dot com. 378 00:23:55,040 --> 00:24:01,850 You bring this over and you scroll down just a little bit and I just put in 1 9 2 1 6 8 1 0 slash twenty 379 00:24:01,850 --> 00:24:08,410 three and you can see that it actually corrects me and says the first bit is 1 9 2 1 6 8 0 0 0. 380 00:24:08,420 --> 00:24:17,960 The last ones 1 9 2 1 6 8 1 255 total hosts is 512 minus two shows you that again first ip last IP you 381 00:24:17,960 --> 00:24:19,100 got your net mask. 382 00:24:19,160 --> 00:24:24,950 Very easy to use a cyber calculator here or an IP range to convert decider as well. 383 00:24:25,010 --> 00:24:26,380 So very useful calculators. 384 00:24:26,390 --> 00:24:30,950 But if you're not allowed to use these for like an exam purpose or something along those lines then 385 00:24:30,950 --> 00:24:34,580 using the cheat sheet that I've shown you is super useful. 386 00:24:34,610 --> 00:24:39,870 Now what I want to do is I want to try for three more subnets. 387 00:24:39,910 --> 00:24:40,770 I'm going to write these out. 388 00:24:40,800 --> 00:24:55,910 I must say 1 9 2 1 6 8 0 0 slash 20 to 1 9 2 1 6 8 1 one zero slash twenty six and 1 9 2 1 6 a dot 1 389 00:24:56,080 --> 00:24:58,200 0 slash 27. 390 00:24:58,240 --> 00:24:59,560 I want you to solve these for me. 391 00:24:59,560 --> 00:25:06,040 Tell me the subnet mask the host network and broadcast it with that being said this again is a very 392 00:25:06,040 --> 00:25:07,500 complicated topic. 393 00:25:07,570 --> 00:25:10,510 I did not pick this up the first time or the second time that I got it. 394 00:25:10,510 --> 00:25:16,420 If you're running confused right now perfectly normal you can go back and watch this video again try 395 00:25:16,420 --> 00:25:21,760 to pick up more topics try to understand it maybe I'm not the right instructor for this either I do 396 00:25:21,760 --> 00:25:27,520 recommend looking at other resources to completely fill in your knowledge gap if there is one that exists. 397 00:25:27,520 --> 00:25:32,920 Another resource that I'll link down is what is called Seven second subheading it is very useful a lot 398 00:25:32,920 --> 00:25:34,560 of students have recommended it to me. 399 00:25:34,660 --> 00:25:36,670 I'm going to push it forward as well. 400 00:25:36,670 --> 00:25:38,880 So go ahead and try to solve this. 401 00:25:38,920 --> 00:25:43,510 Understand that what you're after here is just understanding what a subnet is. 402 00:25:43,510 --> 00:25:43,800 OK. 403 00:25:43,810 --> 00:25:49,750 When you see something like this if a client sends you 1 9 2 1 6 8 1 0 slash 24 you're going to say 404 00:25:49,810 --> 00:25:55,330 hey OK I know that there's probably 250 for hosting that network and I know what I'm working with. 405 00:25:55,480 --> 00:26:01,900 If you see this 2 5 5 2 5 5 about 2 5 5 0 again you know that you're working with a slash 24 network 406 00:26:02,260 --> 00:26:03,330 very standard stuff. 407 00:26:03,340 --> 00:26:04,620 That's what we're after. 408 00:26:04,660 --> 00:26:06,630 I don't expect you to ever memorize this. 409 00:26:06,640 --> 00:26:12,820 I don't have this memorized like I don't come in here and say you know a slash 18 is a 2 5 5 2 5 5 1 410 00:26:12,820 --> 00:26:17,820 9 2 0 network and it's got sixteen thousand three hundred eighty four hosts I don't do that. 411 00:26:18,280 --> 00:26:18,610 OK. 412 00:26:18,630 --> 00:26:23,920 I have a cheat sheet I'll use a Web site if I need to for the most part what you need to understand 413 00:26:23,920 --> 00:26:29,870 is to 250 for hosts for a slash twenty four if that number has gone up to like a slash twenty eight 414 00:26:29,890 --> 00:26:34,690 you know you're dealing with less if that number is lower like a slash sixteen you know you're doing 415 00:26:34,690 --> 00:26:39,850 with a bigger network that's really what it comes down to unless you are working in networking and then 416 00:26:39,910 --> 00:26:44,290 these become more important but as a pen tester understanding how to read this understanding what the 417 00:26:44,290 --> 00:26:51,430 subnet is and just identifying it with very basic measures this is extremely useful so I'll get you 418 00:26:51,430 --> 00:26:56,800 over in the next video when we talk about solving these challenges and hopefully we got them all right 419 00:26:56,890 --> 00:26:58,240 so I'll see you over there in the next one.