EIGRP高级配置之路由汇总   我所使用的Router是3640
 
实验拓扑图:
 
 
连接表:
     R1 S0/0 <---->  R3 S0/0
    
     R2 S0/1 <---->  R3 S0/1
   
     R3 S0/2 <---->  R4 S0/2
  
     R1 E1/0 <---->  PC1 E0
  
     R2 E1/0 <---->  PC2 E0
 
注意:上图没有画出PC1,PC2.
 
IP地址表:
 
R1: S0/0  192.168.1.1/24    E1/0 10.1.1.1/16
R2: S0/0  192.168.2.1/24    E1/0 10.2.2.2/16
R3: S0/0  192.168.1.2/24    S0/1 192.168.2.2/24   S0/2 192.168.3.2/24
R4: S0/2  192.168.3.1/24

我选择R3来做详细配置,其他路由器的配置请参考R3配置

R3路由

router>en
router#config t
Enter configuration commands, .e per line.  End with CNTL/Z.
router(config)#hostname R3
R3(config)#int s0/0
R3(config-if)#de.ion conn to R1 s0/0   //描述S0/0的情况
R3(config-if)#clockrate 64000     //提供时钟
R3(config-if)#no shut
R3(config-if)#int s0/1
R3(config-if)#de.ion conn to R2 S0/1
R3(config-if)#clock rate 64000
R3(config-if)#no shut
R3(config-if)#int s0/2
R3(config-if)#de.ion conn to R4 s0/2
R3(config-if)#clock rate 64000
R3(config-if)#no shut
R3(config-if)#router eigrp 10
R3(config-router)#network 192.168.1.0
R3(config-router)#network 192.168.2.0
R3(config-router)#network 192.168.3.0
R3(config-router)#end
 
R3#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
D    10.0.0.0/8 [90/1787392] via 192.168.1.1, 00:00:18, Serial0/0
                      [90/1787392] via 192.168.2.1, 00:00:18, Serial0/1
C    192.168.1.0/24 is directly connected, Serial0/0
C    192.168.2.0/24 is directly connected, Serial0/1
C    192.168.3.0/24 is directly connected, Serial0/2
 
 
注意:
        EIGRP默认是在主网络汇总的。这个结果产生了一个路由选择不明确的情况。
        路由器R3记录到达网络10.0.0.0的两条等价路径,要到达子网之一的数据包可能会, 也可能不会被路由到正确的链路上去。
 
R3#ping 10.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
!U!.!
Success rate is 60 percent (3/5), round-trip min/avg/max = 12/34/72 ms
R3#ping 10.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
U!.!U
Success rate is 40 percent (2/5), round-trip min/avg/max = 12/28/44 ms

注意:情况表明数据包没有完全被路由到正确的链路上。

 
现在我们来看一下R1,R2的情况:

R1路由
 
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
     10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
D       10.0.0.0/8 is a summary, 00:08:59, Null0          //自动汇总功能体现
C       10.1.0.0/16 is directly connected, Ethernet1/0
C    192.168.1.0/24 is directly connected, Serial0/0
D    192.168.2.0/24 [90/2273792] via 192.168.1.2, 00:08:52, Serial0/0
D    192.168.3.0/24 [90/2273792] via 192.168.1.2, 00:08:52, Serial0/0
 
注意:
      路由的下一跳设置为Nullo---软件意义上的直连接口。使用Nullo避免数据流寻找更准确  ,匹配程度更高的路由,避免网络内循环。
 
R1#ping 10.2.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.2.2.2, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
 
注意:
        情况表明此时是无法访问到R2路由的,默认情况路由器接受到不能识别的数据包就丢弃了。
 
R2路由情况 也是无法访问R1路由。

 
 
下面分别在R1,R2上关闭自动汇总功能。

R1路由:
 
R1#config t
Enter configuration commands, .e per line.  End with CNTL/Z.
R1(config)#router eigrp 10
R1(config-router)#no auto-summary  //关闭自动汇总功能
R1(config-router)#end
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
     10.0.0.0/16 is subnetted, 2 subnets
