I have 2 questions regarding loopback interfaces usage for OSPF.
1) What are the reason or advantages behind using an exact address (ex: network 192.168.1.254 0.0.0.0 area 0) over a whole subnet (ex: network 192.168.1.254 0.0.0.255 area 0) when setting a loopback interface?
2) What are the benefits of using a loopback interface over router priority to manipulate the DR election process?
I have to disagree, first of all the RID needs not be advertised via OSPF, secondly a RID will never be rechosen unless the ospf process is manually cleared or the router is reloaded - or if the RID is manually configured.
Accordingly, i totally agree with Rick that using the priority is the most recommended action, although manually setting the RID (or controlling it via the highest loopback address) has other benefits when it comes to using virtual-links for example.
Anyway the DR election process is not that straight forward, i hope that the following explanation would be satisfactory:
A router declares its priority value via the "Rtr Pri" field in the OSPF hello packet. This value is configured under the interface via the "ip ospf priority <0-255>" command, with 1 being the default, and 0 meaning that the router is ineligible to become a DR or a BDR, and the higher priority wins. The RID serves as a tie-breaker when the priority values are the same. One important thing to keep in mind, the DR/BDR election is not pre-empitive, thus the first router to come up will be the DR and the second will be the BDR, the rules of election are oÂnly effective when oÂne of them fail. If the BDR fails, a new BDR is elected according to the rules of election. oÂn the other hand if the DR fails, the BDR takes the DR role, and a new BDR is elected according to the rules of election. Using "ip ospf priority 0" is the strongest tool with the lowest impact if you wish to have an instantaneous action, it doesn't require resetting the OSPF process. If configured oÂn router that is a DR or a BDR, this router will resign its role immediately.
I hope that i've been informative.