IP OSPF Priority
This command is used to manually set the DR election priority of a link. By default all links are equal with a priority of 1. Higher is better. A priority of 0 is used to prevent a router from ever becoming DR which is useful in hub and spoke topologies where the hub must be the DR.
Note: OSPF does not support preemption, meaning that if a router with a higher priority joins the network it will not become DR unless the elected DR goes down.
Router(config-if)#ip ospf priority <number>
In this example, we will use priority to make sure R4 is elected DR for the frame-relay network..
First, we will configure R4 with the highest priority to ensure it will always win an election.
Next, we will set R1 to have a priority of 0 so it can never win.
We then do the same with R3.
Since frame-relay has a default non-broadcast network type, we will either need to add neighbor statements or use a broadcast network type.
We can see that R4 is indeed the DR.
R4(config-if)#ip ospf network broadcast
*Mar 1 01:57:23.803: %OSPF-5-ADJCHG: Process 1, Nbr 18.104.22.168 on Serial0/0 from LOADING to FULL, Loading Done
R4(config-if)#do show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface