登录站点

用户名

密码

路由协议-EIGRP的手工汇总

3已有 3317 次阅读  2013-06-30 15:24   标签eigrp  手工汇总 

1、配置各台路由器的IP地址,并且使用Ping命令确认各路由器的直连口的互通性。
 
2、配置各台路由器的EIGRP协议,并且不关闭自动总结。
 
3、在R2上使用ping测试网络路由,会发现R2路由器无法ping通路由器R4所连接的10.1.X.0/24网络子网。如下所示:
R2#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 = 1/46/92 ms
R2#ping 10.1.16.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.16.1, timeout is 2 seconds:
U.U.U
//无法ping通10.1.16.1的IP地址。
Success rate is 0 percent (0/5)
R2#ping 10.1.17.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.17.1, timeout is 2 seconds:
U.U.U
Success rate is 0 percent (0/5)
 
4、查看R2的路由表:
R2#sh ip ro
     172.16.0.0/30 is subnetted, 3 subnets
D       172.16.1.8 [90/307200] via 172.16.1.6, 00:06:25, Ethernet1/1
C       172.16.1.4 is directly connected, Ethernet1/1
C       172.16.1.0 is directly connected, Ethernet1/0
D    10.0.0.0/8 [90/409600] via 172.16.1.1, 00:06:09, Ethernet1/0
//R2路由器显示的汇总路由。
D    192.168.0.0/24 [90/409600] via 172.16.1.6, 00:06:25, Ethernet1/1
D    192.168.0.0/24 [90/409600] via 172.16.1.6, 00:06:25, Ethernet1/1
D    192.168.2.0/24 [90/409600] via 172.16.1.6, 00:06:25, Ethernet1/1
D    192.168.3.0/24 [90/409600] via 172.16.1.6, 00:06:25, Ethernet1/1
 
5、查看R2路由器的拓扑数据库:
R2#show ip eigrp topology all-links
//all-links参数是显示所有链路。
IP-EIGRP Topology Table for AS(50)/ID(172.16.1.5)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - Reply status
P 10.0.0.0/8, 1 successors, FD is 409600, serno 3
         via 172.16.1.1 (409600/128256), Ethernet1/0
         via 172.16.1.6 (435200/409600), Ethernet1/1
//到10.0.0.0/8网络有两条路由。注意两条路由的FD值是不同的。
P 192.168.0.0/24, 1 successors, FD is 409600, serno 4
         via 172.16.1.6 (409600/128256), Ethernet1/1
P 192.168.1.0/24, 1 successors, FD is 409600, serno 5
         via 172.16.1.6 (409600/128256), Ethernet1/1
P 192.168.2.0/24, 1 successors, FD is 409600, serno 6
         via 172.16.1.6 (409600/128256), Ethernet1/1
P 192.168.3.0/24, 1 successors, FD is 409600, serno 7
         via 172.16.1.6 (409600/128256), Ethernet1/1
P 172.16.1.8/30, 1 successors, FD is 307200, serno 8
         via 172.16.1.6 (307200/281600), Ethernet1/1
P 172.16.1.4/30, 1 successors, FD is 281600, serno 2
         via Connected, Ethernet1/1
P 172.16.1.0/30, 1 successors, FD is 281600, serno 1
         via Connected, Ethernet1/0
 
PS:导致R2无法ping路由器R4所连接的10.1.X.0/24的网络主要原因是:R1本身属于主类的边界,其会将本地路由表中的子网向主类网络自动汇总。而R4也属于主类的边界,也会与R1做出相同的动作。因此R2会从不同的接口,收到相同的汇总路由,即10.0.0.0/8网络路由。由于R2在比较了两条路由的可行距离后,选择了较小的FD值的路由,即R1宣告的10.0.0.0/8汇总路由。而忽略了另外一个接口收到汇总路由。其实真正的原因,并不是路由选择出错,而是自动汇总不能做到精确的控制原因导致的。
 
6、为了解决汇总问题,需要在R1和R4上关闭自动汇总,而采用手工汇总。配置如下:
R1(config)#router eigrp 90
R1(config-router)#no auto-summary
//关闭自动汇总。
R1(config-router)#exit
R1(config)#
R1(config)#interface fastEthernet 0/1
R1(config-if)#ip summary-address eigrp 90 10.1.0.0 255.255.252.0
//进行手工汇总,其汇总路由为10.1.0.0/22。
R1(config-if)#end
R4(config)#router eigrp 90
R4(config-router)#no auto-summary
R4(config-router)#exit
R4(config)#
R4(config)#interface fastEthernet 0/0
R4(config-if)#ip summary-address eigrp 90 10.1.16.0 255.255.252.0
R4(config-if)#end
 
