【网络设备配置与管理实验六】ospf协议的配置

一、实验目的

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

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

二、设备需求

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

三、拓扑结构及接口IP配置

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

【网络设备配置与管理实验六】ospf协议的配置_第1张图片
图10-6 实验的拓扑结构

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

  • twins:S2/0: 172.16.10.5 S3/0: 172.16.20.5
  • sa:S2/0: 172.16.10.6 F0/0: 10.0.10.1
  • gill:S3/0: 172.16.20.6 F0/0: 10.0.10.2

四、实验配置文档

1.基本网络配置
twins:

Router>ena
Router>enable 
Router#con
Router#conf
Router#configure ter
Router#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#host
Router(config)#hostname sjt-twins
sjt-twins(config)#int
sjt-twins(config)#interface s
sjt-twins(config)#interface serial 2/0
sjt-twins(config-if)#ip address 172.16.10.5 255.255.255.252
sjt-twins(config-if)#clo
sjt-twins(config-if)#clock rate 56000
sjt-twins(config-if)#no shu
sjt-twins(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial2/0, changed state to down
sjt-twins(config-if)#exit
sjt-twins(config)#inte
sjt-twins(config)#interface s
sjt-twins(config)#interface serial 3/0
sjt-twins(config-if)#ip address 172.16.20.5 255.255.255.252
sjt-twins(config-if)#clo
sjt-twins(config-if)#clock rate 56000
sjt-twins(config-if)#no shut
sjt-twins(config-if)#no shutdown 
%LINK-5-CHANGED: Interface Serial3/0, changed state to down
sjt-twins(config-if)#

sa:

Router>ena
Router>enable 
Router#conf
Router#configure ter
Router#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#ho
Router(config)#hostname sjt-sa
sjt-sa(config)#int
sjt-sa(config)#interface s
sjt-sa(config)#interface serial 2/0
sjt-sa(config-if)#ip address 172.16.10.6 255.255.255.252
sjt-sa(config-if)#no shut
sjt-sa(config-if)#no shutdown 
sjt-sa(config-if)#
%LINK-5-CHANGED: Interface Serial2/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial2/0, changed state to up
sjt-sa(config-if)#exit
sjt-sa(config)#int
sjt-sa(config)#interface F
sjt-sa(config)#interface FastEthernet 0/0
sjt-sa(config-if)#ip address 10.0.10.1 255.255.255.0
sjt-sa(config-if)#no shut
sjt-sa(config-if)#no shutdown 
sjt-sa(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
sjt-sa(config-if)#

gill:

Router>en
Router>enable 
Router#conf
Router#configure ter
Router#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hos
Router(config)#hostname sjt-gill
sjt-gill(config)#int
sjt-gill(config)#interface s
sjt-gill(config)#interface serial 3/0
sjt-gill(config-if)#ip address 172.16.20.6 255.255.255.252
sjt-gill(config-if)#no shut
sjt-gill(config-if)#no shutdown 
sjt-gill(config-if)#
%LINK-5-CHANGED: Interface Serial3/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial3/0, changed state to up
sjt-gill(config-if)#exit
sjt-gill(config)#int
sjt-gill(config)#interface F
sjt-gill(config)#interface FastEthernet 0/0
sjt-gill(config-if)#ip address 10.0.10.2 255.255.255.0
sjt-gill(config-if)#no shut
sjt-gill(config-if)#no shutdown 
sjt-gill(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
sjt-gill(config-if)#

2.配置OSPF协议
twins:

sjt-twins(config)#rou
sjt-twins(config)#router os
sjt-twins(config)#router ospf 75
sjt-twins(config-router)#netw
sjt-twins(config-router)#network 172.16.10.0 0.0.0.3 area 0
sjt-twins(config-router)#network 172.16.20.0 0.0.0.3 area 0
sjt-twins(config-router)#

sa:

sjt-sa(config)#rou
sjt-sa(config)#router os
sjt-sa(config)#router ospf 75
sjt-sa(config-router)#net
sjt-sa(config-router)#network 172.16.10.0 0.0.0.3 area 0
sjt-sa(config-router)#network 10.0.10.0 0.0.0.255 area 0
sjt-sa(config-router)#

gill:

sjt-gill(config)#rou
sjt-gill(config)#router os
sjt-gill(config)#router ospf 75
sjt-gill(config-router)#net
sjt-gill(config-router)#network 172.16.20.0 0.0.0.3 area 0
sjt-gill(config-router)#network 10.0.10.0 0.0.0.255 area 0
sjt-gill(config-router)#

五、验证实验结果

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

【网络设备配置与管理实验六】ospf协议的配置_第2张图片
sjt-twins#show ip ospf

sa:

【网络设备配置与管理实验六】ospf协议的配置_第3张图片
sjt-sa#show ip ospf

gill:

【网络设备配置与管理实验六】ospf协议的配置_第4张图片
sjt-gill#show ip ospf

2.  命令 show ip ospf database
该命令显示路由器拓扑数据库的内容以及被加入到该数据库中的LSA.该命令如下:
Router# show ip ospf database
下列是该命令的输出:
twins:

【网络设备配置与管理实验六】ospf协议的配置_第5张图片
sjt-twins#show ip ospf database

sa:

【网络设备配置与管理实验六】ospf协议的配置_第6张图片
sjt-sa#show ip ospf database

gill:

【网络设备配置与管理实验六】ospf协议的配置_第7张图片
sjt-gill#show ip ospf database

3.  命令 show ip ospf interface
twins:

【网络设备配置与管理实验六】ospf协议的配置_第8张图片
sjt-twins#show ip ospf interface

sa:

【网络设备配置与管理实验六】ospf协议的配置_第9张图片
sjt-sa#show ip ospf interface

gill:

【网络设备配置与管理实验六】ospf协议的配置_第10张图片
sjt-gill#show ip ospf interface

4.  命令 show ip ospf neighbor
该命令显示OSPF邻居。该命令可用于显示路由器知道的所有邻居,某个接口相连的邻居或特定的邻居,这种细节对诊断配置错误很有帮助,该命令如下:
Router# show ip ospf neighbor [ type-number ] [ neighbor-id ] [ detail ]
下列是该命令的输出:
twins:

sjt-twins#show ip ospf neighbor

sa:

sjt-sa#show ip ospf neighbor

gill:

【网络设备配置与管理实验六】ospf协议的配置_第11张图片
sjt-gill#show ip ospf neighbor

5.  命令 show ip protocols
该命令显示路由器的IP路由选择协议配置,详细说明了协议的配置情况以及协议之间的交互情况,还指出了下一次更新在何时进行,这种细节对诊断配置错误很有帮助,该命令如下:
Router# show ip protocols
下列是该命令的输出:
twins:

【网络设备配置与管理实验六】ospf协议的配置_第12张图片
sjt-twins#show ip protocols

sa:

【网络设备配置与管理实验六】ospf协议的配置_第13张图片
sjt-sa#show ip protocols

gill:

【网络设备配置与管理实验六】ospf协议的配置_第14张图片
sjt-gill#show ip protocols

6. 命令 show ip route
该命令显示路由器的IP路由选择表,详细指出了路由器是如何获悉网络和发现路由的, 该命令如下:
Router# show ip route
下列是该命令的输出:
twins:

【网络设备配置与管理实验六】ospf协议的配置_第15张图片
sjt-twins#show ip route

sa:

【网络设备配置与管理实验六】ospf协议的配置_第16张图片
sjt-sa#show ip route

gill:

【网络设备配置与管理实验六】ospf协议的配置_第17张图片
sjt-gill#show ip route

六、实验总结

1.学习了ospf协议,了解了该协议的特点
2.学会了配置ospf协议,以及ospf协议的各种验证
3.配置ospf协议时需要注意process-number是路由器本地的进程号,用命令network时要注意area用于指定接口所属的区域

七、附件

下面是该实验的文件

链接:https://pan.baidu.com/s/118XrR0oYVlK86kTBtswo6A 密码:poj1

你可能感兴趣的:(【网络设备配置与管理实验六】ospf协议的配置)