EIGRP——增强型内部网关路由协议,和RIP协议一样属于距离矢量协议(EIGRP 兼具链路状态路由协议和距离矢量路由协议的功能。但 EIGRP 依然基于距离矢量路由协议的核心原理,其中关于其他网络的信息是从直连的邻居获得的);采用的DUAL弥散算法,对整个网络进行计算后选择最优的网络通络进行数据 的发送。
EIGRP是早先思科私有的协议,是只适用于思科设备的专有协议。后来思科以开放标准形式向 IETF 发布了 EIGRP 的基本功能作为信息性 RFC。这意味着其他网络供应商现在可以在其设备上实施 EIGRP,从而与运行 EIGRP 的思科路由器和非思科路由器互操作。EIGRP 高级功能不会向 IETF 发布,例如部署动态多点虚拟专用网络 (DMVPN) 所需的 EIGRP 末节。作为信息性 RFC,思科将继续保持对 EIGRP 的控制。所以开源了,但是其他厂商设备来说,也就很少使用到该协议,毕竟在早先的发展中,其他厂商也就选择了其他的协议来代EIGRP协议
Hello 数据包 - 用于发现邻居和维护邻居邻接关系
更新数据包 - 向 EIGRP 邻居传播路由信息。
确认数据包 - 用于确认收到以可靠传输方式发送的 EIGRP 消息。
查询数据包 : 用于向邻居查询路由。
应答数据包 :用于响应 EIGRP 查询。
EIGRP 使用 router eigrp autonomous-system 命令启用 EIGRP 进程。EIGRP 配置中提到的自治系统编号与外部路由协议使用的互联网编号指派机构 (IANA) 全局分配的自治系统编号无关。只有在同一个自治区域的路由器才可建立邻居关系
EIGRP 路由器 ID 用于在 EIGRP 路由域内唯一标识每台路由器。
在 EIGRP IPv4中,路由器 ID 的使用并不那么明显。IPv4 的 EIGRP 使用 32 位路由器 ID 来识别外部路由重分布的始发路由器。IPv4中,EIGRP可以自选择较大的IP地址作为 route-id
IPv6 的 EIGRP 时,路由器 ID 的必要性更为明显。
在EIGRP中可支持三种:只写网段 网段+子网掩码 网段+反掩码
当 EIGRP 网络中启用新的接口时,EIGRP 会尝试与所有相邻路由器建立邻居邻接关系来发送和接收 EIGRP 更新。我们通常会将连接终端的接口设置为被动接口

- Router>enable
- Router#configure
- Router(config)#hostname R1
- R1(config)#interface GigabitEthernet 0/0
- R1(config-if)#ip address 192.168.1.1 255.255.255.0
- R1(config-if)#no shutdown
- R1(config-if)#exit
- R1(config)#interface GigabitEthernet 0/1
- R1(config-if)#ip address 192.168.2.1 255.255.255.0
- R1(config-if)#no shutdown
- R1(config-if)#exit
- R1(config)#inter
- R1(config)#interface GigabitEthernet 0/2
- R1(config-if)#ip address 192.168.4.1 255.255.255.0
- R1(config-if)#no shutdown
- R1(config-if)#exit
- Router>enable
- Router#configure
- Router(config)#hostname R2
- R2(config)#interface GigabitEthernet 0/0
- R2(config-if)#ip address 192.168.1.2 255.255.255.0
- R2(config-if)#no shutdown
- R2(config-if)#exit
- R2(config)#interface GigabitEthernet 0/1
- R2(config-if)#ip address 192.168.5.1 255.255.255.0
- R2(config-if)#no shutdown
- R2(config-if)#exit
- R2(config)#interface GigabitEthernet 0/2
- R2(config-if)#ip address 192.168.3.1 255.255.255.0
- R2(config-if)#no shutdown
- R2(config-if)#exit
- Router>enable
- Router#configure
- Router(config)#hostname R3
- R3(config)#interface G0/0
- R3(config-if)#ip address 192.168.6.1 255.255.255.0
- R3(config-if)#no shutdown
- R3(config-if)#exit
- R3(config)#interface GigabitEthernet 0/1
- R3(config-if)#ip address 192.168.2.1 255.255.255.0
- R3(config-if)#no shutdown
- R3(config-if)#exit
- R3(config)#interface GigabitEthernet 0/1
- R3(config-if)#ip address 192.168.2.2 255.255.255.0
- R3(config-if)#exit
- R3(config)#interface GigabitEthernet 0/2
- R3(config-if)#ip address 192.168.3.2 255.255.255.0
- R3(config-if)#no shutdown
- R3(config-if)#exit
- R1(config)#router eigrp 1
- R1(config-router)#eigrp router-id 1.1.1.1
- R1(config-router)#network 192.168.1.0
- R1(config-router)#network 192.168.2.0
- R1(config-router)#network 192.168.4.0
- R1(config-router)#passive-interface GigabitEthernet 0/2
- R1(config-router)#no auto-summary



