Lecture - Variable Length Subnet Mask

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so now we've been talking about class lists addressing techniques and we started off with a class full addressing technique and then we moved into fixed-width and today in lab would like to talk about something called vlsm and i said when we first started doing this we're going to be going from the most wasteful to the most efficient technique so in the handout that I passed out to you guys I have this little logical topology of a router being connected to another router flips should I get this correct I'm not sure if I like that marker so I have this router connected to another router using a serial connection we usually call this a point-to-point connection and then this connects to another router and then we connect these back together for like a little redundancy I believe off of this router is a private network of 60 hosts all right and then off of this network over here I have a believe 20 host and then over here I have 14 hosts if I remember correctly is that correct so this is ad apology that we're working with alright so how many networks do you guys see in this topology 6e I have three local area networks then I have three wins is that correct initially if I was giving it a network address of one ninety two dot one sixty eight dot one dot 0/24 is that what I have written down on that that was my original block if we started this out in the very first week learning about addressing and the first thing we discovered was classful addressing what address would I give what network address would I give this group of hosts these groups of hosts by using classful and I was giving this first of all if it was classful I would ignore this correct because you don't have a subnet mask or prefix when it comes to classical environment so if I were to assign a network address to a group of the a group of hosts like this group right here what address would I use if I want to use a Class C private one ninety two dot one sixty eight dot something dot something let's make this 12.1.0 so this will become one ninety two dot one sixty eight dot one dot zero well would I make this network address if I use if I was using classful dot 2.0 what would I make this network and what would I make this network notice I'm only changing the third off cap because according to the classful environment this is a Class C in class three consists of the first three octets for the network part correct and all I have to do is change one of those three octets to alter the network address so that I can come up here and make this 1.5 and then make this 1.6 how many total addresses would I be wasting if I use classful for this topology let's just focus on just the wide area networks how many total addresses do I need per each wide area network how many holes are in a wide area in a point-to-point or in a serial connection for total because I need a broadcast and network address plus I need an address to identify this side of the router and I need an address to identify this routers interface correct so there's four therefore therefore there but how many address am i assigning them when I use a class full address and I use a Class C address 256 total right so I'm wasting 252 per each of these wide area networks that I can no longer use again really really inefficient so what do we do to help minimize this wastefulness so I'm getting rid of classful and what was the next addressing technique we learned to get to become less wasteful to become a little bit more efficient what was that addressing technique called classless fixed-width right we used fixed with subnetting and how did we determine that now folks on the exam I might give you a diagram like this it's going to be the last question on the exam it's usually worth 40 points and I'll ask you three separate sections using the same topology how would you address each of these networks using classful addressing we just got them doing that then I'll ask you how would you address each of those networks using fixed-width techniques and then the last one the one that we're going to be learning today is I will ask you how are we going to address this using vlsm clear about that so we try to do with fixed width what did we do now remember the analogy is a sports car in the minivan right and I think I used you as an example of this what must we do to accommodate classless environments what network did I look at first we're getting away from that structured you know I need X number of subnets I need X number usable host and I'm given this information we're clear about that now I'm giving you a diagram this is what's going to happen in the world world you're going to come into an environment and you're going to ask them well how many networks were working with we'll have one for each floor and there's three floors okay you go to each floor what are you going to start doing you're going to count off and your book one two three four first for s60 host you're going to go to the next floor and you're going to say one two three four and you're going to come up to twenty host you're going to go to last floor you're going to count off you're going to come out fourteen host you're counting the number of end devices for each of those networks correct but what do I need to add to each of these numbers to be a little bit more accurate when I'm dividing up these networks and the subnets you need to add 2 to each of these correct because I need to make sure that each of those floors have a network address and a broadcast address now I have 16 total host addresses tha for short we do the same thing with this network add 2 I'm going to get 62 I'm going to add 2 to this one I'm going to have 22 and of course I could add 2 to these but then I just know what these are for total host addresses makes sense I got that out of the way so I converted my useable host range to total host ranges what's the next thing I'm going to do with fixed-width subnetting you didn't have to deal with this when it comes to your homework or to the other problems that I have because I told you up top you have X number usable host correct and we were to make one assumption which was what what did that number indicate the widest Network correct you always work with the widest to set the tone here my widest is 62 posts total I'll put total up there but more importantly it's 62 host not 62 subnets what octet in this particular case is representing the host portion now how do you know the fourth octet is representing the host portion yeah I want to get rid of that notation now if you don't see this like in the math problems that were given to you guys then you had to make the assumption that it's a Class C on the last problem on your homework you do see this in fact it's a slash 17 right you do not assume classful then this is telling you at the very first 24 bits represent what of the IP address the network 1 2 3 3 octets that so happened to correlate with a Class C but it was just coincidental on your homework you guys are going to draw 17 spaces out and then draw your line after 17 those 17 are going to be your network bits then you're going to go from the right to the left because the problem states in the homework you need like a thousand hosts or something to the effect or eleven thousand eleven hundred host I can't remember its problem number seventeen it's very very last problem so it's not problem sometimes whatever library last problem for your homework you need to make sure that you guys again and what this is being used for this last twenty four is telling me that the first 24 bits are for the network and the last bits one two three four five six seven eight are going to be my host bits what am i given I'm given host for my problem since I'm giving host I have to ask myself two raised to what power number of host bits is going to be able to accommodate sixty-two addresses see where I got that notice I put my units up here host bits how many bits am i going to need to leave behind because remember you steal or you borrow four subnets you leave bits behind for your hosts how many of these bits am I going to leave behind to accommodate 62 hosts six bits to raise the six host bits gives me 64 hosts which is going to be enough to accommodate that 62 total what do I do with those six bits I go from the right and work my way to the left 1 2 3 4 5 6 draw the line to the left of that what is that line signifying you can think of the Berlin Wall east and west you got it it's going to illustrate to the left of it is the network and to the right of it is the host all right next thing how many bits do I have that I can borrow to create my subnets if I leave six bits behind for my hosts because I know this to be eight minutes total I - my six host bits you know I always had a problem with math class because they always dropped units off of problems until I went to a physics class that I actually really appreciate math because of the units units really help solve formulas keep a keep tension to this if I have 8 total bits and I remove 6 host bits from it how many bits are going to be left over and what do those bits represent I'm going to have two 8 minus 6 is 2 but what are those bits remember or you can say Network bits either work for me but remember we have a / 24 so I'd have to add 2 to give me a total Network bits does that make sense I have two subnet bits those are bits not subnets how many total subnets can I handle to raise to to subnet bits right so anytime you have something in bits and you want to find out a number just take that and make it the power of two what am I going to get if I have four what subnets I want to see units I will dock half points off when it comes to your exam identify them and I'm only doing it to help you out I mean honestly I know what they are but I need to know that you guys know what they are and by knowing what they are you help sort of identify and organize your work so you're not like what are these bits again mark them out is that enough bits to work with what we have here how many networks did you guys say I had earlier six how many networks can i address if I make each of my networks 64 light only four so what do I do do I say okay half of you guys are moving down to a land now just so I can keep this Network block that I have because I'm too cheap and buying another larger address block why do we take a host and group them together what are the three reasons that we learned in Chapter five location purpose security ownership maybe I don't want this network to be accessed from the internet maybe these are all my servers why would I want to take my servers and move them to another network that has access to the Internet would I not be violating the security rules so I can't just simply say well if I run out of space in this classroom the rest of you guys go to the other classroom because that's what I'd be doing this does not work this fails we are becoming wasteful all I needed was for total host addresses but what I decided to do is make everyone in my network equal size a fixed width of 64 total host now I'm wasting 60 which granted it's better than wasting 250 - originally correct when they did classful but I'm still falling short of handling all six networks well then what you guys might say is Nick borrow another bit move the line over so I move the line over now I borrow three bits to raise the three gives me 8 subnets is that more than enough to handle my 6 my 6 networks okay but what's the drawback I can handle all these other networks because I have 32 now for my host size but I can't handle this one do I only have half of the servers running at one time than the other that I'll commentate for the 62 so every other hour I'm turning off servers with an odd hour you have access to the odd servers if it's an even hour you have an access would you imagine want to have that job we have to flip on servers each time now that would be ridiculous so what are we going to do we're going to use another technique called DL SM these stands for variable what do you think we're going to vary the L stands for length yes them the M stands for subnet mask so what do you guys think we're going to vary here to accommodate our problem got it and still weird vlsm wasn't a trick question I might put that on the exam make it an extra credit quite no make it a one-point question how do we do this well just like before we're going to find our largest host but we can't stop there the largest host cannot be the cookie cutter for every one of our subnets right we need to vary the size of this cookie cutter so we can fit more cookies in our little pan or sheet makes sense right the fixed cookie cutter here use your imagination if not go home and ask mom make some cookies all right here we go this is my largest correct I'm going to write this out 60 host actually I'm going to write host up above this because all the next numbers I'm going to write is going to follow suit and let me scoot this over so let me write host here let me put 60 here what's the next largest network 20 what's the next largest network and the next largest network what's that well let's put this back to two right because I went back to usable so we have to what's the next largest network and the next largest network and the next largest network there's no more networks right we have one two three four five six right these networks are going to become subnets why they going to become subnets because I have one single address block and I'm going to divide that address block up into six subnets is that okay that's the only thing that makes a network and a subnet different is typically a network has in a whole tyre address block a subnet is part of that entire network block you're good about that and why do we do that so all I have to do is buy one address and I can reclaim it if I was an ISP I would want to try to buy I want to try spending less money on an address block and all four more IP addresses to my clients correct so I want to give them one IP address but each of my clients need to be on their own their own network for security reasons and for management purposes I mean I'm going to charge per address I want to try to charge as many address as I possibly can so I'm going to put each of them on their own network so I'm going to try to create as many subnets as I possibly can with few hosts per each subnet this is typically why you guys get one public IP address from your ISP provider because they're subnetting that block so they can sell more addresses more spaces within that one block okay now that I have that what am I going to do with these numbers oh by the way since I moved rest in these our subnets is it okay call this subnet zero so this would be some net what and then this would be then three and four and then five right what am I going to do with these numbers I'm just going to put in parentheses there total host length so I'm just going to add to these so this is going to be 62 and this one's going to be what 22 and this will be so we have 16 for the subnet 2 and then these will be 4 if we're using Ethernet for a point-to-point networks then we'll always have four total host addresses so in parentheses they're just my total addresses because remember the two rays - what form is going to be able to accommodate that so how do I accommodate this to raise to how many bits is going to give me 62 total host addresses room 466 which equals what so if you guys look at your handout that I gave you I believe I did this work for you that makes sense what am I going to do for the next one - raise - what and this is where things start to vary now you notice it's just a repetitive loop before I just attacked the largest one is that okay life is easy do this one time set it for everybody else remember all my other networks had the same subnet mask after I did that but now I'm asking that same question again how many bits do I need to leave behind to accommodate 22 total host addresses 5 which gives me 32 and how many bits am I going to need to leave behind to accommodate 16 do you see why it's really nice to make it from largest to smallest because now look at my bits I'm decreasing them if you have to increase it you screw it up you need to make sure that you start with your largest and you work your way down to the smallest it makes it real simple so what am I gonna do for the next one two raised to what power is going to be able to accommodate for total host addresses to raise the two and that produces four you see how I have zero waste for subnet two three four five is it safe to assume that four and five are going to be to raise to two this is safe to say that four and five and three will have the same subnet mask all right if these bits are my host bits then what is going to be my network prefix let's look at the very first Network right this is the address that they gave me is it okay if I start here with that address is it okay if I use this address as my first Network address to address subnet zero got to start somewhere why not at the beginning so why don't I just put some NetZero right here what's wrong though if I were to put this in here with this last 24 what would happen I'm using all 256 addresses for the subnet correct do I need all 256 addresses how many bits that I need to leave behind for my host I need to leave six bits behind so let me put this in your Dodge - one two three four five six host bits so what are these bits in fact what's in front of these how many dashes are in front of this this is the fourth octet right folks I'm only focusing in the fourth octet because originally I was given a slash 24 so how many ones do I have in front of that if I'm looking at the network address 24 once and how many bits did I steal because all I needed to leave behind was 6 so I needed to assume that I borrowed those 2 correct so this becomes a slash 26 where did I come up to 26 it was the original 24 ones plus the two that I stole from the host portion that makes sense this becomes the network address for subnet zero what's the very first usable address for the subnet this is the network address remember the network address is the first address for each address block correct so what's the first usable address by definition a network address is when you have all zeros in the host portion this is subnet zero so I put two zeros here to represent zero correct the other thing is saying is that my network address is dot zero what does zero look like in binary all zeros in the last octet the first usable address is when you have a one and the least most significant bit the farthest right bit correct convert all eight of these binary numbers back in a decimal what would you get one so the very first useable address is going to be one ninety two dot one sixty eight dot one dot one clear about that what is the subnet mask going to be for this because remember this is what's going to be varying now we can't just lick and stick this add your this subnet mask to all of my other subnets so what is the first sorry what is the sum that mass going to be well the subnet mask has all ones let me do that in green so we don't get these binary digits all mixed up and then it's going to have what in the host part in fact this is how we know this is the host part because the computer doesn't see a line like that all zeros in the host part I need to convert those binary bits back into what decimal originally I was given 20 for one so I have a 255 dot 255 dot 255 dot what I have a one in the 128 and I have a one in the 64 128 plus 64 is 192 and that would be the subnet mask I will use to assign each and every host and this interface of this router okay let's look at subnet one what is my network address going to be for subnet 1 so I have a 192 dot 168 not going to touch that one I can't touch that one I bought a slash 24 that means I have to leave that one alone I don't own it the only thing I own is the fourth octet because I bought a slash 24 address good about that that's what I own that's what I can mess around with what was the range for subnet zero one will subnet zero reach its end when there's all ones in the host what's the other word for all ones was the other network terminology that we've learned that when you have all ones in the host part it's going to represent this address what is this address the broadcast so if the network address is the first address the broadcast is the last address so when I have 0 here in a 128 of 0 here in the 64 but all ones afterwards isn't it the same as saying what's the number right before 64 so 63 is the last number that belongs to subnet 0 hence the next number is which becomes my network address for subnet one do you notice where 64 is on this scheme of things where does the 64 what does 64 look like in binary it's the first bit after the line I originally drew you see that one is now in the network side of the address and the network address contains however does subnet one neat all of these bits subnet one is right up here so I'm net one needs only 22 total host addresses make sense so how many bits must I leave behind to accommodate I need to leave five behind one two three four five so that means this line gets moved over to here what happens to that green zero that's on the wrong side of the fence gets infected and it becomes another animal right that bit is now used to represent the network see what just happened since I change this what will my subnet mask be for subnet 1 and it's the v4 vlsm what is the new cell I'll do the hard part for you guys 255 dot 255 dot 255 you guys do the easy part 224 because I have a 1 in the 128 a 1 in the once until I 1 in the 64 it gives me 192 plus a 1 into 32 which gives me 224 what's the prefix if I decide to use that 27 because I have 24 ones in the first second third octet then I have 3 additional ones here in the fourth octet you guys see why I like the network prefix it's so much easier than dealing with the subnet mask but we have to configure our end devices with subnet masks I really wish we can just start configuring with a / 27 fact I really wish we can update Windows 7 so well there's a prefix and you can either put the slash 27 or whatever it is or the subnet mask and it should be able to calculate one or the other for you right when you're configuring 6070 thousand host or whatever it is you'd appreciate that shorthand all right on with the show what's the next subnet we're working with with the network address for subnet 2 answer that question look at it in binary what is the last usable address and binary I'm sorry what's the last address in binary for this network it's when you always get all once it's the broadcast address in fact I'll ask you what is the broadcast address well the broadcast address for this network is going to be hmm if I add these two together 64 and 32 gives me 96 right so the broadcast address is going to be 95 one just been simple say NIC let's not deal with the last address of the network the current network but just change the bits that you need to change correct if I want to know what the next network address is just change the network bits seems to make sense after all what is the number before this binary pattern 1 0 1 1 1 1 1 1 which translates to be one ninety two dot one sixty eight dot one dot originally been 95 because I'd be the broadcast but now I want the network address for subnet two so it becomes 96 right I can't give myself the prefix or the subnet mask until I ask that same question over again does subnet 2 need all five bits and the host to accommodate their host subnet two needs only sixteen addresses correct how many bits do I need to leave behind to accommodate sixteen addresses one two three four draw the line what happens to this traitor found himself in the wrong side of the fence okay what's the new subnet mask going to be for subnet 2 like before I'll do the hard one for you guys very gracious and generous teacher you guys remember that okay I had to write down those three 255 that comes a work out from my hand all you have to do is give me one number you notice we've been adding the previous subnets with the gift from here to there this subnet was 64 so I just added the width to get from here there the subnet size is 32 did I not just add the width what do you think the next subnet address without even looking at in binary is going to be by the way this shortcut only works when you're not crossing octet so what's subnet threes network address is going to be without even looking at the binary I encourage you guys look at the binary in fact on the exam you have to look at the binary one ninety two dot one sixty eight dot one dot 112 because we took the size of this network which was 16 and add it to the network address which gave me 112 it looks like this in binary all right I asked myself that same question again the subnet three let's make this one subnet three and we'll make this one subnet for we'll make this one in here subnet five we good about that does it really matter which one I use for these wins they're all just size four does subnet three need all 16 addresses all right so what I move the line over one and say okay we're good no remember we asked yourself how many host bits need to be left behind to accommodate the number of hosts for subnet three seven that three needs for total hosts right so that means I need to leave two bits behind now do you notice the line jump twice so what happens to these two traitors could you imagine what that was like when they put that wall up in Berlin they just arbitrarily laid a wall down there and said okay if you're the left of this wall your Soviet and you do the right of it you're a good friendly person you just happen to buy your house in the wrong side of the street it's not what's happening here this arbitrarily drawing the line as I move one as I move it over I just say if you're left to line your all Network bits and if you're the right align your own post bits what is the very end from this subnet mask for way in going to be for your serials if your stay in the networking program you guys will be putting this in and all the time for your point-to-point serials so it's 255 and doing the hard part for you dot 255 dot 255 dot what 2:52 I look at this is 2 and a 1 that's a 3 total address range is 255 255 minus 3 gives me 252 and that's going to be the same subnet mask for subnet three four and five because they all have the same width of four total host addresses make sense the question is what is the subnet address going to be the network address for subnet four and for subnet five so I'll do the hard part this is one ninety two dot one sixty eight dot one dot you guys tell me what it's going to be once the K dot one dot so for number something that four is going to be for away remember these addresses represent the beginning of my networks what's the prefix for subnet 2 twenty-eight all I needed was for what's the prefix for subnet three and it's going to be the same thing for the other ones some people love the math this is the math that's that's the formulas in action to create the chart you're given a logical topology and you're asking to calculate and map everything out network administrators have to journalize or document this stuff because when they rearrange these networks which they will I mean look at the biggest problem I have right now did I account for future growth for our first subnet I can handle 62 total addresses for subnet zero and out of those 62 total I'm already using 60 I mean I can buy two more devices and I'm filled up what do I do when I fill up and I use all of them can I go to the next one can I use one ninety two dot one sixty eight dot one dot 64 why not it's a different network it's a different network address in fact I can't use it for two reasons one it's a network address that's being used to represent another subnet so what do I have to do what's that change everything gosh I'd hate to go back to this whole system just to read I'm giving you my experience I've had to have I have had to do that many times over whether I made a mistake or somebody else has made a mistake but just a little heads up don't pack them in so tight did I use all my addresses for the fourth octet I ended up at 124 correct I have another subnet of with four that I can use so my next true block is going to be a 128 which is exactly what half of the total addresses used in this subnet originally when I use classful I was giving all the addresses all 256 to one network then I have to go buy five more classful addresses then I went to class list and I said this can be done it can be done in class list because I didn't have enough subnet bits to accommodate everybody correct then I went the class list using vlsm and I was like wow I optimize this quite a bit that I actually have extra maybe I can lease these numbers out to somebody else that needs them and make some money on the side it's like buying a house it's only you you have a bathroom kitchen and five bedrooms and you only sleep in one bedroom at a time so what do you do with the other four run them out make money here then pay for your mortgage what else could you do you can make your bedroom bigger knock out the wall it divides your bedroom in the other bedroom correct what if somebody's already in there you already gave that space up now I got to destroy the hallway and go across the hallway to get to the other bedroom so use some sense when you're planning these address blocks out so I'd like to do is I like to show students visually what this looks like because some people love the math other people learn things using geometry okay shapes so let's do that all right so graphically I have a block of addresses I go from 0 to 255 correct with vlsm I always start with the widest entry the widest entry was subnet zero of 60 host addresses I asked myself how many bits must I leave behind to accommodate 64 you guys told me leave six bits behind which allowed me to bits for my subnet two bits to raise the two gives me four subnets I divide this block up equally and two four blocks correct this goes up to 64 128 192 we good with that I went from zero to 64 for my very first subnet and that's something that's going to use that whole range from 0 to 63 correct because 64 marks the next subnet we're clear about that I ask myself the subnet one neat all 64 addresses and the answer to that is something that one only needed 32 so what did I do I divided it up into two subnets this becomes subnet one and this is 1.0 and this is 1.1 remember the binary we had that one where we're supposed to belong to but then I move the line over one and when I move that line over one I was going to have a zero and I was going to have a one correct so I play subnet one right here what do you think I'm going to do next so I'm not zeros already taken care of right it's something that one taken care of yes go to subnet 2 and ask the same question does subnet two neat all how many addresses are now in these blocks if I split this box in half which I think I did actually I did split it in half how many addresses are in here 32 what's half of 64 right so how many addresses are in this block now 32 does subnet two neat all 32 addresses know how many addresses does something that too neat so guess what I get to do with this box right changing the width so what is the worth going to be for the subnet so this is going to be my new subnet subnet number two and it's going to be 16 host correct now I ask myself a subnet 3 does subnet 3 need does something that three neat all 16 I'm sorry all 16 addresses how many addresses make up subnet 3 4 what should I do with that block if I need four addresses sorry if I need only four addresses and not now I'm at sixteen should I divide it into two give me two 8 subnets divided by 4 correct because 16 divided by 4 gives me 4 addresses so this is where things get nasty let's just say each of those lines represent a subnet we good about that and that's about as low as I can divide a network because the network needs two devices and another network address in a broadcast address so this becomes subnet three four and five and then I have an additional subnet I could use later for another way and if I wanted to correct so this could be six if I had to do you see these two blocks were never used maybe another way of doing this is saying let's move this range down here and leave this subnet room to grow do you guys see it visually now which way do you guys like the math or the geometry this is beautiful when you're only dealing with one octet that is universal and it's very flexible when you're going across multiple octet okay which one do I expect you guys to know the hard one why did I show you this one just so that you guys can relate to what's going on all right what are you going to do now you guys are going to open up packet tracer you're going to take that Network the hand that I basically passed out to you guys and you are going to create this listen up you're going to modify it slightly for every one of my lands you are going to add a switch and you're only going to add two end devices you should be grateful because I'm not having you add 60 hosts for the one land 20 for the other and 14 all I want per each local area network is to host addresses is that okay after you add two host addresses for each of those so you're going to come up to a switch the other thing I need to make you guys know is that the DC ease you want to write this down on your handout a DC ease are going to be plugged are going to be used serial zero slash zero slash zero of your router will become the DC e of the network that means if I look at the wind between subnet zero and subnet one I'm going to connect my serial cable to subnet zero outers serial zero slash zero slash zero now I'm going to plug the other end of the serial cable to 0 slash 0 / 1 of subnet ones router so all right in order for you guys to have a serial cable on your router you must turn off the router and add the W to T card to the router okay so after you drop your router in there turn it off upgrade it to a new serial connection and go from there configure them accordingly remember the way in between subnet 1 and subnet 2 is going to be subnet 3 look over at the diagram I've written down the wind between subnet 2 and subnet 0 is going to be subnet 4 and the wind between subnet 0 and some that one is going to be subnet 5 use the appropriate addresses and the appropriate subnet masks they're written on the board over there at the end of class we'll get together you shouldn't have end-to-end delivery all I'm looking for is if you guys have communications sorry configurations that's it we're not going to add static routes we'll do that next time
Info
Channel: Nicholas Andre
Views: 69,226
Rating: undefined out of 5
Keywords:
Id: IiVpVt5pzsA
Channel Id: undefined
Length: 49min 53sec (2993 seconds)
Published: Wed Oct 24 2012
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.