1》配置路由器R1
Router(config)#router ospf 1
Router(config-router)#router-id 1.1.1.1
Router(config-router)#network 1.1.1.0 0.0.0.255 area 0
Router(config-router)#network 192.168.12.0 0.0.0.255 area 0
Router(config)#interface s0/3/0
Router(config-if)#ip ospf authentication
Router(config-if)#ip ospf authentication-key cisco
2》用同样的方法配置R2
3》调试
Router#show ip ospf interface s0/3/0
Serial0/3/0 is up, line protocol is up
Internet address is 192.168.12.1/24, Area 0
Process ID 1, Router ID 1.1.1.1, Network Type POINT-TO-POINT, Cost: 781
Transmit Delay is 1 sec, State POINT-TO-POINT, Priority 0
No designated router on this network
No backup designated router on this network
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:00
Index 2/2, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 1
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 1 , Adjacent neighbor count is 1
Adjacent with neighbor 2.2.2.2
Suppress hello for 0 neighbor(s)
Simple password authentication enabled
以上输出最后一行信息表明该接口启用了简单口令认证。