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去实战一次,开 ...
随机推荐
- Python安装pyinstaller方法,以及将项目生成可执行程序的步骤
pyinstaller安装方法 前提:确保计算机安装了Python语言环境,并且正确配置了环境变量. 方法一:联网在线自动安装 选择一 Windows OS下进入cmd(命令行窗口) 输入:pip i ...
- Security整合spring boot
Security整合spring boot 1.基础概念 Spring Security是一个能够为基于Spring的企业应用系统提供声明式的安全访问控制解决方案的安全框架.它提供了一组可以在Spri ...
- 关于B/S模式CGI上传文件,遇到的问题归纳(待更新。。。)
由于项目问题是基于web的,最近一直在改进web界面,由于产品需要升级,而且升级操作是由客户在web端完成,将软件包放在本地,由web上传到后台完成更新,之前做的是TFTP更新方式,但是需要借助第三方 ...
- Logback MDC
Mapped Diagnostic Contexts (MDC) (译:诊断上下文映射) Logback的设计目标之一是审计和调试复杂的分布式应用程序.大多数实际的分布式系统需要同时处理来自多个客 ...
- IM里“附近的人”功能实现原理是什么?如何高效率地实现它?
1.引言 基本上以陌生人社交为主的IM产品里,都会增加“附近的人”.“附近的xxx”这种以LBS(地理位置)为导向的产品特色(微信这个熟人社交产品里为啥也有“附近的人”?这当然是历史原因了,微信当初还 ...
- inline-block元素间隙产生及去除方法
当我们把元素属性display设置成inline-block时,元素之间就会产生间隙 <!DOCTYPE html><html> <head> <meta c ...
- 大宇java面试系列(一):jvm垃圾回收
1. 说一下 JVM 有哪些垃圾回收算法? 标记-清除算法:标记无用对象,然后进行清除回收.缺点:效率不高,无法清除垃圾碎片. 标记-整理算法:标记无用对象,让所有存活的对象都向一端移动,然后直接清除 ...
- 用c语言打印一个三角形
#define _CRT_SECURE_NO_WARNINGS#include<stdio.h>#include<string.h>#include<stdlib.h&g ...
- lqb 入门训练 序列求和 (PS:用长整数做数据的输入输出)
入门训练 序列求和 时间限制:1.0s 内存限制:256.0MB 问题描述 求1+2+3+...+n的值. 输入格式 输入包括一个整数n. 输出格式 输出一行,包括一个整数,表示1+2+3 ...
- hdu 1068 Girls and Boys (最大独立集)
Girls and BoysTime Limit: 20000/10000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)T ...