实验六——————OSPF协议配置

实验目的

通过本实验,可以掌握以下技能:

  • 配置接口IP地址。
  • 配置OSPF协议。
  • 验证OSPF协议配置。

 设备需求

  • Cisco路由器3台,分别命名为twins、sa和gill。其中twins具有2个串行接口;sa具有1个以太网接口和一个串行接口;gill具有1个以太网接口和一个串行接口。
  • 1条交叉线序双绞线。
  • 2条串行接口线。
  • 1台access server,及用于反向Telnet的相应电缆。
  • 1台带有超级终端程序的PC机,以及Console电缆及转接器。

拓扑结构及配置说明

实验的拓扑结构如图10-6所示。通过2对交叉线序双绞线分别把twins和sa连接起来,twins和gill连接起来。


各路由器使用的接口及其编号见图10-6所示的标注,各接口IP地址分配如下:

  • twins:S0: 172.16.10.5   S1: 172.16.20.5
  • sa:S0: 172.16.10.6  E0:10.0.10.1
  • gill:S0: 172.16.20.6  E0:10.0.10.2

实验配置

基本网络配置

这里使用图形化界面直接操作,读者也可以使用命令行下操作

twins

首先为twins添加两个串口


配置IP信息

扫描二维码关注公众号,回复: 1110948 查看本文章



sa

首先为sa添加一个串口和一个以太网接口


配置ip地址信息



gill 

首先为gill添加一个串口,与一个以太网端口


配置ip地址信息



之后全部开启“ON”选择哦!

网络拓扑如下


配置OSPF协议

sa


Router>enable
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#router ospf 10
Router(config-router)#network 10.0.10.0 0.0.0.255 area 0
Router(config-router)#network 172.16.10.0 0.0.0.255 area 0
Router(config-router)#^Z
Router#
%SYS-5-CONFIG_I: Configured from console by console

Router#

twins


Router>enable
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#router ospf 10
Router(config-router)#network 172.16.10.0 0.0.0.3 area 0
Router(config-router)#network 172.16.20.0 0.0.0.3 area 0
Router(config-router)#^Z
Router#
%SYS-5-CONFIG_I: Configured from console by console

Router#

gill


Router>enable
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#router ospf 10
Router(config-router)#network 172.16.20.0 0.0.0.3 area 0
Router(config-router)#network 10.0.10.0 0.0.0.255 area 0
Router(config-router)#^Z
Router#
%SYS-5-CONFIG_I: Configured from console by console

Router#

验证OSPF协议配置:

命令 show ip ospf

该命令指出了路由选择协议OSPF在路由器上的运行情况,其输出中包括路由选择算法SPF运行了多少次,这是网络稳定性的风向标.该命令如下:

Router# show ip ospf process-id

下列是该命令的输出:

sa


twins


gill


命令 show ip ospf database

该命令显示路由器拓扑数据库的内容以及被加入到该数据库中的LSA.该命令如下:

下列是该命令的输出:

Sa


twins


gill



命令 show ip ospf interface

该命令显示接口的OSPF配置及运行情况,这种细节对诊断配置错误很有帮助,该命令如下:

Router# show ip ospf interface [ type-number ]

下列是该命令的输出:

sa




gill


猜你喜欢

转载自blog.csdn.net/fly_hps/article/details/80472874