Hi and welcome to this CertificaitonKits CCNA Training video on OSPF Configuration.  We are going to be going over the configuration of OSPF configuration commands and  we are going to have to know some commands to be able to configure it.  Show commands will help us check out our work when we are done, see how it's operating as well as troubleshooting OSPF incase if there are any problems.

In my CCNA simulator I have got this diagram configured Palaestra1, Palaestra2 and Palaestra3, Ethernet0 on Palaestra1 has a 99.8 subnet, Serial0 has a 99.32.  Palaestra2 Serial0 has 99.32, Serial1 99.40, Ethernet0 and you can see that over here we got .24 subnet and Serial0 is connected to the .40 subnet.  So by default without any routing protocol configured whatsoever what we see in here is what's going to be in the routing table of each of these routers.  By default by configuring an IP address in subnet mask on the interface and turning the interface on, the router will figure out what subnet it's directly connected to them put those in the routing table.  Our job is to configure open shortest path first so that routers will communicate with each other and share this precious routing information and how we are going to do that we are going to keep it real simple with the area designed, everything will be in Area 0. We're going and configure OSPF and take a look at it. 

Let me bring up the CCNA simulator.  We are going to start at Palaestra1, just going to go and configure this thing so if I do a show run I can see that the IP address is configured but nothing else is as far as routing protocols.  So what we are going to do is we are going to go and enable OSPF. I do a show IP route right now which allows me to see the routing table.  I can see both directly connected subnets but nothing else.  So we are going to go in here and configure OSPF.  Now the command to enable OSPF is router OSPF1 enter.  This 1 right here is what’s called the process ID.  What that is if were to that command again with a question mark, the process ID is a number between 1 and 65535 and it's just a process ID to keep track of this instance of OSPF running on the router. The router keeps track of and can keep track of multiple instances of OSPF running on the router.  Now if we had another instance of OSPF running on the router a situation that might call for that would be you are migrating or bringing new equipment in or you are changing the network around a little bit and you don’t want to mess up the way it's currently operating, so you could bring a new instance of OSPF and set that up. This number does not have to match on the routers. I make it match to just to keep thing simple. But I could put whatever number here because it is only a locally significant number not a globally significant number.  So I go ahead type in router OSPF1.

The next thing I have to do is type in the network number basically what am doing right now is I am going tell the router what interfaces on the router I want to be a part of a particular area like I said everything is going to be in Area 0 so I want all interfaces on the router to be in Area 0.  So all I have to do is type in what all the interfaces have in common, they have got 99 in common so I am just going to go .0.0.0 after that and what comes next is called a wild card mask, they call it wild card bits here.  You can feel free to call it wild card mask and it wants it in this dotted decimal notation.  We will be seeing the wild card mask again when we get in the access list but I am going to put it in right now and then we will go and then talk about it little bit further.  The wild card mask I'm going to put in is 0.255.255.255.  Now the 0 means you are going to compare the IPs on the interfaces, the routers are going to compare the IPs on the interfaces to this number right here.  The wild card mask tells the router what numbers here are important.  The 0 means the IP address on the interface must match what's in the first octet which is 99.  The 25 means I don’t care what's in this octet, don’t care what's in this octet, don’t care what's in this octet.  As long as the 0 says to match the 99 so if the IP address on the interface starts with 99 doesn’t matter what else is in the other octet as long as there's a 99 in that first octet.  This statement will apply to it and what the statement is saying is I want you to participate in area 0, done. 

Let’s take a look a little bit further about what this wild card mask is used for and how we can manipulate it.  Going to bring up a slide and wild card masks shown here and what it is, is I have got a router with multiple interfaces on it.  So I have got interface Ethernet0 might connect off to some other routers, interface Serial0, Serial1, serial2, serial3 so I've got a bunch of interfaces going off in this router, so it looks like a sun.  The IPs on it they all start with 99.8 so all interfaces start with 99.8.  This interface has an IP of 4.1, this interface has 4 actually totally different so let's so 5.1, 6.1, 7.1 and 8.1.  So those are the IPs on the interfaces.  So again they all start with 99.8, 4 through 8 it's going there and the .1 for the IP on the interfaces and we are using the class C subnet mask.  So it's subnetted out to a /24 subnet masks.  Now depending on what I specify with this wild card mask down here we will determine which of these interfaces match the statement so here is my interface Ethernet0 here is the IP on a 4.1. 

