EIGRP(Enhanced Interior Gateway Routing Protocol,增强型内部网关路由协议)是Cisco公司开发的一个平衡混合型路由协议,它融合了距离向量和链路状态两种路由协议的优点,支持IP,IPX和ApplleTalk等多种网络层协议。由于TCP/IP是当今网络中最常用的协议,因此本书只讨论IP网络环境中的EIGRP。
EIGRP是一个高效的路由协议,它的特点如下:
通过本实验可以掌握
本实验拓扑结构如图5-1所示。
图5-1 EIGRP基本配置
实验步骤
(提醒:请先配置每个路由器的每个接口的IP地址,并保证相邻路由器能ping通)
(1)步骤1:配置路由器R1
R1(config)#router eigrp 1
R1(config-router)#no auto-summary
R1(config-router)#network 1.1.1.0 0.0.0.255
R1(config-router)#network 192.168.12.0
(2)步骤2:配置路由器R2
R2(config)#router eigrp 1
R2(config-router)#no auto-summary
R2(config-router)#network 192.168.12.0
R2(config-router)#network 192.168.23.0
(3)步骤3:配置路由器R3
R3(config)#router eigrp 1
R3(config-router)#no auto-summary
R3(config-router)#network 192.168.23.0
R3(config-router)#network 192.168.34.0
(4)步骤4:配置路由器R4
R4(config)#router eigrp 1
R4(config-router)#no auto-summary
R4(config-router)#network 4.4.4.0 0.0.0.255
R4(config-router)#network 192.168.34.0
【说明】
EIGRP协议在通告网段时,如果是主类网络(即标准A、B、C类的网络,或者说没有划分子网的网络),只需输入此网络地址;如果是子网,则最好在网络号后面写子网掩码,或者反掩码,这样可以避免将所有的子网都加入EIGRP进程中。
反掩码是用广播地址(255.255.255.255)减去子网掩码所得到的。如掩码地址是255.255.248.0,则反掩码地址是0.0.7.255.在高级的IOS中也支持网络掩码的写法。
运行EIGRP的整个网络AS号码必须一致,其范围为1~65535.
4.实验调试
(1)show ip route
R2#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
C 192.168.1.0/24 is directly connected, Serial0/0/0
1.0.0.0/24 is subnetted, 1 subnets
D 1.0.0.0/24[90/20640000]via 192.168.12.1,00;04;19, Serial0/0/0
4.0.0.0/16 is subnetted, 1 subnets
D 4.0.0.0/24[90/21152000]via 192.168.23.3,00;00;06, Serial0/0/1
C 192.168.23.0/24 is directly connected, Serial0/0/1
D 192.168.34.0/24[90/21024000]via 192.168.23.3,00;05;34, Serial0/0/1
//以上输出表路由器R2通过EIGRP尝到了3条路由条目,管理距离是90,注意EIGRP协议代码用字母”D”表示,如果通过重分布方式进入EIGRP网络的路由条目,默认管理距离为170,路由代码用”D EX”表示,这也说明EIGRP路由协议能够区分内部路由和外部路由。
对于EIGRP度量值的计算,不妨以”D 1.0.0.0/24[90/20640000]via 192.168.12.1,00;04;19, Serial0/0/0”路由条目为例来说明。
EIGRP度量值的计算公式=[K1*Bandwidth+(K2+Bandwidth)/(256-Load)+K3+Delaly]*[K5/(Reliability+K4)]*256
在默认情况下,K1=K3=1,K2=K4=K5=0。
Bandwidth=107/所经由链路中入口带宽(单位为kbps)的最小值
Delay=所经由链路中入口的延迟为(单位为us)/10
接下来看一下在路由器R2中的”1.1.1.0”路由条目的度量是如何计算的。
首先,带宽应该是从R1的Loopback 0到R2最小的带宽,应该是R2的s0/0/0接口的带宽,为128kbps;而延迟是路由器R1的Loopback 0和路由器R2的s0/0/0接口的延迟之和,
所以,最后的度量值应该是[107/128+(5 000+20 000)/10]*256 =20 640 000,和路由器计算的结果是一致的。
【提示】
接口的带宽和延迟可以通过”show interface”查看。
(2)show ip protocols
R2#show ip protocols
Routeing Protocol is “eigrp 1”
//AS号码为 1
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
//显示计算度量值所用的K值
EIGRP maximum hopcount 100
//EIGRP支持的最大路数
EIGRP maximum metric variance 1
//variance值默认为1,即默认时只支持等价路径的负载均衡
Redistributing;eigrp 1
EIGRP NSF-aware route hold timer is 240s
//不间断转发的持续时间
Automatic network summarization is not int effect
//显示自动灡地,默认自动总是开启的
Maximum path;4
Routing for Networks;
192.168.12.0
192.168.23.0
Routing Information Sources;
Gateway Distance Last Update
192.168.12.1 90 00;10;44
192.168.23.3 90 00;10;15
Distance;internal 90 external 170
(3)show ip eigrp neighbors
R2# show ip eigrp neighbors
IP-EIGRP neighbors for process 1
H Address Interface Hold Uptime SRTT RTO Q Seq
(Sec) (ms) Cnt Num
1 192.168.23.3 Se0/0/1 12 00;11;05 7 1140 0 5
0 192.168.12.1 Se0/0/0 12 00;11;29 7 1140 0 3
以上输出各字段的含义如下所述。
【技术要点】
运行EIGRP路由协议的路由器不能建立邻居关系的可能原因:
(4)show ip eigrp topology
R2# show ip eigrp topology
IP-EIGRP Topology Table for AS(1)/ID(192.168.23.2)
Codes;P-Passive, A-Active, U-Update, Q-QUERY, R- Reply,
r-reply Status, s-sia Status
P 1.1.1.0/24 , 1 successors, FD is 20640000
via 192.168.12.1 (20640000/128256),Serial0/0/0
P 4.4.4.0/24 , 1 successors, FD is 21152000
via 192.168.23.3 (21152000/20640000),Serial0/0/1
P 192.168.34.0/24 , 1 successors, FD is 21024000
via 192.168.23.3 (21024000/20512000),Serial0/0/1
P 192.168.12.0/24 , 1 successors, FD is 20152000
via Connected,Serial0/0/0
P 192.168.23.0/24 , 1 successors, FD is 20152000
via Connected,Serial0/0/1(5)show ip eigrp interface
从以上输出可以清楚地看到每条路由条目的FD和RD的值,而拓扑结构数据库中状态代码最常见的是”P”,”A”和”s”,其含义如下所述。
【术语】
(5)show ip eigrp interfaces
R2# show ip eigrp interfaces
IP-EIGRP interfaces for process 1
Xmit Queue Mean Pacing Time Multicast Pending
Interface Peers Un/reliable SRTT Un/Reliable Flow Timer Routes
Se0/0/0 1 0/0 7 5/190 218 0
Se0/0/1 1 0/0 7 5/190 222 0
以上输出各字段的含义如下所述。
(6)show ip eigrp traffic
R2# show ip eigrp traffic
IP-EIGRP Traffic Statistics for AS 1
Hellos sent/received;364/361
Updates sent/received;10/8
Queries sent/received;0/0
Replies sent/received;0/0
Acks sent/received;4/5
Input queue high water mark 1, 0 drops
SIA-Queries sent/received;0/0
SIA-Replies sent/received;0/0
Hello Process ID;187
PDM Process ID;167
以上输出显示了EIGRP发送和接收到的数据包的统计情况。
(7)debug eigrp neighbors
该命令可以动态查看EIGRP邻居关系的情况。在路由器R1上先将s0/0/0接口”shutdown”
(关闭)掉,然后再”no shutdown”)(启用)可以看到EIGRP邻居建立的过程。
R2# debug eigrp neighbors
EIGRP Neighbors debugging is on
*Feb 10 02;59;31.199;%LINK-3-UPDOWN;Interface Serial0/0/0,changed state to down
*Feb 10 02;59;31.199;%DUAL-5-NBRCHANGE;IP-EIGRP(0)1;Neighbor 192.168.12.1(Serial0/0/0) is down; interface down
*Feb 10 02;59;31.199;Going down;peer 192.168.12.1 total=1 stub 0 template=1,iidb-stub=0 iid-all=0
*Feb 10 02;59;31.199;EIGRP;Neighbor 192.168.12.1 went down on Serial0/0/0
*Feb 10 02;59;32.199;%LINEPROTO-5-UPDOWN;Line protocol on Interface Serial0/0/0,changed state to down
*Feb 10 02;59;48.199;%LINK-3-UPDOWN;Interface Serial0/0/0,changed state to up
*Feb 10 02;59;49.199;%LINEPROTO-5-UPDOWN;Line protocol on Interface Serial0/0/0,changed state to up
*Feb 10 02;59;49.199;EIGRP;New peer 192.168.12.1 total=2 stub 0 template=1,iidb-stub=0 iid-all=1
*Feb 10 02;59;31.199;%DUAL-5-NBRCHANGE;IP-EIGRP(0)1;Neighbor 192.168.12.1(Serial0/0/0) is up; new adjacency
(8)debug eigrp packets
该命令可以显示EIGRP发送和接收的数据包
R2#dubug eigrp packets
EIGRP Packets debugging is on
(UPDATE,REQUEST,QUERY,REPLY,HELLO,IPXSAP,PROBE,ACK,STUB,SIAQUERY,SIARELPLY)
*Feb 10 03;01;08.107;EIGRP;Received HELLO on Serial 0/0/0 nbr 192.168.12.1
*Feb 10 03;01;08.107; AS 1,Flags 0x0,Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/0
*Feb 10 03;01;08.843;EIGRP;Received HELLO on Serial 0/0/1 nbr 192.168.23.3
*Feb 10 03;01;08.843; AS 1,Flags 0x0,Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/0
*Feb 10 03;01;08.927;EIGRP;sending HELLO on Serial 0/0/0
*Feb 10 03;01;08.927; AS 1,Flags 0x0,Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
*Feb 10 03;01;08.471;EIGRP;sending HELLO on Serial 0/0/1
*Feb 10 03;01;08.471; AS 1,Flags 0x0,Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
以上输出显示R2发送和接收的EIGRP数据包,由于当前网络是收敛的,所以只有HELLO断气包发送和接收的报告。
【术语】
在EIGRP中,有如下5种类型的数据包。
(9)注入默认路由
在路由器R1上通过”ip default-network”向EIGRP网络注入一条默认路由,具体配置如下:
R1(config)# interface loopback 0
R1(config-if)#no ip address
R1(config-if)#ip address 1.1.1.1 255.0.0.0
R1(config)#router eigrp 1
R1(config-router)#no network 1.1.1.0 0.0.0.255
R1(config-router)#network 1.0.0.0
R1(config)#ip default-network 1.0.0.0
在R2上查看路由表:
R2#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
C 192.168.12.0/24 is directly connected, Serial0/0/0
1.0.0.0/8 is subnetted, 1 subnets
D* 1.0.0.0[90/20640000]via 192.168.12.1,00;00;08,Serial0/0/0
4.0.0.0/24 is subnetted, 1 subnets
D 4.0.0.0[90/21152000]via 192.168.23.3,00;05;35,Serial0/0/1
C 192.168.23.0/24 is directly connected, Serial0/0/1
D 192.168.34.0[90/21024000]via 192.168.23.3,00;05;35,Serial0/0/1
以上输出表明路由器R2收到一条默认路由,同时在R3,R4上也会收到一条默认路由。
1.实验目的
通过本实验可以掌握
2.实验拓扑
本实验拓扑结构图如图5-2所示
图5-2 EIGRP负载均衡
3.实验步骤
(1)步骤1:配置路由器R1
R1(config)#router eigrp 1
R1(config-router)#no auto-summary
R1(config-router)#network 192.168.14.0
R1(config-router)#network 192.168.12.0
(2)步骤2:配置路由器R2
R2(config)#router eigrp 1
R2(config-router)#no auto-summary
R2(config-router)#network 192.168.12.0
R2(config-router)#network 192.168.23.0
R2(config-router)#network 2.2.2.0 255.255.255.0
(3)步骤3:配置路由器R3
R3(config)#router eigrp 1
R3(config-router)#no auto-summary
R3(config-router)#network 192.168.23.0
R3(config-router)#network 192.168.34.0
(4)步骤4:配置路由器R4
R4(config)#router eigrp 1
R4(config-router)#no auto-summary
R4(config-router)#network 4.4.4.0 255.255.255.0
R4(config-router)#network 192.168.34.0
R4(config-router)#network 192.168.14.0
4.实验调试
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 192.168.12.0/24
[90/20514560]via 192.168.14.1,00;00;19, GigabitEthernet0/0
2.0.0.0/24 is subnetted, 1 subnets
D 2.0.0.0[90/20642560]via 192.168.14.1,00;00;15, GigabitEthernet0/0
C 192.168.14.0/24 is directly connected, GigabitEthernet0/0
4.0.0.0/24 is subnetted, 1 subnets
C 4.0.0.0/24 is directly connected,Loopback0
D 192.168.23.0/24[90/21024000]via 192.168. 34.3,00;00;15, Serial0/0/0
C 192.168.34.0/24 is directly connected, Serial0/0/1
本实验只关注路由器R2的Loopback 0,虽然路由器R4到达路由器R2的Loopback 0有
两条路径,但是路由器会将FD最小的放入路由表,选择走g0/0接口。那么另外一条路径是不是可行后继路由呢?在路由器上查看拓扑表,详述如下:
R4#show ip eigrp topology
IP-EIGRP Topology Table for AS(1)/ID(4.4.4.4)
Codes;P-Passive, A-Active, U-Update, Q-QUERY, R- Reply,
r-reply Status, s-sia Status
P 2.2.2.0/24 , 1 successors, FD is 20642560
via 192.168.14.1 (20642560/20640000),GigabitEthernet0/0
via 192.168.34.3 (21152000/20640000),Serial0/0/0
P 4.4.4.0/24 , 1 successors, FD is 128256
via Connected,Loopback0
P 192.168.34.0/24 , 1 successors, FD is20512000
via Connected,Serial0/0/0
P 192.168.12.0/24 , 1 successors, FD is 20514560
via 192.168.14.1 (20514560/20512000),GigabitEthernet0/0
P 192.168.14.0/24 , 1 successors, FD is 28160
via Connected, GigabitEthernet0/0
P 192.168.23.0/24 , 1 successors, FD is 21024
via 192.168.34.3 (21024000/20512000),Serial0/0/0
从下面的输出中可以看到,第二条路径(走s0/0/0接口)的AD为20 640 000,而最优路由(走g0/0)的FD为20 642 560,AD 【术语】 R4(config)#interface gigabitEthernet 0/0 R4(config)#delay 2000 【提示】 在接口下用delay命令修改的延迟,在计算度量值时,不需要再除以10 。 在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 192.168.12.0/24 [90/21024000]via 192.168.14.1,00;00;15, GigabitEthernet0/0 2.0.0.0/24 is subnetted, 1 subnets D 2.0.0.0[90/21152000]via 192.168.34.3,00;00;15, Serial0/0/0 [90/21152000]via 192.168.14.1,00;00;15,GigabitEthernet0/0 D 192.168.23.0/24[90/21024000]via 192.168. 34.3,00;00;15, Serial0/0/0 以上输出表明路由条目”2.2.2.0”确实有两条等价路径,表明EIGRP是支持等价负载均衡的。 P 2.2.2.0/24 , 1 successors, FD is 20642560 via 192.168.14.1 (20642560/20640000),GigabitEthernet0/0 via 192.168.34.3 (21152000/20640000),Serial0/0/0 现在只需在R4的路由器上调整variance的值,即可使这两条路径在路由表中都可见和可用,R4上的配置如下: R4(config)#router eigrpr 1 R4(config-router)#variance 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 192.168.12.0/24 [90/20514560]via 192.168.14.1,00;00;02, GigabitEthernet0/0 2.0.0.0/24 is subnetted, 1 subnets D 2.0.0.0[90/21152000]via 192.168.34.3,00;00;15, Serial0/0/0 [90/20642560]via 192.168.14.1,00;00;15,GigabitEthernet0/0 D 192.168.23.0/24[90/21024000]via 192.168. 34.3,00;00;15, Serial0/0/0 以上输出表明,路由条目”2.2.2.0”有两条路径可达,但是它们的度量值不同,这就是所说的非等价路由,从而证明EIGRP是支持非等价负载均衡的。 【技术要点】 EIGRP非等价负载均衡是通过”variance”命令实现的,”variance”默认值是1(即代表等价路径的负载均衡),variance值的范围是1~128,这个参数代表了可以接受的不等价路径的度量值的倍数,在这个范围内的链路都将被接受,并且被放入路由表中。 1.实验目的 通过本实验可以掌握: 2.实验拓扑 本实验拓扑结构图如图5-3所示。 图5-3 EIGRP路由汇总 3.实验步骤 4.实验调试 ①在R4 s0/0/0执行汇总之前,在R3上查看路由表: 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 192.168.12.0/24 [90/21024000]via 192.168.23.2,00;23;31, Serial0/0/1 1.0.0.0/24 is subnetted, 1 subnets D 1.0.0.0[90/21152000]via 192.168.23.2,00;00;18, Serial0/0/1 4.0.0.0/24 is subnetted, 4 subnets D 4.0.0.0[90/20640000]via 192.168.34.3,00;01;02, Serial0/0/0 D 4.0.0.0[90/20640000]via 192.168.34.3,00;01;02, Serial0/0/0 D 4.0.0.0[90/20640000]via 192.168.34.3,00;01;02, Serial0/0/0 D 4.0.0.0[90/20640000]via 192.168.34.3,00;01;02, Serial0/0/0 以上输出表明路由器R3的路由表中有4条明细路由。 ②在路由器R4 s0/0/0接口执行汇总,在R3和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 192.168.12.0/24 [90/21024000]via 192.168.23.2,00;23;31, Serial0/0/1 1.0.0.0/24 is subnetted, 1 subnets D 1.0.0.0[90/21152000]via 192.168.23.2,00;00;18, Serial0/0/1 4.0.0.0/24 is subnetted, 4 subnets D 4.4.0.0/22 is a summary,00;01;33, Null0 D 192.168.23.0/24 [90/21024000]via 192.168.34.3,00;26;55, Serial0/0/0 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 192.168.12.0/24 [90/21024000]via 192.168.23.2,00;27;30, Serial0/0/1 1.0.0.0/24 is subnetted, 1 subnets D 1.0.0.0[90/21152000]via 192.168.23.2,00;04;17, Serial0/0/1 4.0.0.0/22 is subnetted, 1 subnets D 4.4.0.0 [90/20640000]via 192.168.34.3,00;02;09, Serial0/0/0 以上输出说明,在路由器R4的s0/0/0执行手工汇总后,会在自己的路由表中产生一条指向”null0”的EIGRP路由,主要是为了防止路由环路;在路由器R3上收到被汇总的路由条目”4.4.0.0/22”。 【提示】 当被汇总的明细路由全部down掉以后,汇总路由才自动从路由表里被删除,从而可以有效避免路由抖动。 【思考】 如果把上面实验的R4的环回接口lo0~lo4的地址改为192.168.96.4/24,192.168.97.4/24,192.168.98.4/24和192.168.99.4/24,那么,在路由器R4的s0/0/0接口还能够实现汇总吗? 在路由器R4上实施的配置如下: R4(config)#router eigrp 1 R4(config-router)#network 192.168.96.0 255.255.252.0 R4(config)#interface s0/0/0 R4#(config-if)#ip summary-address eigrp 1192.168.96.0 255.255.252.0 分别在R4和R3上查看路由表: 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 192.168.12.0/24 [90/21536000]via 192.168.34.3,00;04;36, Serial0/0/0 1.0.0.0/24 is subnetted, 1 subnets D 1.0.0.0[90/21664000]via 192.168.34.3,00;03;41, Serial0/0/0 D 192.168.96.0/22 is a summary,00;01;40, Null0 D 192.168.23.0/24 [90/21024000]via 192.168.34.3,00;26;55, Serial0/0/0 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 192.168.12.0/24 [90/21024000]via 192.168.23.2,00;27;30, Serial0/0/1 1.0.0.0/24 is subnetted, 1 subnets D 1.0.0.0[90/21152000]via 192.168.23.2,00;04;17, Serial0/0/1 D 192.168.96.0/22 [90/20640000]via 192.168.34.3,00;02;09, Serial0/0/0 从R3和R4的路由表的输出可以看出EIGRP支持CIDR汇总,这一点和RIPv2是不同的。 1.实验目的 通过本实验可以掌握EIGRP路由协议认证的配置和调试。 2.实验拓扑 本实验拓扑结构图如图5-1所示。 图5-1 EIGRP基本配置 3.实验步骤 4.实验调试 ①如果链路的一端启用了认证,另外一端没有启用认证,则出现下面的提示信息: *Feb 10 05;46;11.119%DUAL-5-NBRCHANGE;IP-EIGRP(0)1;Neighbor 192168.12..2(Serial0/0/0)is down;authentication mode changed ②如果钥匙链的密匙不正确,则出现下面的提示信息: *Feb 10 05;47;08.122%DUAL-5-NBRCHANGE;IP-EIGRP(0)1;Neighbor 192168.12..2(Serial0/0/0)is down;Auth failure 表5-1列出了本章涉及的主要命令 表5-1 本章命令汇总 命令 作用 show ip eigrp neighbors 查看EIGRP邻居表 show ip eigrp topology 查看EIGRP拓扑结构数据库 show ip eigrp interface 查看运行EIGRP路由协议的接口的状况 show ip eigrp traffic 查看EIGRP发送和接收到的数据包的统计情况 debug eigrp neighbors 查看EIGRP动态建立邻居关系的情况 debug eigrp packets 显示发和接收的EIGRP数据包 ip hello-interval eigrp 配置EIGRP的HELLO发送周期 ip hold-time eigrp 配置EIGRP的HELLO hold时间 router eigrp 启动EIGRP路由进程 no auto-summary 关闭自动汇总 ip authentication mode eigrp 配置EIGRP的认证模式 ip authentication key-chain eigrp 在接口上调用钥匙链 variance 配置非等价负载均衡 delay 配置接口下的延迟 bandwidth 配置接口下的带宽 ip summary-address eigrp 手工路由汇总
2 实验3: EIGRP路由汇总
本实验只给出路由器R4的配置,路由器R1、R2和R3的配置同5.2节实验1完全相同。默认时EIGRP的自动汇总是开启的,自动汇总只对本地产生的EIGRP路由汇总,可以通过”no auto-summary”命令关闭自动汇总,然后进行手工汇总,R4的配置如下:
R4(config)#router eigrp 1
R4(config-router)#no auto-summary
R4(config-router)#network 4.4.4.0 255.255.255.0
R4(config-router)#network 192.168.34.0
R4(config)#interface s0/0/0
R4#(config-if)#ip summary-address eigrp 1 4.4.0.0 255.255.252.0
//配置EIGRP手工路由汇总
3 实验4:EIGRP认证
(1)步骤1:配置路由器R1
R1(config)#key chain ccnp
R1(config-keychain)#key 1
R1(config-keychain-key)#key-string cisco
R1(config)#interface s0/0/0
R1(config-if)#ip authentication mode eigrp 1 md5 //认证模式为MD5
R1(config-if)ip authentication key-chain eigrp 1 ccnp //在接口上调用钥匙链
(2)步骤2:配置路由器R2
R2(config)#key chain ccnp
R2(config-keychain)#key 1
R2(config-keychain-key)#key-string cisco
R2(config)#interface s0/0/0
R2(config-if)#ip authentication mode eigrp 1 md5
R2(config-if)ip authentication key-chain eigrp 1 ccnp
R2(config)#interface s0/0/1
R2(config-if)#ip authentication mode eigrp 1 md5
R2(config-if)ip authentication key-chain eigrp 1 ccnp
(3)步骤3:配置路由器R3
R3(config)#key chain ccnp
R3(config-keychain)#key 1
R3(config-keychain-key)#key-string cisco
R3(config)#interface s0/0/0
R3(config-if)#ip authentication mode eigrp 1 md5
R3(config-if)ip authentication key-chain eigrp 1 ccnp
R3(config)#interface s0/0/1
R3(config-if)#ip authentication mode eigrp 1 md5
R3(config-if)ip authentication key-chain eigrp 1 ccnp
(4)步骤4:配置路由器R4
R2(config)#key chain ccnp
R2(config-keychain)#key 1
R2(config-keychain-key)#key-string cisco
R2(config)#interface s0/0/0
R2(config-if)#ip authentication mode eigrp 1 md5
R2(config-if)ip authentication key-chain eigrp 1 ccnp
四EIGRP 命令汇总