OSPF weird elections!

altdrugzaltdrugz Member Posts: 69 ■■□□□□□□□□
Hello. This is my testing topology -> PicPaste - OSPF_topol-Hig9qfoN.png

Summary: I know that the elections are electing the highest router-id bidder as DR. If the router-id command has been set thats the router-id. If it is not the biggest local loopback address will become and if there isnt any loopback it goes the highest address assigned in the interfaces.

Ok. But this is not happening to me!

Informations and facts:
R1 Fa0/0 = 10.0.0.1 255.255.255.240
R2 Fa0/0 = 10.0.0.2 255.255.255.240
R3 Fa0/0 = 10.0.0.3 255.255.255.240
R4 Fa0/0 = 10.0.0.4 255.255.255.240
No loopbacks/router-id command has been used.
OSPF version 2.

I started R1 and R2 ospf process and R1 became the DR R2 the BDR. Why?!!!

Then as it was planning to be when i introduce them R3 nothing changed (this is normal...because in order to change the result you must clear ospf process).

So I cleared the ospf process in R1 and guess what... R2 became the DR ! and not the R3 ! (???)

I added R4 into the party I cleared R2 s ospf process and then R3 became the DR and R4 the BDR. (???)
R2#clear ip ospf processReset ALL OSPF processes? [no]: yes
R2#show ip ospf nei


Neighbor ID Pri State Dead Time Address Interface
10.0.0.1 1 2WAY/DROTHER 00:00:32 10.0.0.1 FastEthernet0/0
10.0.0.3 1 FULL/DR 00:00:30 10.0.0.3 FastEthernet0/0
10.0.0.4 1 FULL/BDR 00:00:39 10.0.0.4 FastEthernet0/0

After clearing R3s process as well R4 became the DR and R2 the BDR ( ok R4 is the right DR but why R2 became the BDR?!?! )
R3#show ip ospf nei

Neighbor ID Pri State Dead Time Address Interface
10.0.0.1 1 2WAY/DROTHER 00:00:39 10.0.0.1 FastEthernet0/0
10.0.0.2 1 FULL/BDR 00:00:36 10.0.0.2 FastEthernet0/0
10.0.0.4 1 EXSTART/DR 00:00:36 10.0.0.4 FastEthernet0/0
R3#show ip ospf nei


Neighbor ID Pri State Dead Time Address Interface
10.0.0.1 1 2WAY/DROTHER 00:00:35 10.0.0.1 FastEthernet0/0
10.0.0.2 1 FULL/BDR 00:00:38 10.0.0.2 FastEthernet0/0
10.0.0.4 1 FULL/DR 00:00:36 10.0.0.4 FastEthernet0/0

I cleared ospf process of R4 and then the chaos continue ofcourse ->
R4#show ip ospf nei

Neighbor ID Pri State Dead Time Address Interface
10.0.0.1 1 2WAY/DROTHER 00:00:33 10.0.0.1 FastEthernet0/0
10.0.0.2 1 FULL/DR 00:00:30 10.0.0.2 FastEthernet0/0
10.0.0.3 1 FULL/BDR 00:00:34 10.0.0.3 FastEthernet0/0

After I thought... This has something to do with the clearing of the process in the one router... and what I did was to clear the ospf process simultaneously in all routers... and finally everything became right!
R4#show ip ospf nei

Neighbor ID Pri State Dead Time Address Interface
10.0.0.1 1 FULL/DROTHER 00:00:39 10.0.0.1 FastEthernet0/0
10.0.0.2 1 FULL/DROTHER 00:00:39 10.0.0.2 FastEthernet0/0
10.0.0.3 1 FULL/BDR 00:00:39 10.0.0.3 FastEthernet0/0

Although I still want to explain what was happening when I was clearing one by one the process f rom the DRs. I hypothesize that looking in the order of the events the OSPF elections has something to do with a timer of the older entry or something like that. For example lets forget the first elections between R1 and R2 (although it may explains the R1 result as well since ospf process was older than R2s) and lets focus when R3 came into play. When I cleared R1s process R2 became the DR instead of R3 (with my theory :P since R2s process is older than R3s) and the same thing happened after I cleared R2s process (R3 became the DR and not R4)

SO...

I need an explanation about this UFO and extra-terrestial activity in my lab! My hypothesis probably is wrong :P and my books arent saying something about that icon_sad.gif


Help pls!

Comments

  • networker050184networker050184 Mod Posts: 11,962 Mod
    Which ever router comes online first will usually become the DR as it's a finite amount of time it waits before declaring itself the DR.

    When R3 comes online and R1 leaves the current BDR is elevated to DR and a new BDR election takes place.

    Everything you are describing is exactly how it is designed to work. Nothing extra terrestrial about it!
    An expert is a man who has made all the mistakes which can be made.
  • altdrugzaltdrugz Member Posts: 69 ■■□□□□□□□□
    When R3 comes online and R1 leaves the current BDR is elevated to DR and a new BDR election takes place.

    So whenever you clear the process from a DR the BDR becomes the DR and a new BDR is elected from the DROTHERs ?
  • networker050184networker050184 Mod Posts: 11,962 Mod
    Yep that's correct. What would be the point of having a BDR if you had to do a whole new DR election if the DR failed?
    An expert is a man who has made all the mistakes which can be made.
  • altdrugzaltdrugz Member Posts: 69 ■■□□□□□□□□
    Mkay. Thanks!
    And about ->
    Which ever router comes online first will usually become the DR as it's a finite amount of time it waits before declaring itself the DR.

    That means that in the first election between 2 routers the one that sends the first hello becomes the DR? Or it just declares himself DR after an expired timer? If this expired timer happens to 2 routers what is happening?
  • networker050184networker050184 Mod Posts: 11,962 Mod
    It uses the dead interval as a timer. When the router comes online and establishes a 2way state it will accept the currently elected DR/BDR. If there is not a DR/BDR the routers will claim themselves to be the DR/BDR and elections are held.
    An expert is a man who has made all the mistakes which can be made.
  • altdrugzaltdrugz Member Posts: 69 ■■□□□□□□□□
    Yes..thank you networker!.. I figured out some additional informations about DR/BDR "solo" election:
    I shutdown all the interfaces and no shut only R2s Fa0/0
    FastEthernet0/0 is up, line protocol is up Internet Address 10.0.0.2/28, Area 0
    Process ID 11, Router ID 10.0.0.2, Network Type BROADCAST, Cost: 10
    Transmit Delay is 1 sec, State WAITING, Priority 1
    No designated router on this network
    No backup designated router on this network
    Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:08
    Wait time before Designated router selection 00:00:38 <----
    R2#show ip ospf inteFastEthernet0/0 is up, line protocol is up
    Internet Address 10.0.0.2/28, Area 0
    Process ID 11, Router ID 10.0.0.2, Network Type BROADCAST, Cost: 10
    Transmit Delay is 1 sec, State DR, Priority 1
    Designated Router (ID) 10.0.0.2, Interface address 10.0.0.2

    and from another point of view ( R1s Fa0/0)
    R1#show ip ospf int
    FastEthernet0/0 is administratively down, line protocol is down
    Internet Address 10.0.0.1/28, Area 0
    Process ID 10, Router ID 10.0.0.1, Network Type BROADCAST, Cost: 1
    Transmit Delay is 1 sec, State DOWN, Priority 1

    This confirms that it indeed elects itself as DR when it goes up.
Sign In or Register to comment.