十二、EIGRP的手动汇总
实验目的:1、学习EIGRP路由协议手动汇总的配置。
               2、学习EIGRP路由协议手动汇总的意义。
实验拓扑
1、ip地址表:
R1              LO/0                 192.168.10.33/29
R1              LO/1                  192.168.10.41/29
R1              S2/0                  192.168.10.49/30
R2              S2/0                  192.168.10.50/30
R2              FO/0                  192.168.20.1/24
 
2、
R1的配置:
R1(config)#interface loopback 0
%LINK-5-CHANGED: Interface Loopback0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up
R1(config-if)#ip address 192.168.10.33 255.255.255.248
R1(config-if)#exit
R1(config)#interface loopback 1
%LINK-5-CHANGED: Interface Loopback1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback1, changed state to upR1(config-if)#ip address 192.168.10.41 255.255.255.248
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface serial 2/0
R1(config-if)#ip address 192.168.10.49 255.255.255.252
R1(config-if)#clock rate 64000//DCE端设置时钟频率为64000
R1(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial2/0, changed state to down
R1(config-if)#exit
R1(config)#route eigrp 10//启用eigrp路由协议,自治号为10
R1(config-router)#network 192.168.10.0//通告直连网络
 
R2的配置:
R2(config)#interface loopback 0
%LINK-5-CHANGED: Interface Loopback0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to upR2(config-if)#ip address 192.168.20.1 255.255.255.0
R2(config-if)#exit
R2(config)#interface serial 2/0
R2(config-if)#ip address 192.168.10.50 255.255.255.252
R2(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial2/0, changed state to up
R2(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial2/0, changed state to up
R2(config-if)#exit
R2(config)#route eigrp 10//启用eigrp路由协议,自治号为10
R2(config-router)#network 192.168.10.0 //通告直连网络
R2(config-router)#network 192.168.20.0
 
验证:R1和R2的路由表信息分别如下
R1#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
       i - IS-IS, 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
     192.168.10.0/24 is variably subnetted, 3 subnets, 2 masks
C       192.168.10.32/29 is directly connected, Loopback0
C       192.168.10.40/29 is directly connected, Loopback1
C       192.168.10.48/30 is directly connected, Serial2/0
D    192.168.20.0/24 [90/20640000] via 192.168.10.50, 00:00:09, Serial2/0
R2#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
       i - IS-IS, 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
     192.168.10.0/24 is variably subnetted, 4 subnets, 3 masks
D       192.168.10.0/24 is a summary, 00:01:02, Null0
D       192.168.10.32/29 [90/20640000] via 192.168.10.49, 00:04:10, Serial2/0
D       192.168.10.40/29 [90/20640000] via 192.168.10.49, 00:04:10, Serial2/0
C       192.168.10.48/30 is directly connected, Serial2/0
C    192.168.20.0/24 is directly connected, Loopback0
R1和R2路由表可见都学到了所有的路由信息,但R2上汇总了空接口,取消R2上汇总的空接口如下
-----------
R1(config)#route eigrp 10
R1(config-router)#no auto-summary
R2(config)#route eigrp 10
R2(config-router)#no auto-summary
-----------
 
R2(config)#interface serial 2/0
R2(config-if)#ip summary-address eigrp 10 192.168.10.32 255.255.255.240//eigrp的手动汇总
 
R2#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
       i - IS-IS, 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
     192.168.10.0/24 is variably subnetted, 3 subnets, 2 masks
D       192.168.10.32/28 [90/20640000] via 192.168.10.49, 00:00:15, Serial2/0
C       192.168.10.48/30 is directly connected, Serial2/0
C    192.168.20.0/24 is directly connected, Loopback0
结论:
1、可见eigrp路由协议手动汇总配置成功;
2、对比上面R2的输出,两个/29的子网被汇总了一个/28的子网通告出去,目的使得路由表的尺寸变小,从而节省了搜索路由表的时间。