EIGRP的汇总
拓扑图
实验过程
1. R1的预配置
Router>en Router#config t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#no ip domain-lookup Router(config)#line con 0 Router(config-line)#no exec-timeout Router(config-line)#loggin syn Router(config-line)#exit Router(config)#host R1 R1(config)#int lo0 R1(config-if)#ip add 10.1.0.1 255.255.255.0 R1(config-if)#int lo1 R1(config-if)#ip add 10.1.1.1 255.255.255.0 R1(config-if)#int lo2 R1(config-if)#ip add 10.1.2.1 255.255.255.0 R1(config-if)#int lo3 R1(config-if)#ip add 10.1.3.1 255.255.255.0 R1(config-if)#int f0/0 R1(config-if)#no shut R1(config-if)#ip add 172.16.1.1 255.255.255.252 R1(config-if)#exit |
2. R2的预配置
Router>en Router#config t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#no ip domain-lookup Router(config)#line con 0 Router(config-line)#no exec-timeout Router(config-line)#loggin syn Router(config-line)#exit Router(config)#host R2 R2(config)#int e1/0 R2(config-if)#no shut R2(config-if)#ip add 172.16.1.2 255.255.255.252 R2(config-if)#int e1/1 R2(config-if)#no shut R2(config-if)#ip add 172.16.1.5 255.255.255.252 R2(config-if)#exit |
3. R3的预配置
Router>en Router#config t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#no ip domain-lookup Router(config)#line con 0 Router(config-line)#no exec-timeout Router(config-line)#loggin syn Router(config-line)#exit Router(config)#host R3 R3(config)#int e1/0 R3(config-if)#no shut R3(config-if)#ip add 172.16.1.6 255.255.255.252 R3(config-if)#int e1/1 R3(config-if)#no shut R3(config-if)#ip add 172.16.1.9 255.255.255.252 R3(config-if)#int lo0 R3(config-if)#ip add 192.168.0.1 255.255.255.0 R3(config-if)#int lo1 R3(config-if)#ip add 192.168.1.1 255.255.255.0 R3(config-if)#int lo2 R3(config-if)#ip add 192.168.2.1 255.255.255.0 R3(config-if)#int lo3 R3(config-if)#ip add 192.168.3.1 255.255.255.0 R3(config-if)#exit |
4. R4的预配置
Router>en Router#config t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#no ip domain-lookup Router(config)#line con 0 Router(config-line)#no exec-timeout Router(config-line)#loggin syn Router(config-line)#exit Router(config)#host R4 R4(config)#int f0/0 R4(config-if)#no shut R4(config-if)#ip add 172.16.1.10 255.255.255.252 R4(config-if)#int lo0 R4(config-if)#ip add 10.1.16.1 255.255.255.0 R4(config-if)#int lo1 R4(config-if)#ip add 10.1.17.1 255.255.255.0 R4(config-if)#int lo2 R4(config-if)#ip add 10.1.18.1 255.255.255.0 R4(config-if)#int lo3 R4(config-if)#ip add 10.1.19.1 255.255.255.0 R4(config-if)#exit |
5. 配置R1,R2,R3和R4的EIGRP
R1(config)#router eigrp 50 R1(config-router)#net 10.1.0.1 R1(config-router)#net 10.1.1.1 R1(config-router)#net 10.1.2.1 R1(config-router)#net 10.1.3.1 R1(config-router)#net 172.16.1.1 R1(config-router)#end R2(config)#router eigrp 50 R2(config-router)#net 172.16.1.2 R2(config-router)#net 172.16.1.5 R2(config-router)#end R3(config)#router eigrp 50 R3(config-router)#net 172.16.1.6 R3(config-router)#net 172.16.1.9 R3(config-router)#net 192.168.0.1 R3(config-router)#net 192.168.1.1 R3(config-router)#net 192.168.2.1 R3(config-router)#net 192.168.3.1 R3(config-router)#end R4(config)#router eigrp 50 R4(config-router)#net 172.16.1.10 R4(config-router)#net 10.1.16.1 R4(config-router)#net 10.1.17.1 R4(config-router)#net 10.1.18.1 R4(config-router)#net 10.1.19.1 R4(config-router)#end |
6. 在R2上ping R1和R4
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: !!!!! 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 //出现了丢包 Success rate is 0 percent (0/5) |
7. 用traceroute跟踪
8. R2#traceroute 10.1.16.1 9. 10. Type escape sequence to abort. 11. Tracing the route to 10.1.16.1 12. 13. 1 172.16.1.1 68 msec 24 msec 16 msec //去往网R4的icmp包去了R1 14. 2 172.16.1.1 !H * !H |
15. 查看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
172.16.0.0/30 is subnetted, 3 subnets D 172.16.1.8 [90/307200] via 172.16.1.6, 00:19:43, 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:09:15, Ethernet1/0 //只有一条汇总路由 D 192.168.0.0/24 [90/409600] via 172.16.1.6, 00:10:26, Ethernet1/1 D 192.168.1.0/24 [90/409600] via 172.16.1.6, 00:10:25, Ethernet1/1 D 192.168.2.0/24 [90/409600] via 172.16.1.6, 00:10:24, Ethernet1/1 D 192.168.3.0/24 [90/409600] via 172.16.1.6, 00:10:24, Ethernet1/1 |
16. 查看R2的拓扑数据库
R2#show ip eigrp topology 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, s - sia Status
P 10.0.0.0/8, 1 successors, FD is 409600, serno 20 via 172.16.1.1 (409600/128256), Ethernet1/0 via 172.16.1.6 (435200/409600), Ethernet1/1 P 192.168.0.0/24, 1 successors, FD is 409600, serno 30 via 172.16.1.6 (409600/128256), Ethernet1/1 P 192.168.1.0/24, 1 successors, FD is 409600, serno 31 via 172.16.1.6 (409600/128256), Ethernet1/1 P 192.168.2.0/24, 1 successors, FD is 409600, serno 32 via 172.16.1.6 (409600/128256), Ethernet1/1 P 192.168.3.0/24, 1 successors, FD is 409600, serno 33 via 172.16.1.6 (409600/128256), Ethernet1/1 P 172.16.1.8/30, 1 successors, FD is 307200, serno 4 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 |
17. 为了解决以上问题,需要关闭EIGRP的自动汇总功能
R1(config)#router eigrp 50 R1(config-router)#no auto R1(config-router)#end R4(config)#router eigrp 50 R4(config-router)#no auto R4(config-router)#end |
18. 再次R2上ping R1和R4
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 = 1/34/120 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 = 1/39/84 ms |
19. 查看R2的路由表
R2#show ip route eigrp 172.16.0.0/30 is subnetted, 3 subnets D 172.16.1.8 [90/307200] via 172.16.1.6, 00:03:15, Ethernet1/1 10.0.0.0/24 is subnetted, 8 subnets D 10.1.3.0 [90/409600] via 172.16.1.1, 00:03:15, Ethernet1/0 D 10.1.2.0 [90/409600] via 172.16.1.1, 00:03:15, Ethernet1/0 D 10.1.1.0 [90/409600] via 172.16.1.1, 00:03:15, Ethernet1/0 D 10.1.0.0 [90/409600] via 172.16.1.1, 00:03:15, Ethernet1/0 D 10.1.19.0 [90/435200] via 172.16.1.6, 00:03:15, Ethernet1/1 D 10.1.18.0 [90/435200] via 172.16.1.6, 00:03:15, Ethernet1/1 D 10.1.17.0 [90/435200] via 172.16.1.6, 00:03:15, Ethernet1/1 D 10.1.16.0 [90/435200] via 172.16.1.6, 00:03:15, Ethernet1/1 D 192.168.0.0/24 [90/409600] via 172.16.1.6, 00:03:15, Ethernet1/1 D 192.168.1.0/24 [90/409600] via 172.16.1.6, 00:03:15, Ethernet1/1 D 192.168.2.0/24 [90/409600] via 172.16.1.6, 00:03:15, Ethernet1/1 D 192.168.3.0/24 [90/409600] via 172.16.1.6, 00:03:15, Ethernet1/1 |
20. 在接口上采用手工汇总方法
R1(config)#int f0/0 R1(config-if)#ip summary-address eigrp 50 10.1.0.0 255.255.252.0 R1(config-if)#end R4(config)#int f0/0 R4(config-if)#ip summary-address eigrp 50 10.1.16.0 255.255.255.252 R4(config-if)#exit |
21. 再次查看EIGRP路由表
R2#show ip route eigrp 172.16.0.0/30 is subnetted, 3 subnets D 172.16.1.8 [90/307200] via 172.16.1.6, 00:00:14, Ethernet1/1 10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks D 10.1.0.0/22 [90/409600] via 172.16.1.1, 00:00:14, Ethernet1/0 D 10.1.19.0/24 [90/435200] via 172.16.1.6, 00:00:14, Ethernet1/1 D 10.1.18.0/24 [90/435200] via 172.16.1.6, 00:00:14, Ethernet1/1 D 10.1.17.0/24 [90/435200] via 172.16.1.6, 00:00:14, Ethernet1/1 D 10.1.16.0/24 [90/435200] via 172.16.1.6, 00:00:14, Ethernet1/1 D 192.168.0.0/24 [90/409600] via 172.16.1.6, 00:00:14, Ethernet1/1 D 192.168.1.0/24 [90/409600] via 172.16.1.6, 00:00:14, Ethernet1/1 D 192.168.2.0/24 [90/409600] via 172.16.1.6, 00:00:14, Ethernet1/1 D 192.168.3.0/24 [90/409600] via 172.16.1.6, 00:00:14, Ethernet1/1 |
22. 在R2上ping R2和R4
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/33/84 ms R2#ping *Mar 1 00:36:51.035: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on Ethernet1/0 (not full duplex), with R1 FastEthernet0/0 (full duplex). 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 = 1/47/108 ms |