In order for OSPF-enabled routers to exchange information, they must form an adjacency (relationship) with their neighbor. Within this article, we will look at the process and various steps involved (Figure 1).
Before the OSPF router even starts to try and form an adjacency, OSPF must know/determine the following:
- Router ID – The router-id is simply the routers name within the OSPF process. To determine the router-id the system selects the highest active IP address configured upon the interfaces.
- OSPF Interfaces – Each interface that should run OSPF and send HELLO packets This is configured, on Cisco devices via the ‘network’ command under the OSPF process. OSPF then adds a list of interfaces/routes that it will advertise to its LSBD (Link State Database).
The OSPF Type 1, HELLO packet is used for the dynamic discovery of neighbors and also to maintain neighbor relationships. HELLO packets are sent, via multicast the 184.108.40.206 multicast address on all interfaces.
Let us look at how OSPF uses these HELLO packets is some more detail.
- Send HELLO – A HELLO is sent (every 10 seconds as default). Within this packet, a set of information is provided. This includes,
- Hello and dead timers
- Router Priority
- Network Mask
- BR/BDR IP Addresses
- Area ID
- Authentication password
Note: In order for the neighbor adjacency to form the HELLO and dead timers, network mask, area id, and authentication password must all match.
- Receive HELLO – The router receives the HELLO, and checks the information within. If the HELLO and dead timers, network mask, area id and/or authentication password do not match then the HELLO is dropped, and it is marked as an incompatible neighbor. In addition, the router also checks to see if its own router-id is listed within the neighbors of the HELLO packet.
- Send Reply HELLO – If the previous HELLO contained our router-id then a neighbor adjacency has already been formed. The dead timers are reset and a HELLO is sent back. If our router-id is not within the HELLO, then the new neighbor process begins.
Figure 1 – OSPF Neighbor Process/States.
Now the process required to form a new neighbor relationship will begin. Lets step through each of the steps:
- Master/Slave – First of all the master/slave relation is determined, to decide who speaks first. This is determined by priority, with the router-id being used to break any potential tie. Next, the master sends a summary packet, also known as the database description (DBD), of the LSDB. The slave then sends theirs.
- DBD Review – Each DBD is acknowledged and reviewed. This involves each router looking through the DBD. For any routes that it does not know it requests more information from its neighbor. This process consists of the following steps/packets:
- LSR (Link State Request) – Slave requests details.
- LSU (Link State Update) – Master sends updates.
- LSR (Link State Request) – Master requests details.
- LSU (Link State Update) – Slave sends updates.
- Full Neighbor State – At this point, the neighbors are synchronized and the neighbor adjacency is fully complete.
- How to Configure a BIND Server on Ubuntu - March 15, 2018
- What is a BGP Confederation? - March 6, 2018
- Cisco – What is BGP ORF (Outbound Route Filtering)? - March 5, 2018
Want to become a networking expert?
Here is our hand-picked selection of the best courses you can find online:
Cisco CCNA 200-301 Certification Gold Bootcamp
Complete Cyber Security Course – Network Security
Internet Security Deep Dive course
Python Pro Bootcamp
and our recommended certification practice exams:
AlphaPrep Practice Tests - Free Trial