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的更多相关文章

  1. “全栈2019”Java第六十二章:接口与常量详解

    难度 初级 学习时间 10分钟 适合人群 零基础 开发语言 Java 开发环境 JDK v11 IntelliJ IDEA v2018.3 文章原文链接 "全栈2019"Java第 ...

  2. 第十六届“二十一世纪的计算”学术研讨会 密西根州立大学教授Anil K. Jain主题演讲

    Biometrics---How Do I Know Who You Are? 密西根州立大学教授Anil K. Jain主题演讲" title="第十六届"二十一世纪的 ...

  3. 第十六届“二十一世纪的计算”学术研讨会 图灵奖获得者Butler W. Lampson主题演讲

    Personal Control of Digital Data 图灵奖获得者Butler W. Lampson主题演讲" title="第十六届"二十一世纪的计算&qu ...

  4. 第十六届“二十一世纪的计算”学术研讨会 牛津大学肿瘤成像学教授Michael Brady主题演讲

    Computing and Healthcare 牛津大学肿瘤成像学教授Michael Brady主题演讲" title="第十六届"二十一世纪的计算"学术研讨 ...

  5. java之jvm学习笔记六-十二(实践写自己的安全管理器)(jar包的代码认证和签名) (实践对jar包的代码签名) (策略文件)(策略和保护域) (访问控制器) (访问控制器的栈校验机制) (jvm基本结构)

    java之jvm学习笔记六(实践写自己的安全管理器) 安全管理器SecurityManager里设计的内容实在是非常的庞大,它的核心方法就是checkPerssiom这个方法里又调用 AccessCo ...

  6. CCNA 课程 六

    路由协议概述: 通过一种路由协议学习到了多个去往同一目标网络的路由,metric小的放入路由表中.metric一样,同时放进路由表. 通过多种路由协议学习到了去往同一目标网络的路由,路由协议管理距离小 ...

  7. CCNA 之 七 路由协议 三 OSPF

    OSPF协议 OSPF开放式最短路径优先 全称:Open Shortest Path First 是目前使用最为广泛的路由协议,主要因为OSPF是开放式协议,和IGRP.EIGRP思科的私有协议不同. ...

  8. CCNA 之 五 路由协议 一 静态路由

    静态路由 路由选择原理 什么是路由? 就如同去某一个地方,会有很多种路线,每一条路线经都可以称之为路由: 路由器中会维护一张路由表,每一个表项都是一条路由,也就是去往某个网络的路径,然后将对应的数据包 ...

  9. FastAPI(六十二)实战开发《在线课程学习系统》需求分析

    前言 基础的分享我们已经分享了六十篇,那么我们这次分享开始将用一系列的文章分享实战课程.我们分享的系统是在线学习系统.我们会分成不同的模块进行分享.我们的目的是带着大家去用fastapi去实战一次,开 ...

随机推荐

  1. IDEA上tomcat的配置

    IDEA上tomcat的配置   IDEA上集成自己的tomcat,主要就是下面这张表的配置,不累述.

  2. strGame:博弈论,trie

    挺有意思的一道题.初探博弈论. 最好自己思考? 我们先考虑只有1轮游戏的情况. 这题明显要在字符串上一位一位地走,所以对字符串建立起trie. 最终建立起的trie的叶节点就是必败位置了. 对于非叶节 ...

  3. python经典算法题:无重复字符的最长子串

    题目:无重复字符的最长子串. 给定一个字符串,请你找出其中不含有重复字符的 最长子串 的长度. 示例 1: 输入: "abcabcbb" 输出: 3 解释: 因为无重复字符的最长子 ...

  4. len、is、==、可变于不可变类型

    a="asdfghjkl;'iuygb" b="小米" c=['a','b','c'] d= {'name':1,'age':24} # len统计字符或元素的 ...

  5. 小白学 Python(23):Excel 基础操作(上)

    人生苦短,我选Python 前文传送门 小白学 Python(1):开篇 小白学 Python(2):基础数据类型(上) 小白学 Python(3):基础数据类型(下) 小白学 Python(4):变 ...

  6. docker swarm 过滤器affinity 限制副本不会出现在同一个节点上

    affinity:container!=容器服务名称(可以是正则) 举个例子:stack_ds.yaml # cat stack_dsc.yaml version: '3.0' services: t ...

  7. hdu 1874 畅通工程续 (floyd)

    畅通工程续Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submis ...

  8. CSS中越界问题的经典解决方案

    (1)如何解决父元素的第一个子元素的margin-top越界问题 1)为父元素加border-top: 1px;——有副作用 2)为父元素指定padding-top: 1px;——有副作用 3)为父元 ...

  9. PHP面向对象中new self( )和 new static( ) 的区别

    在PHP中 self指向定义了当前被调用方法的类, static指向调用当前静态方法的类. class A { public static $_a = 'Class A'; public static ...

  10. 安卓手机运行fedora

    安卓手机使用容器运行其他linux,一般两种: 1. termux + rootfs.img + proot,依赖api>=21,不必root但受限. 2. linuxdeploy + proo ...