认证模式
一、明文认证配置【可以通过抓包查看密码】
配置很简单设备相连的两个接口上做配置
[AR2]interface GigabitEthernet 0/0/0
[AR2-GigabitEthernet0/0/0]ospf authentication-mode simple cipher HCIE
[AR3]interface GigabitEthernet 0/0/1
[AR3-GigabitEthernet0/0/1]ospf authentication-mode simple cipher HCIE
simple:模式为明文
cipher:反正一些朋友通过设备看见密码,使密码在设备上显示为乱码
HCIE:密码
authentication-mode:安全认证模式
二、密文认证【无法通过抓包文件抓到密码】
配置同样很简单
1、进入ospf的进程
ospf 1
2、进入相应要加密的区域
area XX
3、选择加密模式和密码并且自定义钥匙编号
authentication-mode md5 1-255 cipher xxx
MD5:加密模式为md5加密模式
1-255:key ID 这里值可以是1-255 的任意一个数字
xxx:自定义密码
![](https://img-blog.csdnimg.cn/direct/f2984777e0a04dbe8930961a6dc0a761.png)
这里必须保持密码相同、key ID 相同、模式相同。两种认证同事使用则优先显示的是明文认证