| 场景 | 区域安全加固、防止非法设备接入 OSPF |
|---|---|
| 适用 | 全部三层设备 |
| 命令族 | authentication-mode / area authentication + key / authentication-mode |
华为 VRP
华为 VRP
[Huawei-ospf-1] area 0
[Huawei-ospf-1-area-0.0.0.0] authentication-mode md5 1 cipher Huawei@123
! simple 模式:authentication-mode simple cipher Huawei@123思科 IOS
思科 IOS
SW-CORE-01(config)# router ospf 1
SW-CORE-01(config-router)# area 0 authentication message-digest
SW-CORE-01(config-if)# ip ospf message-digest-key 1 md5 Cisco@123
! 简单口令:area 0 authentication + ip ospf authentication-keyH3C Comware
H3C Comware
[H3C-ospf-1] area 0
[H3C-ospf-1-area-0.0.0.0] authentication-mode md5 1 cipher H3C@123思科的区域认证要配两段:区域里声明模式 + 接口上放密钥;华为/H3C 在区域视图一次配完密钥。区域认证对区域内所有接口生效,接口认证优先级更高(两者可共存,匹配规则取接口)。