RIP-综合实验.docx
1.o120.1.1.2/24R2WWW2CTO.COMkRI,R2,R3,R4运行RlPY22、Rl以广播的形式发送路由给20.I.3.0的路由10、R2上看到5.5.5.0的路由为IO跳11.R5向RIPja告一条一认路由R2(confi)isinterface1.OOPbaCk3R2(config-if)#ipaddress20.1.3.2255.255.255.0R2(confi)8intf00R2(config-if)ipadd12.1.1.2255.255.255.0R2(config-if)noshutdownR2(config-if)Bdup1exful1R-I(Config)Sinterfaceloopback1R4(configif)=ipadd4.4.4.4255.255.255.0R4(config)#intf00R4(confi-if)tfipadd12.1,1.4255.255.255.0Rl(config-if)SnoshutdownR4(config-if)OduplexfullRIconfi)Rintl'00RKconfigif)Sipadd12.1.1.1255.255.255.0RKconfigif)SnoshutdownR2(config-if)Sduplexful1Rl(confi-if)i11tcrfacesl/1Rl(confi-if)4ipadd13.1.1.1255.255.255.OIU(config-if)ttnoshutdownR3(config)Rintsl/1R3(config-if)ipadd13.1.1.3255.255.255.0R3(co11figif)#noshutR3(configif)Pintsl0R3(config-if)ipadd35.1.1,3255.255.255.0R3(config-if)nushutdownR5(config)#interfaceloopback1R5(config-if)Oipadd5.5.5.5255.255.255.0R5(config)9intsl0R5(nfig-if)Sipadd35.1.1.5255.255.255.0R5(co11figif)Pnoshutdown按以上配置好后,运用口in吩时确保网络连通性正常。kR1.R2、R3、Rl运行RIPV2R2(config)#routerrip#启用RlP协议R2(confi-router)vcrsion2#启用RlPV2版本R2(config-router)network.0"宣告主类网段R2(config-router)network12.0.0.0R2(config-router)Rnoauto-su三nary#不发自动汇总路由Rl(config)SrouterripR4(confi-router)Svorsion2R4(config-rouler)nauto-suwnaryR4(config-routor)Itnetwork4.0.O.ORl(config-router)network12.O.O.ORI(config)UrouterripRl(config-router)Aversion2Rl(configrouter)noautoSUBfnnryRl(configrouter)network12.O.O.ORKconfig-routcr)Snetwork13.O.O.OR3(config)UrouterripR3(config-router)Aversion2R3(config-router)Onoaut-sunmnryR3(config-router)network13.O.O.OR3(configrouter)#network35.O.O.O2. Rl以广播的形式发送路由送.O网段Rl(Config)Uint00RKconfigif)=ipripv2broadcast#接口下以广播的形式发送版本2的史新Rl(configif),dodebugiprip*启用debug询试路由更新.可看到RI在F0/0口上运用广揄更新Sep620:36:08.895:RIP:sendingv2updateto255.255.255.255viaFastEthernetOZO(12.1.1.1)Sep620:36:08.895:RIP:buiIdupdateentries*S叩620:36:08.895:13.1.1.0/24viaO.O.O.O.metricI.tagOSep620:36:08,895:35.1.1.0/24viaO.O.O.O.metric2»tagO3、R5运行RlPWR5(config)RrouterripR5(config-router)CverR5(co11figrouter)version1R5(configrouter)network此时在R5Ng看路由只有宜连接路由:其它路由器上没有R5的路由。缘由在R5上运行的是Vl版本行I只收发运行VI路由),其它路由器上运行的是V2(V2只收发运行V2路由解决的方法是:在接口下限刎发送接收的更新版本路由。可见后面明细路由时的配4、R1.R2R4所在的.0网段进行MD5认证Rl(config)Ukeychaincisco"定义钥匙链名称,只有本地意义,路由器之间的keychain可以不同R1(config-keychain)Rkey1。指定Key-IDteRl(configkeychainkey)Skeystringtgh二指定Key密码,路由器之间的KeyString要保持一样R1(confiJrkcychain-key)#exitRKconfi-koychain)cxitRl(config)intf00Rl(config-if)ipripauthenticationm<xlemd5菅在接口下启用Nd5认证方式(默认为明文)RI(COnfig-if)Oipripauthenticationkey-chaincisco的接口下IB用的匙tR2(config)SkeychainciscoR2(config-keychain)key1Kcy-stri11要保持一样R2(cnfig-keychain-key)#kcy-stringlghR2(confi-keychain-key)#CXilR2(config-keychain)exitR2(config*inif00K2(config-if)Sipripauthenticationmodemd5R2(config-if)Sipripauthenticationkey-chainciscoR4(config)SkeychainciscoR4(confikeychain)Ckey1R4(config-kcychainkey)t!key-strirIKh=KCy-SIrinK要保持一样RKconfig-keychain-key)*exitIM(config-keychain)SexitIM(Config)RintOOIM(config-if)Sipripauthenticationmodemd5R4(configif)Sipripauthenticationkey-chaincisco明文认SE的匹配原则是,发送方发送生小的Keyn)的密的(key-string).并且不密KeyID;接收方会和全部的keychain中的密钥(key-string)加配.假如兀配胜利.才能过认证。YD5认证的匹配原则是:发送方发送最小的keyID的密朗(key-siring)并携带KeyID号码;接收方会先去匹配具有相向的KeyD的密钥,假加密钥楣同,则只匹限次,就可确定认证是否胜利:假如没有相同的KeyD,只向下查找次KeylD(只检式该KeyII)号中的密钥),匹配,认证胜利:不匹配,认证失败.注,RIP中每个路由更新报文技大可包含25条路的,做了明文认证后只能包含24条,做了MD5认证后只能包含23条.5、Rl要求看到全制明细路由R5(config)Rrouterrip#关闭汇总#接口模式下发送V2更新.此时R5(configrouter)#noautosu11maryR5(co11fig)Sintsi/OR5(config-if)#ipripsendversion2其它路由器学到R5上的全部条目R5(confiR-if)Sipripreceiveversion2#接口模式卜接收Y2更新,此时R5学到其它路由涔上的全部路由6、R3要若到条.0/16汇总路由R3showiprouteCodes:C-connectedS-sialic,R-RIP>W-三obile,B-BGPD-ElGRP,EX-EIGRPexternal.0-OSPF,IA-OSPFinterareaNl-OSITNSSAexternaltype1,N2-OSITNSSAexternaltype2EI-OSPFexternaltype1.E2-OSPFexternaltype2i-IS-IS.su-IS-ISs三nary,1.l-IS-ISlevel-1,1.2-IS-ISIeveI-2iaISISinterarea.Candidntedefault.UperuserstaticrouteoODR,P-periodicdownloadedstaticrouteGatewayoflastresortisnotset35. 0.0.0/24issub<ettcd,1subnets1. .1.1.0isdirectlyconnected,Serial1/0.0/24issubnetted,Isubnets4. 4.4.0120/2vi.lt00:00:12,Serial1/120.0.0.0/24isSubnctted93subnets此时20段路20.1.1.0120/2vi.1,00:00:12,Serial1/1由并没有汇总20.1.3.0120/2vi.h00:00:12.Serial1/120.1.2.0120/2vi.1.00:00:12,Serial1/15.0.0.02dissubnetted,1subnets5. 5,5,0120/1via35.1.1.5.00:00:15,Serial1/012.0.0.0/24issuletted,1subnets12.1.1.0120/1vi.1,00:00:12.Serial1/113.00.0/21issubnetted.1subnets13.1.1.0isdirectlyconnected.Serial1/1sl/1Rl(config-if)ipsuwnary-addressri*通过在Rl的Sl/1接口上手动汇总跖由,如此可削何路由条目,并可节约内存开销IWICariproute*RSPshowiprouteCodes:C-connectcd>S-static*R-RIP,M-BobilaB-BGPD-EIGRHEX-EI