一、理论知识
1、请简述EIGRP路由协议的优点?
- 高级距离矢量
- 快速收敛
- 100%无环路的无类路由
- 配置简单
- 逐步更新(触发更新)
- 在开销相等和不相等的路径上实现负载均衡
- 网络设计灵活
- 用组播地址和单播地址代替广播地址
- 支持 VLSM 和不连续的子网
- 在 Internet 网络中的任意点手动汇总
- 支持多种网络层协议
2、请简述EIGRP路由协议的工作原理?
邻居发现/恢复机制
–在邻居间使用HELLO报文
可靠的传输协议(RTP)
–确保EIGRP报文可靠,有序地传送到所有邻居
DUAL(扩散更新算法)
–为去往每个目标选择最小开销,无环路的路径
协议无关模块(PDMs)
–EIGRP支持为IP,Apple Talk,IPX等协议计算路由
二、实践任务
1、配置eigrp实现全网通信
开启路由器端口并给路由器端口设置IP地址:
R1(config)#int f0/0
R1(config-if)#no shutdown
R1(config-if)#ip add 13.1.1.1 255.255.255.0
R1(config-if)#exit
R1(config)#int s1/0
R1(config-if)#no shutdown
R1(config-if)#ip add 12.1.1.1 255.255.255.0
R2(config)#int f0/0
R2(config-if)#no shutdown
R2(config-if)#ip add 24.1.1.1 255.255.255.0
R2(config-if)#exit
R2(config)#int s1/0
R2(config-if)#no shutdown
R2(config-if)#ip add 12.1.1.2 255.255.255.0
R3(config)#int f0/0
R3(config-if)#no shutdown
R3(config-if)#ip add 13.1.1.2 255.255.255.0
R3(config-if)#exit
R3(config)#int f1/0
R3(config-if)#no shutdown
R3(config-if)#ip add 34.1.1.1 255.255.255.0
R4(config)#int f0/0
R4(config-if)#no shutdown
R4(config-if)#ip add 24.1.1.2 255.255.255.0
R4(config-if)#exit
R4(config)#int f1/0
R4(config-if)#no shutdown
R4(config-if)#ip add 34.1.1.2 255.255.255.0
给R1、R2、R4设置回环地址:
R1(config)#int loopback 0
R1(config-if)#ip address 11.1.1.1 255.255.255.0
R2(config)#int loopback 0
R2(config-if)#ip address 22.1.0.1 255.255.255.0
R2(config)#int loopback 1
R2(config-if)#ip address 22.1.1.1 255.255.255.0
R2(config)#int loopback 2
R2(config-if)#ip address 22.1.2.1 255.255.255.0
R2(config)#int loopback 3
R2(config-if)#ip address 22.1.3.1 255.255.255.0
R4(config)#int loopback 0
R4(config-if)#ip address 44.1.1.1 255.255.255.0
配置eigrp协议:
R1(config)#router eigrp 1
R1(config-router)#network 12.1.1.1 0.0.0.255
R1(config-router)#network 13.1.1.1 0.0.0.255
R1(config-router)#network 11.1.1.1 0.0.0.255
R2(config)#router eigrp 1
R2(config-router)#network 12.1.1.2 0.0.0.255
R2(config-router)#network 24.1.1.1 0.0.0.255
R2(config-router)#network 22.1.0.1 0.0.0.255
R2(config-router)#network 22.1.1.1 0.0.0.255
R2(config-router)#network 22.1.2.1 0.0.0.255
R2(config-router)#network 22.1.3.1 0.0.0.255
R3(config)#router eigrp 1
R3(config-router)#network 13.1.1.2 0.0.0.255
R3(config-router)#network 34.1.1.1 0.0.0.255
R4(config)#router eigrp 1
R4(config-router)#network 34.1.1.2 0.0.0.255
R4(config-router)#network 24.1.1.2 0.0.0.255
R4(config-router)#network 44.1.1.1 0.0.0.255
R1#show ip route eigrp
2、MD5验证(基于链路)
给R1的f0/0、s1/0端口设置MD5验证:
R1(config)#key chain key1 进入密钥链配置模式
R1(config-keychain)#key 1 标识密钥并进入密钥ID的配置模式
R1(config-keychain-key)#key-string 1234 标识密钥字符串(密码)
R1(config)#int f0/0
R1(config-if)#ip authentication mode eigrp 1 md5 为EIGRP数据包指定MD5身份验证
R1(config-if)#ip authentication key-chain eigrp 1 key1使用密钥链中的密钥来启用EIGRP数据包的身份验证
R1(config)#int s1/0
R1(config-if)#ip authentication mode eigrp 1 md5 为EIGRP数据包指定MD5身份验证
R1(config-if)#ip authentication key-chain eigrp 1 key1使用密钥链中的密钥来启用EIGRP数据包的身份验证
此时学习不到R2、R3、R4:
给R3和R2配置md5验证:
R3(config)#key chain key1 进入密钥链配置模式
R3(config-keychain)#key 1 标识密钥并进入密钥ID的配置模式
R3(config-keychain-key)#key-string 1234 标识密钥字符串(密码)
R3(config)#int f0/0
R3(config-if)#ip authentication mode eigrp 1 md5 为EIGRP数据包指定MD5身份验证
R3(config-if)#ip authentication key-chain eigrp 1 key1使用密钥链中的密钥来启用EIGRP数据包的身份验证
R2(config)#key chain key1 进入密钥链配置模式
R2(config-keychain)#key 1 标识密钥并进入密钥ID的配置模式
R2(config-keychain-key)#key-string 1234 标识密钥字符串(密码)
R2(config)#int s1/0
R2(config-if)#ip authentication mode eigrp 1 md5 为EIGRP数据包指定MD5身份验证
R2(config-if)#ip authentication key-chain eigrp 1 key1使用密钥链中的密钥来启用EIGRP数据包的身份验证
此时路由器就能互相通信:
3、做去往44.1.1.0网络的非等价负载
首先确定有没有Feasible successor:
#sh ip eigrp topology all-links
12.1.1.2为FS
计算v值:
vS FD > FS FD
V 158720 > 2300416
配置V值:
R1(config)#router eigrp 1
R1(config-router)#variance 15
4、EIGRP路由汇总:
R2(config)#router eigrp 1
R2(config-router)#no auto-summary
R1(config)#router eigrp 1
R1(config-router)#no auto-summary
R1#show ip route eigrp
R2(config)#int s1/0
R2(config-if)#ip summary-address eigrp 1 22.1.0.0 255.255.252.0
R2(config)#int f0/0
R2(config-if)#ip summary-address eigrp 1 22.1.0.0 255.255.252.0
此时就完成了路由汇总:
5、配置被动接口:
R1(config)#router eigrp 1
R1(config-router)#passive-interface Loopback 0
被动接口(passive interface)一般应用于优化,比如在我们的拓扑中R2上有一个环回口lo0:2.2.2.2,向lo0口发送EIGRP报文是没必要的,当我们在EIGRP路由进程下启用lo0的被动接口后,R2将不再向lo0发送任何EIGRP报文,但是lo0的路由还是会被R2发送出去。