动态路由协议RIP与OSPF的配置文档格式.docx
《动态路由协议RIP与OSPF的配置文档格式.docx》由会员分享,可在线阅读,更多相关《动态路由协议RIP与OSPF的配置文档格式.docx(18页珍藏版)》请在冰豆网上搜索。
二、实验设备与环境
Windows2000Server/AdvanceServer主机局域网、CISCOCatalyst2950交换机和2600系列路由器,CiscoPacketTracer7.0软件。
三、实验内容
3.1课内实验任务
(2)实验过程
0)创建拓扑图
1)采用配置PC1和PC2的IP地址和子网掩码。
2)连接到路由器Router3,配置路由器的RIP,命令如下:
Router>
enable
Router#confterminal
Router(config)#hostnameR3
R3(config)#interfaceFastEthernet0/0
R3(config-if)#ipaddress11.0.0.1255.255.255.0
R3(config-if)#noshutdown
R3(config-if)#interfaceFastEthernet0/1
R3(config-if)#ipaddress12.0.0.1255.255.255.0
R3(config-if)#interfaceserial0
R3(config-if)#ipaddress10.0.0.1255.255.255.0
R3(config-if)#bandwidth128//设置链路带宽为128kbit/s
R3(config-if)#clockrate64000//设置DCE设备的时钟速率
R3(config-if)#exit
-------------设置路由器R3的RIP--------------------------------------
R3(config)#routerrip//设置RIP
R3(config-router)#network10.0.0.0//设置接口S0连接的网络地址
R3(config-router)#network11.0.0.0//设置接口E0连接的网络地址
R3(config-router)#network12.0.0.0//设置接口E1连接的网络地址
R3(config-router)#end
R3(config)#routerrip//设置RIP
R3(config-router)#network10.0.0.0//设置接口S0连接的网络地址
R3(config-router)#network11.0.0.0//设置接口E0连接的网络地址
R3(config-router)#network12.0.0.0//设置接口E1连接的网络地址
R3#
%SYS-5-CONFIG_I:
Configuredfromconsolebyconsole
4)按照步骤(3)分别完成对路由器R1、R2、R4的接口配置。
//配置过程不再列出
5)按照步骤(3)分别完成对路由器R1、R2、R4的RIP配置。
R1(config)#routerrip//设置路由器R1的RIP
R1(config-router)#network11.0.0.0
R1(config-router)#end
R1(config)#routerrip//设置路由器R1的RIP
R1#
------------设置路由器R2的RIP---------------------------------------
R2(config)#routerrip//设置路由器R2的RIP
R2(config-router)#network12.0.0.0
R2(config-router)#end
R2(config)#routerrip//设置R2的RIP
R2#
------------设置路由器R4的RIP---------------------------------------
R4(config)#routerrip//设置路由器R4的RIP
R4(config-router)#network10.0.0.0
R4(config-router)#network192.168.1.0
R4(config-router)#end
R4(config)#routrip//设置R4的rip
6)连接到路由器R1中,通过命令“showiproute”显示R1的动态路由表,观察路由表项,当目标网络是192.168.1.0/24时,需要多少跳数(hops)?
通过命令“showipprotocols”查看每台路由器的协议。
R1>
showiproute
Codes:
C-connected,S-static,I-IGRP,R-RIP,M-mobile,B-BGP
D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterarea
N1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2
E1-OSPFexternaltype1,E2-OSPFexternaltype2,E-EGP
i-IS-IS,L1-IS-ISlevel-1,L2-IS-ISlevel-2,ia-IS-ISinterarea
*-candidatedefault,U-per-userstaticroute,o-ODR
P-periodicdownloadedstaticroute
Gatewayoflastresortisnotset
R10.0.0.0/8[120/1]via11.0.0.1,00:
00:
20,FastEthernet0/0
11.0.0.0/24issubnetted,1subnets
C11.0.0.0isdirectlyconnected,FastEthernet0/0
R12.0.0.0/8[120/1]via11.0.0.1,00:
R192.168.1.0/24[120/2]via11.0.0.1,00:
答;
有路由表可知,到达192.168.1.0需要两跳。
显示协议如下
showipprotocol
RoutingProtocolis"
rip"
//协议是RIP协议
Sendingupdatesevery30seconds,nextduein13seconds
Invalidafter180seconds,holddown180,flushedafter240
Outgoingupdatefilterlistforallinterfacesisnotset
Incomingupdatefilterlistforallinterfacesisnotset
Redistributing:
rip
Defaultversioncontrol:
sendversion1,receiveanyversion
InterfaceSendRecvTriggeredRIPKey-chain
FastEthernet0/0121
Automaticnetworksummarizationisineffect
Maximumpath:
4
RoutingforNetworks:
11.0.0.0
PassiveInterface(s):
RoutingInformationSources:
GatewayDistanceLastUpdate
11.0.0.112000:
19
Distance:
(defaultis120)
7)连接到R2、R3和R4,通过“showiproute”和“showipprotocols”命令查看每台路由器的路由表和协议。
R2:
R2的路由表:
R2>
R10.0.0.0/8[120/1]via12.0.0.1,00:
19,FastEthernet0/0
R11.0.0.0/8[120/1]via12.0.0.1,00:
12.0.0.0/24issubnetted,1subnets
C12.0.0.0isdirectlyconnected,FastEthernet0/0
R192.168.1.0/24[120/2]via12.0.0.1,00:
//需要两跳
R2所用协议:
showipprotocols
Sendingupdatesevery30seconds,nextduein11seconds
12.0.0.0
12.0.0.112000:
25
R3:
R3路由表:
R3>
10.0.0.0/24issubnetted,1subnets
C10.0.0.0isdirectlyconnected,Serial0/0
C12.0.0.0isdirectlyconnected,FastEthernet0/1
R192.168.1.0/24[120/1]via10.0.0.2,00:
09,Serial0/0
//需要一跳
R3协议:
Sendingupdatesevery30seconds,nextduein12seconds
Serial0/0121
FastEthernet0/1121
10.0.0.0
10.0.0.212000:
14
R4:
R4路由表:
R4>
showiproute
R11.0.0.0/8[120/1]via10.0.0.1,00:
03,Serial0/0
R12.0.0.0/8[120/1]via10.0.0.1,00:
C192.168.1.0/24isdirectlyconnected,FastEthernet0/0
R4协议:
Sendingupdatesevery30seconds,nextduein1seconds
192.168.1.0
10.0.0.112000:
24
8)使用ping命令测试到路由器各接口的连通状态,以检测路由器的配置。
用PC1测试与各个路由器接口的连接性:
C:
\>
ping11.0.0.1
Pinging11.0.0.1with32bytesofdata:
Replyfrom11.0.0.1:
bytes=32time=31msTTL=254
bytes=32time=15msTTL=254
Pingstatisticsfor11.0.0.1:
Packets:
Sent=4,Received=4,Lost=0(0%loss),
Approximateroundtriptimesinmilli-seconds:
Minimum=15ms,Maximum=31ms,Average=27ms
//接通
ping12.0.0.2
Pinging12.0.0.2with32bytesofdata:
Replyfrom12.0.0.2:
bytes=32time=16msTTL=253
bytes=32time=31msTTL=253
bytes=32time=47msTTL=253
Pingstatisticsfor12.0.0.2:
Minimum=16ms,Maximum=47ms,Average=31ms
ping192.168.1.1
Pinging192.168.1.1with32bytesofdata:
Replyfrom192.168.1.1:
bytes=32time<
1msTTL=255
Pingstatisticsfor192.168.1.1:
Approxima