Question: how ospf dr and bdr are elected?
Answer: Two rules are used to elect a DR and BDR: router with the highest OSPF priority will become a DR. By default, all routers have a priority of 1. if there is a tie, a router with the highest router ID wins the election.