OSFP协议配置实验

实验目的:

(1)理解OSPF;

(2)掌握OSPF的配置方法;

(3)掌握查看OSPF协议的相关信息。

实验器材:

Cisco packet

实验内容:

实验步骤:

(1)布置拓扑:

(2)成功布置拓扑:

(3)配置主机IP地址:
  1. 路由器配置:

路由器R0:

Router>enable

Router#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#int g0/0

Router(config-if)#ip address 192.168.10.1 255.255.255.0

Router(config-if)#no shutdown

Router(config-if)#exit

Router(config)#int g0/1

Router(config-if)#ip address 192.168.20.1 255.255.255.0

Router(config-if)#no shutdown

Router(config-if)#int s0/3/0

Router(config-if)#ip address 192.168.50.1 255.255.255.0

Router(config-if)#no shutdown

路由器R1:

Router>enable

Router#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#int g0/0

Router(config-if)#ip address 192.168.30.1 255.255.255.0

Router(config-if)#no shutdown

Router(config-if)#exit

Router(config)#int g0/1

Router(config-if)#ip address 192.168.40.1 255.255.255.0

Router(config-if)#no shutdown

Router(config-if)#exit

Router(config)#int s0/3/0

Router(config-if)#ip address 192.168.60.1 255.255.255.0

Router(config-if)#no shutdown

路由器R2:

Router>enable

Router#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#int g0/0

Router(config-if)#ip address 192.168.190.1 255.255.255.0

Router(config-if)#no shutdown

Router(config-if)#int g0/1

Router(config-if)#ip address 192.168.90.1 255.255.255.0

Router(config-if)#no shutdown

Router(config-if)#int s0/2/0

Router(config-if)#ip address 192.168.50.2 255.255.255.0

Router(config-if)#no shutdown

Router(config-if)#int s0/2/1

Router(config-if)#ip address 192.168.60.2 255.255.255.0

Router(config-if)#no shutdown

路由器R3:

Router>enable

Router#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#int g0/0

Router(config-if)#ip address 192.168.190.2 255.255.255.0

Router(config-if)#no shutdown

Router(config-if)#exit

Router(config)#int g0/1

Router(config-if)#ip address 192.168.200.1 255.255.255.0

Router(config-if)#no shutdown

路由器R4:

Router>enable

Router#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#int g0/0

Router(config-if)#ip address 192.168.90.2 255.255.255.0

Router(config-if)#no shutdown

Router(config-if)#int g0/1

Router(config-if)#ip address 192.168.100.1 255.255.255.0

Router(config-if)#no shutdown

(5)封装OSPF协议

路由器R0:

Router(config)#route ospf ?

<1-65535> Process ID

Router(config)#route ospf 1

Router(config-router)#network 192.168.10.0 0.0.0.255 area 0

Router(config-router)#network 192.168.20.0 0.0.0.255 area 0

Router(config-router)#network 192.168.50.0 0.0.0.255 area 0

路由器R1:

Router(config)#route ospf 1

Router(config-router)#network 192.168.30.0 0.0.0.255 area 0

Router(config-router)#network 192.168.40.0 0.0.0.255 area 0

Router(config-router)#network 192.168.60.0 0.0.0.255 area 0

路由器R2:

Router(config)#route ospf 1

Router(config-router)#network 192.168.50.0 0.0.0.255 area 0

Router(config-router)#network 192.168.60.0 0.0.0.255 area 0

Router(config-router)#network 192.168.90.0 0.0.0.255 area 0

Router(config-router)#network 192.168.190.0 0.0.0.255 area 0

6.使用主机PC0ping主机PC1,2,5,6

C:\>ping 192.168.20.11

Pinging 192.168.20.11 with 32 bytes of data:

Request timed out.

Reply from 192.168.20.11: bytes=32 time<1ms TTL=127

Reply from 192.168.20.11: bytes=32 time<1ms TTL=127

Reply from 192.168.20.11: bytes=32 time<1ms TTL=127

Ping statistics for 192.168.20.11:

Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),

Approximate round trip times in milli-seconds:

Minimum = 0ms, Maximum = 0ms, Average = 0ms

C:\>ping 192.168.100.11

Pinging 192.168.100.11 with 32 bytes of data:

Reply from 192.168.10.1: Destination host unreachable.

