岁月联盟 · 中国技术网 本站主页 | 安全认证 | 用户服务 | 技术论坛
新闻快报 | 法律法规 | 新手学堂 | 黑客特区 | 操作系统 | 安全防范 | 程序语言 | 数 据 库 | 防 火 墙 | 交换路由 | 考试认证
系统集成 | 存储备份 | 协议分析 | 协议大全 | RFC专题 | FTP服务器 | 解决方案 | 问题解答 | 图库资料 | 软件下载 | 教程下载
  您现在的位置: 岁月联盟 >> 路由交换 >> 路由协议 >> 路由交换正文
EIGRP协议的基本配置
作者:未知 文章来源:本站整理 点击数: 更新时间:2007-1-8 9:57:45
本实验对EIGRP协议进行基本的配置,涉及到配置ElGRP协议所必须的命令和常用的show命令。
  
    1.实验目的
    通过本实验,读者可以掌握以下技能:
    在路由器上启动EIGRP协议;
    声明相应网段进入EIGRP路由进程;
    查看路由表并理解相关字段含义;
    查看EIGRP协议配置信息;
    查看EIGRP邻居路由器信息。
    
    2.设备需求
  
    本实验需要以下设备:
    Cisco路由器3台,分别命名为R1、R2和R3,其申R1要求具有2个串行接口、R2和R3均要求具有1个串行接口和1个以太网接口。
    2条DCE电缆和2条DTE电缆,或3条DCE转DTE电缆;
    1条交叉线序的双绞线;
    1台终端服务器,如Cisco2509路由器,及用于反向Telnet的相应电缆;
    1台带有超级终端程序的PC机,以及Console电缆及转接器。
  
    3. 拓扑结构及配置说明
  
    本实验拓扑结构如图6.1所示。首先把DCE电缆和DTE电缆进行对接,共组成2对电缆,然后用这2对电缆把R1和R2,R1和R3连接起来。
    用交又线序的双绞线把R2和R3连接起来。
    各路由器使用的接口及其编号见图6.1中的标注。
  



  
  
  
    各接口IP地址分配加下:
    R1 50 201.1.12.1/30, S1 201.1.13.1/30, L0 10.1.1.1/24
    R2: 50 201.1.12.2/30, E0 200.1.1.2/24
    R3: 50 201.1.12.2/30, E0 200.1.1.3/24
    实验中R1、R2之间和R1、R3之间的串行线路速率设置为2000kbit/s。
    本实验要求通过对EIGRP路由选择协议进行配置,实现全网的连通性。
  
    4.实验配置及监测结果
  
    首先对各路由器的相关接口进行配置,然后启动EIGRP路由协议,并且声明网段。
    读者应该已经在对RIP和IGRP协议的配置中熟悉了这个配置过程,因此我们在此给出配置完成后的结果,而不再记录完整的配置过程。
    配置清单6-1是3台路由器的具体配置。
  
    配置清单6-1各路由器配置清单
  
    第1段:路由器R1的配置清单
    R1#sh mnn
    Building configuration...
  
    Current configuration : 931 bytes
    !
    version 12.1
    service timestamps debug uptime
    service timestamps log uptime
    no service password-encryption
    !
    hostname R1
    !
    ip subnet-zero
    i
    interface LoopbackO
     ip address 10.1.1.1255.255.255.0
    !
    interface Serial0
     bandwidth 2000
     ipaddress 201.1.12.1 255.255.255.252
     clockrate 2000000
    !
    interface Serial 1
     bandwidth 2000
     ipaddress 201.1.13.1 255.255.255.252
     clockrate 2000000
    !
    router eigrp 100
     network 10.1.1.0 0.0.0.255
     network 201.1.12.0 0.0.0.3
     network 201.1.l3.0.0.0.0.3
     no ayto-summary
     no eigrp log-neighbor-changes
    !
    ip classless
    ip http server
    !
    !
    line con 0
    line aux 0
    line vty 0 4
    !
    end
    R1#
    第2段:路由器R2的配置清单
    R2#sh run
    Building configuration...
  
    Current configuration : 656 bytes
    !
    version 12.1
    service timestamps debug uptime
    service timestamps log uptime
    no service password-encryption
    !
    hostname R2
    !
    ip subnet-zero
    no ip finger
    !
    interface Ethemet0
     ip address 200.1.1.2 255.255.255.0
    !
    interface Serial0
     bandwidth 2000
     ip address 201.1.12.2 255.255.255.2;
    !
    router elgrp 100
     network 200.1.1.0
     network 201.1.12.0 0.0.0.3
     no auto-summary
     no eigrp log-neighbor-changes
    !
    ip classless
    ip http server
    !
    line con 0
    line aux 0
    line vty 0 4
    !
    end
    R2#
    第3段:路由器R3的配置清单
    R3#sh runn
    Building configuration...
  
    Current configuration : 702 bytes
    !
    version 12.1
    service timestamps debug uptime
    service timestamps log uptime
    no service password-encryption
    !
    hostname R3
    !
    ip subnet-zero
    no ip finger
    !
    interface Ethemet0
     ip address 200.1.1.3 255.255.255.0
    !
    interface Serial0
     bandwidth 2000
     ip address 201.1.13.2 255.255.255.252
    !
    router eigrp 100
     network 200.1.1.0
     network 201.1.13.0.0.0.0.3
     no auto-susmmary
     no eigrp log-neighbor-changes
    !
    ip classless
    ip http server
    !
    line con 0
    line aux 0
    line vty 04
    !
    end
    (1)在配置清单6-1的第1、2、3段中,分别对R1、R2和R3路由器的接口进行了配置。在配置过程中,应特别注意串行接口的DCE和DTE的区分,并且配置bandwidth参数;
    配置bandwidth参数的意义在于,可以使路由器正确计算相应的度量值,从而使路由表正确反映实际的拓扑和链路情况。EIGRP协议和IGRP协议一样,把带宽作为度量值的主要因子之一。在RIP协议的实验中。我们己经看到bandwidth命令对实际的路由选择不起作用,那是因为RIP协议的惟一度量值因子是跳数。
    (2)在EIGRP协议配置模式下,使用network命令来声明网段。
    与IGRP协议和RIP协议所不同的是,EIGRP协议的网段声明中,如果是主网地址(即A、B、C类的主网,没有划分于网的网络),只需输入此网络地址;如果是子网的话,则必须在网段号后面写入反掩码。
    反掩码是用广播地址(255.255.255.255)减去掩码地址所得到的地址。如掩码地址是255.255.255.0,则反掩码是0.0.0.255;掩码地址是255.255.255.252,则掩码地址是0.0.0.3。
    当然也可以在对子网的声明中只写入主网的网络地址,这表明此网络的所有子网都加入了EIGRP路由进程。
    (3)no auto-sumnary命令关闭了EIGRP协议的路由自动汇总功能,缺省的配置是自动汇总生效。在处理使用VLSM尤其是存在不连续的子网的网络中,通常需要关闭路由自动汇总功能。
    (4)no egrp-log-neighbor-changes是路由器的缺省配置,作用是不记录相邻路由器有关EIGRP协议的变化信息。
    下面通过有关的show命令查看配置完成后的结果,看是否实现了全网的连通,并查看有关配置和统计信息。详细结果见监测清单6-1。
    
    监测清单6-1 查看实验1配置结果

    第1段:杳看EIGRP路由信息
    R3#sh ip route
    Codes: C -connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRjP, EX - EIGRP external, 0 - 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, E - EGP
       i- IS-IS, LI - 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   200.1.1.0/24 is directly connected, Ethernet0
       201.1.13.0/30 is subnetted, 1 subnets
    C   201.1.13.0 is directly connected, Serial0
    201.1.12.0/30 is subnetted, 1 subnets
    D   201.1.12.0 [90/1817600] via 200,1.1.2,00:02:57, Ethernet0
    10.0.0.0/24 is subnetted, I mibnets
    D   10.1.1.0 [90/1920000] via 201.1,13,1,00:02:57, Seriai0
    R3#
    Term_Server>2
    [Resuming connection 1 to R1 ...]
    R2#
    R2#sh ip route eigrp
       201.1.13.0/30 is subnetted, 1 subnets
    D   201.1.13.0190/1817600) via 200.1.1.3, 00:07:31, Ethernet0
       10.0.0.0/24is subnetted,1 subnets
    D   10.1.1.0[90/1920000]via 201.1.1.12.1,00:07:26,Serial0
    R2#
    Term Server>1
    [Resuming connection 1 to R1 ...]
  
    R1#sh ip route etgrp
    D   200.1.1.0/24 [90/1817600] via 201.1.12,2, 00:07:40,
              [90/18176003 via 201.1.13.2,00:07:41,Serial1
    R1#
              [90/1817600] via 201.1.13.2, 00:07:41, Serial1
    R1#sh ip route 200.1.1.0
    Routing entry for 200.1.1.0/24
     Known via "eigrp 100", distance 90,metric 1817600, type internal
     Redistributing via eigrp 100
     Last update from 201.1.13.2 on Serial1, 00:35:12 ago)
     Routing Descriptor Blocks:
     *201.1.12.2, from 201.1,12.2,00:35:12 ago, via Serial0
      Route metric is 1817600, traffic share count is 1
      Total delay is 21000 microseconds, minimum bandwicll is. 1000 Kbit
      Reliability 255/255, minimum MTU 1500 bytes
      Loading 1/255, Hops 1
     201.1.13.2, from 201.1.13.2, 00:35:12 ago, via Serial1
      Route metric is 1817600, traffic share count is 1
      Total delay is 21000 microseconds, minimum banchvidt@ii 1000111
      Reliability 255/255, minimum MTU 1500 bytes
      Loading 1/255, Hops 1
    第2段:查看EIGRP协议配置信息
    R1#ship protocol
    Routing Protocol is "eigrp 100"
     Outgoing update filter list for all interfaces is
     Incoming update filter list for all interfaces is
     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 variance1
     Redistributing: eigrp 100
     Automatic network summarization is not in effect
     Routing for Networks:
      10.1.1.0/24
      201.1.12.0/30
      201.1.13.0/30
     Routing Information Sources:
      Gateway      Distance        Last Update
      (this router)    90          00:42:44
      201,1.12.2      90          00:35:29
      201.1.13.2      90          00:35:27
      Distance: internal 90 external 170
    第3段:查看EIGRP邻居路由器
    R1#sh ip eigrp neighbor
    IP-EIGRP neighbors for process 100
    H Address    Interface  Hold  Uptime  SRTT  RTO  Q  Seq Type
                   (sec)       (ms)     Cnt   Num
    1 201.1,13.2    Se1    12  00:36:09  20   200  0    6
    0 201.1.12.2    Se0    12  00:38:50  10   200  0    6
    R1#
  
  
    (1)在R3路由器上使用show ip route命令查看其路由表,可以看到有2个由EIGRP协议所获取的路由表项,分别是关于10.1.1.0/24网段和201.1.12.0/24网段的,前面的字母"D"代表EIGRP。
    至于为什么用"D"而不用"E"代表EIGRP,是因为"E"已经代表了EGP(外部网关协议),而"D"是DUAL(扩散更新算法,EEGRP的路由算法)的头一个字母的缘故。
    在路由表项中的"[90/1817600]",斜线前的数字"90"是EIGRP协议的管理距离;斜线后的数宇"1817600"是本条路由的度量值(Metric)。
    (2)使用show ip route eigrp命令可以只列出由ETGRP协议所获取的路由信息。
    (3)在R1路由器上查看路由表,显示对200.1.1.0/24于网有2条路径,即201.1.12.2(通过R2路由器)和201.1.13.2(通过R3路由器),这是相等度量值负载均衡的情况。在后续验中我们可以看到在EIGRP协议中不等度量值负载均衡的情况。
    (4)在R1上发出show ip route 200.1.1.0命令,查看对于网络地址为200.1.10的网段的路由表项的详细信息。信息包括:
    此网段是由EIGRP获取Known via"eigrp 100";
    对应的管理距离为90——distance 9O;
    相应的度量值为1817600——metric 1817600;
    路由类型为EIGRP内部路由type internal;
    最后一次更新的源地址。接口和时间Last update form 201.1.13.2 on Seriall,00:35:12 ago。
    本路由表项有2个路由源,即2O1.1.12.2(R2)和201.1.13.2(R3),对于每一个路由源,列表中给出了相应的Metric值,同时给出了延迟、带宽、可靠性。MTU和负载的值。
    (5)在第2段中,使用show ip protocol命令查看了有关EIGRP协议的配置信息和统计信息。其主要信息为:
    EIGRP的variance(变量)值为1,即只进行等度量值的负载均衡;
    自动汇总处于关闭状态;
    所路由的网络为10.1.1.0/24、201.1.12.0/30和201.1.13.0/30,这是通过network语句配置进R1路由器中的3个网段;
    路由信息源为201.1.12.2和201.1.13.2,即R2和R3,R1由这2个路由器学习来其他网段的路由信息。
    管理距离为:内部90,外部170。这里的内部指由EIGRP协议本身产生的路由信息,外部是指由其他协议再分发(Redistribute)过来的路由信息。这两者的管理距离是不同的,两者的可信程度的区别较大。
    (6)EIGRP协议能够在两个路由器之间交换路由信息的基础是它们彼此形成EIGRP邻居关系,成为EIGRP邻居。
    show ip eigrp neighbors命令列出了有关EIGRP邻居的信息摘要,我们主要关注其中的Address、Interfce和Uptime字段下对应的信息:
    Address项对应的是邻居路由器的IP地址;
    Interface项对应的接口是与邻居路由器相连的本路由器上的接口号;
    Uptime项对应的时间表示与相应的邻居路由器建立EIGRP邻接关系的时间。

        通过本章的实验,读者应该对在Cisco路由器上配置EIGRP协议的操作有了很全面的理解和掌握。
    为方便学习和使用,现将本章中涉及到的主要命令进行总结,见表6-1。
  




  • 上一个路由交换:
  • 下一个路由交换:
  •  
     最新图文
     热门文章
     推荐文章
    关于我们 | 发展历程 | 网站地图 | 广告服务 | 招贤纳士 | 战略合作 | 友情链接 | 著作声明 | 联系我们
    Copyright © 2002-2006 SYUE All rights reserved.
    E_mail:WebSyue@163.Com 皖ICP备05004589号
    在此特别感谢 “中国·华夏新科技” 提供CDN技术支持,祝他们越办越好