OSPF Operation
Summary
This topic explain how single-area OSPF operates. Start learning CCNA 200-301 for free right now!!
Table of Contents
Video – OSPF Operation
Click Play in the figure to view a video about OSPF operation.
OSPF Operational States
Now that you know about the OSPF link-state packets, this topic explains how they work with OSPF-enabled routers. When an OSPF router is initially connected to a network, it attempts to:
- Create adjacencies with neighbors
- Exchange routing information
- Calculate the best routes
- Reach convergence
The table details the states OSPF progresses through while attempting to reach convergence:
State | Description |
---|---|
Down State |
|
Init State |
|
Two-Way State |
|
ExStart State | On point-to-point networks, the two routers decide which router will initiate the DBD packet exchange and decide upon the initial DBD packet sequence number. |
Exchange State |
|
Loading State |
|
Full State | The link-state database of the router is fully synchronized. |
Establish Neighbor Adjacencies
When OSPF is enabled on an interface, the router must determine if there is another OSPF neighbor on the link. To accomplish this, the router sends a Hello packet that contains its router ID out all OSPF-enabled interfaces. The Hello packet is sent to the reserved All OSPF Routers IPv4 multicast address 224.0.0.5. Only OSPFv2 routers will process these packets. The OSPF router ID is used by the OSPF process to uniquely identify each router in the OSPF area. A router ID is a 32-bit number formatted like an IPv4 address and assigned to uniquely identify a router among OSPF peers.
When a neighboring OSPF-enabled router receives a Hello packet with a router ID that is not within its neighbor list, the receiving router attempts to establish an adjacency with the initiating router.
Synchronizing OSPF Databases
After the Two-Way state, routers transition to database synchronization states. While the Hello packet was used to establish neighbor adjacencies, the other four types of OSPF packets are used during the process of exchanging and synchronizing LSDBs. This is a three step process, as follows:
- Decide first router
- Exchange DBDs
- Send an LSR
The Need for a DR
Why is a DR and BDR election necessary?
Multiaccess networks can create two challenges for OSPF regarding the flooding of LSAs, as follows:
- Creation of multiple adjacencies – Ethernet networks could potentially interconnect many OSPF routers over a common link. Creating adjacencies with every router is unnecessary and undesirable. It would lead to an excessive number of LSAs exchanged between routers on the same network.
- Extensive flooding of LSAs – Link-state routers flood their LSAs any time OSPF is initialized, or when there is a change in the topology. This flooding can become excessive.
To understand the problem with multiple adjacencies, we must study a formula:
For any number of routers (designated as n) on a multiaccess network, there are n (n – 1) / 2 adjacencies.
For example, the figure shows a simple topology of five routers, all of which are attached to the same multiaccess Ethernet network. Without some type of mechanism to reduce the number of adjacencies, collectively these routers would form 10 adjacencies:
5 (5 – 1) / 2 = 10
This may not seem like much, but as routers are added to the network, the number of adjacencies increases dramatically. For example, a multiaccess network with 20 routers would create 190 adjacencies.
Creating Adjacencies With Every Neighbor
- Number of Adjacencies = n (n – 1) / 2
- n = number of routers
- Example: 5 (5 – 1) / 2 = 10 adjacencies
LSA Flooding With a DR
A dramatic increase in the number of routers also dramatically increases the number of LSAs exchanged between the routers. This flooding of LSAs significantly impacts the operation of OSPF.
Ready to go! Keep visiting our networking course blog, give Like to our fanpage; and you will find more tools and concepts that will make you a networking professional.