OSPF neighbor states define the step-by-step process a router uses to discover, synchronize, and maintain routing relationships with adjacent devices. This content covers each state from Down through Full convergence, the role of the Designated Router, and how topology changes are propagated across the network.
OSPF Neighbor States
When an interface on your router has OSPF turned on and is plugged into a network, it will start trying to communicate with other devices. As it establishes those connections it goes through a process and several different states.
In this example we are going to say that R1 is talking to R2.
First of all, R1 is going to start in the down state. The down state just means it is sending out hello packets but it has not received any hello packets yet. Everything is going to start in that down state.
Then it is going to jump to the init state. Notice I skipped attempt - that is because it is specific to certain networks and we are not really going to deal with it, and some literature does not even have it listed as an option.
What happens in the init state is that R1 receives a hello packet from R2, but within the hello packet we know that R2 lists out all of its neighbor relationships, all of its neighbors. So the init state exists when that hello packet does not list the RID, the router ID, of router 1. That tells router 1 that router 2 has not received a hello packet yet.
As soon as the hello packet gets to R2, and then R2 sends a hello packet to R1 and the router ID of R1 is in that hello packet, then it knows: yes, we now are on the same wavelength, you see me and I see you. So then it goes into two-way, where they now see each other. Once they have seen each other, that is when we say the neighborship is established. We have got a true neighborship going on there, and part of this will also elect a DR and BDR, so that is where that takes place as well.
This is the division line right here. Some of these relationships never progress on past this, and we will see what that looks like in a little bit.
The next state is the ExStart state. The ExStart state is when the DR and BDR establish a primary and secondary relationship. ExStart, and actually the next couple of exchanges here, is just establishing the database and getting the database going. The DR and BDR have to communicate back and forth and figure out who is going to be the primary and who is going to be the secondary - you can also see it in some places listed as master and slave. Whoever becomes the primary is going to have the higher router ID, so the higher router ID becomes the primary and the lower router ID becomes the secondary.
That could be different than the DR and BDR if there is a priority set on those. The DR and BDR use a different set of criteria, which is kind of interesting, that the primary may not be the DR, but this is just a designator for these initial stages.
Based on the router ID, that is going to select a primary, and then the primary initiates an initial database sequence number. A database sequence number gets started, and that is going to be the basis for this first initial configuration.
Once that is done, it goes into exchange mode. In exchange mode, the database packets get sent back and forth and it builds this link state database. It is getting all of these updates to the database, and the database is incrementing through this sequence number. Only the primary can increment the sequence number, so the primary will increment the sequence number and the secondary will acknowledge the sequencing of this database.
Once it has done that, it goes into the loading state. The database just has the link state advertisement headers in it, so it is kind of like a synopsis of all of the different links that are out there. It builds this whole database that has a synopsis of what the database should look like, and realizes: now I actually need the information about these link states, so now I am going to send out link state requests and get link state updates back.
The designated router is going to send out all these link state requests saying, hey, I need these updates. The link state updates are going to get sent back, and the link state updates have the full link state advertisements, not just the header. That gets sent back to the designated router, and now the designated router communicates and sends out link state updates to the rest of the devices.
Once that is done and everything is fully converged, then we say full.
Once everything is fully converged and everything is communicated, we call that the converged neighbor state. This is when the DR is elected, the BDR is elected, and everybody has their link state database all up to date.
So we are going to have several types of relationships that exist in this case.
Between the BDR and DR and any of these devices, they are going to have all the communication. But between any of the DROthers we do not have link state updates, we do not have link state acknowledgments, we do not have link state requests. Those are only going to be sent to the designated router and the backup designated router. Do notice, though, that we still maintain relationships with all of the devices on this network.
First of all, just know what we have: hello timers, the database timer, a link state request, a link state update and a link state acknowledgment. Those are the different packets that we have that get sent out. The database ones are only for the initial setup. We mentioned how the DR is elected and the database gets passed around to the DR, the DR creates the link state database here and then sends all the updates to the other devices. Once that is done, that comes out of the picture.
The next thing to know is that all the other devices are going to, every 30 minutes, send out a link state update to 224.0.0.6. It is a multicast address, and the DR is listening to that multicast address. That happens every 30 minutes and it is going to contain all the link state advertisements. Remember, link state advertisements are information about each one of the links, and that just refreshes it to make sure that the database is always refreshed.
The other thing that is going to happen is if there is a change to the topology. Let us say there is a link on this router that goes down. That is also going to trigger a link state update, and it is going to send a link state update with that link state advertisement with the change to it. That is going to go to this DR, and once again it is a multicast, so it is being sent to this multicast address.
Then this designated router is going to update its link state database and send out that link state update to all of the other devices, and then a link state acknowledgment is sent back. The link state acknowledgment and everything goes to 224.0.0.6, so that way it is just the designated router that is getting that update - and actually the backup designated router is getting those updates as well, just in case it needs to take over.
But when communication is happening from the designated router to all the other devices, that is happening on 224.0.0.5, so that all the other devices can listen to that. Your hello packets get sent out on that also, because they are all maintaining relationships with each other and they all create those adjacencies.
So if there is a topology change, everything goes through that designated router.
As OSPF establishes communication with each one of its neighbors, it brings that communication through those different states. If we do the ip ospf neighbor, we will see what states those are. Once it is fully converged, these will either say that it is fully converged with that other device, or that it is in a two-way, which means two-way just between two DROthers and not between a DROther and a designated router or a backup designated router.
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 →