首页/网络/网络设备配置速查/OSPF 被动接口(silent-interface / passive-interface)
路由(静态 / OSPF)62 条

OSPF 被动接口(silent-interface / passive-interface)

上联口起邻居、下联接终端的接口只想宣告网段不想发 Hello:被动接口只收不发 Hello、不建邻接,但仍把网段放进 LSA。

网络设备配置速查网络更新于 2026-10-12
场景接入层/用户网段只宣告不建邻居
适用全部三层设备
命令族silent-interface / passive-interface / silent-interface

华为 VRP

华为 VRP
[Huawei] ospf 1
[Huawei-ospf-1] silent-interface GigabitEthernet0/0/24
! 也可 silent-interface all 再对个别上联口 undo

思科 IOS

思科 IOS
SW-CORE-01(config)# router ospf 1
SW-CORE-01(config-router)# passive-interface gi0/24
SW-CORE-01(config-router)# passive-interface default   ! 全被动
SW-CORE-01(config-router)# no passive-interface gi0/1  ! 上联口例外

H3C Comware

H3C Comware
[H3C] ospf 1
[H3C-ospf-1] silent-interface GigabitEthernet1/0/24
! 同样支持 silent-interface all + undo 例外
三厂语义一致:接口不发不收 OSPF Hello,但该网段(匹配 network 宣告的)照常进 LSA 被其他路由器学到。与 ACL 阻断的区别:被动接口是协议级开关,链路两端行为对称可控。

易错点

  • 以为被动接口后网段不被宣告:仍会进 LSA
  • 给需要建邻居的两台路由器之间配了被动:邻居永远起不来

数据来源与参考

  • 华为 silent-interface
  • Cisco passive-interface
  • H3C silent-interface

相关工具

​‌‌​​‌​​​‌‌​‌‌‌‌​‌‌​​​‌‌​‌‌‌​​‌‌​​‌​‌‌‌​​‌‌‌​​​‌​‌‌​‌​​‌​‌‌‌​​​‌​‌‌​‌​​‌​‌‌​​​‌‌​‌‌‌​‌​​​‌‌​‌‌‌‌​​‌​‌‌‌​​‌‌​​​‌‌​‌‌​‌‌‌‌​‌‌​‌‌​‌