The OSPF DR / BDR router election algorithm within IOS
The OSPF BDR / DR election is only performed for SWITCHED networks, not on serial networks.
The whole idea of having a DR is to minimise the flooding of LSA’s to neighbouring routers. Once a neighbour relationship with a DR has been established, the DR (by default) will only have to multicast the LSA’s once every 30 minutes.
The DR plays no other special role within the routing process.
The Backup Designated Router (BDR) will become DR once the DR is unreachable. A new BDR will be elected if available.
The Designated Router (DR) is elected by using the following criteria;
1. The highest Router Priority: the priority ranges from 0-255, where 1 is default for a switched network. 0 is default for a serial network and implies “do not take part in the election”.
The default of 1 for switched networks is usually left as is.
If there is a tie in the Router Priority, the highest Router ID is used to elect a DR. The Router ID is a 32-bit, dotted decimal number resembling an IP address but is solely used for naming the router.
The Router ID is determined at the STARTUP of the OSPF router process and will not change during it’s lifecycle.
2. The Router ID is determined by:
-Manual configuration; here the administrator has manually set a Router ID.
-If no manual Router ID has been configured, the highest IP address on any LoopBack interface at the time of the OSPF process startup.
-If no loopback IP addresses are configured either, the Router ID will become the highest ACTIVE IP address at the time of the OSPF process startup.
NOTE: The Router ID or Router Priority will NEVER change pre-emptive. Not even if the IP address that has determined the Router ID has changed or been removed. During the lifecycle of the OSPF router process, Router ID and Router Priority remain unchanged.
To change the Router ID or Router Priority, a restart of the OSPF process is needed.