If I just want this one interface to be in Area 0, I use the network command 99.8.4.1 which is the IP address for this guy.  0.0.0.0 meaning every octet in this IP address 99.8.4.1 must match this statement right here.  So what it’s going to do its look at and go okay 0 means must be 99, here is at 99, yes, 0 here means must match 8, does that match 8, yes.  0 here means match 4 does that match 4, yes.  0 here means match 1, does that match 1, yes it does.  So this interface will be in Area 0 based on the statement.  Let’s take a look at the other interfaces, is 99.8, we'll do this one 99.8.6.1.  What will happen is it will check the 99.8 so far so good however it says okay third octet must be of 4, is that a 4 no it’s not.  That interface will not be in Area 0.  So 0 means must match, 255 means doesn’t matter.  If I want all interfaces to be in Area 0 based on the statement what I would is I'd go network 99 000, it really doesn’t matter what I specify here because the wild card mask is saying.  Let me check all interface IPs this 0 says must match 99, they all match 99.  255 means doesn’t matter what's in the second octet, doesn’t matter, doesn’t matter. 

So as long there's a 99 in the first octet which they all have they will be in Area 0 based on this statement.  Now here is one if I want to just put Ethernet0 Serial1, Serial0, Serial1 and serial2 in area 0 and serial3 is going to be in different area so if I want to do that with one statement what I have to do is I have to use this wild card mask and to see how this works effectively I am going to break it down into binary.  We got the 99.8 I know that’s good because this is 00 must be in 99 must be in 8. Which they all match, what the 3 does is it does something, that we really can’t see without breaking it into binary.  There’s eight or there’s four in binary, so 00000100 that’s four in binary and then the last one zeros.  So, I am not going to worry about breaking that into binary and then here I’ve got my wild card mask we’ve got the 00 and then three, so what three is, it's has 00000001 — I'm sorry, 000.  Let me try that again, it's right there one, two, three, four, five six 0 and then the two and the one turned on gives us three.  And, then this last one would not be a zero, it would a 255, all right much better, so we’ve got 255 in this one which is all one.  So, basically the ones start here and go over, it's the opposite of what you’re subnet mask would be, subnet masks are all ones from the left to the right.  This is all zeros from the left to the right and then you hit the one that determines what must match.  So, what it's saying here is every bit must match up until this point in the address and so what happens is the 99 A it's got to be the first five bits, have to be zeros and then six bit has to be a one and then the last bit it doesn’t matter what it is.  So, what's saying is it can be this combination 00 it could be 01 combination, 10 or 11 which is four, five, six, and seven, they all match the statement because they all have 00000 and 1 in the first six bits of this octet.  It doesn’t matter what the rest of the bits are because those ones are turned on in the wild card mask.  So, by putting a 3 there, .255 it's saying four plus the next three subnets 5, 6, 7 doesn’t matter what's in the last octet will be in Area 0.  So, here is 4 plus the next 3, 5, 6 and 7, so that’s our wild card mask and we can manipulate that. 

Now, if I didn’t want to worry about doing this crazy math down here which is 4 plus 3 form –7 minus 4 is 3, if I didn’t want to worry about having to figure it out what number goes there.  If I wanted to I could simply do multiple network statements, one for each interface I could go network 99.8.4.0.0.0.0.255 or I could go 99.8.4.1.0.0.0.0 and then I would create another statement and do 51.  And, then another statement and do 61, and another statement do 71.  I can put as many statements as I want in there, so that’s another way to do I could just make four statements and not have to worry about this wild card mask math going on down here.  But, again that’s not hard and either way it works fine. 

Let's get back to our router and finish configuring this OSPF, so I brought my router prompt backup and again I typed router OSPF one, the process ID doesn’t have to match on each router, even though I like it too.  Network 99.0.0.0.0.255.255.255 again this 0 means the interface on the IP on the interface must match 99, but 255 means it doesn’t matter what rest of the octets are, that interface will be Area 0.  All of my interfaces on this router start with the 99, so they will all participate in Area 0 routing.  So, I am done with that, let's go onto Palaestra2 and Palaestra3 and configure those.  So all I’ve to do is router OSPF 1 network, same area if I don’t put the same area for the corresponding interface, then router or Palaestra1 will not talk to router Palaestra2 and then I’ll go and do the same thing on Palaestra3, so I'll enable this, I go router OSPF 2000 just to show you that this number does not have the match, network 99.0.0.0, so, they’re all in the Area 0, every router interface in this diagram is in Area 0 now.  So, I go and check out Palaestra1, you show IP route and check out the routing table and it is populated. 

So, when we’re looking at this routing table the O means OSPF, 99.40.0.0 is the destination subnet, 1.10 is the administrative distance.  This is the cost, 64 is the cost and to get the cost OSPF does the default calculation of 10/8th divided by the bandwidth of the interface.  99.40.0.1 is the next top or the router that it got the information from not the next top router and Serial0 is the interface in which it came in on, 99.16.0.1 and 19.32.0.2 where it's getting the information from for these particular subnets and actually this will typically just show the next top router.  Here the CCNA sim it’s acting little funky, so Serial0 it’s the interface it came in on and O is OSPF.  This is destination subnet administrative distance and the actual OSPF cost. 

If I were having problems things I would do to check this out.  First thing I would is I would do show interface.  If my interface is not up and up then it’s going to function someone take a look at my serial interface it says it’s up line protocol is up.  That means layer 1 and layer 2 of the OSI model are good, physical layer and layer 2 encapsulation.  I could just type in show IP OSPF interface and get the same information and more pertaining to OSPF, it says Serial0 is up, line protocol is up, just what I was looking at what it also shows me is the area that this interface is participating in and again if the area on Palaestra2 router isn’t 0, it doesn’t match they won’t talk to each other.  They won’t be friends.  The Hello and Dead intervals again must match.  I can see that it’s adjacent with the neighbor router is 99.32.0.2.  Everything looks good there.  I also have the show IP OSPF neighbor command, will show me neighbor router, the state is full, so I know they've exchanged all the routing information the neighbor ID is the IP address that represents the next top router.  Again this IP address is the highest IP address on an up and up interface for Palaestra2 and this just happens to be the highest IP address on Palaestra2's interface and I can see the interface it came in on so I can get information by doing the Show IP OSPF neighbor command. 

So, we’ve got that show IP protocol to make sure OSPF is configured in the first place and I can check out the information about that.  Here’s the interfaces that OSPF is working on.  I can make sure it’s routing for the appropriated network so it’s a very helpful commands.  Another command that’s very helpful that is not available in this simulator, debug IP OSPF and you've got a few different options here, events I can do and events issues log messages for every OSPF packet that gets sent.  So, I can see the packets as they can.  I can debug IP OSPF packet and this is described in the contents of all the OSPF packets and another one is I can do debug IP OSPF Hello so I can look at the Hellos and make sure all the settings for the Hello messages are right.  Remember the Hellos are how the OSPF routers find their neighbors.  They have to have matching information otherwise they’re going to make neighbor relationships thus not exchanging topology information. 

So, there are few debug commands.  A new CCNA will see what happens when I turn debugging on, things will just start scrolling on my screen as these messages come in.  If I want to debugging off I go no debug all.  If I have multiple paths to a destination, if I do a show IP route and there’s information in here two paths to 99.40 going out of the Serial0 and maybe I have Serial1 interface, what I could do is, I could go into an interface and I could use the bandwidth command and change the bandwidth or what OSPF thinks is the band with on the interface, I could go ahead and increase the bandwidth.  So I could go, 200, it's bandwidth in kilobytes so, I go 256 kilobytes I don’t have to put 256,000 it just 256 kilobytes I can put there and increase the bandwidth and by doing that what would happen is if I add multiple routes to the same destination OSPF would think that router they Serial0 might be a better or worse cost path based on the bandwidth command that I put in there, that bandwidth command that I entered bandwidth 256 — oops didn't mean to highlight all that, bandwidth 256 does not change the actual bandwidth, doesn’t have anything to do with what happens at layer one, what it does is, it changes the calculation variable that OSPF uses to figure out its cost, it's calculation is 10/8th divided by bandwidth so if I changed the word OSPF things is the bandwidth on the interface I can change what it thinks might be a better path to your particular destination. 

One other thing I could do on an interface, I go to interface Serial0, if I want to directly specify that cost of a interface I could go IP OSPF cost command it's probably not supported in the simulator, it is supported in this simulator and specify a cost for this interface of 1- 65535, that is a additional way that I can use to tweak the routing table to what OSPF would perceive as the most appropriate path from this point A to point B.  So it's a couple different ways I can go in and tweak the routing table as far as how OSPF is going to operate.  And again that may be necessary when you have more than 1½ to a particular destination so I brought up this slides so we could go over these commands again.  Router OSPF in process ID again this is only locally significant, that’s how enable OSPF then I type network and network address, the appropriate wild card mask, area and then an area I'd.  This is globally significant.  If the area ID does not match my next top router that I want to share the information with and then it’s not going to function.  IP OSPF cost interface allows me to tweak the router that will end up in the routing table I place in a cost on the interface, bandwidth and then the bandwidth number again it’s 10/8th divided by bandwidth allows me to manipulate what OSPF thinks is the best path as well IP OSPF Hello and second allows me to change the Hello timer on an interface, an IP OSPF network and then the interface type allows me to specify how OSPF is going to view an interface as far as determining a designated router or not.  Again that command we went over in more detail in the designated router video with OSPF. 

So, in this CCNA video, we have gone over OSPF configuration, the different configuration commands, show commands as well as those debug commands that will scroll a bunch of stuff on your screen, troubleshooting OSPF, different things to look at, as well as a couple of additional commands to tweak the way OSPF put routs in its routing table with the bandwidth in the cost on the interface.  I hope you have enjoyed this CertificationKits CCNA training video on configuring OSPF.