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去实战一次,开 ...
随机推荐
- NodeJs 实现 WebSocket 即时通讯(版本二)
服务端代码 websocket.js 'use strict' const WebSocket = require('ws'); const connections = new Map(); cons ...
- centOS7 永久关闭防火墙
查看防火墙状态: systemctl status firewalld.service 如图 绿的running表示防火墙开启 执行关闭命令: systemctl stop firewalld.ser ...
- 很详细很详细的gitLab使用具体流程
gitLab详细流程 先说一下整个流程,就是先建立一个项目-----拆分里程碑-----拆分issue----项目开发-----项目总结---关闭里程碑 下面是每个步骤具体的步骤,这个比较适合那种纯新 ...
- iSCSI 共享存储
iSCSI(Internet Small Computer System Interface,发音为/ˈаɪskʌzi/),Internet小型计算机系统接口,又称为IP-SAN,是一种基于 ...
- 实测Maven上传jar包到私服的方法归纳
Hello,各位小伙伴大家好,我是小栈君.好久不见,最近因为工作的缘故,导致了更新变慢,但是小栈君也在积极的做素材的规划,毕竟学习知识点的归纳和提炼需要一定的时间. 所以还请大家多多见谅,下一期的分享 ...
- Xshell6配置ssh免密码登录虚拟机
首先先说明一下有密码的,涉及到root登陆权限的问题: 1.用超级管理员身份登录,修改 vi /etc/ssh/sshd_config, 找到 把其中的permitRootLogin 修改成: # ...
- SSM整合相关试题
1.下列关于Spring自动装配的说法中,错误的是() A 在Spring配置文件中,可以通过<bean>元素的autowire属性指定自动装配方式 B autowire属性值可以设置为n ...
- H5+app,自动更新后自动删除安装包
H5+app 自动删除安装包 一.前言 之前做好的app自动更新,遗留下了一个问题,就是自动更新后安装包没有自行删除掉. 好像现在的手机的系统是有安装完自动清理安装包的.想我这个H5+的app安装完后 ...
- Asp.net Core 系列之--4.事务、日志及错误处理
ChuanGoing 2019-11-17 这篇原本时想把事务处理.日志处理.错误处理.授权于鉴权一并介绍完的,授权和鉴权我想结合自定义权限来介绍,全部放到这里篇幅可能太长,因此权限部分将会在下篇来介 ...
- 在lldb调试中调用c++函数 - 如何使用QuartzCore里面的日志消息
承接上一篇,上一篇讲到可以在lldb调试中调用QuartzCore.framework里的CA::Render::Object::show方法来是观察CA::Render模块内的类的信息,但是在lld ...