配置RIP文档格式.docx
《配置RIP文档格式.docx》由会员分享,可在线阅读,更多相关《配置RIP文档格式.docx(17页珍藏版)》请在冰豆网上搜索。
2.恢复路由器的初始配置。
(若路由器末被配置过则直接做第三步)
3.按图2-1所示配置路由器的hostname及IP地址
Router>
Router#conft
Router(config)#hostnamer1//
R1(config)#interfaceFastEthernet0/1//进入FastEthernet0/1端口
r1(config-if)#ipaddress10.1.1.1255.255.255.0//指定端口的IP地址及子网掩码
r1(config-if)#noshut//开启端口
r1(config-if)#exit//退出端口模式
4.检验相邻设备的连通性Ping各个ip地址,将结果记录到监测清单3-1中
ping192.168.102.1
r2>
......
IP
R1
R2
R3
R4
10.1.1.1
-
10.2.2.1
10.3.3.1
10.1.1.2
192.168.101.1
192.168.101.2
172.16.10.1
172.16.10.2
172.16.11.1
172.16.12.1
监测清单3-1
5.配置RIPv1,并且在四台路由器上使用“showiproute”和“showipripdatabase”命令查看路由表。
RIP协议的基本配置非常简单。
首先使用routerip命令进入RIP协议配置模式,然后用network语句声明进入RIP进程的网络。
r1(config)#routerrip//进入RIP配置模式
r1(config-router)#network10.1.1.0
r2(config)#routerrip
r2(config-router)#network10.0.0.0
r2(config-router)#network192.168.101.0
r3(config)#routerrip
r3(config-router)#network192.168.101.0
r3(config-router)#network172.16.10.0
r4(config)#routerrip
r4(config-router)#network172.16.0.0
监测清单3-2
可以看到network语句中使用的是网络号,而不是子网号。
当我们把10.1.1.0这一子网号加入R1的rip路由进程中而发出network10.1.1.0的命令后,showrunning-config命令的结果会显示此处的语句变成为network10.0.0.0,即A类网络下的所有子网都加入RIP路由进程。
在路由器上使用“showiproute”、“showipripdatabase”和showipprotocol命令的输出,记录到监测清单3-3中。
r1#shiproute
Codes:
C-connected,S-static,R-RIP,M-mobile,B-BGP
D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterarea
N1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2
E1-OSPFexternaltype1,E2-OSPFexternaltype2
i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2
ia-IS-ISinterarea,*-candidatedefault,U-per-userstaticroute
o-ODR,P-periodicdownloadedstaticroute
Gatewayoflastresortisnotset
R172.16.0.0/16[120/2]via10.1.1.2,00:
00:
27,FastEthernet0/1
10.0.0.0/8isvariablysubnetted,3subnets,2masks
C10.3.3.0/27isdirectlyconnected,Loopback1
C10.2.2.0/24isdirectlyconnected,Loopback0
C10.1.1.0/24isdirectlyconnected,FastEthernet0/1
R192.168.101.0/24[120/1]via10.1.1.2,00:
r1#shipripdata
10.0.0.0/8auto-summary
10.1.1.0/24directlyconnected,FastEthernet0/1
10.2.2.0/24directlyconnected,Loopback0
10.3.3.0/27directlyconnected,Loopback1
172.16.0.0/16auto-summary
172.16.0.0/16
[2]via10.1.1.2,00:
05,FastEthernet0/1
192.168.101.0/24auto-summary
192.168.101.0/24
[1]via10.1.1.2,00:
r1#shipproto
RoutingProtocolis"
rip"
Sendingupdatesevery30seconds,nextduein15seconds
Invalidafter180seconds,holddown180,flushedafter240
Outgoingupdatefilterlistforallinterfacesisnotset
Incomingupdatefilterlistforallinterfacesisnotset
Redistributing:
rip
Defaultversioncontrol:
sendversion1,receiveanyversion
InterfaceSendRecvTriggeredRIPKey-chain
FastEthernet0/1112
Loopback0112
Loopback1112
Automaticnetworksummarizationisineffect
Maximumpath:
4
RoutingforNetworks:
10.0.0.0
RoutingInformationSources:
GatewayDistanceLastUpdate
10.1.1.212000:
13
Distance:
(defaultis120)
r2#shiproute
R172.16.0.0/16[120/1]via192.168.101.2,00:
12,Serial0/0/0
10.0.0.0/24issubnetted,2subnets
R10.2.2.0[120/1]via10.1.1.1,00:
C10.1.1.0isdirectlyconnected,FastEthernet0/1
C192.168.101.0/24isdirectlyconnected,Serial0/0/0
r2#shipripdata
10.2.2.0/24
[1]via10.1.1.1,00:
[1]via192.168.101.2,00:
18,Serial0/0/0
192.168.101.0/24directlyconnected,Serial0/0/0
r2#shipproto
Sendingupdatesevery30seconds,nextduein24seconds
Serial0/0/0112
192.168.101.0
10.1.1.112000:
11
192.168.101.212000:
23
r3#shiproute
172.16.0.0/24issubnetted,2subnets
C172.16.10.0isdirectlyconnected,FastEthernet0/1
R172.16.11.0[120/1]via172.16.10.2,00:
24,FastEthernet0/1
R10.0.0.0/8[120/1]via192.168.101.1,00:
21,Serial0/0/0
r3#shipripdata
10.0.0.0/8
[1]via192.168.101.1,00:
02,Serial0/0/0
172.16.10.0/24directlyconnected,FastEthernet0/1
172.16.11.0/24
[1]via172.16.10.2,00:
01,FastEthernet0/1
r3#shipproto
Sendingupdatesevery30seconds,nextduein25seconds
172.16.0.0
192.168.101.112000:
08
172.16.10.212000:
07
r4#shiproute
172.16.0.0/16isvariablysubnetted,3subnets,2masks
C172.16.12.0/27isdirectlyconnected,Loopback1
C172.16.10.0/24isdirectlyconnected,FastEthernet0/1
C172.16.11.0/24isdirectlyconnected,Loopback0
R10.0.0.0/8[120/2]via172.16.10.1,00:
06,FastEthernet0/1
R192.168.101.0/24[120/1]via172.16.10.1,00:
r4#shipripdata
[2]via172.16.10.1,00:
13,FastEthernet0/1
172.16.11.0/24directlyconnected,Loopback0
172.16.12.0/27directlyconnected,Loopback1
[1]via172.16.10.1,00:
r4#shipprot
Sendingupdatesevery30seconds,nextduein23seconds
172.16.10.112000:
监测清单3-3
在路由器上ping各个IP地址,结果记录到监测清单3-4中
监测清单3-4
6.R2的路由表中是否出现了10.3.3.0/27的路由,R3的路由表是否出现了172.16.12.0/27的路由?
在R1、R2和R3上能否ping通172.16.12.1,在R2、R3和R4上能否ping通10.3.3.1?
为什么
未出现。
都不能ping通。
因为10.3.3.0/27及172.16.12.0/27已不在默认的A类及B类网络中。
7.将RIP升级成version2,并且在路由器上查看“showiproute”、“showipripdatabase”和“showipprotocol”命令的输出,记录到监测清单3-5中。
r1(config)#routerrip
r1(config-router)#version2
……
其它路由器也执行这两条命令
r1#shiproute
C-connected,S-static,R