安徽工业经济职业技术学院 17#422
实验目的:
(1)实现全网互通
(2)通过操作,实现不同路由之间的转换
(3)练习OSPF多区域/单区域的配置和管理方法
实验拓扑图:
实验拓扑图实验步骤
(1) 配置PC机.路由器.服务器的IP地址
R0
R0>enable
R0#configure terminal.
R0(config)#interface FastEthernet0/0
R0(config-if)#ip address 10.0.1.254 255.255.255.0
R0(config-if)#no shutdown
R0(config-if)#exit
R0(config)#interface FastEthernet0/1
R0(config-if)#ip address 10.0.2.254 255.255.255.0
R0(config-if)#no shutdown
R0(config-if)#exit
R0(config)#interface Serial1/0
R0(config-if)#ip address 30.0.0.1 255.255.255.0
R0(config-if)#clock rate 64000
R0(config-if)#no shutdown
R1
R1>enable
R1#configure terminal
R1(config)#interface FastEthernet0/0
R1(config-if)#ip address 20.0.0.254 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface Serial1/0
R1(config-if)#ip address 40.0.0.1 255.255.255.0
R1(config-if)#clock rate 64000
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface Serial1/1
R1(config-if)#ip address 30.0.0.2 255.255.255.0
R1(config-if)#clock rate 64000
R1(config-if)#no shutdown
R2
R2>enable
R2#configure terminal
R2(config)#interface FastEthernet0/0
R2(config-if)#ip address 50.0.0.254 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface Serial1/1
R2(config-if)#ip address 40.0.0.2 255.255.255.0
R2(config-if)#clock rate 64000
R2(config-if)#no shutdown
(2) OPSF的开启和设置区域公布网络
R0
R0>enable
R0#configure terminal
R0(config)#router ospf 12200
R0(config-router)#net 10.0.1.0 0.0.0.255 area 1
R0(config-router)#net 10.0.2.0 0.0.0.255 area 1
R0(config-router)#net 30.0.0.0 0.0.0.255 area 1
R1
R1>enable
R1#configure terminal
R1(config)#router ospf 12200
R1(config-router)#net 30.0.0.0 0.0.0.255 area 1
R1(config-router)#net 20.0.0.0 0.0.0.255 area 0
R1(config-router)#net 40.0.0.0 0.0.0.255 area 2
R2
R2>enable
R2#configure terminal
R2(config)#router ospf 12200
R2(config-router)#net 40.0.0.0 0.0.0.255 area 2
R2(config-router)#net 50.0.0.0 0.0.0.255 area 2
实验结果:
PC>ping 50.0.0.1
Pinging 50.0.0.1 with 32 bytes of data:
Reply from 50.0.0.1: bytes=32 time=9ms TTL=125
Reply from 50.0.0.1: bytes=32 time=2ms TTL=125
Reply from 50.0.0.1: bytes=32 time=10ms TTL=125
Reply from 50.0.0.1: bytes=32 time=2ms TTL=125
Ping statistics for 50.0.0.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 2ms, Maximum = 10ms, Average = 5ms
设置OSPF协议有以下优点
(1) 可实现全网通的通信同时可通过更改优先级以及开销值更改路由路径
(2) 避免骨干区域压力过大 形成负载分担
(3) 每个网络有自己的区域降低了域内每个路由器的压力
网友评论