Multiaccess networks can create two challenges for OSPF regarding the flooding of LSAs:
- Creation of multiple adjacencies – Ethernet networks could potentially interconnect many OSPF routers over a common link. Creating adjacencies with every router is unnecessary and undesirable. It would lead to an excessive number of LSAs exchanged between routers on the same network. For n number of routers, there will be n(n-1)/2 adjacencies. As routers are added to the network, the number of adjacencies increases dramatically.
- Extensive flooding of LSAs – Link-state routers flood their LSAs any time OSPF is initialized, or when there is a change in the topology. This flooding can become excessive.
The solution to managing the number of adjacencies and the flooding of LSAs on a multiaccess network is the DR. On multiaccess networks, OSPF elects a DR to be the collection and distribution point for LSAs sent and received. A BDR is also elected in case the DR fails. All other routers become DROTHERs. A DROTHER is a router that is neither the DR nor the BDR.
1. router with the highest OSPF priority will become a DR.
ip ospf priority
To set the router priority, use the ip ospf priority command in interface configuration mode.
To return to the default value, use the no form of this command.
R1(config-if)#ip ospf priority number-value //The range is from 0 to 255.
R1(config-if)#no ip ospf priority number-value
A router with a router priority set to 0 is ineligible to become the designated router or backup designated router, never take in the election.
A router with 255 will always win out.
Command Modes: Interface configuration
When two routers attached to a network both attempt to become the designated router, the one with the higher router priority takes precedence. If there is a tie, the router with the higher router ID takes precedence. Router priority is configured only for interfaces to multiaccess networks (in other words, not to point-to-point networks).
This priority value is used when you configure OSPF for nonbroadcast networks using the neighbor router configuration command for OSPF.
The following example sets the router priority value to 4:
r1(config)#nterface ethernet 0
r1(config-if)#ip ospf priority 4
2. If there is a tie, a router with the highest router ID wins the election.
To use a fixed router ID, use the router-id command in router configuration mode. To force OSPF to use the previous OSPF router ID behavior, use the no form of this command.
router(config)#no router-id ip-address
A 0.0.0.0 will never win, 255.255.255.255 will always win!
Defaults: No OSPF routing process is defined.
Command Modes: Router configuration
You can configure an arbitrary value in the IP address format for each router. However, each router ID must be unique.
If this command is used on an OSPF router process which is already active (has neighbors), the new router-ID is used at the next reload or at a manual OSPF process restart.
The OSPF election must be negotiated using one of the following methods:
- Shutdown the router interfaces and then re-enable them starting with the DR, then the BDR, and then all other routers.
- Reset the OSPF process using the clear ip ospf process privileged EXEC mode command on all routers.
The following example specifies a fixed router-id: