CCNA 之 六 路由协议 二 EIGRP
EIGRP(Enhanced IGRP)
增强型内部网关路由协议
注意:这是cisco私有协议;也就是说,该协议只能运行在思科的设备上,如果有其他的厂家的设备,则不能保证能运行此协议;
EIGRP的特点:
- 高级距离矢量协议 - 具有距离矢量性和链路状态协议特征
- 无类路由协议 - 可划分子网、可聚合子网路由
- 支持VLSM与不连续子网
- 100%五环路 - DUAL算法
- 快速收敛 - 路由条目不过期,拥有备份路由
- 触发更新
- 底路由更新信息开销
- 配置简单
- 支持多种网络层协议(IP、IPX、Appletalk、etc)

EIGRP的五种报文:
| HELLO分组 | 以224.0.0.10发送,无需确认Hello包 EIGRP依靠分组来发现,验证和重新发现邻居router 以固定的时间发送hello包,该时间间隔与接口贷款有关 LAN上默认为5s |
| 更新 | EIGRP协议的这双鞋更新数据包只在必要的时候传递必要的信息,而且仅仅传递给需要路由信息的路由器。当只有某一制定的路由器需要路有更新时,更新数据包就是单播发送的;当有多台路由器更新时,更新数据包就是组播发送的 以可靠的方式发送,需要确认 |
| 查询 | 当某条路有丢失,向邻居查询关于路由信息,通常靠组播方式发送,有时也用单播重传;可靠地发送 |
| 应答 | 相应查询分组,单播;可靠方式发送 |
| 确认(ACK) | 以单播发送的HELLO包(不包含数据),包含确认号。用来确认更新、查询和应答。ACk本身不需要确认。 |

上图中,如果是RIP协议的话,则肯定会选择走Metric值小的那一条路由,就是由A路由直接到C路由,而如果是EIGRP协议,则会选择走B路由到C路由去,因为会根据算法选择线路更优的线路。
而通过show ip route命令查看路由表,以D开头的,则表示通过EIGRP协议同步的路由表,D全称是DUAl,表示EIGRP协议。
EIGRP协议中的Metric值的计算公式如下图:

来看下计算案例:

DUAL算法
Diffusing Update Algorithm 用于计算最佳无环路径和备用路径
特点:
- 无环拓扑
- 可立即使用的无环备用路径
- 跨苏收敛
- 低带宽利用率(通过限定更新实现)
几个术语:
- 后继路由器
Successors
被实际选中作为到达一个目的地所使用的下一跳路由器。改条路由保存在路由表中。
- 可行距离(Feasible Distance)
计算出的桐乡目的网络最小的度量。
- 可行后继路由器(Feasible Successor)
是一条备份路由,只保存在拓扑表中。要成为可行后继,吓一跳路由器前往某个特定网络的
AD必须必当前后继的FD小。
- 通告距离(Advertise Distance)
即为
EIGRP邻居桐乡相同目的网络的它自己的可行距离。
- 可行条件,或称可行性条件(Feasible Condition)
符合了可行性条件Feasible Condition指当邻居桐乡一个网络的通告距离(AD)比本地路由器桐乡同一个目的网络的可行距离短时;
EIGRP的其他特性
- 最多支持等价的路径的跳数不同的IOS版本不同进行负载(默认是4条)
- 可以通过maximum-paths修改

EIGRP动手配置
根据下面图中拓扑,配置EIGRP

