动态路由协议ospf配置验证
1、动态路由协议ospf支持明文验证和加密验证。我们这里以三台2811路由器配置。

2、拓扑图中,我们配置路由R1和R2明文验证,R2和R3加密验证。
查看R1的直接网络
R1#sh ip int bri

3、配置R1的ospf
R1(config-if)#router ospf 1
R1(config-router)#network 192.168.1.1 0.0.0.0 area 0

4、查看R2的直接网络
R2#sh ip int bri

5、配置R2的ospf
R2(config-if)#router ospf 1
R2(config-router)#network 192.168.1.2 0.0.0.0 area 0
R2(config-router)#network 192.168.2.1 0.0.0.0 area 0
6、查看R3的直接网络
R3#sh ip int bri

7、配置R3的ospf
R3(config-if)#router ospf 1
R2(config-router)#network 192.168.2.2 0.0.0.0 area 0

8、验证是在线路上的验证,我们配置R1的接口线路。我们先配置明文验证。
R1(config)#interface fa0/0
R1(config-if)#ip ospf authentication
R1(config-if)#ip ospf authentication-key ospf
这里的密码设置为ospf

9、线路是双向的,我们还要配置R2的明文验证。验证类型和密码都要一样。
R2(config)#interface fa0/0
R2(config-if)#ip ospf authentication
R3(config-if)#ip ospf authentication-key ospf

10、配置R2加密验证 message-digest,加密类型是md5。
R2(config)#interface fa0/1
R2(config-if)#ip ospf authentication message-digest
R2(config-if)#ip ospf message-digest-key 1 md5 eigrp

11、配置R3加密验证 message-digest,加密类型是md5。
R3(config)#inter fa0/1
R3(config-if)#ip ospf authentication message-digest
R3(config-if)#ip ospf message-digest-key 1 md5 eigrp

12、查看路由邻居表
R2#show ip ospf neighbor
