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



    各路由器使用的接口及其编号见图6-3中的标注。
    各接口IP地址分配如下:
    R1: 51 201.1.13.1/30, L0 192.1.1.1/24
    R2: 50 201.1.23.1/30, E0 200.1.1.2/24, L0 192.1.2.2/24
    R3: 50 201.1.23.2/30, S1 201.1.13.2/30, E0 200.1.1.3/24
    实验中R1、R3之间和R2、R3之间的串行线路速率设置为2000kbit/s。
  
    4.实验配置及监测结果
  
    首先对3台路由器进行接口配置和EIGRP基本配置,各路由器的配置见配置清单6-2。
  
    配置清单6-2实验3路由器基本配置
  
    第1段:R1路由器配置清单
    R1#sh runn
    Building configuration...
  
    Current configuratptime
    service timestamps log uptime
    no service password-encryption
    !
    hostname R1
    !
    ip subnet-zero
    !
    interface Loopback0
     ip address 192.1.1.1255.255.255.0
    !
    interface Serial 1
     bandwidth 2000
     ip address 201.1.13.1 255.255.255.252
     clockrate 2000000
    !
    router eigrp 200
     network 192.1.1.0
     network 201.1.13.0 0.0.0.3
     no auto-summary
     no eigrp Sog-neighbor-chailges
    !
    ip classless
    ip http server
    !
    line con 0
    line aux 0
    line vty 0 4
     password cisco
     login
    !
    end
    R1#
    第2段:R2路由器配置清单
    R2#sh run
    Building configuration...
  
    Current configuration : 733 bytes
    !
    version 12.1
    service timestamps debug uptime
    service timestamps log uptime
    no service password-encryption
    !
    hostname R2
    !
    no logging console
    ip subnet-zero
    no ip finger!
    !
    interface Loopback0
     ip address 192.1.2.2 255.255.255.0
    !
    interface Ethemet0
     ip address 200.1.1.2 255.255.255.0
    !
    interface Serial0
     bandwidth 2000
     ip address 201.1.23.1 255.255.255.252
    !
    router eigrp 200
     network 192.1.2.0
     network 200.1.1.0
     network 201.1.23.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 : 744 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.23.2 255.255.255.252
     no fair-queue
     clockrate 2000000
    !
    interface Serial 1
     bandwidth 2000
     ip address 201.1.13.2 255.255.255.252
    !
    router eigrp 200
     network 200.1.1.0
     network 201.1.13.0 0.0.0.3
     network 201.1.23.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 04
    !
    end
    对于上述配置,没有太多需要说明的,请读者注意串行接口配置和网络声明语句两处容易出现错误的部分。
  
    在以上EIGRP路由正常配置的基础上,我们来进行被动接口和不等度量值负载均衡方面的实验。监测清单6-3记录了实验的全过程。
