ip ospf priority

To set the router priority for an Open Shortest Path First (OSPF) interface, use the ip ospf priority command. To return to the default, use the no form of this command.

ip ospf priority number-value

no ip ospf priority number-value

Syntax Description

Number that specifies the priority of the router. The range is from 0 to 255.

Command Default

Priority of 1

Command Modes

Interface configuration mode

Command History

This command was introduced.

Usage Guidelines

Use the ip ospf priority command to set the router priority, which determines the designated router for this network. When two routers are attached to a network, both attempt to become the designated router. The router with the higher router priority takes precedence. If there is a tie, the router with the higher router ID takes precedence. A router with a router priority set to zero cannot become the designated router or backup designated router.

Cisco NX-OS uses this priority value when you configure OSPF for broadcast networks using the neighbor command in router configuration mode.

This command requires the LAN Base Services license.


This example shows how to set the router priority value to 4:

switch# configure terminal
switch(config)# interface ethernet 1/2
switch(config-if)# no switchport
switch(config-if)# ip ospf priority 4

Related Commands

ip ospf network
Configures the OSPF network type to a type other than the default for a given medium.