在上述的三个表中,我们很清楚的看到,配置EIGRP后的详细信息,邻居关系就很说明我们的配置没有问题。
- R2(config)#router eigrp 1
- R2(config-router)#eigrp router-id 2.2.2.2
- R2(config-router)#network 192.168.1.0
- %DUAL-5-NBRCHANGE: IP-EIGRP 1: Neighbor 192.168.1.1 (GigabitEthernet0/0) is up: new adjacency
- R2(config-router)#network 192.168.3.0
- R2(config-router)#network 192.168.5.0
- R2(config-router)#passive-interface GigabitEthernet 0/1
- R2(config-router)#exit
- R2(config-router)#no auto-summary



- R3(config)#router eigrp 1
- R3(config-router)#eigrp router-id 3.3.3.3
- R3(config-router)#network 192.168.2.0
- %DUAL-5-NBRCHANGE: IP-EIGRP 1: Neighbor 192.168.2.1 (GigabitEthernet0/1) is up: new adjacency
- R3(config-router)#network 192.168.3.0
- %DUAL-5-NBRCHANGE: IP-EIGRP 1: Neighbor 192.168.3.1 (GigabitEthernet0/2) is up: new adjacency
- R3(config-router)#network 192.168.6.0
- R3(config-router)#passive-interface GigabitEthernet 0/0
- R3(config-router)#no auto-summary
- R3(config-router)#exit



- Switch>enable
- Switch#configure
- Switch(config)#hostname S2
- S2(config)#interface vlan 1
- S2(config-if)#ip address 192.168.5.2 255.255.255.0
- S2(config-if)#no shutdown
- S2(config-if)#exit
- S2(config)#ip default-gateway 192.168.5.1
- Switch>enable
- Switch#configure
- Switch(config)#hostname S1
- S1(config)#interface vlan 1
- S1(config-if)#ip address 192.168.4.2 255.255.255.0
- S1(config-if)#no shutdown
- S1(config-if)#exit
- S1(config)#ip default-gateway 192.168.4.1
- Switch>enable
- Switch#configure
- Switch(config)#hostname S3
- S3(config)#interface vlan 1
- S3(config-if)#ip address 192.168.6.2 255.255.255.0
- S3(config-if)#no shutdown
- S3(config-if)#exit
- S3(config)#ip default-gateway 192.168.6.1


其他的PC依次配置



OK,在此拓扑的配置中,我们的任意一个设备都是可以相互通的
EIGRP的配置中,我们会将内网与外网衔接,边缘的路由器我们总会配置静态路由或者默认路由,此时,我们就需要配置一条语句使得其他路由器也可以学习道该路由信息——重分发
- R1(config)#router eigrp 1
- R1(config-router)#redistribute static
自定义链路的带宽:一定注意是一条链路的两端的路由器都要配置 且配配置的参数值一样
例如在R2的G0/2接口和R3的G0/2接口
- R2(config)#interface G0/2
- R2(config-if)#Bandwidth 64
- R3(config)#interface G0/2
- R3(config-if)#Bandwidth 64
配置带宽的目的就是做一个负载均衡
自定义EiGRP的Hello时间:配置也是基于端口的,所以一条链路的两端都要配置
- R2(config)#interface GigabitEthernet 0/2
- R2(config-if)#ip hello-interval eigrp 1 50
- R2(config-if)#ip hold-time eigrp 1 150
例如:

在R1与R2上配置EIGRP的身份认证
- R1(config)#key chain cisco
- R1(config-keychain)#key 1
- R1(config-keychain-key)#key-string cisco123
- R1(config-keychain-key)#exit
- R1(config-keychain)#ex
- R1(config)#interface g0/0
- R1(config-if)#ip authentication mode eigrp 1 md5
- R1(config-if)#ip authentication key-chain eigrp 1 cisco
配置完R1的身份验证:R2便于R1失去的邻居关系

- R2(config)#key chain cisco
- R2(config-keychain)#key 1
- R2(config-keychain-key)#key-string cisco123
- R2(config-keychain-key)#ex
- R2(config-keychain)#ex
- R2(config)#interface G0/0
- R2(config-if)#ip authentication mode eigrp 1 md5
- R2(config-if)#ip authentication key-chain eigrp 1 cisco
R2上配置完EIGRP的身份验证后,重新与R1建立了身份验证
