一.实验目的:
将大型网络划分多个 OSPF 区域,掌握多区域下 OSPF 的配置。
二.实验要点:
1.OSPF 多区域的划分
2.OSPF 路由条目。
三.实验设备:
Cisco 2621 路由器 4 台,pc机两台
四、实验环境
注意,图中有三个域,区域0,区域1,区域2
五. 实验步骤
1.按 如图所示 连接各路由器。
2.按 如图所示 配置各路由器的 IP 地址等参数。
3.配置路由器 RouterA 、RouterB、RouterC 和 RouterD 上的 OSPF 协议。
RouterA(config)#router ospf 1
RouterA(config-router)#net 10.0.0.0 0.255.255.255 area 0
RouterA(config-router)#net 172.16.0.0 0.0.255.255 area 1
4.测试各网络之间的连通性。
5.观察各路由器的路由表条目。
5.练习 OSPF 的各种诊断命令对 OSPF 的运行进行诊断,观察诊断输出。
六. 实验总结
1.多区域 OSPF 配置与单区域 OSPF 配置的区别?
实验详细步骤
在Router1中
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface Serial0/0
Router(config-if)#ip address 10.0.0.2 255.0.0.0
Router(config-if)#clock rate 64000
This command applies only to DCE interfaces
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface Serial0/0, changed state to up
Router(config-if)#exit
Router(config)#interface FastEthernet0/0
Router(config-if)#ip address 192.168.0.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#exit
Router(config)#router ospf 1
Router(config-router)#net 10.0.0.0 0.255.255.255 area 0
Router(config-router)#net 192.168.0.0 0.0.255.255 area 2
Router(config-router)#exit
在Router3中
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface FastEthernet0/0
Router(config-if)#ip address 192.168.0.2 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#exit
Router(config)#interface FastEthernet0/1
Router(config-if)#ip address 192.168.1.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
Router(config-if)#exit
Router(config)#router ospf 1
Router(config-router)#net 192.168.0.0 0.0.255.255 area 2
Router(config-router)#exit
在Router2中
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface FastEthernet0/0
Router(config-if)#ip address 172.16.0.2 255.255.0.0
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#exit
Router(config)#interface FastEthernet0/1
Router(config-if)#ip address 172.17.0.1 255.255.0.0
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
Router(config-if)#exit
Router(config)#router ospf 1
Router(config-router)#net 172.16.0.0 0.0.255.255 area 1
Router(config-router)#net 172.17.0.0 0.0.255.255 area 1
Router(config-router)#exit
在Router0中
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface Serial0/0
Router(config-if)#ip address 10.0.0.1 255.0.0.0
Router(config-if)#clock rate 64000
Router(config-if)#no shutdown
Router(config-if)#
Router(config-if)#exit
Router(config)#interface FastEthernet0/0
Router(config-if)#ip address 172.16.0.1 255.255.0.0
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINK-5-CHANGED: Interface Serial0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up
%LINEPROTO-5