OSPF Wildcard Masks | Cisco CCNA 200-301

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
a router and here's a router beautiful router we'll call this guy router one and so router one has several interfaces he's got one there and one there and one there and one there and we'll say these are for the purposes of Education will make these loopback interfaces so we don't have to actually be physically connecting but we can have these loopback interfaces and let's have this be loopback zero and loopback one and loop back to and loopback three so and the process of loopback interface is just think of them as a logical interface you can assign an IP address to them they don't move a whole lot of traffic because they're not physical interfaces but they they can be used as far as IP addresses and that's going to help us out as we take a look at OSP F and there are wild card statements that were used with the network statements for OSPF so on these interfaces let's use the following let's use the IP address of 10.16 0.1 with a 24-bit mask so a 24-bit mask means that there's 24 bits from this IP address going from left to right that are being used that represent the network so we have eight bits here eight bits here eight bits here and the 24 simply says the first 24 bits 8 times 3 is 24 are going to be the network and that leaves this last number as the host and we talk more about that the in the subnet Saturdays so this is a 10 1601 10 16 0 Network and let's see up here we have the the 11 . 14.3 dot 5 address actually i'm gonna make the last octet 1 to make it 72 dot 16 dot and let's go ahead and use a 64 dot 1 and let's use a slash 28 here okay for our 28 bit mask then over here we'll do 191 or jelly's down so that as we're configuring the network masks are the wild card statements to include these networks I can get them all in so I'm gonna go ahead and put it up and I'm gonna jump down real quick 10:16 dot 0 dot 1/24 is luk bek 0 and loop 1 is Tim actually it's 11 you know I'm gonna change that cuz I can let's use a private RFC 1918 address why not all right so that's 10.14 dot 3.1 with the 24 bit mask and that's loopback one and then we have loopback 2 which is 172 dot 1660 for that one and if you have opportunity where you're out right now to jot these down as well it'll help because if you haven't jotted down and then as I'm in the interface we're going back and forth with network statements you can be very clear with where stuff is and with Damascus 28 is the mask for that and then loop three is one ninety two dot one sixty eight dot one dot two to five with a twenty nine bit mask all right okay so I've got him hope you got them and let's go ahead let me take a label this layer so I can find it again I'm gonna call this interfaces and let me actually hide that layer for a moment and we bring up a new one and let's talk about let's talk about how OSPF network statements operate so my gonna hide that bring up a new layer and alright so to configure OSPF the basics of it with OSPF there are a few things that we need to know to make it work and one of those things is we need to have a process ID so the process ID is simply a number between 1 and i forget whatever height the high ranges but it's basically thinking of like an application you know if you have like a cell phone and we're gonna run an app if you have one app running no problem if you have two apps running it needs to keep them separate well in some instances not very often especially not these certainly associate levels and not even too much to the professional level but at the expert level you might have to run two or three separate instances of OSPF on a router and if you do so you have to have a separate instance number for each one of them so love lines people use number one like router OSPF one process ID one and boom it's running in away they go so if you have to ever ever ever after on two or three or four that's why they have a process number you can identify so you can have more than just one it's like writing the same app twice two instances of OSPF if you need it so we need a process ID and for our plan let's use a process ID of one and then also with OSPF there's the thing called a router ID now the router ID if there's three ways you can set it or have it set you can actually specify it SPE C ify SS Phi it what the round write D command and it's simple router ID in OSPF router configuration mode you say here is what I want you to be in boom that takes effect immediately and that's the router ID for that router so if we have five or six routers the router IDs all have to be unique we're gonna have problems if you have two routers in the same segment that want to become neighbors and they have the same router ID that's a problem so the router ID that we're gonna configure on these devices if you you can manually configure it and that's great if you want to you can configure that manually or or if you don't configure it manually it's going to take the highest IP address on a loopback so if we have a loopback interface or or doesn't loopback interfaces and those interfaces are all up assuming they're all up it's going to if it hasn't been specifically configured it's gonna use the highest IP address on any loopback interface as the router ID now what happens if we didn't specify it and we don't have any loop backs that what to do the third choice it chooses the actual highest IP address on a in a I should say a non loopback interface I'm gonna call it a could I say real on a real interface all of that could include a sub interface for inter VLAN routing and so forth but the highest IP address on a real interface and all these of all these are applicable when OSPF is starting so if you and I didn't configure a router ID and then we boot up OSPF at that moment it we turned on that moment it would actually look at the highest IP address on any loop backs and the loop backs it would then take a look at the highest IEP dressed on anything active interface and that would take it word to the wise don't let OSPF pick its own router ID hard-coded and that solves the problem but that is the pecking order and from a CCNA perspective understanding that pecking order is important so let's make a plan and our plan is going to be we are going to specify the router ID and let's go ahead have the router ID if it's router 1 we'll go ahead and use a router idea one dot one dot one dot one and if it's router 2 we do - two - two and that's that we'll go ahead and specify it so that's gonna be the router ID that we're gonna use the other thing we need to do and OSPF is we need to specify to that router it knows it's running LSBF it knows this router ID we need to tell that router which of its interfaces are going to be participating in OSPF let's imagine we have a router with 10 interfaces whoo 10 interfaces so it's got 10 interfaces and maybe we want oh s PF to participate in some of those interfaces but not others so basically think of it like OSPF is running and now based on the which interfaces we choose which interfaces are going to send and receive the LSAs and format Jason sees and and be advertised so his network should be advertised so it's interesting I think I think it's really interesting about how we tell oh s PF which interfaces are going to participate and the way we do it is that yeah there's an interface option but the way we do it in router configuration mode is with network statements and let me show you how that works a network statement simply says to the router dear mister router if you have it's like Go Fish really that's that's a pretty good analogy it's like go fish it's like telling the router you got any threes yeah great that's part of OSPF different router you got any fours Go Fish and then he goes okay so I don't need force I'm not gonna put that in oh s PF so how we're gonna ask the router to do some looking at his cards and based on what his cards have those interfaces may or may not become part of us now what we're gonna ask is we're gonna tell the router hey if you have any interfaces they have IP addresses in these networks or if you have certain IP addresses that begin with this series of numbers then those interfaces become part of OSPF and that's what the network statement does for us and let me show you the network statement so if you have interfaces in let's see here the that 10.16 dot 0 dot 0 slash 24 network go ahead and add those interfaces to OSPF so if you're thinking Keith are you saying that we're going to specify what networks should be in OSPF and then the router looks at its real time looks at its interfaces and says oh I'm connected to that Network where I have an interface that has those three octets for the first three octets and based on that match it's going to go and say well that matches 10.16 dot zero I've gotten a network interface that has that IP address that starts at 10:16 zero because it's a match with the network statement I'm gonna add that interface and make it part of OSPF that's how it works so it's like an indirect process we tell the router which interfaces they are which IP addresses or network spaces that we want in OSPF it looks at its interfaces and when it sees it has a match it adds that interface and whatever networks connected to that interface into OSPF that's that works and we'll do a couple good examples here in fact let's let's do this one first we've got enough to work with with loopback zero which is what this guy loopback zero is ten or it will be when we configure it 10.16 dot zero dot one with a 24-bit mask so here's how we write the network statement in OSPF we'd say network in fact let me put that in a slightly different color to make it more readable so it'll stand out as a configuration command that make it easier for you so we use come in network space and then we're going to specify what we want to have match let's imagine we want these first three octets to go ahead and match so we say network 10.16 dot zero dot and then for the last octet we just leave it as a zero and this is the this is the part where we're gonna introduce the wildcard mask when you think of a wildcard mask think of it doesn't matter meaning wherever the bits are on in the wild-card mask this the router says hey the administrator the guy who configured me he put in this wildcard mask that says I don't care about the last octet I have to do is match on the 10.16 dot zero and for the last octet I don't care what it is it could be a dot two or ten or nine or dot forty it doesn't matter because the wildcard mask those bits say I don't care about it here's what the syntax would look like the wildcard mask I'm gonna put a space this is my symbol for a space that little triangle and say Network 10 1600 and then I care about matching on this first number of the ten I care about matching on the second number the sixteen I care about matching the third number the zero but check this out for that last number the router could have a top ten or two or dot one or ninety doesn't matter we put a 255 there and what that says is I don't care and I'll circle that in red so this 255 of the wildcard mask which equates to this last octet of the IP address that we're putting in here this network statement simply says I don't care about any of those eight bits doesn't matter what they are so the router could be ten sixteen zero ten or twenty or thirty or forty it wouldn't matter what that lasts amber was of the routers interface address because this wild card mass as well as long as you have 10 16 zero that match that interface that has that IP address is going to become part of OSPF now the last piece of the network statement is up in a space here area 0 and with OSPF one of the misconceptions that I mean it took me a while back in the early days when I was first learning less if you have to kind of get the idea this is that with OSPF it's more accurate to say that networks belong to OSPF areas as opposed to routers belong to OSPF areas meaning when we think of OSPF it's better initially to think of each interface and the networks connected to those interfaces belonging to certain OSPF areas so with CCNA it's just area zero which means that there's if you have 10 routers and all the networks are associated with area 0 that means all those routers interfaces and all those networks are going to be sharing LSA is link-state advertisements from the routers and they'll have to learn everybody else's interfaces and how to reach everywhere in that network so if you have a huge network with thousands of routers we wouldn't launch this one area because then means every router would have to learn all the details about every other router in the area and all the routes there's a lot of overhead so in larger networks we start carving it up into multiple areas and the cool is it's like rooms I said having a room with like 300 people or 500 people and we have to memorize everybody's names of everybody in that room we can go ahead and chop that up into five rooms of a hundred people each and you only have to really memorize everybody in your own local room and then you know who's standing by the door and in tho SPF the person that's standing by the door between one area and another area is called the area border router but for CCNA that's above and beyond the scope of that but come see us an encore we'll talk more about that in CCMP level in great detail with multiple areas but I wanted to give you a big picture of how it works so going back to this example what I think we had to do is implement this and then show you that this interface loopback zero if we use this network statement and this wildcard mask that it would become part of our OSPF process so let me go ahead and do that I'm gonna size up my screen real quick to make sure I have the right the right size and almost there hold on one second in fact I'll show you all I do it to you I'll show you well I do it so I meant to say and let me go ahead and log on and there we have router one let me just line this up nice and perfect okay alright so we have router one first thing if you've been with me and all the few live streams which I know many of you have and I'm so grateful or watching this recording one of the first things that I got to do when I get on new device is I want to verify what's there make sure I'm on the right device before I start configuring because the CLI on many devices they look pretty much the same and the difference between switched to in switch 3 could be our PE our P stands for a resume producing event when you bring the whole network down because you configured something on the wrong device I haven't lost the job because of that but I have totally trashed a network at least once because I was on the wrong device many many years ago it only takes once to really learn it so learn from my mistakes make sure on the right device before you configure all right so here we are on router 1 we'll do a show IP interface brief all right hey good start so this router has nothing up which is the default state for a router so let's go ahead and create our loopback interfaces interface loopback 0 actually you know what let's enable OSPF first and then we'll bring in the loopback so let's do that so router OSPF process ID 1 we'll set the router ID to 1.1.1 that one see that right there I love it is it I can't even start because there's no interfaces and the router ID is not set and because there's no interfaces loopback or otherwise I can't select a router ID so this will this will help him and they do show IP protocols and just to make sure it's running all right so OSPF is now running the router ideas 1 1 1 1 and we are on our way so let's add a network statement Network and then we'll put in the network of looking at my notes 10.16 dot 0 dot 0 and now we'll put in the wildcard mask yeah and this is when we put in the wild-card mask we're simply saying do we care about matching on the 10 if so the wildcard bits would be in that position would be a 0 meaning we want to match exactly on the first octet so wherever the wild-card bits are on that's the part we don't care about then we regarding the second number here the 16 if we want to match on that we would put a 0 for the wild-card mask at that point for the second octet and then for the third octet if we want that to match we would simply add another 0 in a period and then for this last octet we if we don't care if we don't care about matching on that last octet this is where we could put in the 255 for the wild-card mask and that simply says you know that last octet of the IP address we don't care what it is just have a party and that way the router says great I get it so it looks at interfaces and it says any interfaces they have that begin with 10 16 0 regardless of the last octet because the wild-card Mouse says we don't care about that but any interfaces they have an IP address that starts with 10.0 dot 60 10.16 dot 0 it'll go ahead and say wow that matches the network statement I'm going to add this interface as part of OSPF into this area and we have to still play the area - and that's the last part of the syntax so we'll put a wildcard mask for the last octet there and then we'll use some context-sensitive help and we need to set the area and for CCNA purposes I'm putting everything in area 0 so boom done now if we do a show IP ospf interface and I'm just adding the do command right there because I'm in configuration mode and I don't want to drop out do the show command then come back in because I just wanted here so check this out show me I'm asking the router we're asking the router show me all the interfaces that currently are participating in OSPF and the router says okay well the network statement said 10.16 dot zero I have no interfaces that begin with 10 16 zero that are up so at the moment I have no interfaces participating in OSPF so let's add one let's add a loopback that'll be participating based on a match so we'll exit out to global configuration mode and let's create interface loopback zero and we'll give it the IP address 10.16 dot zero dot one with a 24-bit mask and boom the moment we do that if we hit the up arrow key a few times and we do a show IP ospf interface and I'm also gonna have the keyword of brief on there it's now showing us that we have as far as interfaces participating in LSBF we have loopback zero here's its IP address it's in area zero it's running as part of OSPF process ID number one and it has some state information because the loopback is not going to be too helpful here but that was just out it now if we did this let's do this let's change the IP address on this loopback interface if we change the IP address - how about 254 which is the last valid IP address on that subnet and we'll learn more about that in subnets subnet Saturdays but we change the IP address and we need to do at a show IP ospf interface let's do a show IP interface brief show IP interface brief so we've got this IP address 10 16 0 up to 54 my question is based on our network statement and we can do a do show IP protocols to get a good to get a good idea that so show IP protocols it's a great command oh my gosh it's a winner because it's gonna show us our dynamic routing protocols also it shows us right here our network staving which I love so based on this Network statement and based on us change this IP address on the loopback 0 to 10 16 0.2 54 my question is is that loopback 0 interface still going to be associated and part of OSPF because we just changed that last octet and here's here's the part I want to have soaked in because the wildcard mask and I'm going to point it out right here infecting to get my pin out [Music] do-do-do-do-do-do-do here we go so because this wildcard mask right there is 255 which means I don't care what's in the last octet the fact that we changed that customer the routers interface IP address from dot one to top to 84 from an OSPF perspective is still gonna match because this first three parts the 1016 0 still matches now who's gonna who is that gonna cause a problem far though well if you have 40 clients or 100 clients in a VLAN and they're all expecting to point to a default gateway that they learn via DHCP that's a problem so it would cause a prom for clients who are expecting a default gateway to be a dot one for example to just change it to duck 254 but the point here is that the router because the last octet is the wildcard mask for the network statement doesn't care still part of it we can verify that with a really cool show command such as do show IP ospf interface bridge just like that so there it is still there now if we wanted to we could also do something like this let's go to router configuration mode and I'm gonna hit the up arrow key a few times and let's do a tan if it's in my history yeah I guess it isn't anymore all right so we'll take it out so the history is only so big so we'll do it no network 10 about 16 not 0.0 with the mask of this area zero all right and this is to a quick check I always it's a really good idea when you make a change just verify like a third party source or a different command that it took that way you're comfortable that okay what I'm when I meant to change it got changed so we should expect now is that no interfaces are participating in OSPF because we have no network statements let's do a do show IP protocols that's great so that shows us for OSPF that it's running it shows the router ID but we've got no network statement fantastic and if you do a show IP ospf interface brief we're gonna have nothing there either all right so let's do a do show IP interface brief so if we another way of doing a network statement would be to say we care about every single bit matching and so what we could say is to the router hey listen here's your Network statement but we want the wildcard mask is all zeros and that way it literally has to match all 32 bits of the network portion in the network statement have to match an interface IP address in order for that interface to become part of OSPF so to do that we're gonna go ahead and do a config or we're in router configuration mode so the network statement for 10 16 0.2 54 and then for the wild-card mask we're gonna say 0 0 0 0 and what that means is that hey everything has to match the wild-card is not giving anything away so the 10 has to match the 16 has to match the 0 has to match the - g4 has to match and if so we say to the router if you've got an interface with that exact IP address we want to add that associated Network that's associated on that interface to OSPF so we would add that to area 0 and do show IP ospf interface brief and there it is so the other thing I that I wish yeah like all you think that I learned late not late but weren't really apparent to me was this even if we use a network statement you know SPF that says match exactly on the 32 bits for an interface IP address it doesn't mean that that 32 bit route because it's not a route becomes part of OSPF it means that network statement says match on an interface that has that IP address the router says yep I got one and then it infers oh and by the way whatever network you're connected to on that interface that matched the network statement that's the network that we want to become part of OSPF so even though we matched on all 32 bits with this network statement we're just gonna get whatever network happens to be connected to that interface in this case it's loopback one so to show to verify that it's a drippy connected networks that's not going to show up as an OSPF but here's the network so this network 10 16 0 with the 24 bit mask is what would be actually added to OSPF so the network statement says where to check the router looks at all--that's interfaces identifies which ones match based on the network statement and then whatever networks are connected to those interfaces are locked in to OSPF in the specified area so let's - let's do another example and let's actually let's crank it up a little bit we can make this more fun another interface that we have let me bring this back let me go ahead and choose layers here another interface that we have is this guy right here loopback 1 1014 3.1 with a 24-bit mask and for this one let's have let's have a little bit of fun and let's do this let's say that we want a network statement that tells the router just to match bring up another layer here let's say we want to match just on this first number so in our network statement we could use something like this Network 10.0.0.0 so wherever you don't care about matching you can just put zeros there we're gonna represent full 32 bits and then for the wildcard mask if we wanted to care about matching just the 10 but not the rest the wildcard mask would say we care about the first octet but we don't care couldn't care less about the second octet or the third octet or the fourth octet like that and that would reprimand zero so these last three 255 s which are 24 contiguous bits would say we don't care about matching on this one or this one or this one just like that also if we chose to do that and we had this interface of 10 16 0 1 and 10 14 3 1 and we were just matching on 10 this one Network statement would match on this guy it match on this guy and as a result it would include both of those interfaces in OSPF with just that one Network statement that said I care about matching just on the 10 so we can verify that and prove that in the lab so let's go back to our lab and here it is all right so I'm gonna take off the network statement we just did I'm put in the I use the up arrow keys and just doing a control ID to the beginning saying no and let's do show IP protocols and I just want to verify we have no network statements and as a result we have currently no interfaces that match and as a result no networks associated with those interfaces so let's add on interface loopback 0 I'm sorry it interface look back one we just did 0 and interface leak back 1 we're gonna have the IP address of 1014 dot 3.1 with a 24 bit mask boom and do show IP interface brief so now we've got two interfaces they both start with 10 and they're different starting with the third second and third octet so let's go back to our router configuration and we'll use a network statement says I want to match on 10 I don't care about the last three octet and then for the wildcard mask that means that we're gonna say 0 for the first octet which means we have two maps on the 10 and then for the last 3 octaves we don't care that's the second octet don't care for the third octet don't care about the fourth octet whatever it is hey doesn't matter we're not comparing that we're not matching that and then we'll say area 0 and what that will do it will say any interfaces that have the 10 in the first octet of your IP addresses you are included your networks that are on those interfaces are included as part of OSPF and we can form a Jason sees and send updates and the LSA is everything else and have a great time and to verify that let's do a couple things we do show IP protocols just a verifier network statement so the first octet we care about the last 3 octet so we don't and let's do a do show IP ospf interface brief but my favorite commands the whole time and look at that we now have loop 0 and loop 1 they're both part of OSPF area 0 because that's what the networks David's where I put it and now these two networks 10 16 0 and 10 14 3 based on the mask are now participating in OSPF and we can form a Jason sees off these respective off these respective interfaces if there were neighbors off those interfaces ok so let's just do a quick check on what we've done so far we've identified when we run OSPF we're gonna have a process ID we identified how the router idea is chosen we also identified how the network statement works with network and then for octet for decimal numbers with three periods separating them identifying what we want to match on and then the wildcard mask confirming that okay here's the part of what you just put in that we want to match on or not match on and with the wildcard mask anywhere there's 255 that means that corresponding octet from the IP address of the network statement doesn't matter and sell the router once we have the Network statement it looks real-time who down at all of those interfaces and says ok which interfaces match based on that Network statement this one does that one does this one does and then it takes those respective interfaces enables them as part of OSPF along with advertising those specific networks that are connected to those interfaces so whether the networks are 24 bit networks or 28 bit networks or 27 bit networks or our 12 bit networks if the network statement matched on those those respective networks on those interfaces become part of OSPF and can be shared and communicated and advertised all right we've got a couple interfaces to go we have interface loopback 2 and 3 let's add those and then we'll add Network statements I'm gonna ask you to help me and identifying what would be the appropriate network statement for this and this is where it gets a little bit more dicey and more fun so let's add the interfaces and then we'll go through the logic of calculating what the network statements should be so for loopback - I'm looking at my notes here loopback - is 172 16 60 4.1 with a 28 bit mask so let's exit out of router configuration mode and go to interface loop back to and give it the IP address of 172 dot 16 dot 64 dot one with a 28 bit mask so I bet you in fact I know and many of you in this live stream and in this listening is recording know how to do a 28 bit mask and for those of you who don't yet I would encourage you just to not sign up but just go ahead and check out the subnet Sundays I made a separate playlist for it it's gonna walk through step by step by the time your by the time the beautiful sky Hey while I reconnect alright so the IP address is 1 to 2 16 64 dot 1 with a 28 bit mask so there's 8 bits callate what the wildcard mask should be exactly for that Network and to do that let me let me bring out this tool is I thought it was their Cologne second oh yeah there is and let's do this [Music] let's let's do this first and then we'll go ahead and do this more tricky one another way of thinking about the wildcard mask is thinking doo doo doo doo doo doo doo okay great so let's imagine that we want we have the the 10 network and a / 8 and we want to match on that so the mask for this network would be 255 and it'd go ahead and put it in blue if we invert this it would be a 0 here and the rest of you 255 s and and that's true by the way so if you simply want to invert a mask for like a / 8 or a / 16 or a / 24 just flip it so if we had a mask of 255 dot 255 0.04 the IP for the network and we wanted a wildcard mask we would go ahead and use something like 0 dot 0 dot 255 dot 255 and if we had a network that was a 24-bit networking the mass was 255 dot 255 dot 255 dot 0 the wildcard mask the inverse of that the flip of that would be 0 dot 0 dot 0 dot 255 so that's one way of very quickly calculating a wildcard mask if you have a network that's on a nice even boundary and you can just put it in the network that you're connected to and putting the appropriate wildcard mask and it simply says great I don't care about basically this wildcard mask is I don't care about that octet this you know are the last octet and this wildcard mask says I don't care what lost to octet which is all the host addresses and this wildcard mask says I don't care care about the last three octet switch are all host addresses so the tricky part comes with a network like this so if we were to build a network statement a wildcard mask let me go ahead and clear this off if we were to build a wildcard mask for this network let's go ahead and try to flip it so the mask and I'll put that in red and the blue color so the mask is - actually this is the literal mask right there it started there so it's 255 255 dot 255 dot - 40 and for the wild-card mask what we would do is flip it so the 255 would be a zero so our network statement would be 1 16 is 16 64 dot zero and then the wildcard mask with 0 dot 0 dot 0 dot and then we have this last part so the tricky part for this last part is that if we look at that last octet the bit values are 1 2 4 8 16 32 64 128 so if you look at this mask of 240 this mask of 240 I'll draw it right here would be one of those one of those one of those one of those and stop so that's the mask in of 240 right there it's 128 plus 64 plus 32 plus 16 and that's the mask so if we wanted to invert that for the wild-card mask and then use a very different color this time to make it stand out let's go ahead and use let's use green so for the wild-card mask if we flipped all those individual bits it would look like this 0 0 0 0 and then 1 1 1 1 so we've flipped the entire octet for the wild-card mask but for the 240 because some of the bits are honest and the bits are off we simply can go to the binary to do it and that also works so the wildcard mask in this case would be in binary 0 0 0 0 1 1 1 1 and if we calculated that up the answer to that would be where the bits are wrong we have 8 plus 4 is 12 plus 2 more is 14 plus 1 more of 15 our wildcard mask for this last octet would be 15 now there are several ways of calculating but I'd like to also share with you instead of going to binary another way of doing it and that's this if we know the last number are the last if we know the mask is 240 we can subtract 240 the real mask we can subtract that from 255 which is the max and guess what it equals that's the same number so when you when you're better when you really mmm with a better understanding of binary and how binary conversion works between decimal and binary and binary to decimal which we're going to be covering more and more on our subnet Saturdays this will become easier and easier but what I want to do is point out that the wildcard mask is simply saying if we use this wildcard mask it would mean this it would mean so let's write out the statement so the network statement would be this network 172 that 16 64 dot 0 because this is actually the 17 16 64 network based on this mask the wildcard mask would be 0 we care about matching the first octet 0 we care about matching the second octet 0 we care about matching on the third well yeah we care about making the third octet and then dot 15 which means we care about matching on the first 4 bits of that last octet but not care we don't care about the last 4 bits of that last octet and that's because the last 4 bits would be host addresses well the first 4 bits would be actually part of the actual subnet address so that's what it means and that's how the wildcard mask works let me see if I I think I covered all the basics that I wanted to hear so let clear off this for a moment and let's do this together now that we have this IP address 10 one stage in 1664 dot 1 with a twenty twenty eight bit mask if we wanted to create a network statement for that let's do it together based on the board work we just did so we'll go to router OSPF one just a do show IP ospf interface brief just to make sure that loopback 3 our loop back to brother is not there yet and lets out a network statement that will include that specific network so one way of doing it is this we could say network 172 and then tell the wildcard mask hey only match on one city two and then the rest I don't care about that would work and if we did a show IP ospf interface brief we now got loopback interface - because it matched on that first octet but that's that's too broad I mean if we had lots of interfaces that started with 132 and we had lots of sub and lots of subnets and so forth we may not want to include just anything that starts with 172 we want you might want to be more granular so I'm gonna do a control a take off that Network statement verify that that interface loopback - is no longer there and now let's make an appropriate and accurate in fact this is the type of scenario that not only we want to understand for a production environment but for a certification so we might be given choices about you know which is the correct Network statement to use or do the correct Network statement in a simulation they're both valid both valid options and in testing environment so what we'd want to do is be able to put in the most accurate Network statement because that's what they're looking for so in a situation like this they're not just asking for a wild card that says yeah once to me - anything just bring them all in they're gonna want to have a specific wild card based on that exact subnet and so based on it being us last 28 we'd want to use a wild card with the slat with a dot 15 for that last octet which says we don't care about the host bits the last four bits but we care about everything else up to that point so if we go back to our router config and we say a network and the interface I'm just gonna go ahead and copy it here - - to do it do do that's the right hand face okay so network once a - 16 64 0 and then the wildcard mask would say we have to match on the first octet we have to match on the second octet we have to match on the third octet and we only have to match on the first four bits of that last octet which means we don't care about the last four bits which is fifteen and then we'll tuck all of that into area zero and this is the moment and this is the moment we get to see if our math is correct because then we can do a show IP ospf interface brief and see whether or not interface loopback - shows up or not if it doesn't we did something wrong or if it does we hopefully got the exact right network so to verify that we'll do a couple up arrow keys show IP ospf interface brief and there it is so that interface loopback - is the in and if we do a show IP protocols which is nice and handy to see on one screen here I thought I had it in the cache dang we can increase the history buffer - but I didn't so do show IP protocols and it's there because of this Network statement right there so this network statement says we care about the first 28 bits matching and the last four bits we don't care about because the wildcard mask says we don't care and one way of looking at that is we could take the decimal mask for the one cent is used 1664 network which was 240 and subtract that from the 255 and that gives us a remainder of 15 the math is the same either way and then this one statement here with the network of 10 anything that's what included loopback zero on the back one into the party and I think we should try one more because we had that in our initial whiteboard and let's go ahead and do it so let's try not try let's go ahead and do one additional interface and I'll exit out of configuration mode for route the router OSPF and let's do interface loopback 3 interface loopback 3 is IP address 192 dot 168 dot one dot 225 looking at my notes with a 29 bit mask 29 mask what do you mean 20 so the first 29 bits are the network and the last 3 bits 29 3 yeah the last 3 bits would be the host address so the appropriate mask for that would be 255 just the first octet 255 the second octet 255 the third octet and then whenever those bits are for the first 5 IP address the first 5 bits of that last octet so if you have that memorize great if you don't have it memorized yet you will by the end of subnets Saturdays so that's the IP address and the masses give me 255 255 dot 255 dot and what I would like to do is walk you through let's imagine it's crunch time for you maybe that crunch time is you're studying maybe that crunch time is you're in certification and like oh what is the mask for that again what is the mask for a slash twenty nine let me walk you through a helpful tip on how to solve that and get it right every time even if you don't have it memorized here it is you simply write out the powers of you simply write out the values for the 8-bit positions in binary and they would go like this this is the decimal values of each of the positions 1 2 4 8 16 32 64 128 great awesome and we are going to pretend that this is the end of the third octet and this is the beginning of the fourth octet because we know the mass is gonna be 255 255 255 and now we need the mass that's going to indicate that we are going to use five more bits and so was this drum we're gonna use this bit it's one two three four five so we said the mass was going to be a slash twenty nine so this is the 24-bit mark so 25 - six - seven - eight twenty nine we draw a line there that's the dividing line and then we put zeros in the mask for the last three bits because those are gonna be host bits and then you can add them up so 128 plus 64 plus 32 plus 16 plus eight is 248 and if you yeah if you added that you know if you added up manually it'll still be 248 so if you use a calculator or just say 128 plus 64 and do the math longhand it's 120 as is 248 so if this is the this is the mask for the interface so we'll go ahead and put that on so 248 press Enter dr. Lata and now if we want to add a network statement for OSPF to capture that that specific network it would be something like this we'll go router OSPF one network one ninety two dot one sixty eight dot one dot now this is where you have to know what the network is - so is 224 that's the actual network address space and then we would put in the wild-card and if you don't if you don't get now how to sort that out stick with us on subnet Sundays and you'll be right as rain before you know it so then we would go ahead and simply have the wildcard mask of 0 dot 0 dot 0 dot and what we could do here we could do it the long way you can do it the short way but if you take 255 which is the maximum value for 8 bits in octet and you subtract the mask the current mask oh hold on a sec it I need to point to the right thing and you subtract the mask the current mask right there 248 and then we get in some really serious math here so we're gonna borrow that that'll be 15 8 is 16 that'd be 7 and that's the remainder so our wild-card bit here would be 7 255 minus the current mask or you could do it long way like we did earlier the math is going to come out the same so the wildcard mask is gonna be a wildcard mask of dot 7 for that last octet so let's go ahead and put it in now you click here and put it in and then we'll set it to area 0 and if we did this right we do a do show IP protocols it will just come on I know it won't give you context sensitive so there's our Network statement we just added 192 wants to date one dot 224 and what that means is it cares about matching on the first eight bits here and then the next eight bits and the next eight bits all 24 bits and five of the bits in this last number which is identifying the network and it doesn't care about the last three that's what this seven means seven means I don't care about the last three bits and if we did that right and we do a show IP ospf interface brief which I think is in my history there it is do show IP ospf in race brief we now have interface loopback 3 as well because it it included that all right so the the Network statement was dated matched on the first twenty nine bits of an interface we had on loopback three and as a result it put that network into the interface become active for OSPF and put that interface as part of OSPF okay that is a lot of content right there wild card masks and interpreting them and understanding them rely heavily on the knowledge of how I P addresses work and that's why subnetting and the binary conversions and decimal conversions are so important to learn because they're going to help not just with this they're gonna help with everything including routing decisions like why did the router choose this route and not that route and things like that are gonna matter also about understanding that behind the scenes with the binary okay so I wanted to cover a few things in this CCNA Sunday and let's make sure we did number one I wanted to walk through the process of bringing up OSPF the raht the process ID and also the router ID how its identified and described perfect we then took a look at the network statements and the network statements and how they work basically it goes it goes limb like this the network statement says to the router hey you got any like go fish like like playing the game of fish damnit e3 is hidden for us except in this case the Network statement says hey do you have any interfaces that begin with these numbers in your IP addresses and then we can specify how many numbers we care about how many bits we care about by using the appropriate wildcard mask that indicate what we don't care about so if we're looking for interfaces again with 10 16 0 with a wildcard mask associated that would be 0 0 0 meaning we care about those first 3 octets and then 255 meaning we don't care what the last octet if we're working with non clean boundaries that's when we have to slice and dice with the wild-card mask so if the network has 29 bits the wild-card mask should say we don't care about the last 3 bits or if the network is 12 bits the wildcard mask should say we don't care about anything else about beyond that for matching purposes and there's there's one other option I'd like to share with you real quick this if we want it to be very specific let's create one more interface interface loopback 5 and let's give it the IP address of 6 7 dot 83 dot one dot for with a 2 octet mask alright so it the first 2 network to first two numbers of the network last to you or the host address and it doesn't like that trading period I don't know why okay so there's our IP address another option is we could be very specific with OSPF and say hey OSPF match on all 32 bits and here this how do we do that in a router OSPF configuration mode we'd say network and I'm just gonna copy paste to save myself any typos Network and then 0 0 0 0 area 0 and what that means is I care about matching on the 67 the second 0 says I care about matching on the 83 this third 0 and the mask says I care about the matching on the 1 and the fourth zero in the wild-card math says I care about metaphor and if one if one bit is off and it doesn't match that interface and its associated network won't be locked into OSPF if it does match we will be and that would be another way of being very I mean the most accurate Network statements would be a 32 bit match which is what this is requiring right here so if we do they show IP ospf interface brief we now have loopback 5 and also this 16 bit network 67 83 would now be participating in involved with OSPF even though we did a network statement says the whole interface IP address had to match once it matches whatever interface is whatever networks are associated with that interface are going to be considered part of OSPF and then from this perspective we do a show IP route and let go ahead and get out the LS exclude the capital L there we go so here are the oh that was so that was a huge fail like how come everything disappeared that's because I have a loopback interfaces with the capital L on all the so my bad so let's go back and just do the normal command show IP route so all of these routes the 1014 three the ten sixteen zero the 67 283 with 16-bit mask the here we go the 132 16 64 Network with the 28 bit mask and the 192 168 1 dot 224 network with a 29 bit mask those all those interfaces and those associated networks that they're running on those networks are participating and being advertised in OSPF and that's that's the basics of the network statement but I want to share with you in this video are in this live stream regarding OSPF and network statements specifically on the wildcard mask now where else our wildcard mask is going to raise their heads and and provide you with satisfaction by understanding how they work the answer is access control lists so with extended ACLs and even standard a seals with a wildcard mask you can specify with a match you know which part of the IP address you're supplying you care about and it works the same way as the network statement if there's a zero in the wild-card mask it means you have to match exactly on that corresponding set of eight bits in the IP address and where the wildcard mask has bits there on those exact bits in the IP address we don't care about they could be anything so they could be a range of host addresses or all the host addresses in a subnet because the wildcard masks can indicate we don't care about them well that's it for this session of CCNA Sunday on OSPF specifically a wild card mast I appreciate you being here our next live stream is next what day is Sunday the next live stream is Wednesday and there's gonna be two more on Saturday and Sunday with subnets Saturday and also CCNA Sunday coming up so did I say Wednesday oh my gosh so so much fun so Wednesday Saturday and Sunday alternate with live streams also I'm just inning I had a they show you real quick I purchased a couple of home Wi-Fi mesh systems like six to eight months ago I got Google Wi-Fi and I also got the amplify I use Google Wi-Fi here in my home in the recording studio and in my home in Vegas which is about 15 miles away I put this one in and so I I bought two of each and what I did was I was gonna do an unboxing you know like for a YouTube unboxing never got around to it we're really really busy with everything going on with all the content we're creating so I didn't unbox it and so I did a giveaway and so if you find on social as posted many places I'm sure it's living it to the US because I have to ship it I had comp people coming and saying Keith how come he's not good over here there I was like I've got to ship this thing and so it's about a $300 ish value I think it sells on Amazon for like 339 or something it's sealed I love it it is one of my favorite home Wi-Fi mesh systems it's elegant this light will get here it looks like an apple product it's just you touch the front and it tells you that megabits per second it tells you the aggregate throughput and the port status and Wi-Fi Protected setup if you want that that's available on a button and it glows at the bottom anyway it's great so I'm not sponsored by of equity but I love this product and that is part of the giveaway that ends tomorrow so that competition or that that giveaway ends tomorrow at all included with the link for this but ends tomorrow at some point so if you want to participate in that please feel free to do so um again three things I'd like you to do before you go if you liked the video or got value out of it hit the like button to find a study buddy something to study with and practice with and and bounce ideas off of and third please subscribe so you can always get latest alerts of what's going on here the two playlists I would have you in mind for would be the master playlist here on YouTube for CCNA 200 301 and the the CCNA the subnet Saturday I'm making a separate playlist as well so if you just want to focus on the subnetting and learn from the ground up how that works might be the place for you or if you want to go through all of it the master playlist I add videos to both of those every single week alright thank you very much for your patience today it's been great having you I enjoy doing this it's it's really a pleasure and when my equipments working it's even better and I just realized that I don't have any exit music cued up but let me cue some up it'll be worth it also for those who who've asked about my exit music and intro music I use that epic sound , have subscription and I get a lot of my content from that so here's a song that's called a little bit of faith by Melina stark thanks everybody see in the next dream [Music] [Applause] [Music] [Applause] [Music] [Applause]
Info
Channel: Keith Barker
Views: 7,848
Rating: 4.963964 out of 5
Keywords: cbt nuggets, ccna, ccna 200-301, ccna certification, ccna study, ccna training, cisco, cisco ccna, cisco certifications, cisco training, ccnp, binary, subnet mask, ospf network statement, cisco wildcard mask explained, cisco wildcard mask, wildcard cisco, Cisco wildcard, wildcard, ospf configuration, ospf routing protocol tutorial
Id: UtU8deoEH8k
Channel Id: undefined
Length: 60min 29sec (3629 seconds)
Published: Sun Jan 26 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.