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.

 

OSPF router can elect one router to be a Designated Ruter (DR) and one router to be a Backup Designated Router (BDR). For example, on multiaccess broadcast networks (such as LANs) routers defaults to elect a DR and BDR. DR and BDR serve as the central point for exchanging OSPF routing information. Each non-DR or non-BDR router will exchange routing information only with the DR and BDR, instead of exchanging updates with every router on the network segment. DR will then distribute topology information to every other router inside the same area. This greatly reduces OSPF traffic.
To send routing information to a DR or BDR the multicast address of 224.0.0.6 is used. DR sends routing updates to the multicast address of 224.0.0.5. If DR fails, BDR takes over its role of redistributing routing information-regardless of whether a higher-priority router has joined the subnet- and new election is held to choose a new BDR. If the BDR fails, a new election is held for the BDR, and the DR remains unchanged.
Every router on a network segment establish a full neighbor relationship with the DR and BDR. Non-DR and non-BDR routers establish a two way neighbor relationship between themselves.
NOTE – on point-to-point links a DR and BDR are not elected since only two routers are directly connected.
On LANs, DR and BDR have to be elected.
Two rules are used to elect a DR and BDR:
1.    router with the highest OSPF priority will become a DR.
By default, all routers have a priority of 1.

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

Usage Guidelines

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.

Examples

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.
The router with the second highest OSPF priority or router ID will become a BDR.

Router-id

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)#router-id ip-address 
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

Usage Guidelines

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.

Examples

The following example specifies a fixed router-id:

router-id 10.1.1.1