OSPF configuration requires just two core commands to get a network up and running, covering process IDs, network statements, wildcard masks, and area assignments. This content builds a practical foundation before diving deeper into advanced OSPF concepts.
OSPF Configuration
I have said multiple times that link state protocols and OSPF are a little more complicated when you are rolling it out on your network, but it actually does not have to be. It can start out very simplistic, and it really is just two commands, so less than we implemented RIP with.
The commands are router ospf with the process ID, and then the network statement, where we do a network address with the wildcard, area, and area ID. So there are a couple more components in that, that we will be discussing. An example of that is router ospf 10, and then network 10.0.0.0 0.255.255.255 with an area of 0. These are the example of the commands that we will be actually putting in on our network.
The one thing that we need to talk about first of all here is this process ID. The process ID is specific to the router, and it really does not have much bearing on that router. It just separates out your different instances of OSPF. In this case you are just going to have one instance, so I can come up with any number. I just came up with 10 and I can put it in here.
For consistency purposes I am going to want to put ospf 10 on every single router, but it does not have to be, because it is the process ID, so it is identifying the process, or the OSPF instance. If I were to have multiple instances running on this router, then I would use multiple process IDs. So first of all, do not get hung up on that. You do not need to know a lot about it, except for just that it is router specific, and that we are going to come up with 10 and put the same one on our routers.
Then we have the network statement. The network statement does two things for us. First of all, it identifies which networks are going to participate in the OSPF process, meaning whether a directly attached network is going to be advertised out or not. The other thing that it does is it identifies interfaces that are going to participate in this OSPF process, so which interfaces are going to send and receive OSPF updates.
What we have done here with this one right here is we have said that almost all of our networks that we have specified within our topology really fall under this 10.0.0.0 /8 network, and so we pretty much said that all interfaces and all networks are going to participate. For now, just know that that is what the network statement does.
Then we have the wildcard mask. Really what the wildcard mask is, is very similar to the subnet mask, but it is the reverse of the subnet mask most of the time. What I mean by that is, in the subnet mask this 255 ends up being all ones, and it says that each one of those bits is a network bit, and all of these zeros are host bits. So all it is doing is saying this is the network and these are going to specify the hosts on that network.
Well, a wildcard mask, generally speaking, is the opposite of a subnet mask. So where you have a 255 in the subnet mask, you have a zero in the wildcard mask, and it is all zeros. And then the rest of this, what it is specifying, is that those are wildcards. It does not matter if that is a one or a zero, you are going to ignore those bits. So this right here says all of the last 24 bits of this number, of this IP address, are going to be ignored. We do not care if it is a one or a zero. That is the wildcard part of this. So what you end up with is 0.255.255.255 if you are doing a /8.
The last thing that we will touch on is that OSPF areas allow us to break up our topology into smaller sections. With all of this traffic that is being sent back and forth, with all of these updates that are being sent back and forth, it really can swamp down your network, and the bigger your network is the more problematic that can be. So OSPF areas allow us to break it into smaller sections.
The best practice is that when you only have one area, which is what we are going to have on our network, then that area should be area 0. So for our area ID, for the purpose of most of this course, we are going to be using area 0.
We do not need to get into a lot of the other configurations for us to at least initially set something up, but I thought I would mention them. One of them is going to be the OSPF hello intervals. There is a passive interface, and what a passive interface does. There is how we can manipulate OSPF costs, because we are definitely going to want to do that when it comes to OSPF. There are OSPF priorities, and OSPF router IDs.
TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.
Explore free tools and programs →