安徽工业经济职业技术学院 - 31715 - 宿舍号:3#401
一、实验目的
1.掌握多区域的OSPF配置方法
2.区别不同区域的路由
3.掌握OSPF的基本配置命令
二、实验步骤
1. 配置 IP 地址
Router0:Router>enable
Router0#configure terminal
Router0(config)#interface FastEthernet0/0
Router0(config-if)#ip address 10.0.0.254 255.255.255.0
Router0(config-if)#no shutdown
Router0(config-if)#exit
Router0(config)#interface FastEthernet0/1
Router0(config-if)#ip address 20.0.0.254 255.255.255.0
Router0(config-if)#no shutdown
Router0(config-if)#exit
Router0(config)#interface Serial1/0
Router0(config-if)#clock rate 64000
Router0(config-if)#ip address 30.0.0.1 255.255.255.0
Router0(config-if)#no shutdown
Router0(config-if)#exit
Router1; Router>enable
Router1#configure terminal
Router1(config)#interface FastEthernet0/0
Router1(config-if)#ip address 60.0.0.254 255.255.255.0
Router1(config-if)#no shutdown
Router1(config-if)#exit
Router1(config)#interface Serial1/0
Router1(config-if)#clock rate 64000
Router1(config-if)#ip address 30.0.0.2 255.255.255.0
Router1(config-if)#no shutdown
Router1(config-if)#exit
Router1(config)#interface Serial1/1
Router1(config-if)#clock rate 64000
Router1(config-if)#ip address 40.0.0.1 255.255.255.0
Router1(config-if)#no shutdown
Router2:Router>enable
Router2#configure terminal
Router2(config)#interface Serial1/0
Router0(config-if)#clock rate 64000
Router2(config-if)#ip address 40.0.0.2 255.255.255.0
Router2(config-if)#no shutdown
Router2(config-if)#exit
Router2(config)#interface FastEthernet0/0
Router2(config-if)#ip address 50.0.0.254 255.255.255.0
Router2(config-if)#no shutdown
2. 配置OSPF
Router0:
Router0(config)#router ospf 100
Router0(config-router)#network 10.0.0.0 0.0.0.255 area 1
Router0(config-router)#network 20.0.0.0 0.0.0.255 area 1
Router0(config-router)#network 30.0.0.0 0.0.0.255 area 1
Router1:
Router1(config)#interface Serial1/0
Router1(config-if)#clock rate 64000
Router1(config-if)#extit
Router1(config)#interface serial1/1
Router1(config-if)#clock rate 64000
Router1(config-if)#exit
Router1(config)#router ospf 200
Router1(config-router)#network60.0.0.0 0.0.0.255 area 2
Router1(config-router)#network30.0.0.0 0.0.0.255 area 1
Router1(config-router)#network 40.0.0.0 0.0.0.255 area3
Router1(config-router)#network 50.0.0.0 0.0.0.255 area3
Router2(config-router)#network 10.0.0.0 0.0.0.255 area 1
Router2(config-router)#network 20.0.0.0 0.0.0.255 area 1
Router2:
Router2(config)#interface serial0/0
Router2(config-if)#clock rate 64000
Router2(config-if)#extit
Router2(config)#interface serial1/1
Router2(config-if)#clock rate 64000
Router2(config-if)#exit
Router2(config)#router ospf 300
Router2(config-router)#network 40.0.0.0 0.0.0.255 area 3
Router2(config-router)#network 50.0.0.0 0.0.0.255 area 3
三、实验结论
注意 OSPF 区域的划分,OSPF 相对其他路由协议,对于负载分担的支持性能较好。