RIPv1有类路由的问题
版权声明:原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://loveme23.blog.51cto.com/7891/42961 |
RIP实验,验证RIPv1有类别更新是否是采用接口的子网掩码为更新的子网掩码,验证方法:用3台路由器,起RIPv1,然后使用 接口IP: r2:f0/0192.168.1.1/29 r1:s1/0192.168.1.9/29 r2:s1/0192.168.1.10/29 r1:s1/1192.168.1.17/29 r3:s1/0192.168.1.18/29 r4:f0/0192.168.1.24/29 按照上面的连接和IP地址配置每台路由器,然后启用RIPv1协议。然后在每台路由器上show ip route查看路由表。 R2#show ip route Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route Gateway of last resort is not set 192.168.1.0/29 is subnetted, 4 subnets C 192.168.1.8 is directly connected, Serial1/0 C 192.168.1.0 is directly connected, Ethernet0/0 R 192.168.1.24 [120/2] via 192.168.1.9, 00:00:02, Serial1/0 R 192.168.1.16 [120/1] via 192.168.1.9, 00:00:02, Serial1/0 R1#show ip route Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route Gateway of last resort is not set 192.168.1.0/29 is subnetted, 4 subnets C 192.168.1.8 is directly connected, Serial1/0 R 192.168.1.0 [120/1] via 192.168.1.10, 00:00:22, Serial1/0 R 192.168.1.24 [120/1] via 192.168.1.18, 00:00:21, Serial1/1 C 192.168.1.16 is directly connected, Serial1/1 R3#show ip route Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route Gateway of last resort is not set 192.168.1.0/29 is subnetted, 4 subnets R 192.168.1.8 [120/1] via 192.168.1.17, 00:00:12, Serial1/0 R 192.168.1.0 [120/2] via 192.168.1.17, 00:00:12, Serial1/0 C 192.168.1.24 is directly connected, Ethernet0/0 C 192.168.1.16 is directly connected, Serial1/0 可以看到,每台路由器从rip学到的路由的掩码都是29位,再看一下r2的debug信息。 R2#debug ip rip RIP protocol debugging is on R2# *Mar 1 00:02:32.655: RIP: sending v1 update to 255.255.255.255 via Serial1/0 (192.168.1.10) *Mar 1 00:02:32.655: RIP: build update entries *Mar 1 00:02:32.655: subnet 192.168.1.0 metric 1 *Mar 1 00:02:35.003: RIP: received v1 update from 192.168.1.9 on Serial1/0 *Mar 1 00:02:35.003: 192.168.1.16 in 1 hops *Mar 1 00:02:35.007: 192.168.1.24 in 2 hops *Mar 1 00:02:36.499: RIP: sending v1 update to 255.255.255.255 via Ethernet0/0 (192.168.1.1) *Mar 1 00:02:36.499: RIP: build update entries *Mar 1 00:02:36.499: subnet 192.168.1.8 metric 1 *Mar 1 00:02:36.499: subnet 192.168.1.16 metric 2 *Mar 1 00:02:36.503: subnet 192.168.1.24 metric 3 同样也是以/29位掩码的路由信息学习和向外更新。。。。 还有R1的show ip rip database信息: R1#show ip rip database 192.168.1.0/24 auto-summary 192.168.1.0/29 [1] via 192.168.1.10, 00:00:04, Serial1/0 192.168.1.8/29 directly connected, Serial1/0 192.168.1.16/29 directly connected, Serial1/1 192.168.1.24/29 [1] via 192.168.1.18, 00:00:02, Serial1/1 通过这个实验,可以让我们从原来RIPv1更新的路由只会采用默认的掩码的误区中走出来,有类路由是先根据默认掩码生成rip database,然后向外更新的时候会与接口的掩码进行最长匹配原则,然后用计算出来的那个掩码为更新时候所用的掩码。。。。 本文出自 “★Beckham~23” 博客,请务必保留此出处http://loveme23.blog.51cto.com/7891/42961 本文出自 51CTO.COM技术博客 |



loveme23
博客统计信息
热门文章
最新评论
友情链接
