
(一):EIGRP的配置
(二):EIGRP的手工汇总
Router#conf t
Router(config)#enable secret abc
Router(config)#line console 0
Router(config-line)#password abc
Router(config-line)#login
Router(config-line)#logging synchronous
Router(config-line)#exec-timeout 0 0
Router(config-line)#exi
Router(config)#no ip domain lookup
Router(config)#no cdp run
Router(config)#hostname r2
r2(config-if)#ip add 219.146.2.1 255.255.255.0
r2(config-if)#no shut
r2(config-if)#in loo 0 //虚拟环回接口
r2(config-if)#ip add 172.16.0.1 255.255.255.0
r2(config-if)#in loo 1
r2(config-if)#ip add 172.16.1.1 255.255.255.0
r2(config-if)#in loo 2
r2(config-if)#ip add 172.16.2.1 255.255.255.0
r2(config-if)#in loo 3
r2(config-if)#ip add 172.16.3.1 255.255.255.0
r2(config-if)#exi
r2(config-router)#network 219.146.2.0 0.0.0.255 //添加直连网络(反掩码可以不加)
r2(config-router)#network 172.16.0.0 0.0.0.255
r2(config-router)#network 172.16.1.0 0.0.0.255
r2(config-router)#network 172.16.2.0 0.0.0.255
r2(config-router)#network 172.16.3.0 0.0.0.255
r2(config-router)#exi
r3基本信息配置:
Router#conf t
Router(config)#enable secret abc
Router(config)#line console 0
Router(config-line)#password abc
Router(config-line)#login
Router(config-line)#logging synchronous
Router(config-line)#exec-timeout 0 0
Router(config-line)#exi
Router(config)#no ip domain lookup
Router(config)#no cdp run
Router(config)#hostname r3
r3(config-if)#ip add 219.146.2.2 255.255.255.0
r3(config-if)#no shut
r3(config-if)#in s1/2
r3(config-if)#ip add 219.146.3.1 255.255.255.0
r3(config-if)#no shut
r3(config-if)#exi
r3(config-router)#network 219.146.2.0 0.0.0.255
r3(config-router)#network 219.146.3.0 0.0.0.255
r3(config-router)#exi
r4基本信息配置:
Router#conf t
Router(config)#enable secret abc
Router(config)#line console 0
Router(config-line)#password abc
Router(config-line)#login
Router(config-line)#logging synchronous
Router(config-line)#exec-timeout 0 0
Router(config-line)#exi
Router(config)#no ip domain lookup
Router(config)#no cdp run
Router(config)#hostname r4
r4(config-if)#ip add 219.146.3.2 255.255.255.0
r4(config-if)#no shut
r4(config-if)#in loo 0
r4(config-if)#ip add 172.16.4.1 255.255.255.0
r4(config-if)#in loo 1
r4(config-if)#ip add 172.16.5.1 255.255.255.0
r4(config-if)#exi
r4(config-router)#network 219.146.3.0 //不要反掩码也可以
r4(config-router)#network 172.16.4.0
r4(config-router)#network 172.16.5.0
r4(config-router)#exi
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
C 219.146.3.0/24 is directly connected, Serial1/2
D 172.16.0.0/16 [90/2297856] via 219.146.3.2, 00:01:01, Serial1/2
[90/2297856] via 219.146.2.1, 00:01:01, Serial1/1
发现路由表已经出错。原因在eigrp会自动汇总。
Sending 5, 100-byte ICMP Echos to 172.16.0.1, timeout is 2 seconds:
U.U.U
Success rate is 0 percent (0/5)
r3(config)#do p 172.16.0.1
Sending 5, 100-byte ICMP Echos to 172.16.0.1, timeout is 2 seconds:
U!.!U
Success rate is 40 percent (2/5), round-trip min/avg/max = 60/76/92 ms
在r2上关闭自动汇总:
r2(config)#router eigrp 10
r2(config-router)#no auto-summary
r2(config-router)#exi
r4(config)#router eigrp 10
r4(config-router)#no auto-summary
r4(config-router)#exi
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
C 219.146.3.0/24 is directly connected, Serial1/2
172.16.0.0/24 is subnetted, 6 subnets
D 172.16.4.0 [90/2297856] via 219.146.3.2, 00:00:19, Serial1/2
D 172.16.5.0 [90/2297856] via 219.146.3.2, 00:00:19, Serial1/2
D 172.16.0.0 [90/2297856] via 219.146.2.1, 00:00:51, Serial1/1
D 172.16.1.0 [90/2297856] via 219.146.2.1, 00:00:51, Serial1/1
D 172.16.2.0 [90/2297856] via 219.146.2.1, 00:00:51, Serial1/1
D 172.16.3.0 [90/2297856] via 219.146.2.1, 00:00:51, Serial1/1
r2(config)#do show ip pro //查看当前运行的路由协议
Routing Protocol is "eigrp 10"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Default networks flagged in outgoing updates
Default networks accepted from incoming updates
EIGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0
EIGRP maximum hopcount 100
EIGRP maximum metric variance 1
Redistributing: eigrp 10
EIGRP NSF-aware route hold timer is 240s
Automatic network summarization is not in effect
Maximum path: 4
Routing for Networks:
172.16.0.0/24
172.16.1.0/24
172.16.2.0/24
172.16.3.0/24
219.146.2.0
Routing Information Sources:
Gateway Distance Last Update
(this router) 90 00:15:31
219.146.2.2 90 00:05:07
Distance: internal 90 external 170
r4(config)#do show ip pro
Routing Protocol is "eigrp 10"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Default networks flagged in outgoing updates
Default networks accepted from incoming updates
EIGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0
EIGRP maximum hopcount 100
EIGRP maximum metric variance 1
Redistributing: eigrp 10
EIGRP NSF-aware route hold timer is 240s
Automatic network summarization is not in effect
Maximum path: 4
Routing for Networks:
172.16.0.0
219.146.3.0
Routing Information Sources:
Gateway Distance Last Update
(this router) 90 00:09:14
219.146.3.1 90 00:01:04
Distance: internal 90 external 170
(二):EIGRP的手工汇总
r2(config-if)#ip summary-address eigrp 10 172.16.0.0 255.255.252.0
r2(config-if)#exi
r4(config-if)#ip summary-address eigrp 10 172.16.4.0 255.255.254.0
r4(config-if)#exi
再查看r3的路由表:
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
C 219.146.3.0/24 is directly connected, Serial1/2
172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
D 172.16.4.0/23 [90/2297856] via 219.146.3.2, 00:00:26, Serial1/2
D 172.16.0.0/22 [90/2297856] via 219.146.2.1, 00:02:14, Serial1/1
常用调试命令:
Show ip interface brie 查看接口基本参数
Show int e0 查看E0查相关参数
Sho int s0 查看S0查相关参数
Sho int s1 查看S1查相关参数
Show run 查看当前运行配置
Show cdp neighbor 看CDP邻居
Show ip route 查看路由表的内容
Show ip protocol 查看当前运行的协议
Show ip eigrp neighbor 查看EIGRP邻居
Show ip eigrp top 查看EIGRP的拓扑信息
Debug eigrp packet查看EIGRP的DEBUG信息
















