怎么配置多区域OSPF协议
1、 找出四台2811类的路由器,并将它们按照一定的顺序排开来,并将配置线连接起来,如下图所示:
2、配置路由器r1和r2,配置命令如下:
r1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
r1(config)#router ospf 1
r1(config-router)#router-id 1.1.1.1
r1(config-router)#network 1.1.1.0 255.255.255.0 area 1
r1(config-router)#network 192.168.12.0 255.255.255.0 area 1
r2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
r2(config-router)#router ospf 1
r2(config-router)#router-id 2.2.2.2
r2(config-router)#network 192.168.12.0 255.255.255.0 area 1
r2(config-router)#network 192.168.23.0 255.255.255.0 area 0
r2(config-router)#network 2.2.2.0 255.255.255.0 area 0
结果如下图所示:
3、 配置路由器r3和r4,配置命令如下图所示:
r3>enable
r3#conf t
Enter configuration commands, one per line. End with CNTL/Z.
r3(config-router)#router ospf 1
r3(config-router)#router-id 3.3.3.3
r3(config-router)#network 192.168.23.0 255.255.255.0 area 0
r3(config-router)#network 192.168.34.0 255.255.255.0 area 0
r3(config-router)#network 3.3.3.0 255.255.255.0 area 0
r4#conf t
r4(config-router)#router ospf 1
r4(config-router)#router-id 4.4.4.4
r4(config-router)#network 192.168.34.0 0.0.0.255 area 2
r4(config-router)#redistribute connected subnets
结果如下图所示:
4、 实验调试,用“show iP route”命令测试,如下图所示:
5、用“show ip ospf database”命令查看路由器r1和r2的配置信息,如下图所示: