inet icon indicating copy to clipboard operation
inet copied to clipboard

OSPF: Neighbor state after DR/BDR election

Open ManiAm opened this issue 7 years ago • 2 comments
trafficstars

According to the OSPF RFC, each interface connected to a broadcast or NBMA network is assigned a Wait timer with default value of 40s. Once the timer is expired, the DR/BDR election is started for that interface. Once the election is over, a DROTHER router establishes full-adjacency with both DR and BDR and 2-way adjacency with other DROTHERs.

I have created a simple scenario in Cisco packet tracer consisting of six OSPF routers connected to an Ethernet switch. As you can see, the adjacency status are as expected. All routers have priority 1 and the router with highest router id would be DR and the next highest would be BDR.

2018-08-07_14-39-48

I created the same scenario in INET (BTW, I love the INET visualizer).

2018-08-07_15-10-22

Now look at the neighbors + neighbor status in router R3 (you might need to click on the pic to zoom-in). Also note that neighbor status is not shown in the current OSPF implementation and you need to check commit 7bf3f39 from my pull request.

2018-08-07_15-11-29

In the OSPF implementation, the DR and BDR are elected correctly, but R3 (which is a DROTHER) forms 2-way status even with DR/BDR (it should be full). When we continue the simulation, the 2-way state transitions to full which is not expected again! It means that all routers form full-mesh adjacency with each other! The whole purpose of the DR/BDR election is to prevent full-mesh adjacency.

ManiAm avatar Aug 07 '18 22:08 ManiAm

Do you think that this issue is fixed with the merge of your OSPF improvements into maser?

levy avatar Nov 29 '18 10:11 levy

Unfortunate no!

However, this issue is related to the performance of OSPF and will not affect the main function of OSPF. I will take a look at this, once high priority tasks that I want to focus on are done :)

ManiAm avatar Nov 30 '18 02:11 ManiAm