安徽工业经济职业技术学院 - 31715 - 17#301
一、实验目的
- 实现全网的互通
- 通过更改优先级,实现不同路由之间的转换
- 练习OSPF 多区域/单区域配置和管理方法
二、 实验步骤
1. 配置PC机、路由器、服务器的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
Router2(config-router)#end
Router2#show ip route
三、总结
OSPF路由协议支持两级分层结构。利用单区域或多区域OSPF设计,不仅提高网络稳定性,还能减少路由器上的负载和使用率。通过介绍单区域和多区域OSPF设计之间的差异来规划OSPF的实施。