EIGRP实验 3 :EIGRP 拓扑、路由以及汇聚


实验目的:

通过对EIGRP实验拓扑,路由以及汇聚相关实验的的练习,掌握EIGRP建立拓扑信息的方式,度量计算方法,如何调整度量值,非等价负载均衡,以及EIGRP末节路由器。


实验拓扑:

wKiom1PHTo2AC677AACq809FS0c495.jpg

实验步骤:


1、首先在R1、R2、R3上分别配置好各自相关接口,并保持连通性。并且分别在R1/R2/R3路由器上起回环口,配置相应的IP地址,与上述的一致即可。

命令如下:

-----------------------------------------------------------------

R1(config)#no ip domain lo

R1(config)#lin con 0

R1(config-line)#exec-t 0 0

R1(config-line)#logg sy

R1(config-line)#exit

R1(config)#int lo 0

R1(config-if)#ip add 1.1.1.1 255.255.255.0

R1(config-if)#int e0/0

R1(config-if)#ip add 12.1.1.1 255.255.255.0

R1(config-if)#no shutdown

R1(config-if)#exit

-----------------------------------------------------------------

R2(config)#no ip domain lo

R2(config)#lin con 0

R2(config-line)#exec-t 0 0

R2(config-line)#logg sy

R2(config-line)#exit

R2(config)#int lo 0

R2(config-if)#ip add 2.2.2.2 255.255.255.0

R2(config-if)#int e0/1

R2(config-if)#ip add 12.1.1.2 255.255.255.0

R2(config-if)#no shutdown

R2(config-if)#int e0/0

R2(config-if)#ip add 23.1.1.2 255.255.255.0

R2(config-if)#no shutdown

R2(config-if)#exit

-----------------------------------------------------------------

R3(config)#no ip domain lo

R3(config)#lin con 0

R3(config-line)#exec-t 0 0

R3(config-line)#logg sy

R3(config-line)#exit

R3(config)#int e0/1

R3(config-if)#ip add 23.1.1.3 255.255.255.0

R3(config-if)#no shutdown

R3(config-if)#int lo 0

R3(config-if)#ip add 3.3.3.3 255.255.255.0

R3(config-if)#exit

-----------------------------------------------------------------

确保R1/R2/R3之间二二互通,如下图

wKiom1PHTtiCPuEZAAKs_yNSUrA161.jpg

2、配置好R1/R2/R3的EIGRP 100 进程,使用得R1/R2/R3都能正常建立邻居。

命令如下:

-----------------------------------------------------------------

R1(config)#router eigrp 100

R1(config-router)#no auto-summary

R1(config-router)#net 1.1.1.0 0.0.0.255

R1(config-router)#net 12.1.1.0 0.0.0.255

-----------------------------------------------------------------

R2(config)#router eigrp 100

R2(config-router)#no auto-summary

R2(config-router)#net 2.2.2.0 0.0.0.255

R2(config-router)#net 12.1.1.0 0.0.0.255

R2(config-router)#net 23.1.1.0 0.0.0.255

-----------------------------------------------------------------

R3(config)#router eigrp 100

R3(config-router)#no auto-summary

R3(config-router)#net 3.3.3.0 0.0.0.255

R3(config-router)#net 23.1.1.0 0.0.0.255

-----------------------------------------------------------------

3、检验相应的相关关系。

A、查看路由表(show ip route)如下图:

wKiom1PHTwSAWQO3AAOAF8MMAK4735.jpg

可以看到,默认情况下

EIGRP   的管理距离为:90

EIGRP   内部路由的度量值为:409600

B、查看EIGRP的拓扑表(show ip eigrp topology),如下图:

wKioL1PHUEuBK1bTAAI_x0Y4d7s329.jpg

wKiom1PHT5zyU2RKAAGzA9k2-XA368.jpg

可以看到其中度量包含有:

最少带宽:10000 Kbit

可靠性:255

负载为:1

最小MTU:1500

在EIGRP 进程开启后,EIGRP将加入进程的接口信息装载进入UPDATE数据包发给相应的邻居,其中UPDATE数据包中包含上述信息。当每台EIGRP路由器都更新完成后,各自便根据获得的拓扑信息进行计算,最后得到通行距离(RD)和可行性距离(FD).只要满足FD>RD,则该路由标记为可用,选出最优一条。


EIGRP可以使用带宽、延迟、负载、可靠性、MTU进行计算,即K1=K3=1,其余K值为0。如下图:


4、通过分析,可以知道调整EIGRP度量值的方法:

a、调整接口的带宽。

R1(config)#int lo 0

R1(config-if)#bandwidth 8888


调整R1的lo口带宽为888Kbit

注:带宽为整条链路上的最小带宽,并且为入接口带宽。

如下图:

wKioL1PHUOWBtkwcAAWXTTY4npg309.jpg

b、调整接口的延迟。

R1(config)#int lo 0

R1(config-if)#delay 1

调整R1的环回口延迟为10秒,注意此处的单位。

注:延迟为整条链路的延迟之和,并且为入接口延迟。

wKioL1PHiX-AdpdgAAOx-7yrNgA265.jpg

c、调整K值。

建议一般情况下不要更改K值,所以这里也就没有过多操作。

查看 K 值 的命令为(show ip eigrp protocols )

wKiom1PHiSzD1TyVAAI2uJ63CB4117.jpg

d、利用偏移列表(offset-list)

偏移列表可以对某一条特殊路由进行度量值调整。命令如下:

-----------------------------------------------------------------

R1(config)#access-list 1 permit 2.2.2.0 0.0.0.255

R1(config)#router eigrp 100

R1(config-router)#offset-list 1 in 1 e0/0  //第一个1是调用ACL的1,第二个1是


在E0/0入接口的度量值加1

R1(config-router)#end

-----------------------------------------------------------------

如下图:

wKiom1PJ4yGgs_NoAAVZV-YDH20217.jpg

5、非等价负载均衡

6、末节路由

默认情况下,如果EIGRP 丢失了去往某前缀的路由,那么EIGRP将会查找是否存在可靠性后继者,如果有,则直接使用,如果没有,那么EIGRP将把该路由条目标记为活动(active)状态,然后产生Query数据包发给所有的活动邻居询问该路由情况。邻居检查自己的拓扑信息表,如果没有,再次将该查询蔓延给其余邻居。最终无人可查时,将会利用 Reply 数据包回复查询。因此,EIGRP 为了加快汇聚,通常会将一些路由器配置成末节路由器。

目的: EIGRP 不会将查询发送给末节路由器。

-----------------------------------------------------------------

R2(config)#router eigrp 100

R2(config-router)#eigrp stub ?


connected Do advertise connected routes

leak-map Allow dynamic prefixes based on the leak-map

receive-only Set IP-EIGRP as receive only neighbor

redistributed Do advertise redistributed routes

static Do advertise static routes

summary Do advertise summary routes

<tr>

-----------------------------------------------------------------

connected 表示该路由器只通告Network包含的直连网络信息

receive-only表示该路由器除接收邻居信息外,不通行任何信息

redistributed 表示该路由器只通行由重分发进入的路由信息

static 表示该路由器只通告重分发进来的静态路由(动态的不通行)

summary 表示该路由器只通告手工或者自动汇总的路由信息

<tr>默认的情况 下,为connected 和summary 选项。

-----------------------------------------------------------------

检验如下:

若R2设置成了末节路由器,当R1丢失了1.1.1.0/24路由时,R1便不会给R2发送路由查询(Query)包。

如下图:

wKiom1PJ4u2yk5XFAAMM-LvTSfw888.jpg