Chinaunix首页 | 论坛 | 博客
  • 博客访问: 571943
  • 博文数量: 130
  • 博客积分: 7473
  • 博客等级: 少将
  • 技术积分: 1466
  • 用 户 组: 普通用户
  • 注册时间: 2008-05-10 22:29
文章分类

全部博文(130)

文章存档

2012年(1)

2011年(22)

2010年(2)

2009年(58)

2008年(47)

分类: 系统运维

2008-12-29 16:51:32

实验图:
实验目的:验证rip v1 rip v 2 的不同。
实验步骤:(首先使用rip v 2 ,但不关闭自动汇总。)
+++++++++++++++++++++++++++++++++++++
r0
+++++++++++++++++++++++++++++++++++++
en
conf t
host r0
no ip do lo
line c 0
exec-t 0 0
logg sync
exit
in e0/1
ip add 172.16.1.1 255.255.255.0
no sh
exit
router rip
ver 2
net 172.16.0.0
end
++++++++++++++++++++++++++++++++++++++
r1
++++++++++++++++++++++++++++++++++++++
en
conf t
host r1
no ip do lo
line c 0
exec-t 0 0
logg sync
exit
in e0/0
ip add 172.16.1.2 255.255.255.0
no sh
exit
in e0/1
ip add 192.168.1.1 255.255.255.0
no sh
exit
router rip
ver 2
net 172.16.0.0
net 192.168.1.0
end
++++++++++++++++++++++++++++++++++++
r2
++++++++++++++++++++++++++++++++++++
en
conf t
host r2
no ip do lo
line c 0
exec-t 0 0
logg sync
exit
in e0/0
ip add 192.l68.1.2 255.255.255.0
no sh
exit
in e0/1
ip add 192.168.2.1 255.255.255.0
no sh
exit
router rip
ver 2
net 192.168.2.0
net 192.168.1.0
end
++++++++++++++++++++++++++++++++++++
r3
++++++++++++++++++++++++++++++++++++
en
conf t
host r2
no ip do lo
line c 0
exec-t 0 0
logg sync
exit
in e0/0
ip add 192.168.2.2 255.255.255.0
no sh
exit
in e0/1
ip add 172.16.2.1 255.255.255.0
no sh
exit
router rip
ver 2
net 192.168.2.0
net 172.16.0.0
end
+++++++++++++++++++++++++++++++++
r4
++++++++++++++++++++++++++++++++++
en
conf t
host r4
no ip do lo
line c 0
exec-t 0 0
logg sync
exit
in e0/0
ip add 172.16.2.2 255.255.255.0
no sh
exit
router rip
ver 2
net 172.16.0.0
end
++++++++++++++++++++++++++++++++++
查看路由表:
++++++++++++++++++++++++++++++++++
R0:
     172.16.0.0/24 is subnetted, 1 subnets
C       172.16.1.0 is directly connected, Ethernet0/1
R    192.168.1.0/24 [120/1] via 172.16.1.2, 00:00:46, Ethernet0/1
R    192.168.2.0/24 [120/2] via 172.16.1.2, 00:00:46, Ethernet0/1
R1:
     172.16.0.0/24 is subnetted, 1 subnets
C       172.16.1.0 is directly connected, Ethernet0/0
C    192.168.1.0/24 is directly connected, Ethernet0/1
R    192.168.2.0/24 [120/1] via 192.168.1.2, 00:00:13, Ethernet0/1
R2:
R    172.16.0.0/16 [120/1] via 192.168.2.2, 00:00:15, Ethernet0/1
                   [120/1] via 192.168.1.1, 00:00:06, Ethernet0/0
C    192.168.1.0/24 is directly connected, Ethernet0/0
C    192.168.2.0/24 is directly connected, Ethernet0/1
R3:
     172.16.0.0/24 is subnetted, 1 subnets
C       172.16.2.0 is directly connected, Ethernet0/1
R    192.168.1.0/24 [120/1] via 192.168.2.1, 00:00:12, Ethernet0/0
C    192.168.2.0/24 is directly connected, Ethernet0/0
R4:
     172.16.0.0/24 is subnetted, 1 subnets
C       172.16.2.0 is directly connected, Ethernet0/0
R    192.168.1.0/24 [120/2] via 172.16.2.1, 00:00:05, Ethernet0/0
R    192.168.2.0/24 [120/1] via 172.16.2.1, 00:00:05, Ethernet0/0
+++++++++++++++++++++++++++++++++++++++++++++++++
在所有的路由器上打:
en
conf t
router rip
no au
++++++++++++++++++++++++++++++++++++++++++++++++++
再看路由表:
R0:
     172.16.0.0/24 is subnetted, 2 subnets
