实验目标:掌握EIGRP路由汇总的两种方式即自动汇总和手动汇总 实验TOP: 如上配置,已经将基本的地址信息配置完成,下面启动基本的EIGRP
基本配置
(config)#router eigrp 100 R1(config-router)#network 12.1.1.00.0.0.255 R1(config-router)#network 13.1.1.00.0.0.255 R1(config-router)#network 1.1.1.1 0.0.0.0 R1(config-router)#no auto-summary R2(config)#router eigrp 100 R2(config-router)#network 2.2.2.2 0.0.0.0 R2(config-router)#network 12.1.1.00.0.0.255 R2(config-router)#no auto-summary R3(config)#router eigrp 100 R3(config-router)#network 13.1.1.00.0.0.255 R3(config-router)#network 3.3.3.3 0.0.0.0 R3(config-router)#no auto-summary //这里我们将所有路由器的自动汇总关闭 验证: 我们可以通过show ip eigrp neighbors 命令来验证本路由器与其他路由器之间的邻居关系是否正常建立,以R1为例 R1#show ip eigrp neighbors IP-EIGRP neighbors for process 100 H Address Interface Hold Uptime SRTT RTO Q Seq (sec) (ms) Cnt Num 1 13.1.1.3 Se2/0 13 00:01:06 40 240 0 2 0 12.1.1.2 Se1/0 12 00:01:27 38 228 0 3 R1# //说明R1与R2和R3之间的邻居关系正常建立 现在我们查看R1是否已经学习到R2和R3的路由条目,通过show ip route命令可以看出路由器是否学习到邻居的路由,以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 1.0.0.0/32 is subnetted, 1 subnets C 1.1.1.1 is directly connected, Loopback0 2.0.0.0/32 is subnetted, 1 subnets D 2.2.2.2 [90/2297856] via 12.1.1.2, 00:07:38, Serial1/0 3.0.0.0/32 is subnetted, 1 subnets D 3.3.3.3 [90/2297856] via 13.1.1.3, 00:07:15, Serial2/0 12.0.0.0/24 is subnetted, 1 subnets C 12.1.1.0 is directly connected, Serial1/0 13.0.0.0/24 is subnetted, 1 subnets C 13.1.1.0 is directly connected, Serial2/0 R1# 通过如上信息我们可以看出路由器R1现在已经学习到R2和R3的LOOPBACK接口信息,我们发现学习到的路由条目(以从R2学习到的路由为例),关于R2的路由在R1的路由表中的表现形式是 2.0.0.0/32 is subnetted, 1 subnets D 2.2.2.2 [90/2297856] via 12.1.1.2, 00:07:38, Serial1/0 即R1学习到R2的LO0的路由在路由表中的表现形式是明细条目而不是汇总 下面我们研究EIGRP的自动汇总和手动汇总 (1) 自动汇总 Eigrp的自动汇总有两个必要条件,一是必须开启自动汇总,二是开启自动汇总的路由器要存在网络边界 首先,我们将R1、R2和R3的自动汇总打开 R1(config)#router eigrp 100 R1(config-router)#auto-summary R2(config)#router eigrp 100 R2(config-router)#auto-summary R3(config)#router eigrp 100 R3(config-router)#auto-summary 然后,我们再去查看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 1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 1.1.1.1/32 is directly connected, Loopback0 D 1.0.0.0/8 is a summary, 00:05:38, Null0 D 2.0.0.0/8 [90/2297856] via 12.1.1.2, 00:05:26, Serial1/0 D 3.0.0.0/8 [90/2297856] via 13.1.1.3, 00:05:21, Serial2/0 12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 12.1.1.0/24 is directly connected, Serial1/0 D 12.0.0.0/8 is a summary, 00:05:38, Null0 13.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 13.1.1.0/24 is directly connected, Serial2/0 D 13.0.0.0/8 is a summary, 00:05:38, Null0 R1# //查看黄色背景的字体,可以看出R1学到的关于R2和R3 的路由信息是汇总的条目,这里由于是自动汇总,所以汇总是后得到的是主类网段信息。 //查看红色背景的字体,我们发现R1的路由表中出现了关于自身直连网段的汇总信息。同样,由于这里也是路由器进行的自动汇总,所以汇总后得到的也是主类的网段信息。这里值得注意的是EIGRP同RIP一样,只会对自身直连的网段进行汇总。但是有一个前提条件是自身直连的网段构成了网络边界。观察R1的直连网段,显然R1是存在网络边界的,所以只要EIGRP开启了自动汇总,路由器就会对自身的直连网段进行自动汇总。然而,所有路由器本身的直连信息的汇总条目吓一跳均为Null0,即吓一跳为空。注意:在EIGRP中新产生的路由条目(开启自动汇总产生的汇总条目)需要单独防环,不在DUAL算法内,产生一个Null0的条目,接收到该网段的路由条目会被路由器丢弃,起到放环的作用。 //分析R2,我们发现R2的两个直连网段是存在网络边界的,而且R2开启了自动汇总,也就是说R2会对自身的直连网段进行自动汇总。 查看R2的路由表 R2#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 D 1.0.0.0/8 [90/2297856] via 12.1.1.1, 00:23:14, Serial2/0 2.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 2.2.2.2/32 is directly connected, Loopback0 D 2.0.0.0/8 is a summary, 00:23:19, Null0 D 3.0.0.0/8 [90/2809856] via 12.1.1.1, 00:23:08, Serial2/0 12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 12.1.1.0/24 is directly connected, Serial2/0 D 12.0.0.0/8 is a summary, 00:23:19, Null0 D 13.0.0.0/8 [90/2681856] via 12.1.1.1, 00:23:14, Serial2/0 R2# //实验现象与我们的推测相符,R2会对自身的直连网段按A.B.C主类进行汇总 现在我们对R2的配置进行一下修改,让R2的网络边界消失,然后,我们查看在网络边界不存在的情况下,R2是否会对自身的直连网段进行汇总 我们讲R2的lo 0 关闭 R2(config)#int lo0 R2(config-if)#shutdown 查看R2的路由表 R2#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 D 1.0.0.0/8 [90/2297856] via 12.1.1.1, 00:29:42, Serial2/0 D 3.0.0.0/8 [90/2809856] via 12.1.1.1, 00:29:36, Serial2/0 12.0.0.0/24 is subnetted, 1 subnets C 12.1.1.0 is directly connected, Serial2/0 D 13.0.0.0/8 [90/2681856] via 12.1.1.1, 00:29:42, Serial2/0 R2# //我们发现R2并没有对自身的直连网段进行汇总,而且也没有产生一条吓一跳为Null0的汇总路由,所以当R2只有一个直连网段12.1.1.0/24时,是不会对其进行汇总的,因为此时对于R2来说,网络边界已经不存在了 我们可以用实验进一步验证这一理论,我们可以这么做:我们在R2上新建一个LO2接口,并将LO2接口所在网段设置为12.1.2.0/24即同S2/0接口在相同的A主类网段,并且属于相同的主网,都是12.0.0.0/8主网。 R2(config)#interface loopback 2 R2(config-if)#ip address 12.1.2.22255.255.255.0 在EIGRP进程下宣告 R2(config)#router eigrp 100 R2(config-router)#network 12.1.2.00.0.0.255 查看R2的路由表 R2#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 D 1.0.0.0/8 [90/2297856] via 12.1.1.1, 00:41:47, Serial2/0 D 3.0.0.0/8 [90/2809856] via 12.1.1.1, 00:06:54, Serial2/0 12.0.0.0/24 is subnetted, 2 subnets C 12.1.1.0 is directly connected, Serial2/0 C 12.1.2.0 is directly connected, Loopback2 D 13.0.0.0/8 [90/2681856] via 12.1.1.1, 00:41:47, Serial2/0 R2# //我们发现R2并没有对自己的直连网段信息进行汇总,同样的,这是因为R2并没有存在网络边界。 补充验证: 如果我们关闭R3的自动汇总,我推测一下,R3会将明细条目更新给R1,R1是开启自动汇总的,那么R1是否会将从R3学到的明细的条目汇总成主类网段信息再发送给R2呢。 下面我们通过实验验证: 首先关闭R3的自动汇总 R3(config)#router eigrp 100 R3(config-router)#no auto-summary 查看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 1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 1.1.1.1/32 is directly connected, Loopback0 D 1.0.0.0/8 is a summary, 00:53:39, Null0 3.0.0.0/32 is subnetted, 1 subnets D 3.3.3.3 [90/2297856] via 13.1.1.3, 00:00:25, Serial2/0 12.0.0.0/8 is variably subnetted, 3 subnets, 2 masks C 12.1.1.0/24 is directly connected, Serial1/0 D 12.0.0.0/8 is a summary, 00:53:39, Null0 D 12.1.2.0/24 [90/2297856] via 12.1.1.2, 00:19:42, Serial1/0 13.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 13.1.1.0/24 is directly connected, Serial2/0 D 13.0.0.0/8 is a summary, 00:53:39, Null0 R1# //R1收到的是明细路由 查看R2的路由表 R2#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 D 1.0.0.0/8 [90/2297856] via 12.1.1.1, 00:54:36, Serial2/0 3.0.0.0/32 is subnetted, 1 subnets D 3.3.3.3 [90/2809856] via 12.1.1.1, 00:01:32, Serial2/0 12.0.0.0/24 is subnetted, 2 subnets C 12.1.1.0 is directly connected, Serial2/0 C 12.1.2.0 is directly connected, Loopback2 D 13.0.0.0/8 [90/2681856] via 12.1.1.1, 00:54:36, Serial2/0 R2# //我们发现R2收到的关于R3的路由条目依然是明细的,也就是说R1并没有将关于R3的明细路由汇总后发给R2,而是直接传递明细条目。注意:运行EIGRP路由协议的路由器是不会对接受到的路由条目进行汇总的,只有当自身存在网络边界时,才会对自己直连网段进行汇总。 //我们再次观察R3的路由表发现,只有一条关于12.1.1.0/8的路由条目,那么这一条目是指向哪里的呢。通过开销值我们可以判断出这一条目是指向R1的S1/0所在的12.0.0.0/8网段。那么R3为什么没有收到关于R2的环回口的明细路由,R1为什么没有将关于R2的环回口的明细路由传给R3呢。注意:当一台路由器的路由表中关于一个网段的明细条目和汇总条目同时存在时,它只会发送汇总的条目,并且汇总的条目会抑制明细条目的发送,因为汇总本身就是为了减少路由更细的条目,如果再发送明细路由,那就失去了汇总的意义。 关于EIGRP自动汇总,是优缺点共存的,缺点在于在开启汇总后,会出现不连续子网,导致网络不通,而且在某些情况下,EIGRP的自动汇总会导致次优路径的选择。优点在于自动汇总可以有效的减少路由条目,降低路由器的CPU开支。在小型网络中,这也许表现的不是那么明显,但是在一个大型的网络中,压缩路由表的大小和介绍不必要的开支就显得尤为重要。 (2) 手动汇总 EIGRP支持在任何点做手动汇总,手动汇总可以更精确的进行汇总。 首先,我们在R3新建LO3接口,并将其宣告进EIGRP进程,配置如下 R3(config)#interface loopback 3 R3(config-if)#ip address 10.1.1.3255.255.255.0 R3(config-if)#ip address 10.1.2.3255.255.255.0 secondary R3(config-if)#ip address 10.1.3.3255.255.255.0 secondary R3(config-if)#ip address 10.1.4.3255.255.255.0 secondary R3(config-if)#ip address 10.1.5.3255.255.255.0 secondary R3(config)#router eigrp 100 R3(config-router)#network 10.1.1.00.0.0.255 R3(config-router)#network 10.1.2.00.0.0.255 R3(config-router)#network 10.1.3.00.0.0.255 R3(config-router)#network 10.1.4.00.0.0.255 R3(config-router)#network 10.1.5.00.0.0.255 这时我们查看R2的路由表 R2#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 D 1.0.0.0/8 [90/2297856] via 12.1.1.1, 01:31:54, Serial2/0 3.0.0.0/32 is subnetted, 1 subnets D 3.3.3.3 [90/2809856] via 12.1.1.1, 00:38:50, Serial2/0 10.0.0.0/24 is subnetted, 5 subnets D 10.1.3.0 [90/2809856] via 12.1.1.1, 00:01:23, Serial2/0 D 10.1.2.0 [90/2809856] via 12.1.1.1, 00:01:26, Serial2/0 D 10.1.1.0 [90/2809856] via 12.1.1.1, 00:01:33, Serial2/0 D 10.1.5.0 [90/2809856] via 12.1.1.1, 00:01:15, Serial2/0 D 10.1.4.0 [90/2809856] via 12.1.1.1, 00:01:19, Serial2/0 12.0.0.0/24 is subnetted, 2 subnets C 12.1.1.0 is directly connected, Serial2/0 C 12.1.2.0 is directly connected, Loopback2 D 13.0.0.0/8 [90/2681856] via 12.1.1.1, 01:31:54, Serial2/0 R2# //由于R3关闭了自动汇总,所以R2学到的关于R3的路由条目是明细的,这样固然是可以的,但是如果关于R3的条目过多,那么R2的路由表将会十分庞大,这是我们不希望看到的,如果我们想压缩R2的路由表,当然我们可以通过自动汇总有效的压缩路由表,但是自动汇总只能将路由条目按照主类汇总,而且存在一定的风险。所以这里我们还可以采用手动汇总。 在R3上做手动汇总 R3(config)#interface serial 1/0 R3(config-if)#ip summary-address eigrp 10010.1.0.0 255.255.0.0 查看R2的路由表 R2#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 D 1.0.0.0/8 [90/2297856] via 12.1.1.1, 01:39:31, Serial2/0 3.0.0.0/32 is subnetted, 1 subnets D 3.3.3.3 [90/2809856] via 12.1.1.1, 00:00:04, Serial2/0 10.0.0.0/16 is subnetted, 1 subnets D 10.1.0.0 [90/2809856] via 12.1.1.1, 00:00:04, Serial2/0 12.0.0.0/24 is subnetted, 2 subnets C 12.1.1.0 is directly connected, Serial2/0 C 12.1.2.0 is directly connected, Loopback2 D 13.0.0.0/8 [90/2681856] via 12.1.1.1, 01:39:31, Serial2/0 R2# //R2收到的是汇总条目 再来查看R3的路由表 R3#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 D 1.0.0.0/8 [90/2297856] via 13.1.1.1, 00:01:02, Serial1/0 3.0.0.0/32 is subnetted, 1 subnets C 3.3.3.3 is directly connected, Loopback0 10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks C 10.1.3.0/24 is directly connected, Loopback3 C 10.1.2.0/24 is directly connected, Loopback3 C 10.1.1.0/24 is directly connected, Loopback3 D 10.1.0.0/16 is a summary, 00:02:24, Null0 C 10.1.5.0/24 is directly connected, Loopback3 C 10.1.4.0/24 is directly connected, Loopback3 D 12.0.0.0/8 [90/2681856] via 13.1.1.1, 00:01:02, Serial1/0 13.0.0.0/24 is subnetted, 1 subnets C 13.1.1.0 is directly connected, Serial1/0 R3# //在R3的路由表中,我们发现了下一跳为Null 0 的汇总信息。注意:手动汇总和自动汇总一样,都会产生一条下一跳为Null 0 的汇总信息进行放环。 现在我们思考一个问题,如果我们不在R3上做手动汇总而在R1上做,那么对R2的路由表中关于10.1.0.0/16的汇总路由条目的开销值是多少呢。注意:在路由传递的过程中开销值是累加的,所以在R2上关于10.1.0.0/16的条目的开销值应该是R2的S2/0到R3的环回口的开销值,我们计算得出值为2809856。下面我们通过实验验证 首先将R3上的手动汇总干掉 R3(config)#int s1/0 R3(config-if)#no ip summary-address eigrp100 10.1.0.0 255.255.0.0 5 在R1上手动汇总 R1(config)#int s1/0 R1(config-if)#ip summary-address eigrp 10010.1.0.0 255.255.0.0 5 查看R2的路由表 R2#sh ip ro 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 1.0.0.0/24 is subnetted, 1 subnets D 1.1.1.0 [90/2297856] via 12.1.1.1, 00:00:13, Serial1/0 2.0.0.0/24 is subnetted, 1 subnets C 2.2.2.0 is directly connected, Loopback0 3.0.0.0/24 is subnetted, 1 subnets D 3.3.3.0 [90/2809856] via 12.1.1.1, 00:00:13, Serial1/0 10.0.0.0/16 is subnetted, 1 subnets D 10.1.0.0 [90/2809856] via 12.1.1.1, 00:00:13, Serial1/0 12.0.0.0/24 is subnetted, 2 subnets C 12.1.1.0 is directly connected, Serial1/0 C 12.1.2.0 is directly connected, Loopback1 13.0.0.0/24 is subnetted, 1 subnets D 13.1.1.0 [90/2681856] via 12.1.1.1, 00:00:15, Serial1/0 R2# //R2路由表中关于10.1.0.0/16的条目的开销值为2909856,与我们推测的相符,证明在路由传递的过程中,开销值是累加的。 如果我们在R1上也新建一个lo 1 ,地址为10.1.10.10/24,并宣告进EIGRP进程,仍旧在R1上进行手动汇总,那么这时R2路由表中关于10.1.0.0/16的条目的开销又是多少呢。我们推测一下,在R2的路由表中,肯定装表最优路径,那么关于10.1.0.0/16的条目一定是来自R1的。所以经过计算开销值应该是2297856。下面我们通过实验验证。 首先在R1上添加一个lo 1 R1(config)#int lo 1 R1(config-if)#ip add 10.1.10.10 255.255.255.0 宣告进IEGRP进程 R1(config)#router ei 100 R1(config-router)#net 10.1.10.0 0.0.0.255 查看R2的路由表 R2#sh ip ro 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 1.0.0.0/24 is subnetted, 1 subnets D 1.1.1.0 [90/2297856] via 12.1.1.1, 01:06:06, Serial1/0 2.0.0.0/24 is subnetted, 1 subnets C 2.2.2.0 is directly connected, Loopback0 3.0.0.0/24 is subnetted, 1 subnets D 3.3.3.0 [90/2809856] via 12.1.1.1, 01:06:06, Serial1/0 10.0.0.0/16 is subnetted, 1 subnets D 10.1.0.0 [90/2297856] via 12.1.1.1, 00:10:26, Serial1/0 12.0.0.0/24 is subnetted, 2 subnets C 12.1.1.0 is directly connected, Serial1/0 C 12.1.2.0 is directly connected, Loopback1 13.0.0.0/24 is subnetted, 1 subnets D 13.1.1.0 [90/2681856] via 12.1.1.1, 01:06:08, Serial1/0 R2# //R2路由表中关于10.1.0.0/16 条目开销值为2297856。由此可得,汇总条目的开销值为明细条目中最小的开销。 下面我们通过实验验证一下EIGRP的手动汇总是否支持CIDR和VLSM。 首先基本配置如上, R2有三个环回口,分别是 192.168.1.0/24 192.168.2.0/24 192.168.3.0/24 并宣告进EIGRP进程 在R1的S2/0做手动汇总,汇总成192.168.0.0/22 R1(config)#int s2/0 R1(config-if)#ip summary-address eigrp 100192.168.0.0 255.255.252.0 5 查看R3的路由表 R3#sh ip ro 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 12.0.0.0/24 is subnetted, 1 subnets D 12.1.1.0 [90/2681856] via 13.1.1.1, 00:00:54, Serial1/1 13.0.0.0/24 is subnetted, 1 subnets C 13.1.1.0 is directly connected, Serial1/1 D 192.168.0.0/22 [90/2809856] via 13.1.1.1, 00:00:54, Serial1/1 R3# //R3收到了一个关于192.168.0.0/22的汇总条目,说明EIGRIP的手动汇总是支持CIDR超网 接下来是VLSM,我们在R2上在起三个新的环回口,分别是 172.168.1.1/16 172.168.2.1/16 172.168.3.1/16 并宣告进EIGRIP进程 同样在R1的S2/0汇总,汇总成172.168.0.0/22 R1(config)#int s2/0 R1(config-if)#ip summary-address eigrp 100172.168.0.0 255.255.255.252 5 查看R3的路由表 R3#sh ip ro 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 172.168.0.0/22 is subnetted, 1 subnets D 172.168.0.0 [90/2809856] via 13.1.1.1, 00:00:04, Serial1/1 12.0.0.0/24 is subnetted, 1 subnets D 12.1.1.0 [90/2681856] via 13.1.1.1, 00:00:04, Serial1/1 13.0.0.0/24 is subnetted, 1 subnets C 13.1.1.0 is directly connected, Serial1/1 D 192.168.0.0/22 [90/2809856] via 13.1.1.1, 00:00:04, Serial1/1 R3# R3上收到一个172.168.0.0/22的汇总条目,说明EIGRP的手动汇总是支持VLSM的 关于EIGRP 手动汇总,手动汇总可以在任何点进行更精确的汇总,达到更有效的控制路由条目的目的。 总结: 在EIGRP中,自动汇总要开启自动汇总且存在网络边界 在EIGRP中,自动汇总时只会对自身的直连网段进行汇总 在EIGRP中,自动汇总是按照主类进行汇总 在EIGRP中,关闭汇总的路由器上,如果接收的条目是汇总的,装表的也只能是汇总 在EIGRP中,当最后的明细路由消失后,汇总路由才会消失 在EIGRP中,汇总的条目会抑制明细条目的发送 在EIGRP中,开启自动汇总产生的汇总条目需要单独防环,不在DUAL算法内 在EIGRP中,汇总生成的下一跳为Null 0 的路由条目管理距离是5 在EIGRP中,在任何点可手动汇总 在EIGRP中,手动汇总要在路由器的出口做 在EIGRP中,汇总不会影响开销值的正常累加 在EIGRP中,手动汇总是支持CIDR和VLSM的
|