此实验前面的小实验:

RIP实验总结之一被动接口和单播更新(拓朴)

RIP实验总结之三rip v2的认证(实验的word文档)

实验2RipV2的手动汇总:

1.       开启环回口:
R1(config)#int lo1
R1(config-if)#ip add <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />1.1.2.1 255.255.255.0
R1(config-if)#int lo2
R1(config-if)#ip add 1.1.3.1 255.255.255.0
R1(config-if)#int lo3
R1(config-if)# ip ad 1.1.4.1 255.255.255.0
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

 

R3(config)#int lo0
R3(config-if)#ip add 192.168.0.1 255.255.255.0
R3(config-if)#int lo1
R3(config-if)#ip add 192.168.1.1 255.255.255.0
R3(config-if)#int lo2
R3(config-if)# ip add 192.168.2.1 255.255.255.0
R3(config-if)#int lo3
R3(config-if)#ip add 192.168.3.1 255.255.255.0
2.       将环回口地址加入到Rip进程,使用版本2,并关闭自动汇总。下面的命令只是使用版本2 和关闭自动汇总:
R1(config-if)#router rip
R1(config-router)#version 2
R1(config-router)#no auto-summary
R2show ip route
R2#sh ip route
     1.0.0.0/24 is subnetted, 4 subnets
R       1.1.1.0 [120/1] via 10.1.1.1, 00:00:14, FastEthernet0/0
R       1.1.2.0 [120/1] via 10.1.1.1, 00:00:14, FastEthernet0/0
R       1.1.3.0 [120/1] via 10.1.1.1, 00:00:14, FastEthernet0/0
R       1.1.4.0 [120/1] via 10.1.1.1, 00:00:14, FastEthernet0/0
     2.0.0.0/24 is subnetted, 1 subnets
C       2.2.2.0 is directly connected, Loopback0
     10.0.0.0/24 is subnetted, 1 subnets
C       10.1.1.0 is directly connected, FastEthernet0/0
R    192.168.0.0/24 [120/1] via 10.1.1.3, 00:00:15, FastEthernet0/0
R    192.168.1.0/24 [120/1] via 10.1.1.3, 00:00:13, FastEthernet0/0
R    192.168.2.0/24 [120/1] via 10.1.1.3, 00:00:08, FastEthernet0/0
R    192.168.3.0/24 [120/1] via 10.1.1.3, 00:00:04, FastEthernet0/0
3.       R1fa0/0上使用手动汇总,将地址汇总为1.1.0.0/16
R1(config)#int fastEthernet 0/0
R1(config-if)#ip summary-address rip 1.1.0.0 255.255.0.0 
R3上将地址汇总为192.168.0.0/16:

 

R3(config)#int fastEthernet 0/0
R3(config-if)#ip summary-address rip 192.168.0.0 255.255.0.0
 Summary mask must be greater or equal to major net
掩码错误,必须大于或等于主网地址。R1A类地址,主网掩码为8,所以能配置。RipV2不支持CIDR,但它可传递CIDR,所以我们可以使用一个汇总后的地址,将它指向NULL0口(EIGRPOSPF后的汇总地址都是指向NULL0的),并将它重分布到RIP中,然后将原地址从rip进程中删除:
R3(config)#ip route 192.168.0.0 255.255.0.0 null 0
R3(config)#router rip
R3(config-router)#redistribute static metric 2
R3(config-router)#no net 192.168.0.1
R3(config-router)#no net 192.168.1.1
R3(config-router)#no net 192.168.2.1
R3(config-router)#no net 192.168.3.1
R2上查看汇总后的路由:
R2#sh ip route
     1.0.0.0/16 is subnetted, 1 subnets
R       1.1.0.0 [120/1] via 10.1.1.1, 00:00:11, FastEthernet0/0
     2.0.0.0/24 is subnetted, 1 subnets
C       2.2.2.0 is directly connected, Loopback0
     10.0.0.0/24 is subnetted, 1 subnets
C       10.1.1.0 is directly connected, FastEthernet0/0
R    192.168.0.0/16 [120/1] via 10.1.1.3, 00:00:18, FastEthernet0/0
指向NULL0的作用:R3对收到网段为192.168.*.0的路由时进行匹配,假如无匹配项,则将之发到NULL0口,即丢弃。
注意在rip中使用路由重分布时,默认为无穷大,所以必须指明metric值。