| 场景 | 出口/边界设备向 OSPF 域内下发默认路由 |
|---|---|
| 适用 | ASBR / 边界路由器 |
| 命令族 | default-route-advertise / default-information originate / default-route-advertise |
华为 VRP
华为 VRP
[Huawei] ospf 1
[Huawei-ospf-1] default-route-advertise
! 本地需存在激活的默认路由;无条件发布用 default-route-advertise always
! 想随链路 cost 浮动(E1): default-route-advertise type 1思科 IOS
思科 IOS
SW-CORE-01(config)# router ospf 1
SW-CORE-01(config-router)# default-information originate
! 无条件:default-information originate always
! 类型:metric-type 1 指定 E1H3C Comware
H3C Comware
[H3C] ospf 1
[H3C-ospf-1] default-route-advertise
! 无条件:default-route-advertise always默认类型是 E2(cost 20 恒定),出口多链路时选路不敏感;需要按实际链路 cost 变化就用 type 1(思科 metric-type 1)。找不到路由的经典原因:本地默认路由下一跳没激活(递归失败)。