CCNP路由实验---3、人工汇总EIG
实验目的:
1、理解EIGRP的自动汇总的缺点。
2、掌握EIGRP的手工自动总结的配置方法。
实验拓扑:
实验步骤:
1、配置各路由器的名称、相连接口IP地址,并且使用Ping命令确认各路由器的直连口的互通性。
R1:
R1(config)#int s1/1
R1(config-if)#ip add 172.16.1.1 255.255.255.252
R1(config-if)#no shut
R2:
R2(config)# int s1/0
R2(config-if)#ip add 172.16.1.2 255.255.255.252
R2(config-if)#no shut
R2(config)#int s1/1
R2(config-if)#ip add 172.16.1.5 255.255.255.252
R2(config-if)#no shut
R3:
R3(config)#int s1/0
R3(config-if)#ip add 172.16.1.6 255.255.255.252
R3(config-if)#no shut
R3(config)#int s1/2
R3(config-if)#ip add 172.16.1.9 255.255.255.252
R3(config-if)#no shut
2、配置各台路由器的EIGRP协议,并且不关闭自动总结。例如在R上配置如下
R1(config)#router eigrp 80
R1(config-router)#network 10.1.0.0
R1(config-router)#network 172.16.0.0
其它配置类似。
3、在R2上使用ping测试网络路由,会发现R2路由器无法ping通路由器R4所连接的10.1.X.0/24网络子网。如下所示:
R2#ping 10.1.11.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.11.1, timeout is 2 seconds:
U.U.U
Success rate is 0 percent (0/5)
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 = 4/11/24 ms
R2#ping 10.1.13.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.13.1, timeout is 2 seconds:
U.U.U
Success rate is 0 percent (0/5)
可以看到,在R2去ping R1下带的网络地址10.1.0.1是通的,但ping R4下带的网络地址10.1.11.1 和10.1.13.1却是不通。潜意识下,查看R 2的路由表
R2#sh ip rout
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.16.0.0/30 is subnetted, 3 subnets
D 172.16.1.8 [90/2681856] via 172.16.1.6, 00:13:03, Serial1/1
C 172.16.1.4 is directly connected, Serial1/1
C 172.16.1.0 is directly connected, Serial1/0
D 10.0.0.0/8 [90/2297856] via 172.16.1.1, 00:07:02, Serial1/0
D 192.168.0.0/24 [90/2297856] via 172.16.1.6, 00:12:44, Serial1/1
原来,R2已经将R1、R4的下带网络自动汇总成了10.0.0.0/8,已经不能分辨通往R1和R4的路由。但为什么它能通达R1而不能通达R4呢?
再来查看下R2 的拓扑数据库
R2#sh ip eigrp topology all-links
IP-EIGRP Topology Table for AS(80)/ID(172.16.1.5)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
r - reply Status, s - sia Status
P 10.0.0.0/8, 1 successors, FD is 2297856, serno 3
via 172.16.1.1 (2297856/128256), Serial1/0
via 172.16.1.6 (2809856/2297856), Serial1/1
P 192.168.0.0/24, 1 successors, FD is 2297856, serno 5
via 172.16.1.6 (2297856/128256), Serial1/1
P 172.16.1.8/30, 1 successors, FD is 2681856, serno 4
via 172.16.1.6 (2681856/2169856), Serial1/1
P 172.16.1.4/30, 1 successors, FD is 2169856, serno 2
via Connected, Serial1/1
P 172.16.1.0/30, 1 successors, FD is 2169856, serno 1
via Connected, Serial1/0
这里注意下这条命令sh ip eigrp topology all-links是显示所有的链路。
再细看粗字体,到达网络10.0.0.0/8是有两条路由的,并且两条路由的FD值是不同的。
R1、R4都是主类的边界,都会将本地路由表中的子网向主类网络自动汇总,因此R2会从不同的接口,收到相同的汇总路由,即
4、找到了原因,解决问题就容易了。如果要顺利让R2 ping 通R4下带的网络,可以先关闭掉EIGRP的自动汇总,再重新在R1、R4上进行人工汇总。
R1:
R1(config)#router eigrp 80
R1(config-router)#no auto-summary
R1(config-router)#exit
R1(config)#int s1/0
R1(config-if)#ip summary-address eigrp 80 10.1.0.0 255.255.252.0
R1(config-if)#exit
注意上面是在R1与R2的接口s1/0的配置了人工的汇总,其汇总路由为
R4(config)#router eigrp 50
R4(config-router)#no auto-summary
R4(config-router)#exit
R4(config)#
R4(config)#int s1/2
R4(config-if)#ip summary-address eigrp 80 10.1.10.0 255.255.252.0
配置好再查看R2的路由表,
R2#sh 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
172.16.0.0/30 is subnetted, 3 subnets
D 172.16.1.8 [90/2681856] via 172.16.1.6, 00:52:02, Serial1/1
C 172.16.1.4 is directly connected, Serial1/1
C 172.16.1.0 is directly connected, Serial1/0
10.0.0.0/8 is variably subnetted, 7 subnets, 2 masks
D 10.1.8.0/22 [90/2809856] via 172.16.1.6, 00:25:14, Serial1/1
D 10.1.13.0/24 [90/2809856] via 172.16.1.6, 00:25:14, Serial1/1
D 10.1.12.0/24 [90/2809856] via 172.16.1.6, 00:25:14, Serial1/1
D 10.1.3.0/24 [90/2297856] via 172.16.1.1, 00:35:55, Serial1/0
D 10.1.2.0/24 [90/2297856] via 172.16.1.1, 00:35:55, Serial1/0
D 10.1.1.0/24 [90/2297856] via 172.16.1.1, 00:35:55, Serial1/0
D 10.1.0.0/24 [90/2297856] via 172.16.1.1, 00:35:55, Serial1/0
D 192.168.0.0/24 [90/2297856] via 172.16.1.6, 00:51:44, Serial1/1
可以看出R2已经将到达R4的路由汇总成了/22的路由。此时可以再在R2上用ping命令测试到达R1、R4的可达性。
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 = 4/24/36 ms
R2# ping 10.1.11.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.11.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/26/76 ms
R2# ping 10.1.13.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.13.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/15/28 ms
可以看到,都通顺利地ping通R1、R4的下带网络了。
相关文章