C       172.16.1.0 is directly connected, Ethernet0/1
R       172.16.2.0 [120/3] via 172.16.1.2, 00:00:17, Ethernet0/1
R    192.168.1.0/24 [120/1] via 172.16.1.2, 00:00:19, Ethernet0/1
R    192.168.2.0/24 [120/2] via 172.16.1.2, 00:00:19, Ethernet0/1
R1:
     172.16.0.0/24 is subnetted, 2 subnets
C       172.16.1.0 is directly connected, Ethernet0/0
R       172.16.2.0 [120/2] via 192.168.1.2, 00:00:29, Ethernet0/1
C    192.168.1.0/24 is directly connected, Ethernet0/1
R    192.168.2.0/24 [120/1] via 192.168.1.2, 00:00:29, Ethernet0/1
R2:
     172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
R       172.16.0.0/16 [120/1] via 192.168.2.2, 00:00:43, Ethernet0/1
                      [120/1] via 192.168.1.1, 00:00:34, Ethernet0/0
R       172.16.1.0/24 [120/1] via 192.168.1.1, 00:00:01, Ethernet0/0
R       172.16.2.0/24 [120/1] via 192.168.2.2, 00:00:15, Ethernet0/1
C    192.168.1.0/24 is directly connected, Ethernet0/0
C    192.168.2.0/24 is directly connected, Ethernet0/1
R3:
     172.16.0.0/24 is subnetted, 2 subnets
R       172.16.1.0 [120/2] via 192.168.2.1, 00:00:13, Ethernet0/0
C       172.16.2.0 is directly connected, Ethernet0/1
R    192.168.1.0/24 [120/1] via 192.168.2.1, 00:00:13, Ethernet0/0
C    192.168.2.0/24 is directly connected, Ethernet0/0
R4:
     172.16.0.0/24 is subnetted, 2 subnets
R       172.16.1.0 [120/3] via 172.16.2.1, 00:00:16, Ethernet0/0
C       172.16.2.0 is directly connected, Ethernet0/0
R    192.168.1.0/24 [120/2] via 172.16.2.1, 00:00:16, Ethernet0/0
R    192.168.2.0/24 [120/1] via 172.16.2.1, 00:00:16, Ethernet0/0
+++++++++++++++++++++++++++++++++++++++++++++++++
使用rip v1版本重复实验:
+++++++++++++++++++++++++++++++++++++++++++++++++
步骤:
ver 2 去掉就行啦!
++++++++++++++++++++++++++++++++++++++++++++++++++
不管你信不信,路由表真他X的与rip v2不打no au 一模一样。
不信你看:
R0
     172.16.0.0/24 is subnetted, 1 subnets
C       172.16.1.0 is directly connected, Ethernet0/1
R    192.168.1.0/24 [120/1] via 172.16.1.2, 00:00:07, Ethernet0/1
R    192.168.2.0/24 [120/2] via 172.16.1.2, 00:00:02, Ethernet0/1
R1:
     172.16.0.0/24 is subnetted, 1 subnets
C       172.16.1.0 is directly connected, Ethernet0/0
C    192.168.1.0/24 is directly connected, Ethernet0/1
R    192.168.2.0/24 [120/1] via 192.168.1.2, 00:00:04, Ethernet0/1
R2:
R    172.16.0.0/16 [120/1] via 192.168.2.2, 00:00:37, Ethernet0/1
                   [120/1] via 192.168.1.1, 00:00:04, Ethernet0/0
C    192.168.1.0/24 is directly connected, Ethernet0/0
C    192.168.2.0/24 is directly connected, Ethernet0/1
R3:
R    172.16.0.0/16 [120/1] via 192.168.2.2, 00:00:37, Ethernet0/1
                   [120/1] via 192.168.1.1, 00:00:04, Ethernet0/0
C    192.168.1.0/24 is directly connected, Ethernet0/0
C    192.168.2.0/24 is directly connected, Ethernet0/1
R4:
     172.16.0.0/24 is subnetted, 1 subnets
C       172.16.2.0 is directly connected, Ethernet0/0
R    192.168.1.0/24 [120/2] via 172.16.2.1, 00:00:07, Ethernet0/0
R    192.168.2.0/24 [120/1] via 172.16.2.1, 00:00:07, Ethernet0/0
你会说我是复制的吧!你看看时间。
你会说那把rip 1 也关闭自动汇总啊!不行啊!rip1 真他X的不知道可变长的子网掩码。关了也不行。
可见RIP V2 只不过多了no auto-summary 这条命令罢了。不打这条命令,你也别起RIP V2啦!
阅读(835) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~