RIP路由协议基本配置五.docx
- 文档编号:3787248
- 上传时间:2022-11-25
- 格式:DOCX
- 页数:15
- 大小:90.53KB
RIP路由协议基本配置五.docx
《RIP路由协议基本配置五.docx》由会员分享,可在线阅读,更多相关《RIP路由协议基本配置五.docx(15页珍藏版)》请在冰豆网上搜索。
RIP路由协议基本配置五
武夷学院实验报告
课程名称:
__网络构建与管理__项目名称:
RIP路由协议基本配置
姓名:
_安小圣_专业:
_计科_班级:
_10
(2)班__学号:
_20104061049___
同组成员_____无____
一、实验准备:
(一)、实验目的:
1)、理解静态路由配置;
2)、掌握RIP协议的配置;
(二)、实验环境:
1)、硬件:
路由器二台、PC二台、专用配置线一根。
2)、软件:
超级终端
(3)、准备知识:
路由器的工作原理和基本配置方法,距离矢量路由协议,RIP工作原理和配置方法;
(四)实验原理:
RIP(RoutingInformationProtocols,路由信息协议)是应用较早、使用普遍的IGP(Interior
GatewayProtocols,内部网关协议),适用于小型同类网络,是典型的距离矢量(distance-vetor)协
议。
RIP协议以跳数作为衡量路径开销的,RIP协议里规定最大跳数为15。
RIP在构造路由表时会使用到3种计时器:
更新计时器、无效计时器、刷新计时器。
它让每台路由器
周期性地向每个相邻的邻居发送完整的路由表。
路由表包括每个网络或子网的信息,以及与之相关的度量
值。
二、实验过程记录:
1、通过Console口搭建配置环境
第一步:
如图所示,建立本地配置环境,只需将微机(或终端)的串口通过配置电缆与以太网路由器的Console口连接。
组网图
实际组网中路由器是用来连接两个物理网络的,为了模拟实际环境,我们在实验中采用背靠背直接相连来模拟广域网连接。
按照上图的实验组网建立实验环境。
为了不受路由器原来的配置影响,在实验之前请先将所有路由器的配置数据擦除后重新启动。
交换机在此只用作连接主机和路由器用,以便全采用标准网线连接,不需配置。
第二步:
在微机上运行超级终端,设置终端通信参数为:
波特率为9600bit/s、8位数据位、1位停止位、无校验和无流控,并选择终端类型为VT100,如图所示。
新建连接
连接端口设置
端口通信参数设置
第三步:
以太网交换机上电,终端上显示以太网交换机自检信息,自检结束后提示用户键入回车,之后将出现命令行提示符(如
第四步:
键入命令,配置以太网交换机或查看以太网交换机运行状态。
需要帮助可以随时键入“?
”,具体的配置命令参考书中实验的内容。
2.配置路由器:
第一步:
配置两台路由器的主机名、接口IP地址:
RSR20>en
RSR20#
RSR20#configureterminal
Enterconfigurationcommands,oneperline.EndwithCNTL/Z.
RSR20(config)#hostnameRouterA
RouterA(config)#
RouterA(config)#interfaceserial2/0
RouterA(config-if)#ipaddress192.168.1.1255.255.255.0
RouterA(config-if)#noshutdown
RouterA(config-if)#exit
RouterA(config)#
RouterA(config)#interfaceloopback0
RouterA(config-if)#Aug1523:
46:
32RouterA%7:
%LINEPROTOCOLCHANGE:
InterfaceLoopback0,changedstatetoUP
RouterA(config-if)#ipaddress172.16.1.1255.255.255.0
RouterA(config-if)#exit
RouterA(config)#
RouterA(config)#interfaceloopback1
RouterA(config-if)#Aug1523:
47:
00RouterA%7:
%LINEPROTOCOLCHANGE:
InterfaceLoopback1,changedstatetoUP
RouterA(config-if)#ipaddress172.16.2.1255.255.255.0
RouterA(config-if)#exit
RSR20#configureterminal
Enterconfigurationcommands,oneperline.EndwithCNTL/Z.
RSR20(config)#hostnameRouterB
RouterB(config)#
RouterB(config)#interfaceserial3/0
RouterB(config-if)#ipaddress192.168.1.2255.255.255.0
RouterB(config-if)#noshutdown
RouterB(config-if)#exit
RouterB(config)#
RouterB(config)#interfaceloopback0
RouterB(config-if)#Aug821:
00:
00RouterB%7:
%LINEPROTOCOLCHANGE:
InterfaceLoopback0,changedstatetoUP
RouterB(config-if)#ipaddress10.1.1.1255.255.255.0
RouterB(config-if)#exit
RouterB(config)#
RouterB(config)#interfaceloopback1
RouterB(config-if)#Aug821:
00:
28RouterB%7:
%LINEPROTOCOLCHANGE:
InterfaceLoopback1,changedstatetoUP
RouterB(config-if)#ipaddress10.2.2.1255.255.255.0
RouterB(config-if)#exit
第二步:
在两台路由器上配置RIP路由协议
RouterA(config)#routerrip
RouterA(config-router)#network192.168.1.0
RouterA(config-router)#network172.16.1.0
RouterA(config-router)#exit
RouterB(config)#routerrip
RouterB(config-router)#network192.168.1.0
RouterB(config-router)#network10.0.0.0
RouterB(config-router)#exit
第三步:
查看RIP配置信息,路由表:
RouterA#showiproute
Codes:
C-connected,S-static,R-RIPB-BGP
O-OSPF,IA-OSPFinterarea
N1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2
E1-OSPFexternaltype1,E2-OSPFexternaltype2
i-IS-IS,L1-IS-ISlevel-1,L2-IS-ISlevel-2,ia-IS-ISinterarea
*-candidatedefault
Gatewayoflastresortisnoset
R10.0.0.0/8[120/1]via192.168.1.2,00:
00:
17,FastEthernet0/0
C172.16.1.0/24isdirectlyconnected,Loopback0
C172.16.1.1/32islocalhost.
C172.16.2.0/24isdirectlyconnected,Loopback1
C172.16.2.1/32islocalhost.
C192.168.1.0/24isdirectlyconnected,FastEthernet0/0
C192.168.1.1/32islocalhost.
RouterA#
RoutingProtocolis"rip"
Sendingupdatesevery30seconds,nextduein21seconds
Invalidafter180seconds,flushedafter120seconds
Outgoingupdatefilterlistforallinterfaceis:
notset
Incomingupdatefilterlistforallinterfaceis:
notset
Defaultredistributionmetricis1
Redistributing:
Defaultversioncontrol:
sendversion1,receiveanyversion
InterfaceSendRecvKey-chain
FastEthernet0/0112
Loopback0112
Loopback1112
RoutingforNetworks:
172.16.0.0
192.168.1.0
Distance:
(defaultis120)
RouterB#showiproute
Codes:
C-connected,S-static,R-RIPB-BGP
O-OSPF,IA-OSPFinterarea
N1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2
E1-OSPFexternaltype1,E2-OSPFexternaltype2
i-IS-IS,L1-IS-ISlevel-1,L2-IS-ISlevel-2,ia-IS-ISinterarea
*-candidatedefault
Gatewayoflastresortisnoset
C10.1.1.0/24isdirectlyconnected,Loopback0
C10.1.1.1/32islocalhost.
C10.2.2.0/24isdirectlyconnected,Loopback1
C10.2.2.1/32islocalhost.
R172.16.0.0/16[120/1]via192.168.1.1,00:
00:
12,FastEthernet0/0
C192.168.1.0/24isdirectlyconnected,FastEthernet0/0
C192.168.1.2/32islocalhost.
RouterA#showipripdatabase
10.0.0.0/8auto-summary
10.0.0.0/8
[1]via192.168.1.2FastEthernet0/000:
09
172.16.0.0/16auto-summary
172.16.1.0/24
[1]directlyconnected,Loopback0
172.16.2.0/24
[1]directlyconnected,Loopback1
192.168.1.0/24auto-summary
192.168.1.0/24
[1]directlyconnected,FastEthernet0/0
RouterA#showipripinterface
FastEthernet0/0isup,lineprotocolisup
RoutingProtocol:
RIP
ReceiveRIPv1andRIPv2packets
SendRIPv1packetsonly
Passiveinterface:
Disabled
Splithorizon:
Enabled
V2Broadcast:
Disabled
Multicastregiste:
Registed
InterfaceSummaryRip:
NotConfigured
IPinterfaceaddress:
192.168.1.1/24
FastEthernet0/1isdown,lineprotocolisdown
RIPisnotenabledonthisinterface
Null0isup,lineprotocolisup
RIPisnotenabledonthisinterface
Loopback0isup,lineprotocolisup
RoutingProtocol:
RIP
ReceiveRIPv1andRIPv2packets
SendRIPv1packetsonly
Passiveinterface:
Disabled
Splithorizon:
Enabled
V2Broadcast:
Disabled
Multicastregiste:
Registed
InterfaceSummaryRip:
NotConfigured
IPinterfaceaddress:
172.16.1.1/24
Loopback1isup,lineprotocolisup
RoutingProtocol:
RIP
ReceiveRIPv1andRIPv2packets
SendRIPv1packetsonly
Passiveinterface:
Disabled
Splithorizon:
Enabled
V2Broadcast:
Disabled
Multicastregiste:
Registed
InterfaceSummaryRip:
NotConfigured
IPinterfaceaddress:
172.16.2.1/24
RouterB#showiprip
RoutingProtocolis"rip"
Sendingupdatesevery30seconds,nextduein21seconds
Invalidafter180seconds,flushedafter120seconds
Outgoingupdatefilterlistforallinterfaceis:
notset
Incomingupdatefilterlistforallinterfaceis:
notset
Defaultredistributionmetricis1
Redistributing:
Defaultversioncontrol:
sendversion1,receiveanyversion
InterfaceSendRecvKey-chain
FastEthernet0/0112
Loopback0112
Loopback1112
RoutingforNetworks:
10.0.0.0
192.168.1.0
Distance:
(defaultis120)
RouterB#showipripdatabase
10.0.0.0/8auto-summary
10.1.1.0/24
[1]directlyconnected,Loopback0
10.2.2.0/24
[1]directlyconnected,Loopback1
172.16.0.0/16auto-summary
172.16.0.0/16
[1]via192.168.1.1FastEthernet0/000:
08
192.168.1.0/24auto-summary
192.168.1.0/24
[1]directlyconnected,FastEthernet0/0
RouterB#showipripinterface
FastEthernet0/0isup,lineprotocolisup
RoutingProtocol:
RIP
ReceiveRIPv1andRIPv2packets
SendRIPv1packetsonly
Passiveinterface:
Disabled
Splithorizon:
Enabled
V2Broadcast:
Disabled
Multicastregiste:
Registed
InterfaceSummaryRip:
NotConfigured
IPinterfaceaddress:
192.168.1.2/24
FastEthernet0/1isdown,lineprotocolisdown
RIPisnotenabledonthisinterface
Null0isup,lineprotocolisup
RIPisnotenabledonthisinterface
Loopback0isup,lineprotocolisup
RoutingProtocol:
RIP
ReceiveRIPv1andRIPv2packets
SendRIPv1packetsonly
Passiveinterface:
Disabled
Splithorizon:
Enabled
V2Broadcast:
Disabled
Multicastregiste:
Registed
InterfaceSummaryRip:
NotConfigured
IPinterfaceaddress:
10.1.1.1/24
Loopback1isup,lineprotocolisup
RoutingProtocol:
RIP
ReceiveRIPv1andRIPv2packets
SendRIPv1packetsonly
Passiveinterface:
Disabled
Splithorizon:
Enabled
V2Broadcast:
Disabled
Multicastregiste:
Registed
InterfaceSummaryRip:
NotConfigured
IPinterfaceaddress:
10.2.2.1/24
第四步:
测试网络连通性:
RouterA#ping10.1.1.1
Sending5,100-byteICMPEchoesto10.1.1.1,timeoutis2seconds:
!
!
!
!
!
Successrateis100percent(5/5),round-tripmin/avg/max=1/1/1ms
RouterA#ping10.2.2.1
Sending5,100-byteICMPEchoesto10.2.2.1,timeoutis2seconds:
!
!
!
!
!
Successrateis100percent(5/5),round-tripmin/avg/max=1/2/10ms
RouterB#ping172.16.1.1
Sending5,100-byteICMPEchoesto172.16.1.1,timeoutis2seconds:
!
!
!
!
!
Successrateis100percent(5/5),round-tripmin/avg/max=1/1/1ms
RouterB#ping172.16.2.1
Sending5,100-byteICMPEchoesto172.16.2.1,timeoutis2seconds:
!
!
!
!
!
Successrateis100percent(5/5),round-tripmin/avg/max=1/1/1ms
RouterB#ping172.16.2.1
Sending5,100-byteICMPEchoesto172.16.2.1,timeoutis2seconds:
!
!
!
!
!
Successrateis100percent(5/5),round-tripmin/avg/max=1/1/1ms
第五步:
用debug命令观察路由器接收和发生路由更新的情况
下面是一个完整的RIP路由器接收更新和发送更新的过程,从中可以看到RouterB接收到了RouterA
发送的更新,其中包含一条路由信息172.16.0.0(可以看到水平分割原则的作用),然后刷新了路由表。
RouterB本身发送的更新报文则在Fa0/0、Lo0和Lo1三个端口发出,采用广播的方式,广播地址分别为192.168.1.255,10.1.1.255,10.2.2.255,使用UDP的520端口。
在水平分割的原则下,每个端口发送的路由信息均不相同。
RouterB#debugiprip
Aug821:
06:
08RouterB%7:
[RIP]RIPrecveivedpacket,sock=2125src=192.168.1.1len=24
Aug821:
06:
08RouterB%7:
[RIP]Cancel
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- RIP 路由 协议 基本 配置
![提示](https://static.bdocx.com/images/bang_tan.gif)