1 00:00:02,703 --> 00:00:09,087 [music] 2 00:00:09,119 --> 00:00:11,912 Okay, so up until this point in time, we've 3 00:00:11,912 --> 00:00:17,951 had this concept where some device was running TCP/IP, 4 00:00:17,951 --> 00:00:21,421 the protocol stack, and part of TCP/IP meant that that 5 00:00:21,421 --> 00:00:25,158 device had to have a 32-bit number assigned to it - an 6 00:00:25,158 --> 00:00:28,862 IP address. And how that device looked at that 32-bit 7 00:00:28,862 --> 00:00:32,399 number was, was it a really old style device, where it 8 00:00:32,399 --> 00:00:35,903 just looked at the first eight bits and that was it? 9 00:00:35,903 --> 00:00:38,906 Or, was it a newer device that used classful 10 00:00:38,906 --> 00:00:40,207 addressing, where it said, Well, I'm going to look at 11 00:00:40,207 --> 00:00:43,210 the first two or three bits there and determine if my 12 00:00:43,210 --> 00:00:46,580 address is A, B, or C. And then based on that, I'll 13 00:00:46,580 --> 00:00:48,582 figure out where the dividing line is between my 14 00:00:48,582 --> 00:00:54,421 network bits and everything left over - my host bits. 15 00:00:54,421 --> 00:00:57,691 Well, even though this classful addressing did end 16 00:00:57,691 --> 00:01:00,394 up giving us thousands and thousands of more available 17 00:01:00,394 --> 00:01:05,132 networks. Even that very soon became apparent that it 18 00:01:05,132 --> 00:01:07,901 was not going to be enough. It wasn't going to be 19 00:01:07,901 --> 00:01:14,474 enough. So it soon became apparent that "Hey look," you 20 00:01:14,474 --> 00:01:18,312 know, if a company goes to the Regional Internet Registry or a 21 00:01:18,312 --> 00:01:21,248 service provider and that company says, "Look I'm 22 00:01:21,248 --> 00:01:24,818 really big, and I'm going to need a thousand networks. You 23 00:01:24,818 --> 00:01:29,356 know, I've got 800 different departments of employees. In 24 00:01:29,356 --> 00:01:32,092 addition to that, I want all my printers on one network. 25 00:01:32,092 --> 00:01:34,995 I want all my voice phones on another. I want all my 26 00:01:34,995 --> 00:01:36,897 fax machines on other one," so I actually need a 27 00:01:36,897 --> 00:01:41,034 thousand broadcast domains, a thousand networks. Well if 28 00:01:41,034 --> 00:01:42,769 the Regional Internet Registry or the service 29 00:01:42,769 --> 00:01:46,907 provider gave them one thousand public classful 30 00:01:46,907 --> 00:01:51,411 networks, at that rate those classful networks were 31 00:01:51,411 --> 00:01:57,951 soon going to be gone. So this is where in 1985 the 32 00:01:57,951 --> 00:02:03,090 concept of subnets came into play. So originally we have 33 00:02:03,090 --> 00:02:06,727 this. We have a building, four floors in the building. 34 00:02:06,727 --> 00:02:09,563 Let's just assume that each floor requires its own 35 00:02:09,563 --> 00:02:12,799 unique network. So back in the classful days, we said, 36 00:02:12,799 --> 00:02:15,435 Okay, we'll give each one of those floors its own unique 37 00:02:15,435 --> 00:02:19,506 classful network - the 20, the 21, the 22, and the 23 38 00:02:19,506 --> 00:02:23,644 networks. But that wasn't very scalable. Even that was 39 00:02:23,644 --> 00:02:25,879 going to run out. So instead, they said, Okay, 40 00:02:25,879 --> 00:02:28,115 here's what we're going to do. We will give you a 41 00:02:28,115 --> 00:02:32,786 single classful network, the 20 network, the class A 20 42 00:02:32,786 --> 00:02:36,623 network, and you will now divide that one network into 43 00:02:36,623 --> 00:02:43,330 multiple smaller pieces - what we call subnetworks. 44 00:02:43,330 --> 00:02:47,134 Now in a classful scheme, if all those devices in that 45 00:02:47,134 --> 00:02:49,236 building in the right were doing classful IP 46 00:02:49,236 --> 00:02:53,240 addressing, they would say, We're all in one network. We 47 00:02:53,240 --> 00:02:57,611 looked at the first byte-- and the number 20 in binary 48 00:02:57,611 --> 00:03:01,615 starts out with zero, right? The 128 bit is off. So 49 00:03:01,615 --> 00:03:04,017 they'd say, Oh The 120 bit is off, which means that 50 00:03:04,017 --> 00:03:07,754 this is a Class A address which means the first byte 51 00:03:07,754 --> 00:03:10,123 tells us our network. Oh, the first byte's number 20. 52 00:03:10,123 --> 00:03:13,427 Okay, anything beginning with the number 20 is in my 53 00:03:13,427 --> 00:03:17,264 network, belongs to my group. But clearly, that's 54 00:03:17,264 --> 00:03:20,000 not the case here. Here, we've got four different 55 00:03:20,000 --> 00:03:23,937 broadcast domains. So with subnetting we're saying, 56 00:03:23,937 --> 00:03:28,208 "Hey look, don't worry about your class. Your class is 57 00:03:28,208 --> 00:03:31,244 kind of irrelevant. Don't look at the first bit or two 58 00:03:31,244 --> 00:03:35,982 bits or three bits. Instead, look at something else." 59 00:03:35,982 --> 00:03:37,284 So now you're not going to look at your class 60 00:03:37,284 --> 00:03:39,553 identifier anymore. Now, I'm going to give you a new 61 00:03:39,553 --> 00:03:42,956 piece of information that tells you, of that 32 bit 62 00:03:42,956 --> 00:03:45,725 number where to draw that dividing line between the 63 00:03:45,725 --> 00:03:49,529 network portion and the host. This is where a subnet 64 00:03:49,529 --> 00:03:53,433 mask comes into play. Can't do subnetting without a 65 00:03:53,433 --> 00:04:01,208 subnet mask. So we know, as a review that when you get a 66 00:04:01,208 --> 00:04:04,211 network from an ISP you're going to have the network 67 00:04:04,211 --> 00:04:10,183 part and the host part. Now, from the ISP's perspective, 68 00:04:10,183 --> 00:04:13,687 the service provider, they don't care what you do with 69 00:04:13,687 --> 00:04:16,656 your host bits. They're going to assume that you're 70 00:04:16,656 --> 00:04:18,658 just going to assign those host bits in unique 71 00:04:18,658 --> 00:04:21,261 combinations to your laptops, in your PCs, in 72 00:04:21,261 --> 00:04:24,564 your servers, and so on and so forth. But what they do 73 00:04:24,564 --> 00:04:28,301 care about is, they say, "Look! We just gave you, 74 00:04:28,301 --> 00:04:32,506 let's say, an 8-bit network. We gave you the number 20." 75 00:04:32,506 --> 00:04:36,710 So the ISP says, "That is now registered to you. No 76 00:04:36,710 --> 00:04:40,247 other company in the entire world can have that 8-bit 77 00:04:40,247 --> 00:04:43,650 pattern on their network. That belongs to you, and we 78 00:04:43,650 --> 00:04:46,253 will make sure we advertise, while the other ISPs 79 00:04:46,253 --> 00:04:49,790 throughout the entire world, that the 20 network belongs 80 00:04:49,790 --> 00:04:53,393 right here. So in Germany, Mongolia, China, if you guys 81 00:04:53,393 --> 00:04:55,262 ever need to send a packet to something that's starting 82 00:04:55,262 --> 00:04:59,232 with 20, send it here, and we'll get it to this company, 83 00:04:59,232 --> 00:05:02,169 which is, you know, our customer." So it's very 84 00:05:02,169 --> 00:05:05,605 important that the network they gave you, the network bits, you 85 00:05:05,605 --> 00:05:07,407 don't mess around with those. So if you start 86 00:05:07,407 --> 00:05:09,809 changing your network bits now, you're infringing on 87 00:05:09,809 --> 00:05:16,616 some other company. So let's say for example, an ISP 88 00:05:16,616 --> 00:05:22,789 leases you this network, 129.1.0.0. Now if we're 89 00:05:22,789 --> 00:05:25,425 dealing with a classful architecture, classful IP 90 00:05:25,425 --> 00:05:27,360 addressing, you would look at that and you'd say, "Okay 91 00:05:27,360 --> 00:05:31,064 let's see, 129. Let's convert that into binary." 92 00:05:31,064 --> 00:05:38,772 128 bit is on, 64 bit is off. Boom, I'm done. That is 93 00:05:38,772 --> 00:05:43,443 a class B address which tells me that the first half 94 00:05:43,443 --> 00:05:47,714 of that address, the first 2 bytes, 129.1, is the 95 00:05:47,714 --> 00:05:51,184 network. So this is what the ISP is thinking. The ISP is 96 00:05:51,184 --> 00:05:53,153 thinking, "Okay, Keith's company over here that we 97 00:05:53,153 --> 00:05:59,993 just leased this network to, they own 129.1." Nobody else 98 00:05:59,993 --> 00:06:06,333 in the whole world owns 129.1. So there's what it looks 99 00:06:06,333 --> 00:06:11,538 like in binary. So the ISP says, Don't change those 100 00:06:11,538 --> 00:06:13,640 bits in red. If you do, we're going to be very 101 00:06:13,640 --> 00:06:16,810 unhappy with you. But you can do whatever you want 102 00:06:16,810 --> 00:06:22,882 with those last 16 bits. Those are host bits. So the 103 00:06:22,882 --> 00:06:25,418 ISP's assumption - the service provider's 104 00:06:25,418 --> 00:06:29,990 assumption - is that I have one network, one broadcast 105 00:06:29,990 --> 00:06:33,226 domain, that uses that 16-bit pattern to identify 106 00:06:33,226 --> 00:06:37,897 itself, 129.1 but that raises the question: what if 107 00:06:37,897 --> 00:06:41,134 I have other broadcast domains? What if I need two 108 00:06:41,134 --> 00:06:44,204 networks or three or four? Well certainly, the ISP would be 109 00:06:44,204 --> 00:06:48,108 more than happy to take my money to buy another 110 00:06:48,108 --> 00:06:51,011 network, and another, and another. The ISP will say, 111 00:06:51,011 --> 00:06:56,249 Oh sure, yeah, we'd love to sell you 129.2 and 129.3 and 112 00:06:56,249 --> 00:06:59,352 129.30. Come to us with your money. We'll give you as 113 00:06:59,352 --> 00:07:04,691 many networks as you need. So I say, "Well, you know, if I'm 114 00:07:04,691 --> 00:07:10,363 spending $100 a month on that one network, I don't necessarily 115 00:07:10,363 --> 00:07:14,334 have another $2,000 a month to spend to get a couple 116 00:07:14,334 --> 00:07:17,937 dozen more networks." So remember, the ISP says, 117 00:07:17,937 --> 00:07:21,141 "Look, as long as you don't change those red bits, 118 00:07:21,141 --> 00:07:23,877 that's all we care about." So I say, "Well, wait a 119 00:07:23,877 --> 00:07:27,514 second. We know that all the devices in the same 120 00:07:27,514 --> 00:07:31,718 broadcast domain all have to agree on what the name of 121 00:07:31,718 --> 00:07:35,255 their group is, in binary." What the binary pattern is 122 00:07:35,255 --> 00:07:37,724 for their broadcast domain. What their binary network 123 00:07:37,724 --> 00:07:44,964 is. I know I can't change the first 16 bits. Well, why 124 00:07:44,964 --> 00:07:49,602 don't I do this. Why don't I give them a unique 18 bit 125 00:07:49,602 --> 00:07:53,873 pattern like this? I'll keep the first 16 bits the same 126 00:07:53,873 --> 00:07:55,275 because I can't change that. That's what my service 127 00:07:55,275 --> 00:07:58,545 provider gave me. But, of the last 16 bits, I'm going 128 00:07:58,545 --> 00:08:02,949 to take those two bits there in green. Instead of telling my 129 00:08:02,949 --> 00:08:05,585 laptops, Hey, look at those two bits as part of your 130 00:08:05,585 --> 00:08:08,121 host pattern. I'm going to say, No, I don't want you to 131 00:08:08,121 --> 00:08:12,058 do that. All laptops on that segment on the left there, 132 00:08:12,058 --> 00:08:16,363 of your 32-bit number, for all of you, the first 18 133 00:08:16,363 --> 00:08:20,433 bits represent your network, represent your group. So 134 00:08:20,433 --> 00:08:22,168 basically what I've done is I've taken these two green 135 00:08:22,168 --> 00:08:27,006 bits that used to be host bits and I've repurposed 136 00:08:27,006 --> 00:08:30,643 them. I've converted them into networking bits. I've 137 00:08:30,643 --> 00:08:34,581 added them to the existing 16 networking bits I already 138 00:08:34,581 --> 00:08:38,918 had that I couldn't change. And because the ISP doesn't 139 00:08:38,918 --> 00:08:43,423 care what I do with these 16 bits on the end, I can do 140 00:08:43,423 --> 00:08:46,259 whatever I want with that. So I'll say, Okay, all you 141 00:08:46,259 --> 00:08:51,297 guys here on the left, this is your 18-bit network. And 142 00:08:51,297 --> 00:08:54,567 all you guys on the right, I'll use a different 18-bit 143 00:08:54,567 --> 00:08:59,272 network for you. Still keeping the 16 bits I got 144 00:08:59,272 --> 00:09:02,942 from my ISP consistent, but now this is what's called 145 00:09:02,942 --> 00:09:06,679 subnetting. Subnetting is taking one network and 146 00:09:06,679 --> 00:09:10,850 dividing it into two or three or four or five or 147 00:09:10,850 --> 00:09:14,721 hundreds of subnetworks, keeping the original bit 148 00:09:14,721 --> 00:09:18,224 pattern of your original network consistent across 149 00:09:18,224 --> 00:09:22,429 all of them. So in this particular example here of 150 00:09:22,429 --> 00:09:27,100 my 32-bit number now, we can classify those 32 bits into 151 00:09:27,100 --> 00:09:30,637 one of three buckets. We've got our original networking 152 00:09:30,637 --> 00:09:33,173 bits which are the ones in red. Those are the ones I 153 00:09:33,173 --> 00:09:35,775 can't change that I've bought and paid for from my 154 00:09:35,775 --> 00:09:39,379 regional Internet registry or from my service provider. 155 00:09:39,379 --> 00:09:41,748 And then we have some host bits which are no longer host 156 00:09:41,748 --> 00:09:44,984 bits which I've now repurposed or reused as 157 00:09:44,984 --> 00:09:48,788 networking bits. I'm now telling my laptops, Add that 158 00:09:48,788 --> 00:09:51,357 to your existing network section. That's part of your 159 00:09:51,357 --> 00:09:55,662 group name and those are called subnet bits. And I've 160 00:09:55,662 --> 00:10:02,702 got my host bits on the end. So here's the question. 161 00:10:02,702 --> 00:10:06,005 Original IP, the devices just assume back in the 162 00:10:06,005 --> 00:10:10,477 1960s the first 8 bits represented their group, 163 00:10:10,477 --> 00:10:13,880 represented their network. Move forward to what was it? 164 00:10:13,880 --> 00:10:17,183 1985, I think it was, or 1981, it was in the slides 165 00:10:17,183 --> 00:10:20,220 back, to Classful addressing. Now a device 166 00:10:20,220 --> 00:10:23,389 take a look at the first few bits of the IP address and 167 00:10:23,389 --> 00:10:27,093 said, what class am I? A, B, or C? That'll tell me where 168 00:10:27,093 --> 00:10:31,231 my network ends and where my host portion begins. Now 169 00:10:31,231 --> 00:10:33,900 we're saying as a third alternative, don't use 170 00:10:33,900 --> 00:10:37,170 either one of those methods. I'm going to arbitrarily 171 00:10:37,170 --> 00:10:40,173 tell you that of your 32 bit number, the first 18 bits, 172 00:10:40,173 --> 00:10:45,311 or the first 20 bits, or the first 28 bits represent your 173 00:10:45,311 --> 00:10:48,715 group. But how do I give it that information? How do I 174 00:10:48,715 --> 00:10:51,985 tell it of those 32 bits where that dividing line can 175 00:10:51,985 --> 00:10:55,889 arbitrarily fall? And that's where subnet mask came into 176 00:10:55,889 --> 00:11:03,863 place. So here we see prior to subnet masks just the 177 00:11:03,863 --> 00:11:07,200 first few bits identified how much of the address 178 00:11:07,200 --> 00:11:09,669 belong to your network, and then you were done, that was 179 00:11:09,669 --> 00:11:12,238 it, you feel into an A, B, or C, and that's all you 180 00:11:12,238 --> 00:11:17,710 had. So in this particular case, the PC on the left 181 00:11:17,710 --> 00:11:19,812 says, "Okay, I've now identified my network 182 00:11:19,812 --> 00:11:26,352 numbers being 129.1. So if I need to create a packet, if 183 00:11:26,352 --> 00:11:31,024 the destination of that packet is also 129.1, great! 184 00:11:31,024 --> 00:11:33,459 I know they're on the same wire as me. I know that when 185 00:11:33,459 --> 00:11:35,862 I put my electrical energy on this wire that represents 186 00:11:35,862 --> 00:11:38,464 1s and 0s, they will see it because they're in the same 187 00:11:38,464 --> 00:11:41,868 broadcast domain as I am. But if I need to create a 188 00:11:41,868 --> 00:11:44,137 packet going to a destination that's not 189 00:11:44,137 --> 00:11:49,475 129.1, that's anything else, they are not in my broadcast 190 00:11:49,475 --> 00:11:52,345 domain, which means, I need to send it to my router to 191 00:11:52,345 --> 00:11:57,584 get it to wherever it needs to go." So he says, "Okay, all 192 00:11:57,584 --> 00:12:04,490 of my particular network, my network is 129.1.0.0 and if 193 00:12:04,490 --> 00:12:08,761 I ever need to send a broadcast well, my group is 194 00:12:08,761 --> 00:12:14,701 129.1 and I'll set all the host bits to 1s. So the broadcast 195 00:12:14,701 --> 00:12:20,139 address for this particular network is 129.1.255.255. 196 00:12:24,577 --> 00:12:30,116 Okay, now we go into subnet masks. So now on my laptop or 197 00:12:30,116 --> 00:12:33,519 my PC or my tablet, I have to provide it two pieces of 198 00:12:33,519 --> 00:12:37,657 information: the IP address and right next to that 199 00:12:37,657 --> 00:12:41,160 another 32-bit number in binary which is called a 200 00:12:41,160 --> 00:12:44,097 subnet mask. And the two are used to compare against 201 00:12:44,097 --> 00:12:47,000 each other. Now here I've put them one on top of each 202 00:12:47,000 --> 00:12:49,902 other to make it real clear. I said, Okay, here's your 203 00:12:49,902 --> 00:12:53,206 32-bit number which is your IP address and just below 204 00:12:53,206 --> 00:12:58,344 that is your subnet mask. And the way that your laptop or 205 00:12:58,344 --> 00:13:01,714 smartphone or tablet looks at this, it says, Okay, I'm 206 00:13:01,714 --> 00:13:05,218 going to do a one-for-one comparison. For every bit in 207 00:13:05,218 --> 00:13:09,322 my subnet mask that's a 1, that means the corresponding 208 00:13:09,322 --> 00:13:12,558 bit in the IP address belongs to my network, 209 00:13:12,558 --> 00:13:16,329 belongs to my group, my broadcast domain. And for a 210 00:13:16,329 --> 00:13:19,866 bit in my subnet mask that's a 0, that means the 211 00:13:19,866 --> 00:13:22,702 corresponding bit in my IP address belongs to my own 212 00:13:22,702 --> 00:13:27,306 unique host identifier. So now, here with this subnet 213 00:13:27,306 --> 00:13:30,443 mask, I'm telling it, Okay, don't worry about the class 214 00:13:30,443 --> 00:13:33,579 anymore. Forget about the fact that it says 1 0 at the 215 00:13:33,579 --> 00:13:36,182 beginning. That's irrelevant. Instead, the 216 00:13:36,182 --> 00:13:40,353 subnet mask says, of your 32-bit number, the first 24 217 00:13:40,353 --> 00:13:46,993 bits represent your specific group, your broadcast 218 00:13:46,993 --> 00:13:52,365 domain. So now the laptop says, Okay, based on that, 219 00:13:52,365 --> 00:13:55,101 anybody else I want to talk to who's in my broadcast 220 00:13:55,101 --> 00:13:57,737 domain, who's on my wire, should also have the exact 221 00:13:57,737 --> 00:14:07,013 same 24-bit pattern as me, which is 129.1.1. And so now 222 00:14:07,013 --> 00:14:08,881 if I need to send a packet to anybody that does not 223 00:14:08,881 --> 00:14:12,585 match those first 24 bits, that means they're in a 224 00:14:12,585 --> 00:14:15,588 different broadcast domain, and I'll need to use my 225 00:14:15,588 --> 00:14:20,760 default gateway. So now my network has changed a little 226 00:14:20,760 --> 00:14:25,164 bit. My network is still the same 129.1.0. Remember 227 00:14:25,164 --> 00:14:27,867 previously he said, "Oh my network is only the first 228 00:14:27,867 --> 00:14:33,172 half of the address. I'm class B so it's 129.1." Now 229 00:14:33,172 --> 00:14:34,907 he's saying, "Oh the Subnet mask is telling me it's 230 00:14:34,907 --> 00:14:39,112 129.1.0." I got to include that 0 as part of my network 231 00:14:39,112 --> 00:14:43,149 address, and if I want to send a broadcast, that would 232 00:14:43,149 --> 00:14:53,459 be 129.1.1.255. So this is the purpose of the Subnet 233 00:14:53,459 --> 00:14:56,662 mask. It's a comparison tool to help the device with the 234 00:14:56,662 --> 00:15:00,366 IP address to know specifically of those 32 235 00:15:00,366 --> 00:15:03,836 bits where the dividing line ends. Which portion of the 236 00:15:03,836 --> 00:15:07,373 32 bits are the network, and which portion are unique 237 00:15:07,373 --> 00:15:11,244 host bits. And we represent subnet masks in one of three 238 00:15:11,244 --> 00:15:13,679 different ways. Typically, you won't see it in binary, 239 00:15:13,679 --> 00:15:16,315 but this is how your laptop sees it. It's just a string 240 00:15:16,315 --> 00:15:21,988 of binary bits, but typically we convert just 241 00:15:21,988 --> 00:15:25,324 like we convert a 32 bit IP address into dotted decimal. 242 00:15:25,324 --> 00:15:27,293 We do the same thing to the subnet mask. We take that 243 00:15:27,293 --> 00:15:30,763 entire 32 bit binary number and convert it into dotted 244 00:15:30,763 --> 00:15:33,633 decimals. So this would be a common representation 245 00:15:33,633 --> 00:15:39,238 255.255.0.0. And a lot of times in papers and books and 246 00:15:39,238 --> 00:15:41,574 stuff, they'll shorten it even further. They'll say, 247 00:15:41,574 --> 00:15:44,811 "Okay well, in this combination here, I'm seeing 248 00:15:44,811 --> 00:15:48,548 that the first 16 bits are all 1's so that's telling 249 00:15:48,548 --> 00:15:51,083 me, that of my 32 bit number, the first 16 bits 250 00:15:51,083 --> 00:15:55,188 are the network portion. So, shorthand notation would be 251 00:15:55,188 --> 00:16:01,160 /16. Well, guess what? I have some more questions for 252 00:16:01,160 --> 00:16:04,597 you! So here we go. Let me expand this a little bit. A 253 00:16:04,597 --> 00:16:08,134 few more quiz questions. Same thing. I will give you 254 00:16:08,134 --> 00:16:13,339 guys 30 seconds to think about it and then I will 255 00:16:13,339 --> 00:16:19,278 show you the answer. So here we go, quiz number 3. Given 256 00:16:19,278 --> 00:16:22,515 the following subnet mask in binary, what is the 257 00:16:22,515 --> 00:16:29,956 equivalent representation in dotted-decimal and shorthand? 258 00:16:29,956 --> 00:16:35,995 Okay, time's up. So here is our answer. So if 259 00:16:35,995 --> 00:16:38,631 you take a look at all the 1s and remember that your 1s 260 00:16:38,631 --> 00:16:40,466 represent your networking bits, if you just add them 261 00:16:40,466 --> 00:16:47,306 up, you've got 8 + 8 + 4 which says of the 32 bits, 262 00:16:47,306 --> 00:16:50,276 the first 20 of them are networking bits. So that gives 263 00:16:50,276 --> 00:16:54,113 us our shorthand answer of /20. And if you convert this 264 00:16:54,113 --> 00:16:59,085 into a dotted-decimal number, all 1s is 255.255 265 00:16:59,085 --> 00:17:02,889 and the first four 1s, if you add those up, 128 + 64 + 266 00:17:02,889 --> 00:17:08,094 32 + 16 gives you 240. So that's why answer D is the 267 00:17:08,094 --> 00:17:13,833 correct answer also. Let's do a couple more of these. If the 268 00:17:13,833 --> 00:17:18,104 following subnet mask were to applied to a PC's NIC, how many 269 00:17:18,104 --> 00:17:21,340 bits of the IP address would be interpreted as networking 270 00:17:21,340 --> 00:17:30,449 bits? All right, and the answer to this, 29 of those 271 00:17:30,449 --> 00:17:34,553 bits will be considered networking bits. Let's just 272 00:17:34,553 --> 00:17:40,326 do that one on the whiteboard real quick. So 273 00:17:40,326 --> 00:17:45,531 we had 255-- so let's just make this a little bit 274 00:17:45,531 --> 00:17:54,874 larger. We had 255.255.255.248, so if we 275 00:17:54,874 --> 00:18:01,280 take a look at that, we know the number 255 is that, so 276 00:18:01,280 --> 00:18:04,216 that tells me that all 8-bits of the 1st octet are 277 00:18:04,216 --> 00:18:07,820 networking bits. All 8-bits of the 2nd octet and all 278 00:18:07,820 --> 00:18:10,957 eight bits of the third octet. And then if we take a 279 00:18:10,957 --> 00:18:19,198 look at the number 248, that's the first five bits 280 00:18:19,198 --> 00:18:25,004 as being networking bits. So if you add all those up, 281 00:18:25,004 --> 00:18:29,275 eight plus eight plus eight is 24. 24 plus five gives 282 00:18:29,275 --> 00:18:33,579 us-- what subnet mask would be appropriate in dotted 283 00:18:33,579 --> 00:18:37,550 decimal to indicate to a host that the first 26 bits 284 00:18:37,550 --> 00:18:44,857 of its IP address should be considered as the network? 285 00:18:44,857 --> 00:18:48,594 All right, the correct answer for this one was 286 00:18:48,594 --> 00:18:57,503 answer B, the first 26 bits of the IP address. So if 287 00:18:57,503 --> 00:19:02,208 we're looking at the first 26 bits, it looks like this. 288 00:19:02,208 --> 00:19:04,877 One, two, three, four, five, six, seven, eight. One, two, 289 00:19:04,877 --> 00:19:07,013 three, four, five, six, seven, eight. One, two, 290 00:19:07,013 --> 00:19:08,614 three, four, five, six, seven, eight. That's the 1st 291 00:19:08,614 --> 00:19:14,487 24-bits, 1-2, so there's 26, 3-4-5-6-7-8, and when you 292 00:19:14,487 --> 00:19:22,228 convert those numbers, you've got 255.255.255.192. 293 00:19:28,200 --> 00:19:31,871 Given the following IP address and subnet mask, 294 00:19:31,871 --> 00:19:36,008 identify the sub network address of this host. So 295 00:19:36,008 --> 00:19:41,280 what you have here is a full 32-bit host IP address, and 296 00:19:41,280 --> 00:19:43,683 when the host IP address, when that host looks at that 297 00:19:43,683 --> 00:19:46,218 IP address that he's got, as well as his corresponding 298 00:19:46,218 --> 00:19:50,189 subnet mask, what is the network that he will assume 299 00:19:50,189 --> 00:19:52,525 that he is on, that he's sitting on? Remember, the 300 00:19:52,525 --> 00:19:56,362 key thing here, about this is, in a 32-bit IP address, 301 00:19:56,362 --> 00:20:01,834 if all the host bits are 0s, that is your network number. 302 00:20:01,834 --> 00:20:05,738 So you're trying to extract from this, what the network is, 303 00:20:05,738 --> 00:20:07,940 where all the host bits are zeroed out. 304 00:20:11,677 --> 00:20:18,250 Okay, the answer to this one is answer A. So let's work through 305 00:20:18,250 --> 00:20:34,033 the logic of how this one works. So here we had 137.54.101.77, 306 00:20:34,033 --> 00:20:48,647 and a corresponding subnet mask was 255.255.224.0. Now 307 00:20:48,647 --> 00:20:51,383 whenever you see a-- within a subnet mask, if an entire 308 00:20:51,383 --> 00:20:55,688 byte is the number 255, remember, that's real easy, 309 00:20:55,688 --> 00:21:01,427 right? That means that all eight bits of that byte in the 310 00:21:01,427 --> 00:21:05,097 corresponding IP address belong to the network. So that 311 00:21:05,097 --> 00:21:07,933 means that this entire byte of 137 belongs to the 312 00:21:07,933 --> 00:21:12,438 network, and this entire byte of 54 belongs to the 313 00:21:12,438 --> 00:21:15,040 network. Now where it may have gotten a little 314 00:21:15,040 --> 00:21:17,643 difficult for you was in the third byte because we don't 315 00:21:17,643 --> 00:21:25,484 have all 8 bits. 224 is this number, that's 224 which 316 00:21:25,484 --> 00:21:31,056 tells me of the number 101 only the first 3 bits belong 317 00:21:31,056 --> 00:21:34,026 to the network, and then everything else to the right 318 00:21:34,026 --> 00:21:38,397 needs to be zeroed out as host bits. So to do this, we 319 00:21:38,397 --> 00:21:41,233 had to convert the number 101 - just the first 3 bits 320 00:21:41,233 --> 00:21:48,941 of it - into binary. So with 101, the 128-bit is off, 321 00:21:48,941 --> 00:21:55,915 64-bit is on, 32-bit is on, 64 plus 32 is 96. At this 322 00:21:55,915 --> 00:21:58,551 point, we can't go any further because if we turned 323 00:21:58,551 --> 00:22:03,923 on the 16-bit, that would be too high. And then 324 00:22:03,923 --> 00:22:19,138 everything else, needs to be zeroed out. 12345678. So 325 00:22:19,138 --> 00:22:23,342 this is telling us here that these bits here in the pink 326 00:22:23,342 --> 00:22:27,880 boxes all belong to the network. Everything else are 327 00:22:27,880 --> 00:22:30,983 host bits. So when you convert that entire thing 328 00:22:30,983 --> 00:22:34,353 into a dotted decimal number, that's what gave you 329 00:22:34,353 --> 00:22:43,596 your final answer of 137.54.96.0 because remember 330 00:22:43,596 --> 00:22:47,199 to identify the network that means all host bits have to 331 00:22:47,199 --> 00:22:53,305 be zeroed out. What if I were to ask you using the 332 00:22:53,305 --> 00:22:58,344 same IP address and same Subnet mask to identify the 333 00:22:58,344 --> 00:23:04,316 broadcast address of this network? Remember what makes 334 00:23:04,316 --> 00:23:06,619 the network address different than the broadcast 335 00:23:06,619 --> 00:23:09,388 address? And the network address, all the host bits 336 00:23:09,388 --> 00:23:12,291 are 0 because you're referring to the wire itself 337 00:23:12,291 --> 00:23:15,561 not any particular host on that wire. You're referring 338 00:23:15,561 --> 00:23:18,797 to the broadcast domain in general. Well in a 339 00:23:18,797 --> 00:23:22,801 broadcast, you're saying I'm sending it to all the hosts, 340 00:23:22,801 --> 00:23:29,041 every single host there is. So 011 ends my network, and 341 00:23:29,041 --> 00:23:35,781 if I'm sending it to all my hosts, it looks like that 342 00:23:35,781 --> 00:23:41,120 because all my host bits are set to ones. So to identify 343 00:23:41,120 --> 00:23:47,459 the broadcast address, it would be 137.54, and then 344 00:23:47,459 --> 00:23:50,663 what's this entire byte right here? Well that entire 345 00:23:50,663 --> 00:23:54,733 byte, what is it? That's 1 number shy of the number 128 346 00:23:54,733 --> 00:23:57,269 isn't it? Because the next binary pattern bigger than 347 00:23:57,269 --> 00:24:03,242 that would be 100000 which is 128 so that means that 348 00:24:03,242 --> 00:24:11,684 number is 127.254. So using that 1 IP address and Subnet 349 00:24:11,684 --> 00:24:13,986 mask, we were able to extract from that, and this 350 00:24:13,986 --> 00:24:16,755 is exactly the way your laptop does it. It extracts 351 00:24:16,755 --> 00:24:19,992 from that the network address says, "Okay, once my 352 00:24:19,992 --> 00:24:22,628 networking bits end, I'm just going to zero out 353 00:24:22,628 --> 00:24:24,596 everything." That's the network. That's the 354 00:24:24,596 --> 00:24:28,033 broadcast domain. That's my group. And it says, "Okay 355 00:24:28,033 --> 00:24:31,236 and if I turn all those host bits to 1's, that's how I 356 00:24:31,236 --> 00:24:35,607 send a broadcast to everyone in my group." Let's do 357 00:24:35,607 --> 00:24:40,713 another one. Given the following IP address and 358 00:24:40,713 --> 00:24:44,483 subnet mask in binary, identify which of the 359 00:24:44,483 --> 00:24:47,386 answers below provide for the broadcast address of 360 00:24:47,386 --> 00:24:50,289 this network. We just did that. So let's see if you can 361 00:24:50,289 --> 00:24:56,995 do that for yourself. Okay, time's up. So if we take a look 362 00:24:56,995 --> 00:25:04,570 at this. According to the subnet mask, this right here 363 00:25:04,570 --> 00:25:08,407 belongs to our network because the subnet mask says 364 00:25:08,407 --> 00:25:14,546 the first 16 bits belong to the network. So what is that 365 00:25:14,546 --> 00:25:19,418 number? Well, just by process of elimination 366 00:25:19,418 --> 00:25:21,487 you can pretty much assume it's 67 to begin 367 00:25:21,487 --> 00:25:25,958 with and then the second number is three so that 368 00:25:25,958 --> 00:25:31,597 eliminates answer D, that can't be right. So 67.3 and 369 00:25:31,597 --> 00:25:33,198 we're being asked to identify the broadcast 370 00:25:33,198 --> 00:25:36,535 address so that means that all of the host bits have to 371 00:25:36,535 --> 00:25:48,213 be set to 1's. So that means it would 67.3.255.255 and that 372 00:25:48,213 --> 00:25:53,719 gives us our answer. Let's do a couple more. I want to 373 00:25:53,719 --> 00:25:57,823 make sure you really have this. Different permutations 374 00:25:57,823 --> 00:26:03,228 of the same question. Given the following IP address and 375 00:26:03,228 --> 00:26:06,432 subnet mask, identify which of the answers below provide 376 00:26:06,432 --> 00:26:08,634 for the broadcast address of this network so a very 377 00:26:08,634 --> 00:26:11,370 similar but, a little bit different. Give you 30 378 00:26:11,370 --> 00:26:16,875 seconds for this one. All right, time's up. So in this 379 00:26:16,875 --> 00:26:20,579 particular case, the subnet mask was real easy, right? 380 00:26:20,579 --> 00:26:27,453 Tells us that the first 3 octets belong to the network, and 381 00:26:27,453 --> 00:26:30,389 so if we take our host bits and we set them all to the 382 00:26:30,389 --> 00:26:34,326 ones to make a broadcast, that gives us our correct 383 00:26:34,326 --> 00:26:51,276 answer of 130.54.6.255. Let's do another one. Given 384 00:26:51,276 --> 00:26:53,679 the following IP address and Subnet mask - now we're back 385 00:26:53,679 --> 00:26:56,148 in binary - identify which of the answers below 386 00:26:56,148 --> 00:27:00,519 provides for the broadcast address of this network. 387 00:27:00,519 --> 00:27:07,526 Thirty seconds beginning now. Okay, so in this one 388 00:27:07,526 --> 00:27:18,737 right here, we've got all of this belongs to the network 389 00:27:18,737 --> 00:27:23,509 because that's what matches our Subnet mask pattern. And so 390 00:27:23,509 --> 00:27:25,677 if we're going to identify the broadcast address that means 391 00:27:25,677 --> 00:27:28,413 all these remaining host bits have to be set to 1's. 392 00:27:33,485 --> 00:27:35,854 All right, so this right here, that's easy. If that's 393 00:27:35,854 --> 00:27:44,196 all set to 1's that's 255. So we've got 67.3 and then in 394 00:27:44,196 --> 00:27:47,199 the third octet, if we have 011 and then we set the rest 395 00:27:47,199 --> 00:28:00,178 of it to all 1's, that would give us 67.3. - I made a 396 00:28:00,178 --> 00:28:07,819 mistake here, it's not just the first 3 bits, it's the 397 00:28:07,819 --> 00:28:12,124 first 4 bits. The network mask did not quite line up 398 00:28:12,124 --> 00:28:17,262 underneath. That's where we ended, the first 4 bits 399 00:28:17,262 --> 00:28:21,767 there. So now, if we set the remaining stuff to 1's, that 400 00:28:21,767 --> 00:28:30,008 third octet if we convert that into dotted decimal, 401 00:28:30,008 --> 00:28:41,553 will give us the number 111. 01101111 is the number 111. 402 00:28:41,553 --> 00:28:43,855 One more quiz question. One more and then we'll keep 403 00:28:43,855 --> 00:28:49,461 going on. Same type of thing - identify the broadcast 404 00:28:49,461 --> 00:28:58,403 address for this network. Time's up. Correct answer 405 00:28:58,403 --> 00:29:04,910 was the bottom one. In this particular case, 406 00:29:04,910 --> 00:29:12,618 255.255.224, that tells us that all of 77, all of 42, 407 00:29:12,618 --> 00:29:15,554 and then of the number 200, the first three bits because 408 00:29:15,554 --> 00:29:21,326 224 is 111 and then all five 0s. Kind of hard for me to 409 00:29:21,326 --> 00:29:27,833 draw it here so forgive my sloppy drawing. That's 224. 410 00:29:27,833 --> 00:29:30,702 So the number 200, we've got the first three bits we're 411 00:29:30,702 --> 00:29:37,843 concerned with. So the 128-bit is on, 64-bit is on, 412 00:29:37,843 --> 00:29:44,683 32-bit is off. That gives us the number 192. Everything 413 00:29:44,683 --> 00:29:48,420 else is host bits. So if we're trying to identify the 414 00:29:48,420 --> 00:29:52,190 broadcast address, we have five more bits here so let's 415 00:29:52,190 --> 00:30:00,866 go ahead and draw those in. One, two, three, four, five, 416 00:30:00,866 --> 00:30:04,903 and then one, two, three, four, five, six, seven, 417 00:30:04,903 --> 00:30:15,147 eight. So 77.42, this is the number 223.255. That is the 418 00:30:15,147 --> 00:30:17,380 broadcast address of that network. 419 00:30:17,405 --> 00:30:21,976 [music]