OSPF master slave election
For every OSPF neighbor adjacency, one of the two routers is elected as a master, and the other is a slave. The master sends the first Database Description Packet (DDP) , and is the only part that is allowed to retransmit. The slave can only respond to the master's Database Description Packets. The master/slave relationship is negotiated in state ExStart.
The router with the higher router ID becomes master.