RIPv2 路由手工汇总
拓扑结构
RIPv2 路由手工汇总_第1张图片
(1)配置路由器R1
R1(config)#router rip
R1(config-router)#version 2
R1(config-router)#no auto-summary
R1(config-router)#network 1.0.0.0
R1(config-router)#network 192.168.12.0
(2)配置路由器R2
R2(config)#router rip
R2(config-router)#version 2
R2(config-router)#no auto-summary
R2(config-router)#network 192.168.12.0
R2(config-router)#network 192.168.23.0
(3)配置路由器R3
R3(config)#router rip
R3(config-router)#version 2
R3(config-router)#no auto-summary
R3(config-router)#network 192.168.23.0
R3(config-router)#network 192.168.34.0
(4) R4的配置:
R4(config)#router rip
R4(config-router)#version 2
R4(config-router)#no auto-summary
R4(config-router)#network 192.168.34.0
R4(config-router)#network 4.0.0.0
R4(config)#interface s0/0/0
R4(config-if)#ip summary-address rip 4.4.0.0 255.255.252.0//RIP 手工路由汇总
调试
(1)在没有执行汇总之前路由器R1 的路由表如下:
R1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
C 192.168.12.0/24 is directly connected, Serial0/0/0
1.0.0.0/24 is subnetted, 1 subnets
C 1.1.1.0 is directly connected, Loopback0
4.0.0.0/24 is subnetted, 4 subnets
R 4.4.0.0 [120/3] via 192.168.12.2, 00:00:21, Serial0/0/0
R 4.4.1.0 [120/3] via 192.168.12.2, 00:00:21, Serial0/0/0
R 4.4.2.0 [120/3] via 192.168.12.2, 00:00:12, Serial0/0/0
R 4.4.3.0 [120/3] via 192.168.12.2, 00:00:05, Serial0/0/0
R 192.168.23.0/24 [120/1] via 192.168.12.2, 00:00:21, Serial0/0/0
R 192.168.34.0/24 [120/2] via 192.168.12.2, 00:00:22, Serial0/0/0
从上面的输出看到路由器R1 的路由表中有R4 的4 条环回接口的明细路由。
(2)在执行汇总以后路由器R1 的路由表如下:
R1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
C 192.168.12.0/24 is directly connected, Serial0/0/0
1.0.0.0/24 is subnetted, 1 subnets
C 1.1.1.0 is directly connected, Loopback0
4.0.0.0/22 is subnetted, 1 subnets
R 4.4.0.0 [120/3] via 192.168.12.2, 00:00:21, Serial0/0/0
R 192.168.23.0/24 [120/1] via 192.168.12.2, 00:00:21, Serial0/0/0
R 192.168.34.0/24 [120/2] via 192.168.12.2, 00:00:22, Serial0/0/0
上面的输出表明在路由器R1 的路由表中接收到汇总路由,当然R2,R3 上也能收到汇总
路由。