实验过程:
1、按照图中的示例配置IP地址,使用ping命令确保网络连通性
2、在R3 R4 R5上分别查看路由

R3(config-router)#do sh ip route
     10.0.0.0/24 is subnetted, 2 subnets
R       10.1.45.0 [120/1] via 10.1.34.2, 00:00:25, Serial1/1
C       10.1.34.0 is directly connected, Serial1/1
     192.168.1.0/24 is variably subnetted, 4 subnets, 2 masks
R       192.168.1.8/29 [120/1] via 192.168.1.18, 00:00:11, FastEthernet0/0
C       192.168.1.0/30 is directly connected, Loopback0
R       192.168.1.0/29 [120/1] via 192.168.1.17, 00:00:04, FastEthernet0/0
C       192.168.1.16/29 is directly connected, FastEthernet0/0                    


//R3上没有收到来自于R4的关于192.168.1.0的路由
R4(config-router)#do sh ip route
Gateway of last resort is not set
     10.0.0.0/24 is subnetted, 2 subnets
C       10.1.45.0 is directly connected, Serial1/1
C       10.1.34.0 is directly connected, Serial1/0

R    192.168.1.0/24 [120/1] via 10.1.34.1, 00:00:25, Serial1/0
                    [120/1] via 10.1.45.2, 00:00:01, Serial1/1

//R4从R3,R5分别收到路由,因此有两个关于192.168.1.0 的路由,metric都为1,RIP默认进行负载均衡。
R5(config-router)#do sh ip route
     10.0.0.0/24 is subnetted, 2 subnets
C       10.1.45.0 is directly connected, Serial1/0
R       10.1.34.0 [120/1] via 10.1.45.1, 00:00:15, Serial1/0

     192.168.1.0/29 is subnetted, 1 subnets
C       192.168.1.24 is directly connected, Loopback0

//R5上也只有一条关于192.168.1.0的路由




3、为了实现R1 R2上的路由能够正确的传到R5,需要在沿途确保连续的子网没有被分割。配置secondary address
R3(config)#int s1/1
R3(config-if)#ip add 192.168.1.33 255.255.255.248 sec


R4(config)#int s1/0
R4(config-if)#ip add 192.168.1.34 255.255.255.248 sec
R4(config-if)#
R4(config-if)#
R4(config-if)#int s1/1
R4(config-if)#ip add 192.168.1.41 255.255.255.248 sec
R4(config-if)#exit
R4(config)#router rip
R4(config-router)#net 192.168.1.0

R5(config)#int s1/0
R5(config-if)#ip add 192.168.1.42 255.255.255.248 sec


4、R1 R3 R4 上查看路由表

R1(config-router)#do sh ip route
Gateway of last resort is not set
R    10.0.0.0/8 [120/1] via 192.168.1.19, 00:00:14, FastEthernet0/0
     192.168.1.0/29 is subnetted, 6 subnets
R       192.168.1.40 [120/2] via 192.168.1.19, 00:00:14, FastEthernet0/0
R       192.168.1.32 [120/1] via 192.168.1.19, 00:00:14, FastEthernet0/0
R       192.168.1.8 [120/1] via 192.168.1.18, 00:00:10, FastEthernet0/0
C       192.168.1.0 is directly connected, Loopback0
R       192.168.1.24 [120/3] via 192.168.1.19, 00:00:14, FastEthernet0/0
C       192.168.1.16 is directly connected, FastEthernet0/0


//子网192.168.1.24通过RIP传递过来,metric为3跳
R3(config-router)#do sh ip route
Gateway of last resort is not set
     10.0.0.0/24 is subnetted, 3 subnets
R       10.0.0.0 [120/1] via 192.168.1.34, 00:00:00, Serial1/1
R       10.1.45.0 [120/1] via 10.1.34.2, 00:00:00, Serial1/1
C       10.1.34.0 is directly connected, Serial1/1

     192.168.1.0/24 is variably subnetted, 7 subnets, 2 masks
R       192.168.1.40/29 [120/1] via 192.168.1.34, 00:00:00, Serial1/1
C       192.168.1.32/29 is directly connected, Serial1/1
R       192.168.1.8/29 [120/1] via 192.168.1.18, 00:00:07, FastEthernet0/0
C       192.168.1.0/30 is directly connected, Loopback0
R       192.168.1.0/29 [120/1] via 192.168.1.17, 00:00:01, FastEthernet0/0
                       [120/1] via 10.1.34.2, 00:00:00, Serial1/1
R       192.168.1.24/29 [120/2] via 192.168.1.34, 00:00:00, Serial1/1
C       192.168.1.16/29 is directly connected, FastEthernet0/0
//此时在R3上可以看到关于192.168.1.0各个子网的明细路由。

R4(config-router)#do sh ip route
     10.0.0.0/24 is subnetted, 2 subnets
C       10.1.45.0 is directly connected, Serial1/1
C       10.1.34.0 is directly connected, Serial1/0

     192.168.1.0/29 is subnetted, 6 subnets
C       192.168.1.40 is directly connected, Serial1/1
C       192.168.1.32 is directly connected, Serial1/0
R       192.168.1.8 [120/2] via 192.168.1.33, 00:00:01, Serial1/0
R       192.168.1.0 [120/1] via 10.1.34.1, 00:00:01, Serial1/0
                    [120/1] via 10.1.45.2, 00:00:15, Serial1/1
R       192.168.1.24 [120/1] via 192.168.1.42, 00:00:15, Serial1/1
R       192.168.1.16 [120/1] via 192.168.1.33, 00:00:01, Serial1/0
//R4上也收到了明细路由

实验总结:

RIPV1默认在网络边界汇总网络,这样的话在R310.0.0.0网络边界会将192.168.1.0的各个子网汇总为192.168.1.0,因此整个网络的路由是不正确的。

通过配置 了secondary address之 后,在网络边界延续29位的子网,使得整 个网络的路由能够正常传递。