Subnet Saturday #5: IPv4 Block Size | Cisco CCNA 200-301

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] [Music] [Music] there must be constant [Music] [Music] you you [Music] don't get out what you put all in the [Music] you've lost everything [Music] [Music] you say [Music] [Music] [Music] [Music] [Music] there must be constant [Music] you [Music] don't get out what you put all in [Music] you've lost everything [Music] [Music] [Music] [Music] [Music] [Music] [Music] and welcome everybody it's great to have you here I have been doing some tweaking and tuning here my studio here in Las Vegas and I'm having so much fun oh my gosh with various scenes and changing back and forth hey it's great to have you here it is Saturday it is subnet Saturday to be specific and we have some objectives regarding what we're gonna cover today and if you haven't already done so I would encourage you if you're new to IP and new to networking please check out the the playlist on subnet Saturday it's called subnets Saturday so you get caught up and make sure you're right there along with us so they're on the playlist so you can go back and look at them anytime you want okay our objectives for this session today is to focus on block size now for some of you block size like oh yeah I totally get it and for others is like block size I don't know what that is and that's perfect because that's what we're gonna talk about in this video I have my notes and I went through all the details I wanted to cover today so I could be nice and concise and also we'll do some hands-on and some demonstration and make sure you get it and can use it so regarding block size here are our objectives I want us to understand number one three basic things number one what it is number two how to figure out the value of it so we understand what it is how to figure out the value of a block size and then third why do we care and how can we use it the block size to me is one of those things that's coming so useful so many times and you'll you'll really appreciate it once you start getting into IP and subnetting so that's our goal three things what it is how to calculate it and then third how to go ahead and use it in to make your lives better so to start off I've got a whiteboard let me share that with you and let me bring this up right here and fantastic okay so we just verify this Oh wonderful wonderful wonderful so let's imagine that we have a computer with this IP address 10.0 12.1 to bid IP address represented and dotted decimal and this is the mask thoughts myself self it'd be pretty cool if we could actually maybe verify that so let's just go take a look at a device in our topology that has an IP address like that and I've got one right here there's a little router if I can log into them here and this router which is router one if we do a show IP interface brief that shows us a nice concise view of the interfaces includes some cool details including what is the status of those interfaces are they up or are they administratively down or are they down because there's a layer two issue present with them and then also over here regarding because we have the keyword IP is showing us the IP information so this shows us the IP addresses but it does not show us the mask so what in the world are we doing what in the world we're gonna do if it doesn't show us the mask well we have to issue a different command we could each show over the running config or we could do a show IP interface for a specific interface and that will show us both the IP address and the mask and some of the details about that interface so let's go ahead and do that for let's pick this area sure here so gig 1 slash 0 has the IP address 10 dot 0 dot 12.1 and let's ask it for more information about that so we'll do a show IP interface for a gig 1 slash 0 and press Enter and among other things and I'll screw up just a little bit so here's the the command we issued show IP interface 4 gig 1 slash 0 and the point I wanted to focus on here was that here is the IP address 10 0.12.10 meant and just talked about that we know we've had this discussion in other subnet saturdays and so we've talked about the mask and what does slash 24 means and what a slash by 4 means is this make sure it's right side up so this is a 24 bit mask it means that the first 24 bits of the mask are all on bump up up up up up up up up up 24 times and then they stop and then they turn to zeros and that's the dividing line so everywhere there's a 1 in the mask represent the corresponding bit in the IP address that this mask is associated with is representing a street name like a network name and then everything where there's a zero in the mask those bits in the customers IP address or the host address are the host address so that's how that works and this is a visual representation of this mask right there all right so this mask of slash 24 they kept in here this mask of slash 24 it could be represented in dotted decimal as 255 dot 255 dot 255 dot zero so no mystery there this means that the first three numbers of the IP address is the network so we could say this computer is on Network Ten 0.12 with a slash 24 and and another thing cool thing is we could prove and its host addresses dot one and we can also prove that by just asking the router hey what streets do you believe you're living on and the way you ask a router that question what streets do you believe you're living on is by doing the command show IP route and that will show us the in the networks that this router believes it can reach including is directly connected networks so if we do a show IP route and also gonna add on the keyword connected that way it won't show us OSPF routes or won't show us eeew GRP routes or bgp routes it'll just show us routes that are directly connected so the one we're looking for is this bad boy right there so this router believes it's connected to the 10.0 12 network with the 24 bit mask because it has an IP address on that interface of 10.0 12 dot something may have taught one in our case and so that's why it believes it as directly connected to that network so going back to our discussion of block size now that we have an example to work with let's do this they share with you the secret of the block size and let me go ahead and bring up another layer to do this we can erase it later if we need to all right and then we use a slightly different color let's take example number one oh that's that's a terrible color let's use that let's use mmm how's that look Wow those are all terrible colors hold on a second let me bring up the new layer see if that helps I want to be able to read it I mean if we're gonna write something we'll be able to read it ah look at that hold on one moment here oh I will punt and I will use a different tool because that's what we ready okay so we'll use a different tool all right so for this example right here the 10.0 about 12.1 that's the IP address on that interface of that router and here is the mask and the block size can be calculated based on the least significant bit value of the mask now let's let's break that down let's take a look at the least I'm talking about the the mask and bring up my ruler again here in this mask the the high-order bits the ones that have the most value 128 and 64 then 32 and so forth over here on this side and as we go down those values go less and less so the first bit has a value of 128 then 64 then 32 then 16 etc and that happens again and again with each octet so when we take a look at the least significant bit of the mask it's so simple so simple all it means is you go all the way down in the mouse till the bits top which in this case is right here and you look at the value of that last bit that's on the value of the least significant bit or the last bit that's on that's what we're after here that's it that's the block size it's the value of the last bit in the mask what is its value so let's take a look so here in this this mask if we wanted to find out the value of that last bit we would take that 255 so I'm gonna take this example down here and we're focusing on this third octet so that's the third octet so if we wanted to break that out of Y 1 2 4 8 16 32 I'm out of room hold on bump-bump bump-bump give myself a little room 1 2 4 8 16 32 64 128 so from our previous discussions we're all familiar those are the values the decimal values of each of the positions in an octet of data so if we're looking at this third number here I'll say the second octet the second number it goes that way and this is the beginning of the third number and then over here we have a period and the third number is there and the fourth number will go off to the right so if we want to take a look at 255 in binary to find out what the least significant bit value is it'd be all ones I'm just gonna put 255 255 for the first octet is all ones 255 for the second octet is all ones and now for this third octet which we're focusing on right here it would be for 255 it would be 1 1 1 1 1 1 1 1 that is the binary value of that decimal number which we've talked about in previous sessions and the rest would be all zeros going to the right so our question here is the the block size is the last bit that's on and what I would have us do is I'm gonna have us go ahead and put a literal like a rectangular or a block around that and that is the block size so the block size is the value of that last bit that's on so my question for you is what is the value of that 1 bit in this position right here so if you want to chat that in I would be obliged what is the value so that bit that's this is the last bit of the mask so another term for that is the least significant bit out of all the bits that are on in the mask this is the least significant bit what is the value of that bit and I will wait for a moment I've got a little there's a teeny bit of a lag between the time that I record this some time it goes out maybe 15 to 20 seconds so I appreciate your patience yeah great Gus and and BHA ska are I don't want to say that incorrectly fantastic it's it's a value of one so the block size based on this mask the last bit that's on in that mask is has a block size or a value of one just one that's perfect great block size the value of the last bit now when we have nice clean octet boundaries like that that last bit is going to be in this position it's always gonna be a one however unless I'd like to take a look at another example and again thanks for all the feedback pouring and you guys you are all rockin fantastic let's take a look at another example but this time let's take a look at an IP address of 10.67 83 one with this mask of 255 255 to 24 0 and to do that let's go ahead and bring some reality into this situation by actually going to an interface that has that IP address and if we don't have one we can create one I had a question recently about loopback interfaces and this is a great time we can elaborate on that imagine imagine that you have a router with four physical interfaces so it can be connected to four different networks we have four interfaces we bring them up we configure IP addresses on each of them and so each of those interfaces is logically connected to a street like a network a different street for each one now if we create a loopback interface it doesn't have any way to connect with it's not physical it's just like a holding place in the router so we can say interface loopback 99 or interface loopback 10 million is number and poof it's created out of thin air like why and that's a good question so the question that ardent defender was asking in the chats on the last video was okay so I'm not sure I'm not clear on this loopback interface why would you ever use it and one of the reasons to use it would be this let me show you what topology and then we'll go ahead and we'll create one and we'll demonstrate it so let's go ahead and hide this and let's imagine and clear that off let's imagine that we're PC floors this is Bob so Bob is sitting here at PC for and Bob wants to do a ping periodically to make sure that he can that router one is working he wants to make sure that he can get over to PC one this is good friend Lois over here and so he has two possible paths this is the preferred path if we're running OSPF because it's gonna have a less of a cost so path a is one option and path B would be another option in case path a goes away so let's imagine Bob says you know what I want to just do some periodic tests to make sure that I have reach ability over to Lois and so what Bob could do is he could do a ping to this IP address on the router so router one gig once last year that we just looked at has the IP address of 10 dot zero dot one dot started at 12.1 and this interface gig to slash zero has an IP address of 10.0 dot and that's going to be the third thirteen network 13.1 and those are both using a 24-bit mask so Bob decides I'm gonna just set up a routine and I'm gonna ping from r4 over to our one gig 1/0 and that way I can verify that my network path is working however what happens if gig 1 slash 0 goes down well Bob's ping to that IP address is not going to work because the interface is down so what's to be done well instead of pinging a physical interface what we could do is Bob's our one could create a loopback interface think of it like just a logical layer 3 interface that doesn't really go anywhere create that on r1 and let's say is loopback seven seven seven so we create the loopback interface and we give the IP address of you know ten 0.77 dot you know one or some other number and we give it a mask fine we set that IP address and then we advertise that network in OSPF so it's reachable and then regardless of this one interface going down if there's still another interface that is still forwarding traffic Bob can now try pinging against that loopback address and if only one if one interface goes down that's not the IP address we're pinging we still have connectivity and we still have access for testing connectivity across the network so that's one example of what a loopback address interface is it's just it's just made up it doesn't have any real connectivity and unless a router advertises that route that Network no one will know one else other than that local router will be able to go ahead and reach it so in this topology here when I go ahead and not clear this off on this router I propose that we create a loopback interface and we'll create one for the purpose of this next example find the least significant bit so the IP address let's see there's gonna 10.67 dot eighty three dot one with a mask of 255 255 dot to 24 this main let me verify verify that real quick I mean clear that and bring this back up and just want verify I'm going to the right address yeah so this bad boy right here 10.67 to a 3.1 nobody owns that IP address at the moment there's not a single device on the network that has that but we could create a loopback let's create loopback seven seven seven and we'll assign it the IP address ten sixty seven eighty 3.1 we'll use this mask and then we'll go ahead and identify based on this mask what is the what is the least significant bit value of that mask so we'll do those in order that way I can answer the question regarding loopback addresses and also address the block size at the same time it's a two-for-one deal alright so let's go ahead and do it let me go ahead and clear that off and let's go back to our interface and it's right here so here on on our one if we do a show IP interface brief you'll notice I have three well yeah I've got three physical interfaces right here that's fantastic they have IP addresses on them I've got one loopback interface and for me the reason I use this loopback interface of zero with a one one one one one the dress is for my router ID and OSPF that's the real reason so in OSPF when OSPF first comes up there's three ways that can be can determine with the router ideas the first way is you just configure it router OSPF one or what are the process ideas and you specify a router - ID this is the router router ID done if that hasn't been done the next choice that the OSPF router will do when it first comes up you'll say ok the router ID isn't configured but I have a loopback with an IP address and because the way they wrote OSPF for cisco I'm just gonna take the loopback interface it has the highest type stuff I have ten loop backs I'll take the one that has the highest IP address and I'll use that as my router ID and if there's no loop backs configured it then defaults to the third option which is just grab the highest IP address on any other non loopback interface which means like a real interface and that's that's how it works all right so getting back to this let's go ahead and create loopback seven seven seven so config t interface loopback and you notice we have quite a range of numbers to play with here so we'll do seven seven seven based on pattern and the moment we do that press Enter check this out to show IP ospf inner do show IP interface brief and there's that loopback interface now it exists it came up by default because that's what loopback to do on this version of iOS and now we just can assign it an IP address so we'll give the IP address at the IP address command of 10.67 . eighty 3.1 was that our IP address he just take a peek at my notes real quick ten sixty seven eighty 3.1 yep and the mask it could bring that back up hold on one second and the mask is gonna be 255 dot 255 dot to my brain 220 4.0 alright so a bit basically what that means is that the first eight bits of this number ten is the network this 255 means that the second number in the corresponding IP address is 67 in this case is the network address and the 224 means that a certain quantity of this third number this third octet is representing the network and so 224 boils down to three bits from that third octet and we could determine that in fact let's just do it right here with some easy math and let me bring up a pen and here's my pen and let's go ahead and do this so if we are focusing on this third octet first thing we're gonna do is if we're gonna convert that to binary we would just go ahead and do the powers of 2 1 2 4 8 16 32 64 128 so far so great so I'm gonna put some decimal decimals in our our point decimals in there just to make sure we're focusing on the right octet so this is the first octet second octet third octet fourth octet so I'll mark that here as well so ii goes that way this is the beginning of the third octet and then at this period this is the third octet that we're focusing on and going to the right would be the fourth octet all right so if we want to take 224 if we're trying to figure out what the least significant bit of the mask is we know we need to know where it falls so if we need 224 in one of our sessions we played a game called does this go into and we could do that here BT 8 128 does that go into 224 yes it does does the remainder going to the remainder or does the 64 go into the remainder yes and does 32 go into the remainder yes it does and it's gonna look like this so I'll save that discussion for how to do binary to decimal and decimal to binary for those videos which already have it in it so so far so good and then basically this is our dividing line right here where everything to this to the left is the network including the first two octets and everything over here to the right would be available for host addressing all right so our goal here is what is the value of the least significant bit of the mask and I will put this in red so we're gonna do is we're gonna take the there's eight bits here that are on first octet there's eight bits here that are on in the third octet we have one two three this bad boy right there is the least significant bit of the mask that has an on bit that's it so if we put us a block around that which is not a bad way to remember that this is the block size my question for you now which I would love you to chat in is what is the value of that least significant bit of this mask that we've just configured for this interface on the router the loopback seven seven seven what is the value of that least significant bit go ahead and type that in and as you do I just want to reinforce that this is your block size so it's the same process as we did with the previous example we're taking the least significant bit that's the last bit to the far right that's on and we are identifying the value in that position so as the answers are pouring in 32 32 32 I couldn't be more tickled so 32 is the block size based on this mask and it's always based on the mask by the way it doesn't matter what the IP address is all we're looking for is the last bit that's on in the mask wherever that shows up that is going to be the value of that bit is going to be our block size let's do one more example and again I appreciate the answers pouring in you guys are great let's do one more example to confirm that we've got this down regarding the least significant bit of the mask regarding the bits that are on in the mask and so let's go ahead and do that well clear the screen and let's go back to our example and here we have example number three so we have an interface 10.67 to a 2.1 with a slash 14 oh no gate oh no what are we gonna do well here's what I propose we do let's put this IP address on our router and then let's go ahead and do the calculation for what is the least significant bit value in the mask with a 14 bit mask so I guess actually before we go there because this be good before we go to the interface cisco won't current well depends on what you're running but most cisco routers are not going to allow you to do a slash 14 when you're doing IP address they want a dotted decimal mask that's how you input it so let's calculate what 14 is as far as dotted decimal for a mask and then we'll go ahead and continue the calculation so if we're looking at 14 here's how I read 14 I see the first octet is 1 1 1 1 1 1 1 1 that's 8 bits on for the first number period and then the next number which is the second octet the second octet is going to have 8 look at this I think you'll enjoy this all I'm going to do is just start at 8 and go to 9 10 and and add more so 9 10 11 12 13 14 and then complete the 8 positions for that octet and literally I'm just counting them out visually number wise so the mask is 14 bits this 14 bits so 8 plus 1 2 3 4 5 6 more based on my high math here it's not the 14 bit mask right there and then this would be the third octet and that would be all zeros because the mask is not taking any more bits for networking and then the fourth octet would be all zeros and so the dividing line which is always a good idea to put in the dividing line between which bits are being used for networking for the network address like a street and which bits are being host addresses right here that's the device yeah and that part has not changed some stars like our very first or second session here with subnets Saturday the mask is responsible for identifying the dividing line and it does so by bits on on on on on on or all network and then when the bits go 0 0 0 0 those corresponding bits from the customers IP address are all gonna be used as hosts addressing like a house number on the street all right so our goal here is the block size and let's effect because we're right here let's do the calculation so focusing on just this second octet I'll go ahead and maybe use a slightly different color for some variety here and let's use a light blue there we go so just just a second octet we broke it out 1 2 4 8 16 32 64 128 great there's our powers of two and if we took these bits so that's on these first 4 on also just for learning I just add a little visual space here between nibbles dusty that's it 8 so 8 bits make up a byte and so often one byte of data when we're talking about IP of your IP version 4 addresses we'll call them bites or octet octet meaning we have eight of something like an octopus eight legs or eight whatever mmm whatever those things are so if we call a byte an octet or we call it a number in dotted decimal an octet that were just referring to the 8 bits behind it so half of an octet is a nibble I think this actual spelling is like nyb ble or something cute like that and so when I teach I often put a little teeny space between the first nibble and the second nibble in the octet just for learning purposes and that way it's not just a dyslexia reading competition or like oh what's where so just as a convenience i had a space the routers and the switches and the networking devices are not so kind they're just gonna use dotted decimal or slash notation but I'm out of the space just for making it easier all right so first four bits on plus these two bits so that's this one in this one and then these last two bits are off right here so we can put in our dividing line with I love to do and maybe you will too right there that dividing line says everything to this side is going to be used in the customers IP address for network addressing like a street name and everything to the right is gonna be used for post addressing like a house number on a specific street and then going back to our block size game you take the last bit so you go start you know on the far left going this way stopping right here at the very last bit that's on and you basically circle the value of that so we're gonna block and by drawing a block it might help you remember that that's the block size so in this case what is the block size if a customer has this mask of slash 14 which equates to 255 dot and that would be to 5200 my question is what would the block size be for that mask go ahead and type that in but would the block size be I'm experimenting with a lot of different things by the way including higher res for these live streams which is what's happening with this was my first one at 1920 by 1080 so hopefully it's enjoyable to watch and I'll be tuning years ago all right I'm gonna Wow ever saying four four four four four you're so right knocked it BAM out of the park the block size is four so my objectives for you and I in this session and in this stream was to make sure that we understand first of all what is the block size so let's just make sure we're clear on that together the block size is the value of the last bit that's on in the mask that's what it is how do you find it you can put that part of the mask in binary line it up against the power the one two four eight and just block it off that last bit that's on just put a square around that value and that's it and you've done it in these three examples so these three examples included 24-bit mask and clear that off they included a 24-bit mask where the block size was one they included this 255 255 to 24 which is 16 which is a 19 bit mask and the block size there was 32 based on the value of that last but that was on and now here in the 14 based on the last bit that was on in the mask the block size you're telling me is a block size of 14 of excuse me and make sure you have 14 right of form they backed up as in the wrong bit position bunk blowing easy to do a block size of 4 ok great so we've accomplished a couple goals number one we understand what a block size is it's the value of the last bit that's on fantastic - we've identified how to calculate it and not just calculate it but also you know based on a nice clean octet boundary like at 255 great or a to 24 which is not on the clean boundary because we're splitting some bits in that third octet or if it's giving us giving it to us insider notation sometimes us referred to as cidr classless inter-domain routing but so if you see a slash 14 it just means 14 contiguous bits in the mask and we have identified it how to do it there as well so great I'm confident that if you've been with me through subnet Sunday's so far decimal to binary binary to decimal the purpose of the mask all those good things and now we've identified the how to calculate the block size I would like to share with you why this block size thing rocks and how it's gonna save you a boatload of time let's do that right now all right so ya go to my notes here let's take an IP address like this one 10.0.0.0 zero zero slash twenty nine and let's say that a customer had an IP address and the IP address was 10.0.0.0 [Music] one of the benefits of the block size is you can calculate very easily what the network ranges are like for example if if we were doing custom subnetting and we'll get into the details of all that but if you're doing custom subnetting it'd be important to know okay here's my first network like my first street and what is my next street and the next street after that so the benefit let's talk about the reason for custom sub knitting if we have a ten network like a private network and it has an 8 bit mask we can support millions of possible hosts on the network it doesn't make sense to have just one logical layer 3 network with you know a thousand devices on it there's a he'd be a 1 VLAN 1 broadcast domain every broadcast from every other device did its BC my rails it's a nightmare also for security we may have some groups in our our company that may be one group is used is a engineers we have a group for research and development we have a group for human sources and maybe we want to keep them in their own VLANs and we need separate logical networks for each one of them so the process of subnetting is like taking a huge Street and chopping it up in to sub streets different modulus so maybe we had Elm Street as a huge Street and we said you know what we we don't want to put all the houses all hosts on that one big street called Elm Street let's take that one big Street and let's chop it up into logical smaller streets like Elm Cove and then a different Street difference of Elm way and Elm Avenue and other creative ways of taking one larger network and chopping it up into smaller networks and so that's what that's where this is going by the way after we understand the binary and the what the mass does that's where this journey in the world of subnetting is going is being able to pretty darn quickly by the time we're done being able to take a big network like a big street and chop it up and make logical smaller streets out of it that's exactly the analogy of subnetting and they call it custom subnetting because well if you have a 10 Network and that's the major network and you're chopping it up into smaller networks based on your needs custom so custom subnetting or subnetting or variable length subnet aware some networks are 20 bits and some networks are 21 bits and some networks are 22 bits etc it's all the same game just repeated over and over again so if we have the block size in mind here's how it can help us identify what the actual substrates would be if we're doing subnetting so this is just one value that's submitting that the block size brings the table okay so let's let's first of all calculate what is the block size for this what is the block size for his last twenty nine and let's let's do the math so I know that the first in dotted decimal would be 255 for the mask and this one would be 255 so that's a total of 16 bits we're going 429 the third ox would be 255 so there'd be a total of 20 or so far and then we would need in binary I'm gonna do the last one down here in binary so to get to 29 we need 25 26 27 28 29 and then the last three bits would be off so this is the fourth octet that we're expanding here I'll put a little decoder there so there's the third octet to the left fourth octet to the right and the ass last twenty-nine means this so if we were to do this in dotted decimal it'd be 128 plus 64 plus 32 plus 16 and I'll write these out here one two maybe do a different color and let's use this one two four eight 16 32 64 128 all right so if we were to find out the equivalent the binary to decimal equivalent of this it would be 128 plus 64 plus 32 plus 16 plus 8 plus 4 I'm sorry that bits not on so I'm gonna draw my dividing line I'm also while I'm here gonna go ahead and circle the block size because that's the value of that position for the least significant bit is 8 so I'm gonna say block size equals 8 we'll hang on to that for just a moment but the value of that mass would be 128 plus 64 plus 32 plus 16 plus 8 which I think would be like 248 and we could do that the long way too so yeah it is 248 it's 64 plus 32 64 1 plus 64 plus 32 plus 16 plus 8 is 248 so when we put the an IP address for the client let's say we do 1000 1 or let's tell she do 1000 11 like this so we put the IP address of 1000 11 and we put this mask in 255 255 to d5 248 that's a valid IP address on a network now the question would be how is that block size going to help us in calculating what our subnets are going to be and let me start over here in a different a slightly different color and so just be an intro to the concept but it's just an example of why block size matters so let's say we have 10000 as our major as our networking we have a slash 29 the block size is 8 for this mask and if every agrees with that that's fantastic because that's exactly what it is just like we calculated the block size for this mask and this mask and this mask for a slash point 9 the block size and that fourth octet is an 8 so if we have the network 10 over here check this out all we're gonna do to find out the next network is we're going to add block size what do you mean Keith's add the block size well the block size is 8 and the next network is gonna be 1000 or in that last fourth octet here its last 29 and if we want to find out what the next sub street is like Elm Court and Elm way and our additional sub streets with this mask the next one would be 1000 dot and we would add 8 again which would be 16 and then I'm gonna do one more because we're not doubling it we're simply adding the block size each time the next network would be 1000 dot and 16 plus 8 is 24 now would also have this last 29 bit mask so the cool thing about block size is that once you have a block size identified you can go ahead and start adding that block size value every time you want to identify your next subnet your next subnet your next subnet that's pretty handy I'll take another benefit too and I'll put this in a slightly different color let me go ahead and get and use white do that work let's imagine we have a client like this 10.0.0.0 which of these subnets it's on so sometimes this is called subnet zero and the CPR first subnet 172 703 I don't like calling the first one subnet zero because it's not really the yeah it's the first network and but they call it subnet zero and even if you ever see subnet zero being mentioned like okay subnet they're talking about the first Network when you're doing custom sub knitting so if we have these four different networks my question is I'm gonna label these only take off that I'm gonna do a B C and D because I'll be better network a network B network C network D if we saw this IP address and what I think we should do is let's actually do it 1000 11 with the 29 bit mask let's go to our router interface and actually put it on I wish there was some way we could I don't know make up an IP address for an interface without how to use a physical interface we can create another loopback interface loopback and let's go ahead and call this six seven eight three just for fun so there's our loopback interface it should come up Botha bing bada boom and we'll give the IP address of 1000 11 with that mask of 29 bits which is 255 255 255 dot 2 48 and that is correct all right all right so it's done if you do do show IP interface brief mmm cool there it is in all its glory so loopback six seven eight three has the IP address of 1000 eleven with a twenty nine bit mask and my question is which of these networks right here as I bring that layer break it back up which of these networks is this cut is that I pho son is it on network a or B or C or D and one of the benefits of dating block size and actually identifying these is we have a range look at this this is this is pretty handy and we'll have more practice with this as we continue but if we have the 1000 Network and we know that the next network is dot eight that means that the range for the host addresses in this network a would be like starting with one and we can't go past eight because that's the next network so it'd be like one through seven and the actual last IP address is reserved as a broadcast address and we'll talked about that more later but can you see here that this network 10000 the / 29 bit mask is the next network is dot eight we can't go any higher than dot eight for the range and that same logic continues here so on network be 1000 eight that network the range for that those host would be nine through and the next subnet is sixteen so it would be fifteen as the highest possible IP address and again the last one was reserved as a broadcast and then if you take a look at the sixteen network the first IP address would be seventeen through and the next network is 24 so maybe through 23 so going back to this interface right here to the loopback 673 that we made with the IP address of 1000 eleven with a twenty nine bit mask my question for you right now that I'd love you to chat in is which of these four networks is this client currently connected to what's the street name is it 10000 is it 1000 8 is it 1000 16 is it 1000 up 24 which represent ABCD respectively and that's that's really handy because a lot of times we'll be working with an IP address we'll see a client it'll have an IP address and it's not obvious to the naked eye which Street this customers on but by knowing the block size you can quickly jot out the subnets you take the first network add the block size add the block size out of the block size and then you calculate the ranges based on where the next one starts and you're good to go Wow holy schnikeys there's just a ton of people saying answer be you'd be spot on um and that's one just one of the benefits of the block size is that we can take that block size and calculate the subnets and just say oh here's the range because this one starts here and calculate the ranges and boom so you're telling me based on these four networks that we calculated with the block size based on the mask that this customer this interface 673 is directly connected to network 1000 8 even though it's last octet is 11 I think we should prove it and it's pretty easy to do check this out this is super fun I'm gonna go ahead and hide that for a moment let's go back to our interface and here's what we're gonna do do so IP interface for loopback six seven eight three I just want to confirm the IP address so it's 1000 11 with the 29 bit mask that means the block size is 8 that means each network is gonna be an increment of 8 and we calculate other ranges and that let's do a do show IP route and I'm gonna say connected because the router belief here's the thing about the loop backs the router think so yeah I'm connected to that Network now nobody else knows about that Network except for that local router unless he advertises it inside of a routing protocol like OSPF and then he can share that information with others but by default he's the only guy knows about it so we'll do a show IP route connected to show us just the directly connected routes and what I'm hoping for is that guy 1000 8 is that what we thought hold on a second let me bring that back so answer B 1000 right look at that dad I that's the network it's not just like theory that's literally the network that that client is connected to 1000 8 with a 29 MIT basket Wow block size pretty cool you want to know something else that's pretty cool this is also very very cool I'm gonna race the other work there and start fresh if we know that we have a slash to change the colors if we have a 29 bit mask like we have right here and we already calculated that the block size is the block size of 8 and I'll circle I'll block around that so our block size is 8 if we had to do a wildcard mask for 10 not 0 dot 0 dot H so that's the network with a slash 29 oh this is kind of funky cuz the last octet is 8 also but based on the block size if we want to do a wildcard mask wild card masks well card masks they are block size minus one so that means if we are doing OSPF and we wanted to include this interface in OSPF or that network we could do a network statement of router OSPI output this is a different color router OSPF process ID and then a network statement of that network which is 1000 eight and then for our wildcard mask it be for all the first three octet subi 0.00 but for that last octet in that last octet where the wildcard mask is an 8 minus 1 is 7 so that's another very very quick way of calculating wildcard masks is you can take the in decimal you can take the decimal number subtract the actual mask that's being used that works but it's also taking the wildcard the block and so be subtracting 1 so if we were to do this we could include this interface the and this network loop X 673 into OSPF and I think we had to go ahead and try that to verify it works just one other example of how the block size could be very very helpful so they go ahead and hide that and let's go into router configuration mode I have OSPF already running to show IP ospf into to show IP protocols and it's not giving me a context-sensitive help because I'm in configuration mode oh 10 ok so this network statement right here of 10000 with a wildcard mask of 0 0 2 to 5 255 is already matching on that interface and that's because the the first two octets of our loopback right there they are 10 0 so he's already included but I just want to give you one other example of how the wild card mouse can be calculated very quickly by for that octet just taking the block size minus one so if we did eight show IP ospf interface brief there's loopback six seven eight three who didn't get in there hold on second just show IP interface brief how about how about loopback seven seven seven let's take a look at him show IP interface for a loopback seven seven seven oh yeah nineteen bit mask boo-boo-boo-boo-boo so that's not currently the reason I'm so happy is that that interface is not currently in OSPF because the network statement didn't match but what we can do is as a review we can calculate what we already did on this last nineteen week identify what the block size is and then basically for the wild-card mask for that network just say minus one to bring it in so let's go ahead and do that I have some notes here as well as just to make sure we're gonna get our math straight alright so remind me if you would with a slash nineteen which we did as an earlier exercise what is the block size for a slash nineteen now we'll start there and then we'll do it together so what is the block size for a slash nineteen I'll give you a moment as well so if we were gonna do that longhand we would say well the first octet is eight and then the second octet is eight that's sixteen so we're we're in the third octet that's the second that's the third and so sixteen seventeen eighteen nineteen there's the mask in binary and this is the third octet that goes to fourth octet great and so these values 1 2 4 8 16 32 64 or 128 the block size is 32 okay great awesome so if we wanted to include that in OSPF what we do is take that block size for that and we're in the third octet and simply subtract one so the wildcard mask would be we care about the first octet we care about the second octet and in the third octet we don't we don't we don't care about the lower 1 2 3 4 5 bits and so we take the block size 32 minus 1 would be 31 and then we continue on so our network statement would say something like network and then the network we want to include and then we could use this wildcard mask of 31 as I note this down 31 dot 255 if we wanted to verify the network for that interface loopback 777 we could do that as well so we'll go ahead and do have you get my mouse out here show IP route connected and we're looking for this interface right here okay so here's the network I'm just gonna copy this so so that's the network 1064 1067 64 is the actual network router OSPF 1 Network I'm gonna right-click and paste maybe there we go and then our wildcard mask says we care about the first octet matching we care about the second octet matching and then for that third octet the block size is 32 we'll subtract 1 4 31 so we don't care about the remainder bits there and we don't care about the last octet and then we tuck all of those into area 0 just like that if we do a show IP ospf interface brief now we've just included that Network and its associated that interface and this associated Network into OSPF so we should be able to ping that so this IP address right here 10.67 83 even though it's a loopback interface because we're advertising it in OSPF we should be able to go to a client and let's do a trace out to that address to verify we have full connectivity yeah look at that so pc 4 went to its default gateway 8.4 who forwarded it to r2 who then sent it to dot 1 as the hood we pay nothing Oh ping 1000 11060 780 3.1 who owns that oh and we Arwen owns that address that's our ones external interface where he replied basically that that he received it all right I just want to verify connectivity through the network so let's do a quick spot check and make sure I got all the pieces I wanted to for this subnet Saturday as I got my pin all right here we go what is it what is a block size it is the value of the least significant bit in the mask so wherever that shows that might be somewhere in the first octet or the second octet or the third octet but wherever that shows up that's the value the the least significant bit that's on that is going to be the block size how do you find it you take that octet and you put it in binary you line it up for the powers of two and then you sir put a square around it saying boom this is the bit that's on its value is 32 or its value is 4 or its value is 1 in the case of our first example and then you Circle it and then you can use it in lots of ways you can use it to calculate hey what are my subnets that I could create my smaller streets that I can create you can take the major Network the first one and then in that appropriate octet you just add the block size and add the block size and add the block size and add the block size until you're out of IP address ranges then you're done that's also helpful to then calculate you see an IP address which network does that live in you just basically take one network and then the next one you say well this one starts at dot one and it's gonna end at dot seven because the next one starts at dot eight and that's the range for that IP address so that's helpful in that way it's also helpful in calculating the the wild-card bits so if you need to calculate a wildcard mask for a certain octet if you know the block size is 32 the wild-card mask is gonna be 31 if the block size is 4 the wild-card net mask is gonna be a 3 and that's how you can calculate the wild-card mask for it yeah those are some benefits and why it's useful for those reasons so what we get to do going forward is and I encourage everybody who's participating in and enjoying the stream together is if you haven't been through the entire there's like four or five so far before this in these subnet Saturdays I always strongly encourage you to go through them in order and that way you'll have all the foundation pieces so we can appreciate going forward how to start getting into custom subnetting because okay we can take a street like a big street like the ten network and chop it up into smaller streets but we haven't really talked about how to do that yet or like what should the masks be those are all valid questions spot on that we are going to answer and solve as we get into how to determine what the appropriate masks should be I've got some great techniques coming up regarding fingers that you can use without having to get into the binary to calculate what the proper masks should be and it's a lot of fun so once you I stick with me in this journey through the world of subnetting because it's a very useful skill I probably use subnetting to some element almost every time I teach anything regarding IP like if I want to create loop backs or if I want to configure something on a device a router check this out a router doesn't appreciate having two interfaces in the same network in fact it won't like to do it so if we go to r1 and we go to just go into configuration mode interface this go to interface loopback 99 so just another virtual interface nope doesn't cost anything and doesn't really have access to anything and nobody else knows about it unless you advertise it in a routing protocol so here's loopback 99 will do IP address 10.0.0.0 how about 12 with a 255 dot 255 dot - 48 and it says there's not enough octet here oh hold on 255 dot there we go and this thing hey you can't do that because it overlaps with another interface and that's basically the router saying I want one network per interface and what you're saying here is do you have two interfaces connected to the same street and it does that very quickly but for us because earlier we calculated these subnets the 1000 subnet with a block size of 8 because of the mask and then the next subnet was 1000 8 and then 1000 16 so this address that we just tried to put on there is in the same network the same 1000 8 Network as the other interface if we used a different IP address like say something higher than the next up that's 16 so if we use the 17 here how come in like that it likes that because hey this is a different network this is the 1000 16 network that it just added an IP address to so that's another way to verify that you've got unique subnets and so now if we did a do show IP route connected it would show us that it believes it's directly connected to the 1000 8 Network and is directly connected to the 1000 16 Network and the block size is very very handy in calculating what those networks are so as we continue that skill of identifying the block size is gonna be very very important and I have some homework I'd like to do what I have assign you and then after the homework I will do some music to close out the live stream but if you'd like stick around and I'd be happy to stick around for 15 or 20 minutes and take your live questions now these the that part will be pruned off of the actual video that's recorded and stored up on YouTube but I want to do it for you because you're here and I appreciate it all right so what was like going to do something really cool I totally forgot what I was gonna do I got excited about this chat afterwards because what was I about to demonstrate or do I think it was gonna be valuable I think it's good enough to wait for just a moment and if you could remind me what that was gosh yeah I'll take any as he is doing oh we have our routes gosh I bet just thing really great and I can till you forgot what it was all right okay well whatever it was I'm sure it was gonna be freaking amazing but we'll save it for another time probably right after the live shot oh is this I want to show them or I'll listen back to it I'll remember okay so our objectives that we've covered in this video are let me go ahead and go right here the objectives that we covered in this video we're what is the block size how to calculate what it is and then they give you two or three options of how we'll use it in the future going forward so stick around for QA I appreciate everybody being here also if you have other questions because when I trim the videos the actual stream of QA that's happening live doesn't get kept or doesn't persist so if you have a question you'd like me to answer or address please feel free to add to the comments for an existing video including this one once it gets posted and that way I spend a couple hours a week going through there and making sure I answer all those questions or at least look at all those questions and answer the ones that I can alright so thanks everybody and I'll see you the next dream the extreme is on QoS so I look forward to seeing you for that and have a great great rest your day thanks everybody [Music] don't get out what you put all in the
Info
Channel: Keith Barker
Views: 12,464
Rating: 4.9896908 out of 5
Keywords: ipv4, ipv4 addressing and subnetting, ipv4 subnetting, binary, subnetting, networking, cisco 200-301 ccna, cisco 200-301, cisco 200-301 training, ccna, ccna training, cisco, cisco ccna, ccna 200-301, block size in subnetting, block size networking, block size, tutorial, subnet mask
Id: c_D1VaktOxI
Channel Id: undefined
Length: 70min 8sec (4208 seconds)
Published: Sat Feb 08 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.