OSPF develops neighbour relationships with routers on the same link by exchanging hello messages (a.k.a hellos).
At the initial exchange of hellos, the routers add each other to their respective Neighbour Tables (The Neighbour Table in this case acting as a list of connected OSFP enabled routers).
OSPF Enabled Routers send multicast hellos with a destination address 224.0.0.5 on all OSPF-enabled interfaces.
OSPF sends out hellos every 10 seconds on a broadcast link (a link with more than 2 nodes on the same segment like Ethernet) and 30 seconds on a non-broadcast (a link with only 2 nodes on the same segment; exceptions *shrug* exist for NBMA) link.
The Hello message contains:
After the initial hello exchange between two routers, an exchange of network information begins. After routers have synchronized their information they are adjacent.
Routers must go though various states from the initial relationship “hello” that transitions through a process before forming a “full” adjacency as shown above in the picture.
Once a full adjacency is achieved, tables between routers must be kept updated to prevent loops and routing errors. LSAs are re-sent when a change occurs, or every 30 minutes to keep routing information “fresh”.
Going through the different “states” a neighbour relationship can be in:
- Down – This is the first OSPF neighbour state, this state means that no hellos (information) has been received from any neighbour(s).
- Attempt - This state is only valid for manually configured neighbours in a Non-broadcast multi access (NBMA) environment. In Attempt state, the router sends unicast hellos every poll interval to the neighbour from which hellos have not been received within the dead interval.
- Init - This state indicates that the router has received a hello packet from its neighbour, but the receiving router’s ID was not included in the hello.
- 2-way – This state indicates that the bi-directional communication has been established between two routers
- Exstart – Once the Designated Router (DR) and Backup Designated Router (BDR) are elected, the actual process of exchanging link-state information can start between the routers and their DR and BDR.
- Exchange – In this state, OSPF routers exchange database descriptor (DBD) packets.
- Loading - In this state, the actual exchange of link-state information occurs.
- Full - In this state, routers are fully adjacent with each other. All the routers and networks LSAs are exchanged and the router databases are fully synchronized.
Hellos between routers continue to be sent periodically and the adjacency is maintained as long as hellos are exchanged. Missing hello messages result in a router declaring the adjacency being declared dead.
As soon as OSPF identifies a problem, it modifies its LSAs accordingly and sends the updated LSAs to the remaining neighbours (with full adjacencies).
Being event-driven, this LSA process intrinsically improves convergence time and reduces the amount of information that needs to be sent across the network.
A key piece of information exchange in LSAs is the OSPF metric information. Many OSPF vendors assign each link a cost of 10, Cisco makes cost inversely proportional to a 100 Mbs
An Admin can override the default cost. This would be done for compatibility reasons (with other OSPF speakers or because the link is more than 100 Mbps).
Sometimes the meric is equivalent for multiple paths to a destination. In this case, OSPF will load balance over each of the equivalent interfaces. Cisco routers will automatically perform equal-cost load balancing for up to four paths, but this parameter can be increased by configuration to as many as sixteen paths.
The cost is applied to the outgoing interface. The routing process will select the lowest cumulative cost to a remote network.
Notes and Notices:
This is a part of my personal BSCI notes and research to assist myself in learning and understanding the concepts and theory for the BSCI exam. I learn by making notes reading and writing things down and wish to file them where I can’t lose them. These notes are not to be seen, judged or mistaken for replacements to Cisco recognized and authorized training which I personally support and attend and suggest you undertake if you are going for the BSCI Certification.


0 Responses to “Open Shortest Path First – OSPF Fundamentals – Neighbours and Adjacencies”
Leave a Reply