设为首页收藏本站language 语言切换
查看: 2076|回复: 4
收起左侧

[原创] RIPv1与RIPv2下的VLSM实验

[复制链接]
发表于 2013-5-18 15:19:53 | 显示全部楼层 |阅读模式
本帖最后由 旺旺的窝窝 于 2013-5-18 15:21 编辑

未命名.jpg
实验配置: 现在路由器间启动RIPv1R1#sh run
interface Ethernet0
ip address 192.168.1.33 255.255.255.224
!
interface Serial0
ip address 192.168.1.1 255.255.255.252
!
router rip
network 192.168.1.0
!
****************************************************
R2#sh run
!
interface Loopback0
ip address 192.168.1.65 255.255.255.224
!
interface Serial0
ip address 192.168.1.2 255.255.255.252
clockrate 64000
!
interface Serial1
ip address 192.168.1.5 255.255.255.252
clockrate 64000
!
router rip
network 192.168.1.0
!
****************************************************
R3#sh run
!
interface Ethernet0
ip address 192.168.1.34 255.255.255.224
!
interface Serial1
ip address 192.168.1.6 255.255.255.252
!
router rip
network 192.168.1.0
!
****************************************************
实验检验:
R2#sh ip route
Gateway of last resort is not set
  192.168.1.0/24 is variably subnetted, 3 subnets, 2 masks
C   192.168.1.64/27 is directly connected, Loopback0
C   192.168.1.0/30 is directly connected, Serial0
C   192.168.1.4/30 is directly connected, Serial1
通过R2的路由表我们看到R2并没有收到192.168.1.32/27网络的路由
R1#sh ip route
Gateway of last resort is not set
  192.168.1.0/24 is variably subnetted, 3 subnets, 2 masks
C   192.168.1.32/27 is directly connected, Ethernet0
C   192.168.1.0/30 is directly connected, Serial0
R   192.168.1.4/30 [120/1] via 192.168.1.1, 00:00:05, Serial0
我们看到R1并没有收到192.168.1.64/27网络的路由
R3#sh ip route
Gateway of last resort is not set
  192.168.1.0/24 is variably subnetted, 3 subnets, 2 masks
C   192.168.1.32/27 is directly connected, Ethernet0
R   192.168.1.0/30 [120/1] via 192.168.1.5, 00:00:15, Serial1
C   192.168.1.4/30 is directly connected, Serial1
我们看到R3也没有收到192.168.1.64/27网络的路由;由此我们看到,在3台路由器之间启用RIPV1后,3台路由器都是不完整的。这时因为RIPv1在发送路由更新时并不会携带网络的子网掩码 ,因此RIPV1并不能支持VLSM网络环境,因此为了网络能正常运行,我们必须配置RIPv2。
****************************************************
R1(config)#router rip
R1(config-router)#version 2
R1(config-router)#no auto-summary            //此命令是关闭路由汇总,目的是为了发送无类网络的路由,使子网能穿越有类网络的边界
R1(config-router)#network 192.168.1.0
****************************************************
R2(config)#router rip
R2(config-router)#version 2
R2(config-router)#no auto-summary
R2(config-router)#network 192.168.1.0
****************************************************
R3(config)#router rip
R3(config-router)#version 2
R3(config-router)#no auto-summary
R3(config-router)#network 192.168.1.0
****************************************************
现在再来查看一下路由表,看看有什么变化
R1#sh ip route
Gateway of last resort is not set
  192.168.1.0/24 is variably subnetted, 4 subnets, 2 masks
R   
192.168.1.64/27 [120/1] via 192.168.1.1, 00:00:27, Serial0
C   192.168.1.32/27 is directly connected, Ethernet0
C   192.168.1.0/30 is directly connected, Serial0
R   192.168.1.4/30 [120/1] via 192.168.1.2, 00:00:27, Serial0
                            [120/1] via 192.168.1.34, 00:00:01, Ethernet0
R2#sh ip route
Gateway of last resort is not set
  192.168.1.0/24 is variably subnetted, 4 subnets, 2 masks
C   192.168.1.64/27 is directly connected, Loopback0
R   
192.168.1.32/27 [120/1] via 192.168.1.1, 00:00:19, Serial0
                              [120/1] via 192.168.1.6, 00:00:25, Serial1
C   192.168.1.0/30 is directly connected, Serial0
C   192.168.1.4/30 is directly connected, Serial1
R3#sh ip route
Gateway of last resort is not set
  192.168.1.0/24 is variably subnetted, 4 subnets, 2 masks
R   
192.168.1.64/27 [120/1] via 192.168.1.5, 00:00:12, Serial1
C   192.168.1.32/27 is directly connected, Ethernet0
R   192.168.1.0/30 [120/1] via 192.168.1.5, 00:00:12, Serial1
                            [120/1] via 192.168.1.33, 00:00:11, Ethernet0
C   192.168.1.4/30 is directly connected, Serial1
可以看到在配置RIPV2 之后,3台路由器都有了完整的路由表。
更多信息,请点击合肥思科培训

 楼主| 发表于 2013-5-18 15:21:55 | 显示全部楼层
沙发 2013-5-18 15:21:55 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2013-5-19 15:16:48 | 显示全部楼层
这个图是怎么做出来的?
板凳 2013-5-19 15:16:48 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2013-5-19 15:40:00 | 显示全部楼层
thanks for you share !!!!!!!!!!!!!!!!!!!!
地板 2013-5-19 15:40:00 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2013-5-22 15:38:40 | 显示全部楼层
非常感谢
5# 2013-5-22 15:38:40 回复 收起回复
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2025-5-24 14:19 , Processed in 0.180521 second(s), 27 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

快速回复 返回顶部 返回列表