D       10.2.0.0 [90/2299392] via 192.168.1.2, 00:00:06, Serial0/0
C       10.1.0.0 is directly connected, Ethernet1/0
C    192.168.1.0/24 is directly connected, Serial0/0
D    192.168.2.0/24 [90/2273792] via 192.168.1.2, 00:00:25, Serial0/0
D    192.168.3.0/24 [90/2273792] via 192.168.1.2, 00:00:25, Serial0/0
 
注意:
         由于关闭了自动汇总功能,所以网络宣告更具体的路由  10.2.0.0
 
R1#ping 10.2.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/44/56 ms
 
注意:
         此时R1可以访问到R2路由。

R2路由:配置和R1相同,可以访问到R1路由了。
 
我们来看R3路由表发生了什么变化了。

R3#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
     10.0.0.0/16 is subnetted, 2 subnets
D       10.2.0.0 [90/1787392] via 192.168.2.1, 00:06:00, Serial0/1
D       10.1.0.0 [90/1787392] via 192.168.1.1, 00:06:19, Serial0/0
C    192.168.1.0/24 is directly connected, Serial0/0
C    192.168.2.0/24 is directly connected, Serial0/1
C    192.168.3.0/24 is directly connected, Serial0/2

情况表明网络宣告了更具体的路由。

R4的情况:

R4#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
     10.0.0.0/16 is subnetted, 2 subnets
D       10.2.0.0 [90/2299392] via 192.168.3.2, 00:07:52, Serial0/2
D       10.1.0.0 [90/2299392] via 192.168.3.2, 00:08:10, Serial0/2
D    192.168.1.0/24 [90/2273792] via 192.168.3.2, 00:36:34, Serial0/2
D    192.168.2.0/24 [90/2273792] via 192.168.3.2, 00:36:34, Serial0/2
C    192.168.3.0/24 is directly connected, Serial0/2
 
 
 
       你是不是觉得很奇怪啊,为什么R3不自动汇总呢?
     注意:  因为路由器只自动汇总和自己直接相连的网络。
 
   
    现在来假设,我们并不想让R4知道R1,R2的具体子网地址,那么我们是不是就没有办法呢,答案是否定的,具体情况如下:
 
R3路由配置:

R3#config t
Enter configuration commands, .e per line.  End with CNTL/Z.
R3(config)#int s0/2
R3(config-if)#ip summary-address eigrp 10 10.0.0.0 255.0.0.0     //在想要汇总的接口上汇总你想汇总的网络,输入网络地址和子网掩码
R3(config-if)#end
 
R3#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
     10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
D       10.2.0.0/16 [90/1787392] via 192.168.2.1, 00:15:36, Serial0/1
D       10.0.0.0/8 is a summary, 00:00:06, Null0                    //汇总路由
D       10.1.0.0/16 [90/1787392] via 192.168.1.1, 00:15:55, Serial0/0
C    192.168.1.0/24 is directly connected, Serial0/0
C    192.168.2.0/24 is directly connected, Serial0/1
C    192.168.3.0/24 is directly connected, Serial0/2
 
R4的情况:
 
R4#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
D    10.0.0.0/8 [90/2299392] via 192.168.3.2, 00:03:36, Serial0/2       //汇总路由
D    192.168.1.0/24 [90/2273792] via 192.168.3.2, 00:03:36, Serial0/2
D    192.168.2.0/24 [90/2273792] via 192.168.3.2, 00:03:36, Serial0/2
C    192.168.3.0/24 is directly connected, Serial0/2
 
注意:
           对比汇总路由与不汇总路由,发现汇总可以使路由表变小,提高路由器的性能。
           如果我们不想宣告网络的具体路由可以使用汇总功能来实现,特别是我们构建可扩展网络时强烈建议使用汇总路由。EIGRP可以在网络的任意处汇总,只要有更具体的路由。
 
R4#ping 10.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/33/56 ms

文章的不足之处,请多多指教。