R1的配置
R1>en
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#int s 0/0
R1(config-if)#ip add 192.168.12.1 255.255.255.0
R1(config-if)#no sh
R1(config-if)#ex
R1(config)#int s 0/1
R1(config-if)#ip add 192.168.13.1 255.255.255.0
R1(config-if)#no sh
R1(config-if)#ex
R1(config)#router eigrp 1
R1(config-router)#network 192.168.12.0 0.0.0.255
R1(config-router)#network 192.168.13.0 0.0.0.255
R1(config-router)#end
R2的配置
R2>en
R2#conf t
R2(config)#int s 0/0
R2(config-if)#ip add 192.168.12.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#ex
R2(config)#int s 0/1
R2(config-if)#ip add 192.168.23.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#ex
R2(config)#router eigrp 1
R2(config-router)#network 192.168.23.0 0.0.0.255
R2(config-router)#
*Mar 1 00:03:42.211: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1, changed state to down
R2(config-router)#network 192.168.12.0 0.0.0.255
R2(config-router)#end
R3的配置
R3>en
R3#conf t
R3(config)#int s0/0
R3(config-if)#ip add 192.168.13.3 255.255.255.0
R3(config-if)#no sh
R3(config-if)#ex
R3(config)#int s 0/1
R3(config-if)#ip add 192.168.23.3 255.255.255.0
R3(config-if)#no sh
R3(config-if)#ex
R3(config)#int lo0
R3(config-if)#ip add 3.3.3.3 255.255.255.0
R3(config-if)#no sh
R3(config-if)#ex
R3(config)#router eigrp 1
R3(config-router)#network 192.168.13.0 0.0.0.255
R3(config-router)#network 1
Mar 1 00:07:18.051: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 192.168.13.1 (Serial0/0) is up: new adjacency
R3(config-router)#network 192.168.23.0 0.0.0.255
R3(config-router)#
Mar 1 00:07:29.903: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 192.168.23.2 (Serial0/1) is up: new adjacency
R3(config-router)#network 3.0.0.0
R3(config-router)#end
配置检查
R1检查
R1#show ip route
Codes: C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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
C 192.168.13.0/24 is directly connected, Serial0/1
D 3.0.0.0/8 [90/2297856] via 192.168.13.3, 00:00:02, Serial0/1
D 192.168.23.0/24 [90/2681856] via 192.168.13.3, 00:00:34, Serial0/1
[90/2681856] via 192.168.12.2, 00:00:34, Serial0/0
R1#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.13.3 Se0/1 14 00:00:59 35 210 0 12
0 192.168.12.2 Se0/0 13 00:03:05 56 336 0 11
R1#ping 3.3.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/22/84 ms
R1#ping 192.168.23.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.23.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/27/108 ms
R1#ping 192.168.23.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.23.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/16/44 ms
R1#show ip eigrp topology all-links
IP-EIGRP Topology Table for AS(1)/ID(192.168.13.1)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
r - reply Status, s - sia Status
P 3.0.0.0/8, 1 successors, FD is 2297856, serno 7
via 192.168.13.3 (2297856/128256), Serial0/1
via 192.168.12.2 (2809856/2297856), Serial0/0
P 192.168.12.0/24, 1 successors, FD is 2169856, serno 2
via Connected, Serial0/0
P 192.168.13.0/24, 1 successors, FD is 2169856, serno 3
via Connected, Serial0/1
P 192.168.23.0/24, 2 successors, FD is 2681856, serno 6
via 192.168.12.2 (2681856/2169856), Serial0/0
via 192.168.13.3 (2681856/2169856), Serial0/1
R1#sho ip protocols
Routing Protocol is "eigrp 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
EIGRP maximum hopcount 100
EIGRP maximum metric variance 1
Redistributing: eigrp 1
EIGRP NSF-aware route hold timer is 240s
Automatic network summarization is in effect
Automatic address summarization:
192.168.13.0/24 for Serial0/0
192.168.12.0/24 for Serial0/1
Maximum path: 4
Routing for Networks:
192.168.12.0
192.168.13.0
Routing Information Sources:
Gateway Distance Last Update
192.168.13.3 90 22:03:28
192.168.12.2 90 22:03:28
Distance: internal 90 external 170
R2检查
R2#show ip route
Codes: C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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
D 192.168.13.0/24 [90/2681856] via 192.168.23.3, 00:00:58, Serial0/1
[90/2681856] via 192.168.12.1, 00:00:58, Serial0/0
D 3.0.0.0/8 [90/2297856] via 192.168.23.3, 00:00:26, Serial0/1
C 192.168.23.0/24 is directly connected, Serial0/1
R3检查
R3#show ip route
Codes: C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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/2681856] via 192.168.23.2, 22:24:22, Serial0/1
[90/2681856] via 192.168.13.1, 22:24:22, Serial0/0
C 192.168.13.0/24 is directly connected, Serial0/0
3.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 3.3.3.0/24 is directly connected, Loopback0
D 3.0.0.0/8 is a summary, 22:23:50, Null0
C 192.168.23.0/24 is directly connected, Serial0/1
CCNA 之 六 路由协议 二 EIGRP的更多相关文章
- “全栈2019”Java第六十二章:接口与常量详解
难度 初级 学习时间 10分钟 适合人群 零基础 开发语言 Java 开发环境 JDK v11 IntelliJ IDEA v2018.3 文章原文链接 "全栈2019"Java第 ...
- 第十六届“二十一世纪的计算”学术研讨会 密西根州立大学教授Anil K. Jain主题演讲
Biometrics---How Do I Know Who You Are? 密西根州立大学教授Anil K. Jain主题演讲" title="第十六届"二十一世纪的 ...
- 第十六届“二十一世纪的计算”学术研讨会 图灵奖获得者Butler W. Lampson主题演讲
Personal Control of Digital Data 图灵奖获得者Butler W. Lampson主题演讲" title="第十六届"二十一世纪的计算&qu ...
- 第十六届“二十一世纪的计算”学术研讨会 牛津大学肿瘤成像学教授Michael Brady主题演讲
Computing and Healthcare 牛津大学肿瘤成像学教授Michael Brady主题演讲" title="第十六届"二十一世纪的计算"学术研讨 ...
- java之jvm学习笔记六-十二(实践写自己的安全管理器)(jar包的代码认证和签名) (实践对jar包的代码签名) (策略文件)(策略和保护域) (访问控制器) (访问控制器的栈校验机制) (jvm基本结构)
java之jvm学习笔记六(实践写自己的安全管理器) 安全管理器SecurityManager里设计的内容实在是非常的庞大,它的核心方法就是checkPerssiom这个方法里又调用 AccessCo ...
- CCNA 课程 六
路由协议概述: 通过一种路由协议学习到了多个去往同一目标网络的路由,metric小的放入路由表中.metric一样,同时放进路由表. 通过多种路由协议学习到了去往同一目标网络的路由,路由协议管理距离小 ...
- CCNA 之 七 路由协议 三 OSPF
OSPF协议 OSPF开放式最短路径优先 全称:Open Shortest Path First 是目前使用最为广泛的路由协议,主要因为OSPF是开放式协议,和IGRP.EIGRP思科的私有协议不同. ...
- CCNA 之 五 路由协议 一 静态路由
静态路由 路由选择原理 什么是路由? 就如同去某一个地方,会有很多种路线,每一条路线经都可以称之为路由: 路由器中会维护一张路由表,每一个表项都是一条路由,也就是去往某个网络的路径,然后将对应的数据包 ...
- FastAPI(六十二)实战开发《在线课程学习系统》需求分析
前言 基础的分享我们已经分享了六十篇,那么我们这次分享开始将用一系列的文章分享实战课程.我们分享的系统是在线学习系统.我们会分成不同的模块进行分享.我们的目的是带着大家去用fastapi去实战一次,开 ...
随机推荐
- 盘点一下Creator星球上的开源工具包!
晓衡开始写公众号,最早是从上架 Cocos 商店的 pbkiller 插件开始的,到至今有2年2个月了.在这期间,又陆续在公众号上分享了多个实用工具包,在这里统一盘点一下,方便与大家交流学习. 一.u ...
- pythonpip的基本使用
pip 是 Python 包管理工具,该工具提供了对Python 包的查找.下载.安装.卸载的功能.目前如果你在 python.org 下载最新版本的安装包,则是已经自带了该工具.Python 2.7 ...
- 赤壁情:dp
首先这道题用到的3个新关键字大概讲一下: (我刚学会仅仅会瞎搞做题,欢迎大神补充) static:声明一个变量并清空.(不知道用不用时间,求解答) 具体用法:static 变量类型 变量名.如:sta ...
- HTML知识点汇总
一.什么是HTML HTML是用来描述网页的一种语言. HTML是指超文本标记语言(不仅包含纯文本,还包含图片.超链接.音频.视频等). HTML使用一套标记标签来描述网页. 二.HTML标签的作用 ...
- 原生JS实现单向链表
1.前言 用JS实现一个简单的单向链表,并完成相关的功能 2.功能说明 push(value):从链表尾部添加一个新的节点 insertAfer(value,item):向链表中的item节点之后插入 ...
- JavaScript入门经典(第7版)读书笔记
断断续续看了十来天,终于看完了,还是学到些东西,这本书还是不错的,各方面都有涉及. 补充了下之前不完善的JS 知识 笔记一般只记必要的东西. Table of Contents 1. JavaScr ...
- [转载]1.3 UiPath变量的介绍和使用
一.变量 变量主要用于存储数据,它在RPA中扮演重要的数据传递角色,是RPA编程不可或缺的一部分.它包括变量名称和变量的值,变量的值支持多种数据类型,包括从通用值,文本,数字,数据表,时间和日期,Ui ...
- PHP微信授权登录用于多个域名的方法
PHP微信授权登录用于多个域名的方法appid和 回调地址换下就好了 <pre><!DOCTYPE html><html lang="en">& ...
- aop的简单使用(代码和配置记录)
Spring aop 简单示例 简单的记录一下spring aop的一个示例 基于两种配置方式: 基于xml配置 基于注解配置 这个例子是模拟对数据库的更改操作添加事物 其实并没有添加,只是简单的输出 ...
- (Codeforce)The number of positions
Petr stands in line of n people, but he doesn't know exactly which position he occupies. He can say ...