How OSPF elects DR ?

Answered Question
Jun 27th, 2010

Hello,

Currently studying for CCNA. Have a GNS3 lab with 4 logical routers. And then I implement ospf, i see that the DR's is not selected by RID (Router ID).

For example first Router in a row info:

Router#sh ip ospf interface
FastEthernet0/0 is up, line protocol is up
  Internet Address 172.16.1.1/24, Area 0
  Process ID 1, Router ID 172.16.1.1, Network Type BROADCAST, Cost: 1
  Transmit Delay is 1 sec, State DR, Priority
  Designated Router (ID) 172.16.1.1, Interface address 172.16.1.1
  Backup Designated router (ID) 172.16.2.1, Interface address 172.16.1.2
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:06
  Index 1/1, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 0, maximum is 1
  Last flood scan time is 0 msec, maximum is 4 msec
  Neighbor Count is 1, Adjacent neighbor count is 1
    Adjacent with neighbor 172.16.2.1  (Backup Designated Router)
  Suppress hello for 0 neighbor(s)

it's ip address as u see is 172.16.1.1, and he connects directly to another router interface (172.16.1.2). So my question would be why i see the DR itself rather than the another router with higher ID (172.16.1.2) ?

I have this problem too.
0 votes
Correct Answer by Richard Burts about 6 years 5 months ago

The output that you post manages to omit the OSPF priority of the interface

(  Transmit Delay is 1 sec, State DR, Priority  )

and the priority of the interface might make a difference in election of the DR.

But what you are finding is likely the result of a timing issue. It is not entirely clear in the documentation about election of DR (which emphasizes priority of candidates) but there is an element of timing in the election of DR. When an IOS router is running OSPF and it initializes its interfaces, then it seeks to initiate an election of DR. It sends out OSPF HELLO messages and proposes itself as the DR. If there are no other OSPF routers active on the subnet of the interface, then the router "wins" the election (it was the only candidate) and becomes the DR of that segment. If other routers on that subnet become active later, even if they have better priority or have better IP addresses, the election has already taken place and the first router active on the subnet is the DR.

HTH

Rick

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Correct Answer
Richard Burts Wed, 06/30/2010 - 01:10

The output that you post manages to omit the OSPF priority of the interface

(  Transmit Delay is 1 sec, State DR, Priority  )

and the priority of the interface might make a difference in election of the DR.

But what you are finding is likely the result of a timing issue. It is not entirely clear in the documentation about election of DR (which emphasizes priority of candidates) but there is an element of timing in the election of DR. When an IOS router is running OSPF and it initializes its interfaces, then it seeks to initiate an election of DR. It sends out OSPF HELLO messages and proposes itself as the DR. If there are no other OSPF routers active on the subnet of the interface, then the router "wins" the election (it was the only candidate) and becomes the DR of that segment. If other routers on that subnet become active later, even if they have better priority or have better IP addresses, the election has already taken place and the first router active on the subnet is the DR.

HTH

Rick

Actions

This Discussion