RIP的防环机制共有6种:1.最大跳数2.水平分割3.毒化路由4.毒性逆转5.hold-down计时器6.触发更新联想:定时更新和触发更新的区别:•定时更新:运行如RIP,IGRP等距离矢量协议的路由器以一定的时间间隔广播路由表的全部内容。RIP缺省情况下每隔30s向每个活跃接口广播所有路由。IGRP的缺省更新时间间隔是90s。触发更新:更新通过在网络发生变化时为等待到定时更新的时间点就立即发送更新,从而消除了定时更新带来的收敛延迟,快速更新发生在网络的结点和结点之间,减少了整个网络的收敛时间。以下针对每种更新方式,以实验的方式进行验证:l最大跳数演示试验:R1R2R3R1上有一个环回口地址1.1.1.1/24位,全网起RIPV2协议,演示醉倒跳数的试验。R1R2R3routerripversion2network1.0.0.0network10.0.0.0network172.16.0.0noauto-summaryrouterripversion2network10.0.0.0noauto-summaryrouterripversion2network10.0.0.0network172.16.0.0noauto-summaryR2#showiprouterip1.0.0.0/24issubnetted,1subnets无忧网客联盟Copyright@2008llxmy.AllRightsReservedR1.1.1.0[120/1]via10.1.12.1,00:00:06,Serial1/0172.16.0.0/24issubnetted,1subnetsR172.16.1.0[120/1]via10.1.23.3,00:00:21,Serial1/1[120/1]via10.1.12.1,00:00:26,Serial1/010.0.0.0/8isvariablysubnetted,4subnets,3masksR10.1.45.1/32[120/1]via10.1.12.1,00:00:26,Serial1/0R10.1.34.0/26[120/1]via10.1.12.1,00:00:26,Serial1/0R3#showiprouterip1.0.0.0/24issubnetted,1subnetsR1.1.1.0[120/1]via172.16.1.1,00:00:06,FastEthernet0/010.0.0.0/8isvariablysubnetted,4subnets,3masksR10.1.12.0/24[120/1]via10.1.23.2,00:00:06,Serial1/0[120/1]via172.16.1.1,00:00:06,FastEthernet0/0R10.1.45.1/32[120/1]via172.16.1.1,00:00:06,FastEthernet0/0R10.1.34.0/26[120/1]via172.16.1.1,00:00:06,FastEthernet0/0正常情况下R2的下一跳是R1的串口地址,R3的下一跳是R1的以太口地址。第一步:被动接口R1的以太网口R1(config-router)#passfa0/0大约4分钟后,R3上看到的1.1.1.0/24的下一跳是R2过来的。R3#showiprouterip1.0.0.0/24issubnetted,1subnetsR1.1.1.0[120/2]via10.1.23.2,00:00:06,Serial1/010.0.0.0/8isvariablysubnetted,4subnets,3masksR10.1.12.0/24[120/1]via10.1.23.2,00:00:06,Serial1/0R10.1.45.1/32[120/2]via10.1.23.2,00:00:06,Serial1/0R10.1.34.0/26[120/2]via10.1.23.2,00:00:06,Serial1/0第二步:把R1的s1/1的接口也被动掉,且断开lookback0接口。且打开个各个路由器的debugipripR1(config)#routerripR1(config-router)#passive-interfaces1/1R1(config)#intloopback0R1(config-if)#shutdown第三步:直到R1收到1.1.1.0的下一跳是R2时,打开s1/1的被动接口。R1(config-router)#doshowiprouterip1.0.0.0/24issubnetted,1subnetsR1.1.1.0[120/3]via172.16.1.3,00:00:02,FastEthernet0/0Jun2820:06:28.875:RIP:receivedv2updatefrom10.1.12.2onSerial1/1*Jun2820:06:28.879:10.1.23.0/24via0.0.0.0in1hopsR1(config-router)#nopass1/1R1(config-router)#*Jun2820:06:32.955:RIP:receivedv2updatefrom172.16.1.3onFastEthernet0/0*Jun2820:06:32.959:1.1.1.0/24via0.0.0.0in3hops*Jun2820:06:32.959:10.1.12.0/24via0.0.0.0in2hops无忧网客联盟Copyright@2008llxmy.AllRightsReserved*Jun2820:06:32.959:10.1.23.0/24via0.0.0.0in1hops*Jun2820:06:32.959:10.1.34.0/26via0.0.0.0in3hops*Jun2820:06:32.959:10.1.45.1/32via0.0.0.0in3hopsR1(config-router)#*Jun2820:06:35.219:RIP:sendingv2updateto224.0.0.9viaLoopback2(10.1.23.2)*Jun2820:06:35.219:RIP:buildupdateentries*Jun2820:06:35.219:1.1.1.0/24via0.0.0.0,metric4,tag0*Jun2820:06:35.219:10.1.12.0/24via0.0.0.0,metric1,tag0*Jun2820:06:35.219:10.1.34.0/26via0.0.0.0,metric1,tag0*Jun2820:06:35.219:10.1.45.1/32via0.0.0.0,metric1,tag0*Jun2820:06:35.219:172.16.1.0/24via0.0.0.0,metric1,tag0*Jun2820:06:35.219:RIP:ignoredv2packetfrom10.1.23.2(sourcedfromoneofouraddresses)R1(config-router)#*Jun2820:06:39.027:RIP:sendingv2updateto224.0.0.9viaLoopback3(10.1.34.1)*Jun2820:06:39.027:RIP:buildupdateentries*Jun2820:06:39.031:1.1.1.0/24via0.0.0.0,metric4,tag0*Jun2820:06:39.031:10.1.12.0/24via0.0.0.0,metric1,tag0*Jun2820:06:39.035:10.1.23.0/24via0.0.0.0,metric1,tag0*Jun2820:06:39.035:10.1.45.1/32via0.0.0.0,metric1,tag0*Jun2820:06:39.035:172.16.1.0/24via0.0.0.0,metric1,tag0*Jun2820:06:39.035:RIP:ignoredv2packetfrom10.1.34.1(sourcedfromoneofouraddresses)R1(config-router)#*Jun2820:06:40.519:RIP:sendingv2updateto224.0.0.9viaLoopback4(10.1.45.1)*Jun2820:06:40.519:RIP:buildupdateentries*Jun2820:06:40.519:1.1.1.0/24via0.0.0.0,metric4,tag0*Jun2820:06:40.519:10.1.12.0/24via0.0.0.0,metric1,tag0*Jun2820:06:40.519:10.1.23.0/24via0.0.0.0,metric1,tag0*Jun2820:06:40.519:10.1.34.0/26via0.0.0.0,metric1,tag0*Jun2820:06:40.519:172.16.1.0/24via0.0.0.0,metric1,tag0*Jun2820:06:40.519:RIP:ignoredv2packetfrom10.1.45.1(sourcedfromoneofouraddresses)R1(config-router)#*Jun2820:06:41.679:RIP:sendingv2updateto224.0.0.9viaSerial1/1(10.1.12.1)*Jun2820:06:41.679:RIP:buildupdateentries*Jun2820:06:41.683:1.1.1.0/24via0.0.0.0,metric4,tag0*Jun2820:06:41.683:10.1.23.0/24via0.0.0.0,metric1,tag0*Jun2820:06:41.687:10.1.34.0/26via0.0.0.0,metric1,tag0*Jun2820:06:41.687:10.1.45.1/32via0.0.0.0,metric1,tag0无忧网客联盟Copyright@2008llxmy.AllRightsReserved*Jun2820:06:41.691:172.16.1.0/24via0.0.0.0,metric1,tag0R1(config-router)#*Jun2820:06:45.711:RIP:receivedv2updatefrom172.16.1.3onFastEthernet0/0*Jun2820:06:45.715:1.1.1.0/24via0.0.0.0in6hopsR1(config-router)#*Jun2820:06:47.715:RIP:sendingv2flashupdateto224.0.0.9viaSerial1/1(10.1.12.1)*Jun2820:06:47.715:RIP:buildflashupdateentries*Jun2820:06:47.719:1.1.1.0/24via0.0.0.0,metric7,tag0*Jun2820:06:47.719:RIP:sendingv2flashupdateto224.0.0.9viaLoopback2(10.1.23.2)*Jun2820:06:47.723:RIP:buildflashupdateentries*Jun2820:06:47.723:1.1.1.0/24via0.0.0.0,metric7,tag0*Jun2820:06:47.727:RIP:sendingv2flashupdateto224.0.0.9viaLoopback3(10.1.34.1)*Jun2820:06:47.727:RIP:build