| 场景 | 指定核心交换机做 DR、避免次优转发路径 |
|---|---|
| 适用 | 广播型网络(以太网) |
| 命令族 | ospf dr-priority / ip ospf priority / ospf dr-priority |
华为 VRP
华为 VRP
[Huawei-GigabitEthernet0/0/1] ospf dr-priority 100
! 0=不参与选举;改后不抢占
<Huawei> reset ospf process ! 触发重选(会断邻居,慎用)思科 IOS
思科 IOS
SW-CORE-01(config-if)# ip ospf priority 100
SW-CORE-01# show ip ospf interface gi0/1 | include priority
SW-CORE-01# clear ip ospf process ! 重选(会断邻居,慎用)H3C Comware
H3C Comware
[H3C-GigabitEthernet1/0/1] ospf dr-priority 100
<H3C> reset ospf process ! 触发重选(会断邻居,慎用)把不希望做 DR 的设备优先级设 0(如防火墙/负载设备)。选举结果看 display ospf interface / show ip ospf interface 的 DR/BDR 字段,别只看邻居状态。