RIP手动汇总
实验目的:
主要是看看手动汇总之后路由表看起来有什么区别....
拓扑连接:
autostart = False
[localhost]
`7200`
p_w_picpath = C:\Program Files\Dynamips\p_w_picpaths\C7200.bin
npe = npe-400
ram = 256
idlepc = 0xffffffff80425144
confreg = 0x2142
`7200`
p_w_picpath = C:\Program Files\Dynamips\p_w_picpaths\C7200.bin
npe = npe-400
ram = 256
idlepc = 0xffffffff80425144
confreg = 0x2142
`ROUTER Router1`
model = 7200
console = 2001
slot0 = PA-C7200-IO-FE
slot1 = PA-4T
S1/0 = Router2 S1/0
model = 7200
console = 2001
slot0 = PA-C7200-IO-FE
slot1 = PA-4T
S1/0 = Router2 S1/0
`ROUTER Router2`
model = 7200
console = 2002
slot0 = PA-C7200-IO-FE
slot1 = PA-4T
配置如下:
model = 7200
console = 2002
slot0 = PA-C7200-IO-FE
slot1 = PA-4T
配置如下:
RouterA:
en
config t
int loop 0
ip add 172.16.1.1 255.255.255.0
int loop 1
ip add 172.16.2.1 255.255.255.0
int s1/0
ip add 192.168.1.1 255.255.255.0
router rip
network 192.168.1.0
network 172.16.0.0
en
config t
int loop 0
ip add 172.16.1.1 255.255.255.0
int loop 1
ip add 172.16.2.1 255.255.255.0
int s1/0
ip add 192.168.1.1 255.255.255.0
router rip
network 192.168.1.0
network 172.16.0.0
RouterB:
en
config t
int loop 0
ip add 10.1.1.1 255.255.255.0
int loop 1
ip add 10.1.2.1 255.255.255.0
int s1/0
ip add 192.168.1.2 255.255.255.0
router rip
network 192.168.1.0
network 10.0.0.0
验证结果:
en
config t
int loop 0
ip add 10.1.1.1 255.255.255.0
int loop 1
ip add 10.1.2.1 255.255.255.0
int s1/0
ip add 192.168.1.2 255.255.255.0
router rip
network 192.168.1.0
network 10.0.0.0
验证结果:
因为rip是v1的,也就是说我还没有设置自动汇总.
RouterA#show ip route
Gateway of last resort is not set
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 2 subnets
C 172.16.1.0 is directly connected, Loopback0
C 172.16.2.0 is directly connected, Loopback1
R 10.0.0.0/8 [120/1] via 192.168.1.2, 00:00:10, Serial1/0
C 192.168.1.0/24 is directly connected, Serial1/0
RouterA#
C 172.16.1.0 is directly connected, Loopback0
C 172.16.2.0 is directly connected, Loopback1
R 10.0.0.0/8 [120/1] via 192.168.1.2, 00:00:10, Serial1/0
C 192.168.1.0/24 is directly connected, Serial1/0
RouterA#
RouterB#show ip route
Gateway of last resort is not set
Gateway of last resort is not set
R 172.16.0.0/16 [120/1] via 192.168.1.1, 00:00:05, Serial1/0
10.0.0.0/24 is subnetted, 2 subnets
C 10.1.2.0 is directly connected, Loopback1
C 10.1.1.0 is directly connected, Loopback0
C 192.168.1.0/24 is directly connected, Serial1/0
RouterB#
10.0.0.0/24 is subnetted, 2 subnets
C 10.1.2.0 is directly connected, Loopback1
C 10.1.1.0 is directly connected, Loopback0
C 192.168.1.0/24 is directly connected, Serial1/0
RouterB#
然后在2个路由器上都使用命令
router rip
version 2
no auto-summary
再次验证:
RouterA#show ip route
Gateway of last resort is not set
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 2 subnets
C 172.16.1.0 is directly connected, Loopback0
C 172.16.2.0 is directly connected, Loopback1
10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
R 10.1.2.0/24 [120/1] via 192.168.1.2, 00:00:01, Serial1/0
R 10.1.1.0/24 [120/1] via 192.168.1.2, 00:00:01, Serial1/0
R 10.0.0.0/8 [120/1] via 192.168.1.2, 00:00:26, Serial1/0
C 192.168.1.0/24 is directly connected, Serial1/0
C 172.16.1.0 is directly connected, Loopback0
C 172.16.2.0 is directly connected, Loopback1
10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
R 10.1.2.0/24 [120/1] via 192.168.1.2, 00:00:01, Serial1/0
R 10.1.1.0/24 [120/1] via 192.168.1.2, 00:00:01, Serial1/0
R 10.0.0.0/8 [120/1] via 192.168.1.2, 00:00:26, Serial1/0
C 192.168.1.0/24 is directly connected, Serial1/0
RouterB#show ip route
Gateway of last resort is not set
Gateway of last resort is not set
172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
R 172.16.0.0/16 [120/1] via 192.168.1.1, 00:00:41, Serial1/0
R 172.16.1.0/24 [120/1] via 192.168.1.1, 00:00:14, Serial1/0
R 172.16.2.0/24 [120/1] via 192.168.1.1, 00:00:14, Serial1/0
10.0.0.0/24 is subnetted, 2 subnets
C 10.1.2.0 is directly connected, Loopback1
C 10.1.1.0 is directly connected, Loopback0
C 192.168.1.0/24 is directly connected, Serial1/0
按照理论上出现的结果是不会有蓝色的这2条路由的,后来想到原来是rip v1还没撤销掉.
R 172.16.0.0/16 [120/1] via 192.168.1.1, 00:00:41, Serial1/0
R 172.16.1.0/24 [120/1] via 192.168.1.1, 00:00:14, Serial1/0
R 172.16.2.0/24 [120/1] via 192.168.1.1, 00:00:14, Serial1/0
10.0.0.0/24 is subnetted, 2 subnets
C 10.1.2.0 is directly connected, Loopback1
C 10.1.1.0 is directly connected, Loopback0
C 192.168.1.0/24 is directly connected, Serial1/0
按照理论上出现的结果是不会有蓝色的这2条路由的,后来想到原来是rip v1还没撤销掉.
过一点时间再去查看show ip route之后果然蓝色的记录已经消失掉了.
个人猜想如下:因为rip v1是每30s触发一次表更新,180s之后超时,再过90s之后路由刷新计时器被初始化
所以路由器在270s之后没有收到rip v1的更新,所以删除了那2条蓝色的记录.
如果我在使用version 2 no auto-summary命令之前使用no router rip,这样删除了rip v1路由,
然后在使用router rip version 2 no auto-summary network ****
配置完成之后,再show的时候,蓝色的2个记录肯定也不会出来.