实验拓扑图:
![ffa6860c9006110a2a8400cabb852e4c.png](https://i-blog.csdnimg.cn/blog_migrate/bbb4904c87b6ca7d459b4442737eb3d0.jpeg)
1、配置各台路由器的IP地址,并且使用Ping命令确认各路由器的直连口的互通性。
2、配置OSPF协议,并使用相关命令确认其正常工作。
3、查看R1和R2的路由表。
R1#show ip route
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 2 subnets
O IA 172.16.1.0 [110/193] via 192.168.1.2, 00:01:02, Serial1/1
O IA 172.16.2.0 [110/193] via 192.168.1.2, 00:01:02, Serial1/1
10.0.0.0/24 is subnetted, 2 subnets
C 10.1.2.0 is directly connected, Loopback0
C 10.1.1.0 is directly connected, Loopback1
192.168.1.0/30 is subnetted, 3 subnets
O IA 192.168.1.8 [110/192] via 192.168.1.2, 00:01:12, Serial1/1
C 192.168.1.0 is directly connected, Serial1/1
O IA 192.168.1.4 [110/128] via 192.168.1.2, 00:05:47, Serial1/1
R1#
R2#show ip route
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 2 subnets
O IA 172.16.1.0 [110/129] via 192.168.1.6, 00:09:16, Serial1/1
O IA 172.16.2.0 [110/129] via 192.168.1.6, 00:09:16, Serial1/1
10.0.0.0/24 is subnetted, 2 subnets
O 10.1.2.0 [110/65] via 192.168.1.1, 00:14:00, Serial1/0
O 10.1.1.0 [110/65] via 192.168.1.1, 00:14:00, Serial1/0
192.168.1.0/30 is subnetted, 3 subnets
O IA 192.168.1.8 [110/128] via 192.168.1.6, 00:09:26, Serial1/1
C 192.168.1.0 is directly connected, Serial1/0
C 192.168.1.4 is directly connected, Serial1/1
R2#
4、在R1上启用OSPF的明文认证,配置如下:
R1(config)#interface serial 1/1
R1(config-if)#ip ospf authentication
R1(config-if)#ip ospf authentication-key cisco
R1(config-if)#exit
5、配