ccie理论鸿鹄rampamps逐个击破_第1页
ccie理论鸿鹄rampamps逐个击破_第2页
ccie理论鸿鹄rampamps逐个击破_第3页
ccie理论鸿鹄rampamps逐个击破_第4页
ccie理论鸿鹄rampamps逐个击破_第5页
已阅读5页,还剩222页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

/ IProute0.0.0.0 概 RIPver1路由更 RIPver1主机路 RIP路由更新 RIP触发更 RIP单播更 RIP手工汇 RIPver2认 概 EIGRP EIGRPStuckInActive 概 ICMP重定向(ICMPRedirect)来告诉对方,让对方不要再将数据包发向自己,而应该发到其它★1.当路由器从某个接口收到数据包后,还要将数据包从同一个接口发往目交给R1。r1(config-if)#noshr2(config-if)#ipadd10.1.1.2255.255.255.0r2(config-if)#noshr2(config-if)#ipadd20.1.1.2255.255.255.0r2(config-if)#noshr3(config-if)#ipadd10.1.1.3255.255.255.0r3(config-if)#noshr4(config-if)#ipadd20.1.1.4255.255.255.0r4(config-if)#noshR320.1.1.0ICMPr3#debugipICMPpacketdebuggingisonSending5,100-byteICMPEchosto20.1.1.4,timeoutis2*Mar100:15:39.075:ICMP:redirectrcvdfrom10.1.1.1-for20.1.1.4use*Mar100:15:39.175:ICMP:echoreplyrcvd,src20.1.1.4,dst*Mar100:15:39.291:ICMP:echoreplyrcvd,src20.1.1.4,dst*Mar100:15:39.323:ICMP:echoreplyrcvd,src20.1.1.4,dst*Mar100:15:39.383:ICMP:echoreplyrcvd,src20.1.1.4,dst*Mar100:15:39.403:ICMP:echoreplyrcvd,src20.1.1.4,dst10.1.1.3的数据包发给网关R1R1F0/0收到数据包后,检查路由表得知需要再接口进出,也满足第二条源和下一跳同网段,所以R1ICMP重定向,数可以看出,让R1来转发数据包确实是无谓举动。r3#debugipICMPpacketdebuggingisonSending5,100-byteICMPEchosto20.1.1.4,timeoutis2*Mar100:33:41.511:ICMP:echoreplyrcvd,src20.1.1.4,dst*Mar100:33:41.607:ICMP:echoreplyrcvd,src20.1.1.4,dst*Mar100:33:41.663:ICMP:echoreplyrcvd,src20.1.1.4,dst*Mar100:33:41.719:ICMP:echoreplyrcvd,src20.1.1.4,dst*Mar100:33:41.779:ICMP:echoreplyrcvd,src20.1.1.4,dst10.1.1.3r1(config)#intf0/0r1(config-if)#noipredirects以后的版本可以手工开启ICMP重定向功能。OSI七层模型中的第二层数据链路层地址和第IP地址,主机之间要通信,必须封装效。在这里需要讨论的是代理ARP,故介质默认为以太网。(以MCMC自己的二层链路地址就是目标的二层链路地址,这就是路由器的代理ARP功能。主ARP的路由16R110.1.0.0/16F0/0的直连网段,其中包含r1(config-if)#ipadd10.1.1.1255.255.0.0r1(config-if)#noshr2(config-if)#ipadd10.1.1.2255.255.255.0r2(config-if)#noshR2直连网段10.1.1.0/24,并且通过配置静态路由将去往远程网段r3(config-if)#ipadd10.1.1.3255.255.255.0r3(config-if)#noshr3(config-if)#ipadd10.1.2.3255.255.255.0r3(config-if)#noshr4(config-if)#ipadd10.1.2.4255.255.255.0r4(config-if)#noshr1#shipCodes:C-connected,S-static,R-RIP,M-mobile,B-D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-ia-IS-ISinterarea,*-candidatedefault,U-per-userstaticrouteo-ODR,P-periodicdownloadedstaticrouteGatewayoflastresortisnot 网段,所以我们不用写到10.1.2.0/24的静态路由。Sending5,100-byteICMPEchosto10.1.2.4,timeoutis2时,直接在本网段广播请求目标二层链路地址,这个广播被R3R3能10.1.2.0/24ARPR3将自己接口的二层链路地址数据包交给R3处理,最后网络通信成功。HardwareisGt96kFE,addressisc000.1370.0001(biac000.1370.0001)Internetaddressis10.1.2.4/24r3#shintHardwareisGt96kFE,addressisc000.1124.0000(biac000.1124.0000)Internetaddressis10.1.1.3/24r1#shProtocolAddress Age(min)HardwareAddrType Internet10.1.1.3 c000.1124.0000ARPAFastEthernet0/0Internet10.1.1.1 -c000.141c.0000ARPAFastEthernet0/0Internet10.1.2.4 c000.1124.0000ARPAFastEthernet0/0会代替目标R4回复源主机的二层链路地址请求。r2#shipCodes:C-connected,S-static,R-RIP,M-mobile,B-D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-ia-IS-ISinterarea,*-candidatedefault,U-per-userstaticrouteo-ODR,P-periodicdownloadedstaticrouteGatewayoflastresortisnot 10.1.1.0isdirectlyconnected,FastEthernet0/0r2#r2#ping10.1.2.4Sending5,100-byteICMPEchosto10.1.2.4,timeoutis2说明:因为R210.1.2.0/24为直连网段,所以同上原因,因为R3ARP的功能,最后与10.1.2.0/24的网络通信正常。Sending5,100-byteICMPEchosto10.1.2.4,timeoutis2Successrateis0percent(0/5)r1#shProtocolAddress Age(min)HardwareAddrType Internet10.1.1.3 c000.1124.0000ARPAFastEthernet0/0Internet10.1.1.1 -c000.141c.0000ARPAFastEthernet0/0Internet10.1.2.4 说明:R3ARP功能后,R110.1.2.0/24通信,R1认为目标与自己直连,所以会在直连网段直接请求目标的二层链路地址,录为plete,最终与10.1.2.0/24的通信以失败告结。Sending5,100-byteICMPEchosto10.1.2.4,timeoutis2Successrateis0percent(0/5)r2#shProtocolAddress Age(min)HardwareAddrType Internet10.1.1.2 -c000.13e8.0000ARPAFastEthernet0/0Internet10.1.1.3 c000.1124.0000ARPAFastEthernet0/0Internet10.1.2.4 说明:虽然R210.1.2.0/24的静态路由,但因为静态路由指定去往目标为R2与R1一样,不能与10.1.2.0/24通信。r2#shipCodes:C-connected,S-static,R-RIP,M-mobile,B-D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-ia-IS-ISinterarea,*-candidatedefault,U-per-userstaticrouteo-ODR,P-periodicdownloadedstaticrouteGatewayoflastresortisnot10.0.0.0/24issubnetted,2subnets 10.1.2.0[1/0]via10.1.1.3 10.1.1.3(R3R210.1.2.0/2410.1.2.0/24通信Sending5,100-byteICMPEchosto10.1.2.4,timeoutis2说明:更改静态路由到达目标网络为下一跳地址后,R210.1.2.4的二层链路地址,而是改为请求下一跳地址的二层链路地址,因为请求的地址10.1.1.3,所以R3作出了回应,最后R2与目标通信成功。则可能因为下一跳路由器关闭了代理ARP而造成通信失败,但静态路由指定为下一IProute0.0.0.0IProute0.0.0.0IPDefault-Network器也需要像PC一样配置网关,将所有未知目标地址的数据包全部交给网关。routing说明:必须先关闭路由功能(命令noip10.1.1.1(R1R3上查看默认网关r3#ship LastUse TotalUsesInterfaceICMPredirectcacheisempty测试网络连通性r3#pingSending5,100-byteICMPEchosto172.16.1.1,timeoutis2r3#pingSending5,100-byteICMPEchosto192.168.1.1,timeoutis2IProute0.0.0.0为路由器配置默认网关时,IPDefault-Gateway只能在关闭路由功能后起作用,在路由功能开启的情况下,通过命令IProute0.0.0.00.0.0.0同样可以为路由器配置两者的区别在于,IPDefault-Gateway只能在路由功能关闭时工作,并且一台路IProute0.0.0.00.0.0.0可以在路由功能开启时工作,一条路由器可以配置多条IProute0.0.0.00.0.0.0。r3(config)#iproute0.0.0.00.0.0.010.1.1.1(R1r3#shipCodes:C-connected,S-static,R-RIP,M-mobile,B-D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2ia-IS-ISinterarea,*-candidatedefault,U-per-usero-ODR,P-periodicdownloadedstatic 20.1.1.0isdirectlyconnected,FastEthernet0/110.0.0.0/24issubnetted,1subnets S*0.0.0.0/0[1/0]via测试网络连通性r3#pingSending5,100-byteICMPEchosto192.168.1.1,timeoutis2r3#pingSending5,100-byteICMPEchosto172.16.1.1,timeoutis2r3#shipCodes:C-connected,S-static,R-RIP,M-mobile,B-D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-ia-IS-ISinterarea,*-candidatedefault,U-per-userstaticrouteo-ODR,P-periodicdownloadedstaticroute 20.1.1.0isdirectlyconnected,FastEthernet0/110.0.0.0/24issubnetted,1subnets S*0.0.0.0/0[1/0]via[1/0]via网络将成为路由器的默认网关,所有未知目标的数据包全部发往该网络,IP和IS-IS不会传递。指出IOS版本号。r3#shipCodes:C-connected,S-static,R-RIP,M-mobile,B-D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2ia-IS-ISinterarea,*-candidatedefault,U-per-usero-ODR,P-periodicdownloadedstaticGatewayoflastresortisnot 20.1.1.0isdirectlyconnected,FastEthernet0/110.0.0.0/24issubnetted,1subnets r3#pingSending5,100-byteICMPEchosto192.168.1.1,timeoutis2r3#pingSending5,100-byteICMPEchosto172.16.1.1,timeoutis2Successrateis0percent(0/5)因为路由表中只有去往192.168.1.0/24的静态路由,所以R3r3#shipCodes:C-connected,S-static,R-RIP,M-mobile,B-D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2ia-IS-ISinterarea,*-candidatedefault,U-per-usero-ODR,P-periodicdownloadedstatic 20.1.1.0isdirectlyconnected,FastEthernet0/110.0.0.0/24issubnetted,1subnets S*192.168.1.0/24[1/0]via10.1.1.1r3#pingSending5,100-byteICMPEchosto192.168.1.1,timeoutis2r3#pingSending5,100-byteICMPEchosto172.16.1.1,timeoutis2172.16.1.0/24通信。r3#shipCodes:C-connected,S-static,R-RIP,M-mobile,B-D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2ia-IS-ISinterarea,*-candidatedefault,U-per-usero-ODR,P-periodicdownloadedstatic 20.1.1.0isdirectlyconnected,FastEthernet0/1172.16.0.0/16isvariablysubnetted,2subnets,2masks 172.16.1.0/24[1/0]via10.1.1.1 S*192.168.1.0/24[1/0]via10.1.1.1从结果中看出,172.16.1.0/24并没有成为默认网关,原因是,ip修改172.16.0.0/16为默认网关:r3(config)#noipdefault-network172.16.1.0说明:增加静态路由172.16.0.0/16,并指定为默认网关,需要说明的是,ipdefault-network所指定的网段必须在路由表中真实存在,所以当前必须手工指定到172.16.0.0/16的静态路由。r3#shipCodes:C-connected,S-static,R-RIP,M-mobile,B-D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2ia-IS-ISinterarea,*-candidatedefault,U-per-usero-ODR,P-periodicdownloadedstatic *172.16.0.0/16isvariablysubnetted,2subnets,2 S*192.168.1.0/24[1/0]via10.1.1.1ipdefault-networkAD值的被使用,但也就是使用命令showiproute时,所显示在最上面的条目被优先使用,正因为172.16.0.0/16在192.168.1.0/24上面,所以被优先使用。r3#shiprouteCodes:C-connected,S-static,R-RIP,M-mobile,B-D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2ia-IS-ISinterarea,*-candidatedefault,U-per-usero-ODR,P-periodicdownloadedstaticGatewayoflastresortisnot *10.0.0.0/24issubnetted,1 r4#shipCodes:C-connected,S-static,R-RIP,M-mobile,B-D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2ia-IS-ISinterarea,*-candidatedefault,U-per-usero-ODR,P-periodicdownloadedstatic R*0.0.0.0/0[120/1]via20.1.1.3,00:00:14,r3(config-router)#noauto-summaryr4(config-router)#noauto-summaryr3#shipCodes:C-connected,S-static,R-RIP,M-mobile,B-D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2ia-IS-ISinterarea,*-candidatedefault,U-per-usero-ODR,P-periodicdownloadedstatic 20.1.1.0isdirectlyconnected,FastEthernet0/110.0.0.0/24issubnetted,1subnets S*192.168.1.0/24[1/0]via10.1.1.1r4#shipCodes:C-connected,S-static,R-RIP,M-mobile,B-D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2ia-IS-ISinterarea,*-candidatedefault,U-per-usero-ODR,P-periodicdownloadedstaticGatewayoflastresortisnot 20.1.1.0isdirectlyconnected,FastEthernet0/1通过命令network,但network的网段必须为直连。r4#shipCodes:C-connected,S-static,R-RIP,M-mobile,B-D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2ia-IS-ISinterarea,*-candidatedefault,U-per-usero-ODR,P-periodicdownloadedstatic r3(config)#routereigrp1说明:R1通过RIP向R3通告192.168.1.0/24,R2通过EIGRP向R3r3#shipCodes:C-connected,S-static,R-RIP,M-mobile,B-D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2ia-IS-ISinterarea,*-candidatedefault,U-per-usero-ODR,P-periodicdownloadedstatic 20.1.1.0isdirectlyconnected,FastEthernet0/110.0.0.0/24issubnetted,1subnets R*192.168.1.0/24[120/1]via10.1.1.1,00:00:14, r3#shipCodes:C-connected,S-static,R-RIP,M-mobile,B-D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2ia-IS-ISinterarea,*-candidatedefault,U-per-usero-ODR,P-periodicdownloadedstatic 20.1.1.0isdirectlyconnected,FastEthernet0/110.0.0.0/24issubnetted,1subnets R*192.168.1.0/24[120/1]via10.1.1.1,00:00:23,D*192.168.2.0/24[90/156160]via10.1.1.2,00:01:17,r3#shipCodes:C-connected,S-static,R-RIP,M-mobile,B-D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2ia-IS-ISinterarea,*-candidatedefault,U-per-usero-ODR,P-periodicdownloadedstatic S*0.0.0.0/0[1/0]via20.1.1.4r3#shipCodes:C-connected,S-static,R-RIP,M-mobile,B-D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2ia-IS-ISinterarea,*-candidatedefault,U-per-usero-ODR,P-periodicdownloadedstatic 20.1.1.0isdirectlyconnected,FastEthernet0/1 172.16.0.0/16[1/0]via10.1.1.1 S*0.0.0.0/0[1/0]via20.1.1.4说明:ipdefault-network172.16.0.0是通过静态路由指定的,有当ipdefault-network后面的网段是通过静态路由指定时,才优先于iproute0.0.0.0R3ipdefault-networkRIPr3(config)#ipdefault-network192.168.1.0Codes:C-connected,S-static,R-RIP,M-mobile,B-D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2ia-IS-ISinterarea,*-candidatedefault,U-per-usero-ODR,P-periodicdownloadedstatic 20.1.1.0isdirectlyconnected,FastEthernet0/1 172.16.0.0/16[1/0]via10.1.1.1 R*192.168.1.0/24[120/1]via10.1.1.1,00:00:13, S*0.0.0.0/0[1/0]via说明:ipdefault-network后面的网段是通过静态路由指定时,才优时iproute0.0.0.00.0.0.0优先。IP网段划分成多个子网,子网的掩码可以是任意A8位才是主类网络,B16位才是主类网络,C类地址掩码必须为24位才是主类网络。ClasslessClassless可以与子网很好的协作,如果RIPEIGRP,并且这些功能ClasslessClassfulIOSClassless还是10.1.2.0/24Classless时,对于已经知道的子网,路由器会将数据包精确地发送到相应出口,而对于并不知道的子网和其它所有未知目标网络,如10.1.3.0/2430.1.1.0/24,如果存在默认路由的话,路由器便将他们全部发送到默认路由所指示的出口;但是当路由器工作在Classful时,路由器知道了子网的数据包会被发送到默认路由指示的出口,而去往10.0.0.0/8中的未知子网10.1.3.0/24的数据包则被全部丢弃而不走默认路由。ipclasslessnoipclassless开启或关闭。r1(config-if)#ipadd12.1.1.1255.255.255.0r1(config-if)#noshr1(config-if)#ipadd10.1.1.1255.255.255.0r2(config-if)#ipadd12.1.1.2255.255.255.0r2(config-if)#noshr2(config-if)#noshr3(config-if)#noshr1(config-router)#network12.0.0.0r2(config-router)#network12.0.0.0r2#shipCodes:C-connected,S-static,R-RIP,M-mobile,B-D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2ia-IS-ISinterarea,*-candidatedefault,U-per-usero-ODR,P-periodicdownloadedstaticGatewayoflastresortisnot Sending5,100-byteICMPEchosto10.1.1.1,timeoutis2Sending5,100-byteICMPEchosto10.1.3.1,timeoutis2Successrateis0percentSending5,100-byteICMPEchosto30.1.1.1,timeoutis2Successrateis0percent(0/5)Sending5,100-byteICMPEchosto10.1.3.1,timeoutis2Sending5,100-byteICMPEchosto30.1.1.1,timeoutis2所以通信成功。因为IOS默认工作在Classless。r2#shipCodes:C-connected,S-static,R-RIP,M-mobile,B-D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2ia-IS-ISinterarea,*-candidatedefault,U-per-usero-ODR,P-periodicdownloadedstatic 23.1.1.0isdirectlyconnected,FastEthernet0/110.0.0.0/24issubnetted,1subnets S*0.0.0.0/0[1/0]via23.1.1.3Sending5,100-byteICMPEchosto10.1.3.1,timeoutis2Successrateis0percent(0/5)Sending5,100-byteICMPEchosto30.1.1.1,timeoutis2通信失败,而到30.1.1.0/24通信正常。Sending5,100-byteICMPEchosto10.1.3.1,timeoutis2R210.1.3.0/24通信成功。★ipdefault-networkiproute0.0.0.00.0.0.0配置了多条默认网iproute0.0.0.00.0.0.0被优先选用。AS内传递路由信息。RP表,以供数据转发。正因为如此,对于路由是否正确,对于目标是否可达,P全不可达,由此可见,RIP并不适合大型网络。1使用广播地址255.255.255.255ver2使用组播地址224.0.0.9发出。ver1ver230秒定期向网络中发送,RIP没有邻RIPmetric1后发出去,虽然RIP采用定期更新,但是当路由发生变化时,也会立即发送更新,如果检测到某路RIPver1ver2,如果在配置RIPver1ver2的更新,但默认只发送ver1,可以通过手工配置接口接收或发送更新版本的能力。ver2才可以启用认证,而ver1是不可以的,认证同时支持明文和RIPver1会将收到的路由自动汇总为主类网络,并且无法关闭该功能,为什么RIPver1RIPver1更新中,路由条目只ver1有一套奇怪的规则,在后面的实验中,将会详细解释。RIPver2RIPver1的某些缺点,就是在发送路由更新时,将路由的掩码一起发送,于是成就了RIPver2ClasslessInterdomainRouting(CIDR)和Variable-LengthSubnetMasksVLSMs)RIPver2默认也会自动汇总,只不过该功能可以手工关闭,同时,RIP还支持手工汇总路由信息,但手工汇总也是有RIPver1RIPver2,都可以在接口上关闭发送路由的功能,该功能接口收到路由更新,不会再从这个接口将收到的路由发回去。默认情况下,Frame-FelayFrame-Felay点到点子接口还是多点子接口HDLC封装的串口,以太网接口也都是默认开启RIPver1RIPver1255.255.255.255发送路由更新,所以同网段任何节点都RIPver1会将收到的路由自动汇总为主类网络,并且无法关闭该功能,结果为RIPver18位,16位,24位其中的RIPver1IPIP地址相同的掩码长度,比如248位掩码。由此可以看出,RIP给路由的址的掩码长度赋予接收路由,例如收到的路由为10.1.2.0,而接口主IP地址为位,所以RIP采用SecondaryIP的掩码长度优先。RIPIP地址和自己是同子网的,认为双方RIP路由器自己认为而已,它并没有办法知道对方是否真的与自己在同一子网。有时,RIP希望避免造成不必要的错误,比如自己有条10.1.3.0/25,当要将该路由从某个接口发出去之前,都会做一次检测,10.1.1.0/24的IP地址,如果对方收到10.1.3.0,必定会将掩码定义为24位(10.1.3.024测试RIPver1r1(config-if)#ipadd10.1.1.1255.255.255.0r1(config-if)#noshr2(config-if)#noshr3(config-if)#noshRIPver1r1#debugipRIPprotocoldebuggingison*Mar100:14:12.939:RIP:sendingv1updateto255.255.255.255*Mar100:14:12.939:RIP:buildupdate*Mar1 *Mar100:14:14.959:RIP:sendingv1updateto255.255.255.255*Mar100:14:14.959:RIP:buildupdate*Mar1 *Mar100:14:16.287:RIP:sendingv1updateto255.255.255.255*Mar100:14:16.287:RIP:buildupdateentries-suppressingnullupdate说明:RIP255.255.255.255ve1是不会加metric的,收到时是多少,放进路由表还是多少。还可以看出RIPve1的r2#shipCodes:C-connected,S-static,R-RIP,M-mobile,B-D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2ia-IS-ISinterarea,*-candidatedefault,U-per-usero-ODR,P-periodicdownloadedstaticGatewayoflastresortisnot 10.1.2.0的掩码长度也是24主类,但是路由的掩码长度与接口掩码长度不同,所以R1就已经放弃了发送r3#shipCodes:C-connected,S-static,R-RIP,M-mobile,B-D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2ia-IS-ISinterarea,*-candidatedefault,U-per-usero-ODR,P-periodicdownloadedstaticGatewayoflastresortisnot 很显然,这是错误的,所以可以看出,当RIPIP地址在同一主类,但掩r3#shipCodes:C-connected,S-static,R-RIP,M-mobile,B-D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2ia-IS-ISinterarea,*-candidatedefault,U-per-usero-ODR,P-periodicdownloadedstaticGatewayoflastresortisnot 10.1.0.0/23isdirectlyconnected,FastEthernet0/0r3#r2#shipCodes:C-connected,S-static,R-RIP,M-mobile,B-D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2ia-IS-ISinterarea,*-candidatedefault,U-per-usero-ODR,P-periodicdownloadedstaticGatewayoflastresortisnot 10.1.1.0/24isdirectlyconnected,FastEthernet0/0r2#说明:R2给接口配置Secondary地址为10.1.1.22/25后,由于优先采用了Secondary地址的掩码长度赋予接收到的路由,所以原本的10.1.2.0/24变成了r1#debugipRIPprotocoldebuggingisonr1#conftEnterconfigurationcommands,oneperline.EndwithCNTL/Z.r1(config)#intloopback10*Mar100:24:41.895:RIP:sendingv1flashupdateto255.255.255.255*Mar100:24:41.895:RIP:buildflashupdate*Mar1 *Mar100:24:41.899:RIP:sendingv1flashupdateto255.255.255.255*Mar100:24:41.899:RIP:buildflashupdateentries-suppressing*Mar100:24:42.887:%LINEPROTO-5-UPDOWN:Lineprotocolon*Mar100:24:44.079:RIP:receivedv1updatefrom10.1.1.3*Mar1 10.1.2.0in16hops*Mar100:24:44.087:RIP:receivedv1updatefrom10.1.1.2*Mar100:24:44.087: 10.1.2.0in16hops(inaccessible)说明:RIP1516RIP认为目标不可达,RIPmetric值设R110.1.2.0shutdown后,R110.1.2.0metric16后发出RIPver1000000010000000032位的掩码存放在路由表中。测试RIPver1说明:RIPver1主机路由,网络基础配置同r3#shipCodes:C-connected,S-static,R-RIP,M-mobile,B-D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2ia-IS-ISinterarea,*-candidatedefault,U-per-usero-ODR,P-periodicdownloadedstaticGatewayoflastresortisnot 说明:R32310.1.17.0与2310.1.17.0是否属于0001000 00000009100000000010.1.17.0R3认32位长度的掩码放在路由表中,由此可见,RIP路由器双方r2#shipCodes:C-connected,S-static,R-RIP,M-mobile,B-D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2ia-IS-ISinterarea,*-candidatedefault,U-per-usero-ODR,P-periodicdownloadedstaticGatewayoflastresortisnot r3#shipCodes:C-connected,S-static,R-RIP,M-mobile,B-D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-ia-IS-ISinterarea,*-candidatedefault,U-per-usero-ODR,P-periodicdownloadedstaticGatewayoflastresortisnot R10.1.31.0/32[120/1]via10.1.1.1,00:00:16,FastEthernet0/0R10.1.17.0/32[120/1]via10.1.1.1,00:00:17,FastEthernet0/0R10.1.41.0/32[120/1]via10.1.1.1,00:00:11,FastEthernet0/00,所以被当作主机路由,要产生主机路由,可以手工配置对于接收者来说主机位并不是全为0的网段即要。r2#shipCodes:C-connected,S-static,R-RIP,M-mobile,B-D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltypeE1-OSPFexternaltype1,E2-OSPFexternaltypei-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2ia-IS-ISinterarea,*-candidatedefault,U-per-usero-ODR,P-periodicdownloadedstaticGatewayoflastresortisnot RIPRIPIP地址或子网掩码长度不匹配时,都会造成路由不精确或者路由表错误,因此,RIP收到的路由更新源地址必须和接收接口处于相同子网,即使是源地址和接收接口的Secondary地址处于相同子网也可以,否则忽略收到的路由更新,该功能称为RIP的更新源有效性,可以手动去时,会同时使用主IP地址与Secondary地址分别发送一次。段不会被RIP更新出去。测试RIPr1(config-if)#ipadd10.1.1.1255.255.255.0r1(config-if)#noshr2(config-if)#ipadd10.1.1.2255.255.255.0r2(config-if)#noshr3(config-if)#ipadd30.1.1.3255.255.255.0r3(config-if)#noshr2#shipCodes:C-connected,S-static,R-RIP,M-mobile,B-D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2ia-IS-ISinterarea,*-candidatedefault,U-per-usero-ODR,P-periodicdownloadedstaticGatewayoflastresortisnot r3#shipCodes:C-connected,S-static,R-RIP,M-mobile,B-D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2ia-IS-ISinterarea,*-candidatedefault,U-per-usero-ODR,P-periodicdownloadedstaticGatewayoflastresortisnot 以下是R3上的debug信息:r3#debugipRIPprotocoldebuggingison*Mar100:08:32.219:RIP:sendingv1updateto255.255.255.255*Mar100:08:32.219:RIP:buildupdateentries-suppressingnull*Mar100:08:35.003:RIP:ignoredv1updatefrombadsource10.1.1.1r3#shipCodes:C-connected,S-static,R-RIP,M-mobile,B-D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-ia-IS-ISinterarea,*-candidatedefault,U-per-usero-ODR,P-periodicdownloadedstaticGatewayoflastresortisnot Secondary地址处于相同子网,最后将接收到的路由更新放r3(config)#routerrip说明:R3Secondary地址,再次查看路由r3#shipCodes:C-connected,S-static,R-RIP,M-mobile,B-D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2ia-IS-ISinterarea,*-candidatedefault,U-per-usero-ODR,P-periodicdownloadedstaticGatewayoflastresortisnot r3#debugipRIPprotocoldebuggingis*Mar100:17:20.971:RIP:ignoredv1updatefrombadsource10.1.1.1on*Mar100:17:20.971:RIP:receivedv1updatefrom30.1.1.1*Mar1 11.0.0.0in1r3#shipCodes:C-connected,S-static,R-RIP,M-mobile,B-D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2ia-IS-ISinterarea,*-candidatedefault,U-per-usero-ODR,P-periodicdownloadedstaticGatewayoflastresortisnot R2接收所有路由r2#shipCodes:C-connected,S-static,R-RIP,M-mobile,B-D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2ia-IS-ISinterarea,*-candidatedefault,U-per-usero-ODR,P-periodicdownloadedstaticGatewayoflastresortisnot 11.0.0.0/8[120/1]via30.1.1.1,00:00:06RIPRIPver1ver230秒定期向网络中发送,用和节省广域网上的带宽,RIP可以调整为在广域网链路上抑制路由更新的发送,而只仅仅在路由有变化时,将有变化的路由发出去,这就是RIPRIP是网络早期开发的,在早期时候,广域网都是串行链路,或者说是点RIPFrame-Relay点到点子接口被RIP认为是点到点链路,可以开启触发更新。RIP路由器开启触发更新后,在路由没有变动的情况下,便不再RIP触发的更新机制需要在两端路由器都开启,否则不生效。在双方都开启后,注:RIPver1ver2测试RIP说明:以上图为例,测试测试RIPr1(config-if)#encapsulationframe-relayr1(config-if)#noframe-relayinverse-arpr1(config-if)#noarpframe-relayr1(config-if)#noipaddress接,而Frame-Felay只有点到点子接口才被认为是点到点链路。r2(config)#intserial1/0r2(config-if)#noframe-relayinverse-arpr2(config-if)#noarpframe-relayr2(config-if)#noipaddressr1#shipCodes:C-connected,S-static,R-RIP,M-mobile,B-D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-ia-IS-ISinterarea,*-candidatedefault,U-per-userstaticrouteo-ODR,P-periodicdownloadedstaticrouteGatewayoflastresortisnot 10.1.1.0isdirectlyconnected,Loopback1012.0.0.0/24issubnetted,1subnets r2#shipCodes:C-connected,S-static,R-RIP,M-mobile,B-D-EIGRP,EX-EIGRPexter

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论