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-value
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

Release
Modification
5.0(3)N1(1)
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.

Examples

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
switch(config-if)#

Related Commands

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