OSPFInterface Config

ip ospf priority [0-255]

Sets the OSPF priority on an interface to influence the Designated Router (DR) and Backup Designated Router (BDR) election process in a broadcast multi-access network.

Syntax·Interface Config
ip ospf priority [0-255]

When to Use This Command

  • Ensuring a specific router becomes the DR by setting its priority higher than all other routers on the segment.
  • Preventing a router from participating in the DR/BDR election by setting its priority to 0, making it a DROTHER.
  • Manipulating DR/BDR election results during network maintenance or upgrades.
  • Balancing OSPF adjacency roles in a redundant network to control which router handles inter-area routing.

Command Examples

Setting OSPF priority to 255 to ensure DR election

interface GigabitEthernet0/0 ip ospf priority 255

This command sets the OSPF priority to 255, the highest possible value, ensuring this router becomes the DR on the broadcast segment. No output is generated; the change is applied immediately.

Setting OSPF priority to 0 to prevent DR/BDR participation

interface GigabitEthernet0/1 ip ospf priority 0

Setting priority to 0 makes the router ineligible to become DR or BDR. It will only form adjacencies with the DR and BDR. No output is generated.

Understanding the Output

The 'ip ospf priority' command does not produce any output when executed. To verify the configured priority, use 'show ip ospf interface [interface]'. In the output, look for the line 'Priority: <value>'. A priority of 0 indicates the router will never become DR or BDR. A priority of 1-255 indicates eligibility, with higher values increasing the chance of becoming DR. If priorities are equal, the router with the higher Router ID wins. After changing priority, the DR/BDR election does not occur immediately; it only happens when the current DR or BDR goes down or the OSPF process is reset.

CCNA Exam Tips

1.

Remember that priority only matters on broadcast and non-broadcast multi-access (NBMA) networks; point-to-point links do not use DR/BDR.

2.

The DR/BDR election is non-preemptive: changing priority after election does not force a new election unless the DR or BDR fails.

3.

A priority of 0 means the router is never elected as DR or BDR; it only forms full adjacencies with the DR and BDR.

4.

In the CCNA exam, you may be asked to determine which router becomes DR based on priority and Router ID; higher priority wins, then highest Router ID.

Common Mistakes

Setting priority to 0 on all routers, which prevents any DR/BDR election and can cause OSPF adjacency issues on broadcast networks.

Forgetting that priority changes do not take effect until the current DR or BDR goes down or the OSPF process is reset.

Confusing priority with cost; priority is for DR/BDR election, cost is for route metric calculation.

Related Commands

Practice for the CCNA 200-301

Test your knowledge with hundreds of CCNA practice questions covering all exam domains.

Practice CCNA Questions