Reply from 192.168.10.1: Destination host unreachable.

Reply from 192.168.10.1: Destination host unreachable.

Reply from 192.168.10.1: Destination host unreachable.

Ping statistics for 192.168.100.11:

Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

C:\>ping 192.168.200.11

Pinging 192.168.200.11 with 32 bytes of data:

Reply from 192.168.10.1: Destination host unreachable.

Request timed out.

Reply from 192.168.10.1: Destination host unreachable.

Reply from 192.168.10.1: Destination host unreachable.

Ping statistics for 192.168.200.11:

Packets: Sent = 4, Received = 0, Lost = 4 (100% loss)

(7)配置静态路由:

路由器4:

Router>enable

Router#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#ip route 192.168.0.0 255.255.0.0 192.168.90.1

路由器3:

Router>enable

Router#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#ip route 192.168.0.0 255.255.0.0 192.168.190.1

  1. 验证主机联通:

主机PC0ping主机PC5,4

C:\>ping 192.168.200.11

Pinging 192.168.200.11 with 32 bytes of data:

Reply from 192.168.200.11: bytes=32 time=1ms TTL=125

Reply from 192.168.200.11: bytes=32 time=1ms TTL=125

Reply from 192.168.200.11: bytes=32 time=3ms TTL=125

Reply from 192.168.200.11: bytes=32 time=3ms TTL=125

Ping statistics for 192.168.200.11:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

Minimum = 1ms, Maximum = 3ms, Average = 2ms

C:\>ping 192.168.100.11

Pinging 192.168.100.11 with 32 bytes of data:

Request timed out.

Reply from 192.168.100.11: bytes=32 time=3ms TTL=125

Reply from 192.168.100.11: bytes=32 time=4ms TTL=125

Reply from 192.168.100.11: bytes=32 time=7ms TTL=125

Ping statistics for 192.168.100.11:

Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),

Approximate round trip times in milli-seconds:

Minimum = 3ms, Maximum = 7ms, Average = 4ms

实验结果(附数据和图表):

实验结果分析及结论:

结果分析:OSPF协议可以实现全网的通信,能够在大规模的网络环境中提供有效的路由服务,其配置需要精确的规划。配置了多个路由器之间的OSPF协议,确保了它们之间能够互相学习路由信息,并正确地传递给主机,也可以实现不同区域间的路由传递,保证网络的连通性和效率。

实验心得体会和建议:

通过OSFP协议配置的实验,理解了OSPF协议的重要性,增加实践操作的经验积累,培养了故障排查的能力,与此同时,也掌握多种路由协议。

学会了如何设置路由器参数,如路由器ID、接口IP地址、区域号等,以及如何调试和监控网络,使用ping命令和其他工具来排查网络故障,确保通信的可靠性。模拟环境中进行实验的同时,尝试将所学知识应用到真实网络环境中,以增强实践经验。

通过这次实验,不仅提高了对OSPF协议的理论认识,还增强了实际操作能力和问题解决能力。这些经验和体会将对未来的网络学习和实践大有裨益。

相关推荐
TO_ZRG5 分钟前
使用jenkins打包unity工程
运维·unity·jenkins
liujiangxu11 分钟前
jenkins声明式流水线语法详解
运维·自动化·jenkins
椰椰椰耶20 分钟前
【HTTP】请求“报头”(Host、Content-Length/Content-Type、User-Agent(简称 UA))
网络·网络协议·http
攸攸太上25 分钟前
Docker学习
java·网络·学习·docker·容器
南 阳43 分钟前
阿里开源多模态大模型Ovis1.6,重塑出海电商AI格局
网络·人工智能·chatgpt
看山还是山,看水还是。1 小时前
《网络通信原理》
http·网络安全·智能路由器·信息与通信·信号处理
guoguoqiang.1 小时前
我与Linux的爱恋:命令行参数|环境变量
linux·运维·服务器·c语言·学习
黑客学长-刘备1 小时前
2024最新最全:Wireshark抓包详解(非常详细)零基础入门到精通,收藏这篇就够了
网络·测试工具·wireshark
客观花絮说2 小时前
DSC+DW实时+异步搭建部署
运维
x66ccff2 小时前
【linux】4张卡,坏了1张,怎么办?
linux·运维·服务器