ospf dr-priority

Function

The ospf dr-priority command sets the priority of an interface that runs for the DR or BDR.

The undo ospf dr-priority command restores the default value.

By default, the priority is 1.

Format

ospf dr-priority priovalue

undo ospf dr-priority

Parameters

Parameter Description Value
priovalue

Specifies the priority of the interface that runs for the DR or BDR. The greater the value, the higher the priority.

The value is an integer ranging from 0 to 255. The default value is 1.

Views

100GE interface view, 10GE interface view, 25GE sub-interface view, 25GE interface view, 400GE interface view, 40GE interface view, 50GE sub-interface view, 50GE interface view, Eth-Trunk interface view, FlexE interface view, GE optical interface view, GE electrical interface view, GMPLS-UNI interface view, Global VE sub-interface view, Tunnel interface view, VBDIF interface view, VE sub-interface view, VLANIF interface view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
ospf write

Usage Guidelines

Usage Scenario

The priority of an interface determines whether the interface is qualified to be a DR or BDR. The interface with the highest priority is elected as the DR or BDR. If the priority of an interface on a device is 0, the device cannot be elected as a DR or BDR. On a broadcast or an NBMA network, you can set the priority of an interface to control the DR or BDR selection.

Configuration Impact

When the DR and BDR are elected on a network segment, they send DD packets to all neighboring nodes and set up adjacencies with all neighboring nodes.

Precautions

Restarting or shutting down an interface will interrupt the OSPF adjacency between devices. Therefore, exercise caution when performing the operation.

If the priority of a device is re-configured, the DR or BDR on the network will not be re-elected. To change the DR or BDR, use either of the following methods. This, however, will interrupt the OSPF adjacency between devices. Therefore, exercise caution when performing the operation.

  • Restart the OSPF processes on all devices.
  • Run the shutdown and undo shutdown commands on the interfaces where OSPF adjacencies are set up.

    In OSPF, the priority cannot be configured for null interfaces.

Example

# Set the priority of GE 0/1/0 that runs for the DR or BDR to 8.
<HUAWEI> system-view
[~HUAWEI] interface GigabitEthernet 0/1/0
[~HUAWEI-GigabitEthernet0/1/0] ospf dr-priority 8
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >