L000 0074 中低端路由器路由协议基础配置实验指导书中文版11.docx
- 文档编号:29531291
- 上传时间:2023-07-24
- 格式:DOCX
- 页数:47
- 大小:117.20KB
L000 0074 中低端路由器路由协议基础配置实验指导书中文版11.docx
《L000 0074 中低端路由器路由协议基础配置实验指导书中文版11.docx》由会员分享,可在线阅读,更多相关《L000 0074 中低端路由器路由协议基础配置实验指导书中文版11.docx(47页珍藏版)》请在冰豆网上搜索。
L0000074中低端路由器路由协议基础配置实验指导书中文版11
实验1路由协议基础配置
1.1实验内容
OSPF基本配置;
“DR”选举过程;
虚链路与路由聚合、路由引入;
NBMA非广播式网络和点到多点网络配置OSPF。
1.2路由器基础配置
1.2.1实验目的
熟悉主机的路由配置;
熟悉路由器的路由配置;
掌握RIP协议的基本配置;
掌握OSPF协议的基本配置;
区别以上两种路由协议的特点。
1.2.2实验环境
实际组网中路由器是用来连接两个物理网络的,为了模拟实际环境,我们在实验中采用背靠背直接相连来模拟广域网连接。
由于时间限制,让我们先完成几个简单的背靠背实验,每个对应一个相对独立的内容。
如果时间充足,可以完成后面的综合性实验,进一步提高动手能力,深层理解路由协议。
下面是简单实验的模拟实验环境,共两台路由器,一台交换机,两台PC。
按照下图的实验组网建立实验环境。
为了不受路由器原来的配置影响,在实验之前请先将所有路由器的配置数据擦除后重新启动。
交换机在此只用作连接主机和路由器用,以便全采用标准网线连接,不需配置。
1.2.3实验组网图
1.2.4实验步骤
1.静态路由
清空路由器的原有配置
[Quidway]delete
Thiswillerasetheconfigurationintheflashmemory.
Therouterconfigurationswillbeerasedtoreconfigure
Areyousure?
[Y/N]y
Nowerasingtheconfigurationinflashmemory.
Pleasewaitforawhile......
Erasetheconfigurationinflashmemorysuccessfully
Pleasereboottherouter
[Quidway]reboot
WARNING:
SystemwillREBOOT!
Continue?
[Y/N]y
Systemisnowrebooting,pleasewait
重新启动路由器后,查看初始配置并显示路由表如下:
[Quidway]displaycurrent-configuration
Nowcreateconfiguration...
Currentconfiguration
!
version1.74
firewallenable
encrypt-cardfast-switch
!
interfaceAux0
asyncmodeflow
phy-mru0
link-protocolppp
!
interfaceEthernet0
!
interfaceSerial0
link-protocolppp
!
interfaceSerial1
link-protocolppp
!
interfaceSerial2
link-protocolppp
!
interfaceSerial3
link-protocolppp
!
return
[Quidway]displayiprouting-table
RoutingTables:
Destination/MaskProtoPrefMetricNexthopInterface
127.0.0.0/8Direct00127.0.0.1LoopBack0
127.0.0.1/32Direct00127.0.0.1LoopBack0
配置路由器接口和PC的IP地址
路由器各接口的IP地址如下:
RTA
RTB
E0
202.0.0.1/24
202.0.1.1/24
S0
192.0.0.1/24
192.0.0.2/24
PC的IP地址和缺省网关Gateway如下:
PCA
PCB
IP
202.0.0.2/24
202.0.1.2/24
Gateway
202.0.0.1
202.0.1.1
为了标识路由器,我们修改路由器名称分别为RTA、RTB并按照上述表格完成IP地址的配置,具体配置命令如下:
[Quidway]sysnameRTA
[RTA]inte0
[RTA-Ethernet0]ipaddr202.0.0.124
[RTA-Ethernet0]ints0
[RTA-Serial0]ipaddr192.0.0.124
完成配置命令后的配置信息和路由表信息如下:
[RTA]displaycurrent-configuration
Nowcreateconfiguration...
Currentconfiguration
!
version1.74
firewallenable
sysnameRTA
encrypt-cardfast-switch
!
interfaceAux0
asyncmodeflow
phy-mru0
link-protocolppp
!
interfaceEthernet0
ipaddress202.0.0.1255.255.255.0
!
interfaceSerial0
link-protocolppp
ipaddress192.0.0.1255.255.255.0
!
interfaceSerial1
link-protocolppp
!
interfaceSerial2
link-protocolppp
!
interfaceSerial3
link-protocolppp
!
return
[RTA]displayiprouting-table
RoutingTables:
Destination/MaskProtoPrefMetricNexthopInterface
127.0.0.0/8Direct00127.0.0.1LoopBack0
127.0.0.1/32Direct00127.0.0.1LoopBack0
192.0.0.0/24Direct00192.0.0.2Serial0
192.0.0.1/32Direct00127.0.0.1LoopBack0
192.0.0.2/32Direct00192.0.0.2Serial0
202.0.0.0/24Direct00202.0.0.1Ethernet0
202.0.0.1/32Direct00127.0.0.1LoopBack0
RTB的相关信息类似RTA,可以自己在实验中显示比较。
注意:
串口的配置需要在接口配置模式下完成shutdown和undoshutdown命令之后才生效。
完成上述配置之后,用ping命令测试网络互通性,会发现两个以太网段不能互通。
你知道为什么吗?
仔细看看路由表就可以明白,路由器还没有相关的路由。
在这里我们采用配置静态路由的办法来添加路由。
分别在RTA,RTB上配置到对端以太网段的静态路由,在此只列出RTA的配置命令:
[RTA]iproute-static202.0.1.0255.255.255.0192.0.0.2preference60
RTA的配置信息和路由表信息如下:
[RTA]discur
Nowcreateconfiguration...
Currentconfiguration
!
version1.74
firewallenable
sysnameRTA
encrypt-cardfast-switch
!
interfaceAux0
asyncmodeflow
phy-mru0
link-protocolppp
!
interfaceEthernet0
ipaddress202.0.0.1255.255.255.0
!
interfaceSerial0
link-protocolppp
ipaddress192.0.0.1255.255.255.0
!
interfaceSerial1
link-protocolppp
!
interfaceSerial2
link-protocolppp
!
interfaceSerial3
link-protocolppp
!
quit
iproute-static202.0.1.0255.255.255.0192.0.0.2preference60
!
return
[RTA]displayiprouting-table
RoutingTables:
Destination/MaskProtoPrefMetricNexthopInterface
127.0.0.0/8Direct00127.0.0.1LoopBack0
127.0.0.1/32Direct00127.0.0.1LoopBack0
192.0.0.0/24Direct00192.0.0.2Serial0
192.0.0.1/32Direct00127.0.0.1LoopBack0
192.0.0.2/32Direct00192.0.0.2Serial0
202.0.0.0/24Direct00202.0.0.1Ethernet0
202.0.0.1/32Direct00127.0.0.1LoopBack0
202.0.1.0/24Static600192.0.0.2Serial0
[RTA]
RTB的相关信息类似RTA。
比较前后路由表发现现在新增了一项静态路由,此时再测试网络互通性,可以ping通了吗?
2.RIP协议
在上面的实验基础上,删除静态路由的配置之后再启动RIP协议,其配置命令和配置信息以及路由表信息如下:
[RTA]undoipro202.0.1.024192.0.0.2
[RTA]rip
[RTA-rip]networkall
[RTB]undoipro202.0.0.024192.0.0.1
[RTB]rip
[RTB-rip]networkall
RTA的配置和路由表:
[RTA]displaycurrent-configuration
Nowcreateconfiguration...
Currentconfiguration
!
version1.74
firewallenable
sysnameRTA
encrypt-cardfast-switch
!
interfaceAux0
asyncmodeflow
phy-mru0
link-protocolppp
!
interfaceEthernet0
ipaddress202.0.0.1255.255.255.0
!
interfaceSerial0
link-protocolppp
ipaddress192.0.0.1255.255.255.0
!
interfaceSerial1
link-protocolppp
!
interfaceSerial2
link-protocolppp
!
interfaceSerial3
link-protocolppp
!
quit
rip
networkall
!
quit
!
return
[RTA]displayiprouting-table
RoutingTables:
Destination/MaskProtoPrefMetricNexthopInterface
127.0.0.0/8Direct00127.0.0.1LoopBack0
127.0.0.1/32Direct00127.0.0.1LoopBack0
192.0.0.0/24Direct00192.0.0.2Serial0
192.0.0.1/32Direct00127.0.0.1LoopBack0
192.0.0.2/32Direct00192.0.0.2Serial0
202.0.0.0/24Direct00202.0.0.1Ethernet0
202.0.0.1/32Direct00127.0.0.1LoopBack0
202.0.1.0/24RIP1001192.0.0.2Serial0
RTB的配置和路由表:
[RTB]displaycurrent-configuration
Nowcreateconfiguration...
Currentconfiguration
!
version1.74
firewallenable
sysnameRTB
encrypt-cardfast-switch
!
interfaceAux0
asyncmodeflow
phy-mru0
link-protocolppp
!
interfaceEthernet0
ipaddress202.0.1.1255.255.255.0
!
interfaceSerial0
clockDTECLK1
link-protocolppp
ipaddress192.0.0.2255.255.255.0
!
interfaceSerial1
link-protocolppp
!
quit
rip
networkall
!
quit
!
return
[RTB]displayiprouting-table
RoutingTables:
Destination/MaskProtoPrefMetricNexthopInterface
127.0.0.0/8Direct00127.0.0.1LoopBack0
127.0.0.1/32Direct00127.0.0.1LoopBack0
192.0.0.0/24Direct00192.0.0.1Serial0
192.0.0.1/32Direct00192.0.0.1Serial0
192.0.0.2/32Direct00127.0.0.1LoopBack0
202.0.0.0/24RIP1001192.0.0.1Serial0
202.0.1.0/24Direct00202.0.1.1Ethernet0
202.0.1.1/32Direct00127.0.0.1LoopBack0
测试网络互通性,应该是全网互通的。
如果不是,请检查您的配置是否与上面的一致。
现在我们可以看看RIP是怎样发现路由的,在特权模式下打开RIP协议调试开关,有如下信息在路由器之间传递,它们完成了路由的交换,并形成新的路由。
[RTA]info-centerconsole//设置允许信息中心向Console口输出;
[RTA]info-centerconsoledebugging//设置信息中心向Console口输出调试信息
[RTA]debuggingrippacket
RIP:
receiveResponsefrom192.0.0.2(Serial0)
Packet:
vers1,cmdResponse,length24
dest202.0.1.0,Metric1
RIP:
sendfrom202.0.0.1to255.255.255.255(Ethernet0)
Packet:
vers1,cmdResponse,length44
dest202.0.1.0,Metric2
dest192.0.0.0,Metric1
从上面的信息可以看到RIP协议版本为version1,这是华为路由器的默认版本。
可以在接口视图下用ripversion2multicast命令改变协议版本(注意:
需要两端接口都执行该命令),再查看debug信息如下:
[RTA]debuggingrippacket
RIP:
sendfrom192.0.0.1to224.0.0.9(Serial0)
Packet:
vers2,cmdResponse,length24
dest202.0.0.0mask255.255.255.0,router0.0.0.0,metric1
RIP:
receiveResponsefrom192.0.0.2(Serial0)
Packet:
vers2,cmdResponse,length24
dest202.0.1.0mask255.255.255.0,router0.0.0.0,metric1
然后使用ripversion2broadcast命令改变协议报文的发送方式为广播方式,查看debug信息如下:
[RTA]debuggingrippacket
RIP:
sendfrom192.0.0.1to255.255.255.255(Serial0)
Packet:
vers2,cmdResponse,length24
dest202.0.0.0mask255.255.255.0,router0.0.0.0,metric1
RIP:
receiveResponsefrom192.0.0.2(Serial0)
Packet:
vers2,cmdResponse,length24
dest202.0.1.0mask255.255.255.0,router0.0.0.0,metric1
比较以上三种情况的debug信息,能够发现它们的异同吗?
广播地址是什么,组播地址又是什么?
华为路由器的默认状态启动了水平分割功能,在以上配置基础上,关闭水平分割(undoripsplit-horizon)再看看debug信息有什么变化吗?
[RTA]debuggingrippacket
RIP:
sendfrom202.0.0.1to255.255.255.255(Ethernet0)
Packet:
vers1,cmdResponse,length44
dest202.0.1.0,Metric2
dest192.0.0.0,Metric1
RIP:
sendfrom192.0.0.1to255.255.255.255(Serial0)
Packet:
vers2,cmdResponse,length44
dest202.0.1.0mask255.255.255.0,router0.0.0.0,metric2
dest202.0.0.0mask255.255.255.0,router0.0.0.0,metric1
我们比较发现关闭水平分割时,交换的路由信息增加了,这就是水平分割的作用。
水平分割规定不能将从某一网关送来的路由信息再送回此网关,这就是为什么关闭水平分割时交换的路由信息增加了。
下面我们再来理解验证路由器的自动聚合功能。
先修改各路由器的E0口的IP地址如下:
RTA
RTB
E0
10.0.1.1/24
10.0.2.1/24
显示路由器配置信息和路由表信息如下:
[RTA]displaycurrent-configuration
Nowcreateconfiguration...
Currentconfiguration
!
version1.74
info-centerconsole
info-centerconsoledebugging
firewallenable
sysnameRTA
encrypt-cardfast-switch
!
interfaceAux0
asyncmodeflow
phy-mru0
link-protocolppp
!
interfaceEthernet0
ipaddress10.0.1.1255.255.255.0
!
interfaceSerial0
link-protocolppp
ipaddress192.0.0.1255.255.255.0
ripversion2broadcast
!
interfaceSerial1
link-protocolppp
!
interfaceSerial2
link-protocolppp
!
interfaceSerial3
link-protocolppp
!
quit
rip
networkall
!
quit
!
return
[RTA]displayiprouting-table
RoutingTables:
Destination/MaskProtoPrefMetricNexthopInterface
10.0.1.0/24Direct0010.0.1.1Ethernet0
10.0.1.1/32Direct00127.0.0.1LoopBack0
127.0.0.0/8Direct00127.0.0.1LoopBack0
127.0.0.1/32Direct00127.0.0.1LoopBack0
192.0.0.0/24Direct00192.0.0.2Serial0
192.0.0.1/32Direct00127.0.0.1LoopBack0
192.0.0.2/32Direct00192.0.0.2Serial0
[RTA]
然后在RTB协议配置模式下关闭自动聚合功能,显示路由表信息如下:
[RTB-rip]undosummary
[RTA-rip]disipro
RoutingTables:
Destination/MaskProtoPrefMetricNexthopInterface
10.0.1.0/24Direct0010.0.1.1Ethernet0
10.0.1.1/32Dire
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- L000 0074 中低端路由器路由协议基础配置实验指导书中文版11 低端 路由器 路由 协议 基础 配置 实验 指导书 中文版 11