实验拓扑:
①划分区域
②划分网段
③配置环回口和接口ip
④配置ospf
⑤ping测试连通性
[r1]ping 10.0.34.4
PING 10.0.34.4: 56 data bytes, press CTRL_C to break
Reply from 10.0.34.4: bytes=56 Sequence=1 ttl=253 time=40 ms
Reply from 10.0.34.4: bytes=56 Sequence=2 ttl=253 time=30 ms
Reply from 10.0.34.4: bytes=56 Sequence=3 ttl=253 time=30 ms
Reply from 10.0.34.4: bytes=56 Sequence=4 ttl=253 time=20 ms
Reply from 10.0.34.4: bytes=56 Sequence=5 ttl=253 time=40 ms--- 10.0.34.4 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/32/40 ms
在area0配置区域认证:
[r1-ospf-1-area-0.0.0.0]authentication-mode md5 1 cipher 818818
[r2-ospf-1-area-0.0.0.0]authentication-mode md5 1 cipher 818818
[r3-ospf-1-area-0.0.0.0]authentication-mode md5 1 cipher 818818
在R3和R4之间配置接口认证:
[r3-GigabitEthernet0/0/2]ospf authentication-mode simple cipher 123456
[r4-GigabitEthernet0/0/2]ospf authentication-mode simple cipher 123456
OSPF的手工认证比RIP的手工认证多了一个KeyID,确保两端KeyID相同即可,
KeyID和cipher/plain相当于锁和钥匙,可以配置多套