监测清单6-3设置EIGRP被动接口及不等度量值负载均衡
  
    第1段:设置被动接口
    R3#sh ip route eigrp
    D   192.1.1.0/24[90/40640000]via 201.1.13.1,00:01:40,Serial1
    D   192.1.2.0/24[90/409600]via 200.1.12.1,00:03:36,Ethernet0
    R3#sh ip eigrp neighbor
    IP-EIGRP neighbors for process 200
    H Address     Interface  Hold Uptime  SRTT  RTO Q Seq Type
                     (sec)     (ms)    Cnt Num
    1 201.1.13.1    Se1     10 00:01:51  810  4860 0 10
    2 201.1.23.1    Se0     12 00:34:57  224  1344 0 23
    0 200.1.1.2     Et0     12 00:38:57  12  200  0 24
    R3#sh
    Enter configuration commands,one per line.End with CNTL/Z.
    R3(config)#router eigrp 200
    R3(config-router)#passive-interface s1
    R3(config-router)#^Z
    R3#sh
    01:40:23:%SYS-5-CONFIG_I:Configured from console by console
    R3:sh ip route eigrp
    D   192.1.2.0/24[90/409600]via 200.1.12.1,00:04:16,Ethernet0
    R3#sh ip eigr neighbor
    IP-EIGRP neighbor
    IP-EIGRP neighbors for process 200
    H  Address     Interface   Hold Uptime  SRTT  RTO Q Seq Type
                       (sec)     (ms)    Cnt Num
    2 201.1.13.1     Se0      11 00:35:35  149  894 0 28
    0 200.1.1,2      Et0      11 00:39:36  11  200 0 27
    R3#sh ip protocol
    Routing Protocol is "eigrp 200"
   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 variance 1
     Redistributing: eigrp 200
     Automatic network summarization is not in effect
     Routing for Networks:
      200.1.1.0
      201.1.13.0/30
      201.1.23.0/30
     Passive lnterface(s):
      Serial1
     Routing Information Sources:
      Gateway     Distance   Last Update
      201.1.13.1    90      00:02:39
      200.1.1.2    90       00:00:27
      201.1.23.1    90      00:00:27
     Distance: internal 90 external 170
    第2段:设置不等度量值负载均衡
    R3#
    R3#sh ip eigrp topology
    IP-EIGRP Topology Table for AS(200)/ID(201.1.23.2)
    Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
        r - reply Status, s - sia Status
    P 192.1.2,0/24, 1 successors, PD is 409600
        via 200.1.1.2(409600/128256),Ethernet0
    P201.1.13.1/30,1 successors,FD is 40512000
        via Connected, Serial1
    P 200.1,1.0/24, 1 successors,FD is 281600)
        via Connected,Ethernet0
    P201.1,23.0/30,1 successors,FD is 1792000
        via Connected, Setial0
    R3#conf t
    Enter configuration commands, one per line. End with CNTL/Z.
    R3(config)#router eigrp 200
    R3(config-router)#variance 5
    R3(config-router)#no passive-int si
    R3(config-router)#^Z
    R3#sh ip route
    Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - 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, 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
       201.1.23.0/30 is subnetted, i subnets
    C   201.1.23.01s directly connected, Serial0
    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, Serial1
    D   192.1.2.0/24[90/1920000]via 201.1.13.2,00:00:43, Serial1
    D   192.1.2.0/24[90/409600]via 200.1.1.2,00:00:43, Ethernet0
    R3#cle ip route *
    R3#sh ip route
    Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, 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, 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
       201.1.23.0/30 is subnetted, 1 subnets
    C   201.1.23.01s directly connected, Serial0
    C   200.1.1.0/24 is directly connected, Ethemet0
       201.1.13.0/30 is subnetted, 1 subnets
    C   201.1.13.01s directly connected. Serial 1
    D   192.1.1.0/24[90/1920000]via 201.1.13.1,00:00:02,Serial1
    D   192.1.2.0/24[90/409600]via 200.1.1.2,00:00:02,Ethernet0
             [90/1920000]via 201.1.23.1,00:00:02,Serial0
    R3#
    Term_Server>2
    [Resuming connection 2 to R2 ... ]
    R2#sh ip eigrp topology
    IP-EIGRP Topology Table for AS(200)/ID( 192.1.2.2)
    Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status
  
    P 192.1.1.0/24,1 successors,FD is 1945600
         via 200.1.1.3(1945600/1920000),Ethernet0
         via 201.1.23.2(2432000/1920000),Serial0
    P 192.1.2.0/24, 1 successors, FD is 128256
         via Connected, Loopback0
    P 201.1.13.0/30, 1 successors, FD is 1817600
         via 200.1.1.3(1817600/1792000),Ethernet0
         via 201.1.23.2(234000/1792000),Serial0
    P 200.1.1.0/24, 1 successors, FD is 281600
         via Connected, Ethemet0
    P 201.1.23.0/30, 1 successors, FD is 1792000
         via Connected, Serial0
    R2#sh ip route ei
       201.1.13.0/30 is subnetted, 0 subnets
    D   201.1.13.0[90/1817600]via 200.1.1.3,00:05:12,Ethernet0
    D   192.1.1.0/24[90/1945600]via 200.1.1.3,00:05:12,Ethernet0
    R2#conf t
    Enter configuration commands, one per line. End with CNTL/Z.
    R2(config)#router eigrp 200
    R2(config-router)#variance 5
    R2(ccmfig-router)#^Z
    R2#cle ip route *
    R2#sh ip route eigrp
       201.1.13.0/30 is subnetted, 1 subnets
    D   201.1.13.0 [90/1817600] via 200.1.1.3, 00:00:05, Ethernet0
             [90/2304000] via 201.1.23.2, 00:00:05, Serial0
    D   192.1.1.0/24 [90/1945600] via 200.1.1.3, 00:00:05,Ethernet0
  [90/2432000] via 201.1.23.2, 00:00:05, Serial0
    R2#
    R2#conft
    Enter configuration commands, one per line. End with CNTL/Z.
    R2(config)#router eigrp 200
    R2(config-router)#maximum-paths 1
    R2(config-router)#^Z
    R2#sh ip route eigrp
       201.1.13.0/30 is subnetted, 1 subnets
    D   201.1.13.0 [90/1817600] via 200.1.1.3,00;00:06, Ethernet0
    D   192.1.1.0/24 [90/1945600] via 200.1.1.3,00:00:06, Ethernet0
    R2#
    R2#sh ip prof
    Routing Protocol is "eigrp 200"
     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 variance 5
     Redistributing: eigrp 200
     Automatic network summarization is not in effect
     Routing for Networks:
      192.1.2.0
      200.1.1.0
      201.1.23.0/30
    Routing Information Sources:
     Gateway     Distance    Last Update
     200.1.1.3     90      00:06:55
     201.1.23.2     90      00:06:55
    Distance: internal 90 external 170
    (1)在第1段中,首先查看R3路由器的EIGRP路由表和邻居表。
  
    路由表中有2条由EIGRP获取的路由。
  
    通过3个接口S1、S0和E0,有3个EIGRP邻居存在,分别是R1、R2和R3。基中R2路由器由于通过2条链路(以太网和串行线路)与R3相连,在R3中产生了2个EIGRP邻居项。
    (2)在R3路由器上进入EIGRP协议配置模式,输入命令passive-interface s1,使S1接口成为被动接口。被动接口是不发送EIGRP相关信息包的接口。
    (3)clear ip route*命令清除路由表中的所有信息。以便及时反映最新的变化。
    (4)使用命令show ip route eigrp,显示由S1来向(与R1相连)的路由表项已经消失。
    (5)使用命令sh ip eigrp neighbor,显示由S1接口所连接的EIGRP邻居已经不存在。
    (6)(4)和(5)中两个命令的执行结果表明,使用被动接口命令后,不只是使R3路由器不通过S1接口向R1路由器发送路由信息这么简单,而是R3和R1之间的EIGRP邻居关系不再存在。从而任何有关EIGRP协议的互操作都不再进行,最终造成R3和R1之间的EIGRP路由信息不会被交换。
    (7)sh ip protocol命令显示了被动接口的配置和路由信息在配置更改后的结果。
    (8)在第2段中,演示了对不等度量值负载均衡的设置操作。
    用show ip eigrp topology命令查看EIGRP拓扑表,我们看下述信息:
    P 192.1.2.0/24,lsuccessors,FD is 409600
    via 200.1.1.2(409600/128256),Ethernet0
    via 201.1.23.(1920000/128256),Serial0
    表明对于192.1.2.0/24网段,有2条可用路径,其度量值分别为409600和1920000,后者是前者的近4.7倍。因为EIGRP协议缺省的变化量(Variance)值是1,所以只有前者相对应的路由进入路由表,被路由器在路由数据包时使用。
    (9)进入EIGRP协议配置模式,键入命令variance 5,即意味着针对同一目标网段,所具有与最小度量值(最佳路径的度量值)之比小于5的度量值的路径将被选中,进入路由表。variance命令参数的范围是从1到128。
    这里5大于4.7,所以(8)中所看到的2条路由都应该进入路由表。
    为了便于后续实验,在此使用no passive-int s1命令结束了S1的被动接口状态。
    (1O)sh ip route命令的结果显示路由表中对于192.1.2.0/24网段的路由表项没有增加。这是因为路由表并没有在发出variance指令后立即更新。
    (11)使用clear ip route,命令强迫路由器进行路由的重新计算后,再查看路由表,列在192.1.2.0/24网段下的路径己经变成预期中的2条。
    (12)设置了variance为5之后从R3到R2存在2条路由并不意味着反之亦然。查看R2路由器上的EIGRP拓扑表显示对于网段201.1.13.0/30和192.1.1.0/24而言,同样存在着从串行线路和以太网2条可达路径,而进入路由表的路由项则只有最佳的1条,即通过以太网接口的路径。
    (13)设置R2路由器EIGRP协议的variance值为5,经过相应的操作可以看到不等度量值负载均衡已经在R2上实现。
    (14)不等度量值负载均衡最终是否能真正实现,除了设置大于1的variance值之外,还要看路由协议允许的最大并行路径数 (maxmum-paths)。
    缺省配置下,maxmum-paths值为4,允许4条并行路径被选入路由表。maxmum-paths的可设置范围为从1到6的整数。
    实验中,我们设置R2的EIGRP协议申maxmum-paths为1,来限制并行路径的数量,命令路由器只选2条最佳路由进入路由表。show ip route eigrp指令的执行结果显示了命令生效后的结果,对于2个目标网段来说,分别只有1条路由项。
    (15)实验最后的show ip protocol命令显示了R2路由器的EIGRP协议配置信息,最值得关注的是其中的variance值已经变为5。
  • 上一个路由交换:
  • 下一个路由交换:
  •  
     最新图文
     热门文章
     推荐文章
    关于我们 | 发展历程 | 网站地图 | 广告服务 | 招贤纳士 | 战略合作 | 友情链接 | 著作声明 | 联系我们
    Copyright © 2002-2006 SYUE All rights reserved.
    E_mail:WebSyue@163.Com 皖ICP备05004589号
    在此特别感谢 “中国·华夏新科技” 提供CDN技术支持,祝他们越办越好