7、再次查看R2路由表,并确认网络可达性:
R2#sh ip ro
     172.16.0.0/30 is subnetted, 3 subnets
D       172.16.1.8 [90/307200] via 172.16.1.6, 00:21:08, Ethernet1/1
C       172.16.1.4 is directly connected, Ethernet1/1
C       172.16.1.0 is directly connected, Ethernet1/0
     10.0.0.0/22 is subnetted, 2 subnets
D    10.1.0.0 [90/409600] via 172.16.1.1, 00:03:13, Ethernet1/0
D    10.1.16.0 [90/435200] via 172.16.1.6, 00:01:02, Ethernet1/1
//被汇总的/22位网络路由。
D    192.168.0.0/24 [90/409600] via 172.16.1.6, 00:21:08, Ethernet1/1
D    192.168.0.0/24 [90/409600] via 172.16.1.6, 00:21:08, Ethernet1/1
D    192.168.2.0/24 [90/409600] via 172.16.1.6, 00:21:08, Ethernet1/1
D    192.168.3.0/24 [90/409600] via 172.16.1.6, 00:21:08, Ethernet1/1
R2#ping 10.1.0.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/69/145 ms
R2#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/44/64 ms
R2#ping 10.1.16.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.16.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 60/97/140 ms
R2#ping 10.1.17.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.17.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 48/93/149 ms
PS:在R2的路由表中,显示的是192.168.X.0/24具体路由,为了能够有效的减少路由表的大小,还可以通过EIGRP对192.168.X.0/24的C类网络路由进行手工路由汇总,具体配置如下:
R3(config)#router eigrp 90
R3(config-router)#no auto-summary
//虽然在R3上配置的是超网汇总,仍然需要在R3的EIGRP进程中关闭自动汇总特性,否则,EIGRP还是会向外通告具体路由。
R3(config-router)#exit
R3(config)#
R3(config)#interface ethernet 1/1
R3(config-if)#ip summary-address eigrp 90 192.168.0.0 255.255.252.0
R3(config-if)#exit
R3(config)#
R3(config)#inter ethernet 1/0
R3(config-if)#ip summary-address eigrp 90 192.168.0.0 255.255.252.0
R3(config-if)#exit
R3(config)#
 
8、手工路由汇总后,查看R4和R2的路由表,并确认路由有效性。
R4#sh ip ro
     172.16.0.0/30 is subnetted, 3 subnets
C       172.16.1.8 is directly connected, FastEthernet0/0
D       172.16.1.4 [90/284160] via 172.16.1.9, 00:02:41, FastEthernet0/0
D       172.16.1.0 [90/309760] via 172.16.1.9, 00:02:23, FastEthernet0/0
     10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
D    10.1.0.0/22 [90/437760] via 172.16.1.9, 00:02:23, FastEthernet0/0
C    10.1.19.0/24 is directly connected, Loopback0
C    10.1.18.0/24 is directly connected, Loopback0
C    10.1.17.0/24 is directly connected, Loopback0
C    10.1.16.0/22 is a summary, 00:03:33, Null0
C    10.1.16.0/24 is directly connected, Loopback0
D    192.168.0.0/22 [90/156160] via 172.16.1.9, 00:02:41, FastEthernet0/0
//从R3收到的手工汇总的路由。
R2#sh ip ro
     172.16.0.0/30 is subnetted, 3 subnets
D       172.16.1.8 [90/307200] via 172.16.1.6, 00:02:54, Ethernet1/1
C       172.16.1.4 is directly connected, Ethernet1/1
C       172.16.1.0 is directly connected, Ethernet1/0
     10.0.0.0/22 is subnetted, 2 subnets
D    10.1.0.0 [90/409600] via 172.16.1.1, 00:16:13, Ethernet1/0
D    10.1.16.0 [90/435200] via 172.16.1.6, 00:02:54, Ethernet1/1
D    192.168.0.0/22 [90/409600] via 172.16.1.6, 00:02:54, Ethernet1/1
//从R3收到的手工汇总的路由。
R2#ping 192.168.0.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/28/60 ms
R4#ping 192.168.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 24/37/48 ms
 
PS:通过实验可以看出,虽然EIGRP的自动汇总能够为网络配置带来便捷,但是其依赖于IP子网的规划。如果遇到糟糕的子网规划,则需要小心使用自动特性。
分享 举报

发表评论 评论 (1 个评论)

涂鸦板