# 增强型内部网关路由协议

**增强型内部网关路由协议（Enhanced Interior Gateway Routing Protocol，EIGRP）** 是由思科系统（Cisco Systems）设计并开发的一种高级距离矢量内部网关协议，用于单一自治系统内的路由。它使用扩散更新算法（Diffusing Update Algorithm，DUAL）计算无环路径，该算法由[斯坦福国际研究院](https://www.edgepedia.org/zh/sri-international)（SRI International）研究、开发并仿真，并在 J. J. Garcia-Luna-Aceves 1993 年的论文《使用扩散计算的无环路由》（Loop-Free Routing Using Diffusing Computations）中加以描述。<sup>[1](https://www.rfc-editor.org/info/rfc7868/)</sup> 该协议最初为思科专有，于 2016 年 5 月作为 RFC 7868 发布，这是一份独立提交流中的信息性 RFC，记录了协议的设计与架构，但不作为[互联网标准](https://www.edgepedia.org/zh/internet-standard)的候选。<sup>[1](https://www.rfc-editor.org/info/rfc7868/)</sup>

| 关键事实 | 详情 |
|---|---|
| 分类 | 高级距离矢量内部网关协议；DUAL 在路由计算的每一时刻均提供无环保证<sup>[1](https://www.rfc-editor.org/info/rfc7868/)</sup> |
| 规范 | RFC 7868，信息性，2016 年 5 月；作者 D. Savage、J. Ng、S. Moore、D. Slice、P. Paluch 和 R. White<sup>[1](https://www.rfc-editor.org/info/rfc7868/)</sup> |
| 传输 | IP 协议号 88；IPv4 组播地址 224.0.0.10，IPv6 组播地址 FF02:0:0:0:0:0:0:A<sup>[1](https://www.rfc-editor.org/info/rfc7868/)</sup> |
| 度量 | 由带宽、延迟、负载和可靠性项经 K 值加权而成的复合度量；默认 K1=1、K2=0、K3=1、K4=0、K5=0、K6=0<sup>[1](https://www.rfc-editor.org/info/rfc7868/)</sup> |
| 无环规则 | 可行性条件：邻居的报告距离必须小于路由器的可行距离<sup>[2](https://datatracker.ietf.org/doc/html/rfc7868)</sup> |
| 认证 | MD5 或 SHA2-256 邻居认证；无 PKI 或重量级认证系统<sup>[1](https://www.rfc-editor.org/info/rfc7868/)</sup> |
| 历史 | 基于 IGRP，由思科于 1987 年开发；增强型 IGRP 宣布将于 1994 年中推出；2013 年宣布开放，2016 年 5 月作为 RFC 7868 发布<sup>[3](https://newsroom.cisco.com/c/r/newsroom/en/us/a/y1993/m05/cisco-unveils-plans-for-routing-protocol-enhancements.html)</sup><sup> • </sup><sup>[4](https://www.cisco.com/site/us/en/products/networking/software/ios-nx-os/enhanced-interior-gateway-routing-protocol-eigrp/index.html)</sup> |

## 起源与标准化

EIGRP 源自内部网关路由协议（Interior Gateway Routing Protocol，IGRP），后者由思科于 1987 年开发，该公司称其为第一个允许构建大型互联网的协议。<sup>[3](https://newsroom.cisco.com/c/r/newsroom/en/us/a/y1993/m05/cisco-unveils-plans-for-routing-protocol-enhancements.html)</sup> 思科的第一项专利第 5,088,032 号于 1992 年授予，涵盖了 IGRP 在计算机网络间路由通信的方法与装置。<sup>[5](https://heritage.cisco.com/1992_1stpatent/)</sup> 1993 年 5 月，思科宣布了基于 IGRP 的增强型 IGRP 计划，计划于 1994 年中推出。<sup>[3](https://newsroom.cisco.com/c/r/newsroom/en/us/a/y1993/m05/cisco-unveils-plans-for-routing-protocol-enhancements.html)</sup>

在其生命周期的大部分时间里，EIGRP 一直是思科的专有协议。2013 年，思科宣布开放该协议，完整设计于 2016 年 5 月作为 RFC 7868 发布。<sup>[4](https://www.cisco.com/site/us/en/products/networking/software/ios-nx-os/enhanced-interior-gateway-routing-protocol-eigrp/index.html)</sup><sup> • </sup><sup>[1](https://www.rfc-editor.org/info/rfc7868/)</sup> 该 RFC 是独立于 IETF 标准流程贡献给 RFC 系列的，文件本身声明，除为出版或翻译所作的格式调整外，不得修改或用于创建衍生作品。<sup>[1](https://www.rfc-editor.org/info/rfc7868/)</sup> EIGRP 的原始目标之一是为 IGRP 增强路由：EIGRP 使用与 IGRP 相同的复合度量，但各项乘以 256，将度量从 24 位扩展到 32 位。<sup>[2](https://datatracker.ietf.org/doc/html/rfc7868)</sup>

## DUAL 算法

DUAL 构建通往所有可达目的地的最低成本路径，并保证每条构建的路径在每一时刻都是无环的，包括在拓扑变化和重新收敛期间。受拓扑变化影响的路由器以协调的、扩散的方式计算新的最佳路径，而未受影响的路由器则完全不参与重新计算。<sup>[2](https://datatracker.ietf.org/doc/html/rfc7868)</sup> 与依赖非协调更新的基本 Bellman-Ford 距离矢量协议不同，DUAL 使用**扩散计算**：计算通过向更多路由器查询其到受影响目的地的当前报告距离而增长，并随着回复到达而收缩。未受影响的路由器立即回复，从而终止计算在它们之上的增长，使过程在范围上自我调整。<sup>[2](https://datatracker.ietf.org/doc/html/rfc7868)</sup>

DUAL 使用三种基本消息类型运行：QUERY、UPDATE 和 REPLY。UPDATE 表示度量变化或目的地的添加。<sup>[1](https://www.rfc-editor.org/info/rfc7868/)</sup>

**路由状态。** 路由要么是 PASSIVE，意味着它被保证无环且是最短可用路径；要么是 ACTIVE，意味着该路由不可用，路由器正在积极重新计算它。当提供当前最低成本路径的每个邻居都未通过可行性条件检查时，路由进入 ACTIVE。当路由处于 ACTIVE 时，路由器不得更改其后继或可行距离，直到路由返回 PASSIVE。<sup>[2](https://datatracker.ietf.org/doc/html/rfc7868)</sup> 超过预定义时段仍处于 ACTIVE 状态的目的地称为卡在活动状态（Stuck In Active）；思科将此限制实现为 3 分钟。<sup>[1](https://www.rfc-editor.org/info/rfc7868/)</sup>

## 可行性条件、后继与备份路径

可行性条件是 DUAL 用来验证特定路径无环性的标准。它是一个充分但不必要的条件：满足它的每条路径都保证无环，但并非所有无环路径都满足它。当邻居通告的成本，即报告距离（Reported Distance，RD），小于路由器自身为该目的地持有的可行距离（Feasible Distance，FD）时，条件即满足。<sup>[2](https://datatracker.ietf.org/doc/html/rfc7868)</sup>

三个定义组织了路径选择：

- **后继路由器（successor）** 是用于为某目的地转发流量的下一跳，通常选在最低成本路径上。<sup>[2](https://datatracker.ietf.org/doc/html/rfc7868)</sup>
- **可行后继路由器（Feasible Successor）** 是满足可行性条件的邻居。它是通往目的地的下游邻居，可能不是最低成本路径，可在等代价或不等代价负载分担下用于转发。当当前后继变得不可达时，可行后继成为后继。<sup>[2](https://datatracker.ietf.org/doc/html/rfc7868)</sup>
- **可行距离（Feasible Distance，FD）** 是自上次从 ACTIVE 状态转为 PASSIVE 状态以来已知的到某目的地的最小总度量；它不一定是当前最佳路径的度量。<sup>[2](https://datatracker.ietf.org/doc/html/rfc7868)</sup>

当拓扑变化发生时，DUAL 首先测试可行后继。如果存在一个，路由器可以切换到它而无需扩散计算；只有当不存在可行后继时，才必须进行重新计算。<sup>[2](https://datatracker.ietf.org/doc/html/rfc7868)</sup> 这就是 EIGRP 快速收敛背后的机制：拥有预先验证的备份路径的路由器在本地进行故障切换，只有网络中受影响的部分参与任何查询过程。

## 度量

经典 EIGRP 复合度量是一个 32 位量，计算如下：

\[ \text{Metric} = 256 \cdot \left( K_1 \cdot B_w + \frac{K_2 \cdot B_w}{256 - \text{Load}} + K_3 \cdot D \cdot \frac{K_5}{R + K_4} \right) \]

其中 \( B_w \) 是取倒数并缩放后的带宽，即 \( 10^{7} \) 除以以千比特每秒为单位的最小带宽；\( D \) 是以十微秒为单位的路由延迟；\( R \) 是可靠性；Load 是有效负载，两者均以 0 到 255 的标度表示。如果 \( K_5 = 0 \)，则项 \( K_5/(R + K_4) \) 定义为 1。<sup>[6](https://www.cisco.com/c/en/us/td/docs/routers/ios-xe/ip-routing/b-ip-routing/m_ire-enhanced-igrp.html)</sup> 在默认 K 值 K1=1、K2=0、K3=1、K4=0、K5=0 下，度量简化为缩放带宽与延迟之和的 256 倍，在均匀介质网络上则简化为跳数。<sup>[6](https://www.cisco.com/c/en/us/td/docs/routers/ios-xe/ip-routing/b-ip-routing/m_ire-enhanced-igrp.html)</sup><sup> • </sup><sup>[1](https://www.rfc-editor.org/info/rfc7868/)</sup>

EIGRP 宽度量（Wide Metrics）特性将计算扩展为命名模式配置下的 64 位度量，增加了吞吐量、延迟和扩展属性项，从而支持 32 位经典度量会饱和的高带宽接口。<sup>[6](https://www.cisco.com/c/en/us/td/docs/routers/ios-xe/ip-routing/b-ip-routing/m_ire-enhanced-igrp.html)</sup> K 值在邻居之间交换，不匹配会阻止邻居关系的建立。<sup>[6](https://www.cisco.com/c/en/us/td/docs/routers/ios-xe/ip-routing/b-ip-routing/m_ire-enhanced-igrp.html)</sup>

## 运行与安全

EIGRP 仅在路由变化时发送有界更新，传播路由表变化而非整个路由表，并维护备用路径的拓扑表。<sup>[4](https://www.cisco.com/site/us/en/products/networking/software/ios-nx-os/enhanced-interior-gateway-routing-protocol-eigrp/index.html)</sup> 该协议通过多地址族配置同时支持 IPv4 和 IPv6，管理员可以通过聚合（汇总）或过滤隐藏可达性信息来控制扩散计算的范围，从而在单一自治系统内创建有效的故障域。<sup>[4](https://www.cisco.com/site/us/en/products/networking/software/ios-nx-os/enhanced-interior-gateway-routing-protocol-eigrp/index.html)</sup><sup> • </sup><sup>[2](https://datatracker.ietf.org/doc/html/rfc7868)</sup>

EIGRP 默认不限制邻居关系的建立：它会与任何发送有效 HELLO 包的路由器建立邻居关系。RFC 7868 指出，这种完全开放的方面需要策略能力来将邻居关系的建立限制在有效路由器之间，并且 EIGRP 有意避免 PKI 或重量级认证系统，因为可扩展性是主要设计目标。DoS 防御转而依赖于实现中对控制平面数据包的速率限制，以及使用 MD5 或 SHA2-256 的邻居认证。<sup>[1](https://www.rfc-editor.org/info/rfc7868/)</sup> 思科的 HMAC-SHA-256 认证实现指南描述了共享密钥如何与发送接口地址拼接以抵御重放攻击，生成添加到每个数据包的 256 位消息摘要。<sup>[7](https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_eigrp/configuration/xe-16-9/ire-xe-16-9-book/ire-sha-256.pdf)</sup>

## EIGRP 与 OSPF 的比较

OSPF 和 EIGRP 是企业路由中最常被比较的两种内部网关协议，它们在架构上有所不同。OSPF 是链路状态协议：区域内的每台路由器泛洪链路状态通告以构建共享拓扑数据库，并使用 SPF 独立计算最短路径。EIGRP 是高级距离矢量协议：路由器与邻居交换路由信息并维护备用路径的拓扑表，而不泛洪完整的域地图。<sup>[8](https://www.ituonline.com/blogs/ospf-vs-eigrp-for-enterprise-networks-a-practical-comparison-guide/)</sup>

仿真研究反复测得 EIGRP 是收敛更快的协议。在 Cisco Packet Tracer 和 OPNET 中对 EIGRP、OSPF 和 RIP 的比较发现，EIGRP 在初始化、故障和恢复时是三者中最快的，而 OSPF 由于必须映射网络而产生了最高的初始流量；同一研究发现 EIGRP 是三者中带宽效率最高的。<sup>[9](https://www.computerresearch.org/index.php/computer/article/download/1899/1-Performance-Comparison-of-EIGRP_html/24792)</sup> RFC 7868 做出了相应的设计声明：DUAL 的收敛时间可与任何其他现有路由协议相媲美，且只有受拓扑变化影响的节点需要对其采取行动，这赋予 EIGRP 良好的扩展特性和比许多其他内部网关协议更低的复杂度。<sup>[2](https://datatracker.ietf.org/doc/html/rfc7868)</sup>

实际的权衡在于厂商范围。OSPF 是适合多厂商环境和分层区域设计的开放标准，而 EIGRP 的快速收敛和更简单的部署在以思科为主的网络中最为宝贵；两种协议可以在迁移期间共存，通过路由重分发在两个域之间交换信息。<sup>[8](https://www.ituonline.com/blogs/ospf-vs-eigrp-for-enterprise-networks-a-practical-comparison-guide/)</sup>

## 实现

除 [Cisco IOS](https://www.edgepedia.org/zh/cisco-ios) 外，EIGRP 由开源 [FRRouting](https://www.edgepedia.org/zh/frrouting) 项目实现为 eigrpd 守护进程，支持将内核、静态、直连、OSPF 和 BGP 路由重分发到 EIGRP 表中，并显示具有 Passive、Active、Query 和 Reply 路由状态的拓扑表。<sup>[10](https://docs.frrouting.org/en/stable-7.4/eigrpd.html)</sup> 思科之外的采用仍然有限，该协议仍通常与仅思科的企业环境相关联。<sup>[8](https://www.ituonline.com/blogs/ospf-vs-eigrp-for-enterprise-networks-a-practical-comparison-guide/)</sup>

## References

1. [RFC 7868: Cisco's Enhanced Interior Gateway Routing Protocol (EIGRP), RFC Editor](https://www.rfc-editor.org/info/rfc7868/)
2. [RFC 7868 (full text), IETF Datatracker](https://datatracker.ietf.org/doc/html/rfc7868)
3. [Cisco Unveils Plans for Routing Protocol Enhancements, Cisco Newsroom, May 11, 1993](https://newsroom.cisco.com/c/r/newsroom/en/us/a/y1993/m05/cisco-unveils-plans-for-routing-protocol-enhancements.html)
4. [Enhanced Interior Gateway Routing Protocol (EIGRP), Cisco](https://www.cisco.com/site/us/en/products/networking/software/ios-nx-os/enhanced-interior-gateway-routing-protocol-eigrp/index.html)
5. [First Patent (IGRP), Cisco Story](https://heritage.cisco.com/1992_1stpatent/)
6. [IP Routing Configuration Guide - EIGRP, Cisco](https://www.cisco.com/c/en/us/td/docs/routers/ios-xe/ip-routing/b-ip-routing/m_ire-enhanced-igrp.html)
7. [EIGRP/SAF HMAC-SHA-256 Authentication, Cisco](https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_eigrp/configuration/xe-16-9/ire-xe-16-9-book/ire-sha-256.pdf)
8. [OSPF vs EIGRP for Enterprise Networks: A Practical Comparison Guide, ITU Online](https://www.ituonline.com/blogs/ospf-vs-eigrp-for-enterprise-networks-a-practical-comparison-guide/)
9. [Performance Comparison of EIGRP, OSPF and RIP Routing Protocols using Cisco Packet Tracer and OPNET Simulator](https://www.computerresearch.org/index.php/computer/article/download/1899/1-Performance-Comparison-of-EIGRP_html/24792)
10. [EIGRP, FRRouting documentation](https://docs.frrouting.org/en/stable-7.4/eigrpd.html)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 17, 2026; Sep 30, 2026; Oct 15, 2026 · Edited: Sep 30, 2026; Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 网络与安全 › Networking fundamentals and architecture › Routing and addressing › Routing protocols and daemons

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/enhanced-interior-gateway-routing-protocol

English original: https://www.edgepedia.org/enhanced-interior-gateway-routing-protocol
