What is the reason to use the ip OSPF priority command when the OSPF routing protocol is in use?

93.What is one reason to use the ip ospf priority command when the OSPFrouting protocol is in use?to influence the DR/BDR election process*to streamline and speed up the convergence processto provide a backdoor for connectivity during the convergence processto activate the OSPF neighboring process

OSPF uses a DR (Designated Router) and BDR (Backup Designated Router) on each multi-access network. A multi-access network is a segment where we have more than two routers. OSPF figures this out by looking at the interface type. For example, an Ethernet interface is considered a multi-access network, and a serial interface is considered a point-to-point interface.




Most CCNA students think that this DR/BDR election is done per area but this is incorrect. I’ll show you how the election is done and how you can influence it. This is the topology we’ll use:

What is the reason to use the ip OSPF priority command when the OSPF routing protocol is in use?

Here’s an example of a network with 3 OSPF routers on a FastEthernet network. They are connected to the same switch (multi-access network) so there will be a DR/BDR election. OSPF has been configured so all routers have become OSPF neighbors, let’s take a look:

R1#show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 192.168.123.2 1 FULL/BDR 00:00:32 192.168.123.2 FastEthernet0/0 192.168.123.3 1 FULL/DR 00:00:31 192.168.123.3 FastEthernet0/0

From R1 perspective, R2 is the BDR and R3 is the DR.

R3#show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 192.168.123.1 1 FULL/DROTHER 00:00:36 192.168.123.1 FastEthernet0/0 192.168.123.2 1 FULL/BDR 00:00:39 192.168.123.2 FastEthernet0/0

When a router is not the DR or BDR it’s called a DROTHER. I have no idea if we have to pronounce it like “BROTHER with a D” or “DR-OTHER” 🙂 Here we can see that R1 is a DROTHER.

R2#show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 192.168.123.1 1 FULL/DROTHER 00:00:31 192.168.123.1 FastEthernet0/0 192.168.123.3 1 FULL/DR 00:00:32 192.168.123.3 FastEthernet0/0

And R2 (the BDR) sees the DR and DROTHER.

Of course we can change which router becomes the DR/BDR by playing with the priority. Let’s turn R1 in the DR:

R1(config)#interface fastEthernet 0/0 R1(config-if)#ip ospf priority 200

You change the priority if you like by using the ip ospf priority command:

  • The default priority is 1.
  • A priority of 0 means you will never be elected as DR or BDR.
  • You need to use clear ip ospf process before this change takes effect.
R1#show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 192.168.123.2 1 FULL/BDR 00:00:31 192.168.123.2 FastEthernet0/0 192.168.123.3 1 FULL/DR 00:00:32 192.168.123.3 FastEthernet0/0

As you can see R3 is still the DR, we need to reset the OSPF neighbor adjacencies so that we’ll elect the new DR and BDR.

R3#clear ip ospf process Reset ALL OSPF processes? [no]: yes R2#clear ip ospf process Reset ALL OSPF processes? [no]: yes

I’ll reset all the OPSF neighbor adjacencies.

R1#show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 192.168.123.2 1 FULL/DROTHER 00:00:36 192.168.123.2 FastEthernet0/0 192.168.123.3 1 FULL/BDR 00:00:30 192.168.123.3 FastEthernet0/0

Now you can see R1 is the DR because the other routers are DROTHER and BDR.

R3#show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 192.168.123.1 200 FULL/DR 00:00:30 192.168.123.1 FastEthernet0/0 192.168.123.2 1 FULL/DROTHER 00:00:31 192.168.123.2 FastEthernet0/0

Or we can confirm it from R3, you’ll see that R1 is the DR and that the priority is 200.

Want to take a look for yourself? Here you will find the startup configuration of each device.

R1

hostname R1 ! ip cef ! interface FastEthernet0/0 ip address 192.168.123.1 255.255.255.0 ip ospf priority 200 ! router ospf 1 network 192.168.123.0 0.0.0.255 area 0 ! end

R2

hostname R2 ! ip cef ! interface FastEthernet0/0 ip address 192.168.123.2 255.255.255.0 ! router ospf 1 network 192.168.123.0 0.0.0.255 area 0 ! end

R3

hostname R3 ! ip cef ! interface FastEthernet0/0 ip address 192.168.123.3 255.255.255.0 ! router ospf 1 network 192.168.123.0 0.0.0.255 area 0 ! end


Something you need to be aware of is that the DR/BDR election is per multi-access segment…not per area!). Let me give you an example:

What is the reason to use the ip OSPF priority command when the OSPF routing protocol is in use?

In the example above we have 2 multi-access segments. Between R2 and R1, and between R2 and R3. For each segment, there will be a DR/BDR election.

Sets the priority of a router to determine the designated OSPF router for a network.

Syntax: ip ospf priority number

no ip ospf priority

number

A number between 0 and 255 that specifies the priority of this interface.

Each broadcast and Non-Broadcast Multi-Access (NBMA) network has a designated router. If the network is a transit network, the designated router generates a link state advertisement (LSA) for the network and has other responsibilities required for the running of the protocol. The designated router is elected by the Hello Protocol.

The designated router concept reduces the amount of routing protocol traffic and reduces the size of the link-state database by enabling a reduction in the number of adjacencies required on a broadcast or non-broadcast multi-access network.

When two routers attached to a network both attempt to become the designated router, the router with the highest priority becomes the designated router. A router whose priority is set to 0 is ineligible to become designated router or backup designated router.

Use the ip ospf priority [1 - 255] command to set the priority to a value between 1 and 255.

Use the ip ospf priority 0 command to configure the router to never function as the designated router or backup designated router.

Use the no ip ospf priority command to set the priority at the default value of 1.

Factory Default: 1.

Command Mode: Interface configuration.

Example 1: In the following example, the ip ospf priority number command configures the router with a priority of 3, and the show ip ospf interface pos command displays the setting:

router(config-router)#interface pos 1/1/1

router(config-if)#ip ospf priority 3

router(config-if)#end

router#show ip ospf int pos 1/1/1

Name: POS 1/1/1

Address: 201.1.1.10

Net type:             Broadcast

State:                

Area: 0.0.0.0

DR: 0.0.0.0

BDR: 0.0.0.0

Priority:             3

Cost: 10

Hello int: 10

Dead int: 40

Retrans int: 5

Transmit delay: 1

Example 2: In the following example, the ip ospf priority 0 command ensures that the router will never become the designated OSPF router for this network:

router(config)#router ospf 1

router(config-router)#network 10.1.1.0 0.0.0.255 area 0

router(config-router)#interface pos 1/1/1

router(config-if)#ip ospf priority 0

Related Commands: network area
router ospfinterface

show ip ospf interface

Copyright © 2004 Avici Systems Inc.
Avici® and TSR® is a registered trademark of Avici Systems Inc.
IPriori™, Composite Links™, SSR™, QSR, and NSR® are trademarks of Avici Systems Inc.

   Source File Name: ospf.fm     HTML File Name: ospf13.html

    Last Updated: 05/10/04 at 16:34:58