The ospf dr-priority command sets a priority for an interface that participates in the DR election.
The undo ospf dr-priority command restores the default setting.
By default, the priority is 1.
Parameter | Description | Value |
---|---|---|
priority | Specifies the priority of an interface that participates in the DR or BDR election. A larger value indicates a higher priority. | The value is an integer ranging from 0 to 255. |
Usage Scenario
The DR priority of an interface determines whether it is qualified to be a DR. The interface with the highest DR priority is elected as the DR. If the DR priority of an interface on a device is 0, the device cannot be elected as a DR or a BDR. On a broadcast or NBMA network, you can set a DR priority for an interface to determine whether it is qualified to be a DR or a BDR.
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, perform the operation with caution.
If the DR priority of a device is re-configured, the DR or BDR on the network will not be re-elected. You can re-elect a DR or a BDR by using either of the following methods. This, however, will interrupt the OSPF adjacency between devices. Therefore, use the following methods with caution.
In OSPF, the DR priority cannot be configured for null interfaces.
# Set the priority of VLANIF100 that participates in the DR election to 8.
<HUAWEI> system-view
[HUAWEI] interface vlanif 100
[HUAWEI-Vlanif100] ospf dr-priority 8
# Set the priority of GE0/0/1 that participates in the DR election to 8.
<HUAWEI> system-view [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] undo portswitch [HUAWEI-GigabitEthernet0/0/1] ospf dr-priority 8