Monday, January 3, 2011

DR and BDR Election

In an OSPF network, there is a router that is the "master" router and "backup-master" router. These routers are the 'leader' of the OSPF network. These routers are called the Designated Router (DR) which is the main active router and Backup Designated Router (BDR). All other routers are DROTHERs. A major drawback of DV protocols are slow convergence. This problem does not occur to LS protocols, since they converge almost immediately upon topology change by having DR and BDR. Upon change of network configuration, any detecting router on the same OSPF segment will send a multicast to 224.0.0.6 which is listened only by DR and BDR routers. Both DR and BDR will process the receiving information, where after that the DR will send a multicast via 224.0.0.5 to all non-DR and non-BDR routers about the change.

There are 4 stages in order to elect the DR and BDR in a OSPF segment:

1. The router sending a Hello packet with the highest router priority is elected as the DR. Every router which has a priority higher than 1 (where 1 is the default priority, set at the interface) can participate in the election. The highest priority is 255. To eliminate a router from the election, the interface priority must be set to 0 with the command "(config-if)#ip ospf priority 0".

2. If there are more than one router with the same highest priority, then the router with the highest RID (Router ID) wins, regardless whether that interface is OSPF enabled or not. RID is the highest logical (loopback) IP address.

3. If there is no loopback address, then the router with the highest IP address will be the DR, regardless whether that interface is OSPF enabled.

4. The process 1-3 is repeated for BDR. A router CAN NOT be a DR and BDR at the same time for the same segment.

5. If the DR is down, the BDR will be the DR and a new election is done to choose the replacement BDR from the DROTHER routers. If the original DR is up again, the DR will not affect the current configuration and will therefore NOT be automatically the DR again, but it will be a DROTHER router. The DR can be the original DR configuration again only if the other routers are reloaded or the OSPF process is cleared.

To set a particular router to a DR, BDR or DROTHER, the priorities of the routers need to be changed. 3 ways can be done to change these priorities:

1. Change the OSPF priority with the ip ospf priority command
2. Setting the OSFP Router ID manually with router-id
3. Setting the OSPF Router ID to the desired value by configuring the loopback interface.

The priorities will take change only if the routers are reloaded of the OSPF process is cleared.

-- 4 January 2011 --

No comments:

Post a Comment