设为首页收藏本站language→→ 语言切换

鸿鹄论坛

 找回密码
 论坛注册

QQ登录

先注册再绑定QQ

查看: 1060|回复: 3
收起左侧

[分享] 思科设备配置新手篇--EIGRP

[复制链接]
 成长值: 59065
发表于 2018-10-11 13:20:42 | 显示全部楼层 |阅读模式

EIGRP基本配置命令解释:
1.router(config)#router eigrp 100
#激活EIGRP路由协议,并带上自治系统号100(自治系统号的取值范围是1~65535)在单台路由器上可以支持多个AS共存;EIGRP使用自治系统号来区别可共享路由信息的路由器集合。在不同的自治系统号之间的路由器不会自动共享路由信息,并且它们也不会成为邻居。当然路由信息可以通过“重分发”在不同的AS之间进行共享。这里需要注意的是一旦EIGRP配置了跟IGRP相同的自治系统号,EIGRP会自动将IGRP的路由信息重分发到EIGRP中。外部EIGRP路由的管理距离是170。
2.router(config-router)#net 192.168.1.0
#跟RIP协议一样,直接宣告直连网段的主类网络(掩码可以随路由更新一同被发送)。当然如果想要更精确的界定哪些接口启用EIGRP协议,可以配上通配符掩码。
3.router(config)#passive-interface s0/1
#将S0/1接口标记为被动接口。完成这个配置将会阻止此接口发送和接收HELLO数据包,这样做的结果是将会终止它们已经建立起来的邻居关系。这就意味着这个接口上不能在发送或接收路由信息了。这一点跟RIP协议有点不一样,RIP协议将某个接口设成被动接口以后只是停止发送路由更新但不阻止接收更新。
4.router(config-router)#maximum-paths number
#默认时,EIGRP可以支持最多4条的等价的负载均衡,使用这个命令可以使EIGRP用于实现等价负载均衡(即variance=1)的链路数量达到16条。
5.router(config-router)# variance number
#使用这个命令可以更改EIGRP的等价负载均衡为支持不等价的负载均衡,这个数值一般的取值为1~128。修改这个差异值可以使EIGRP在本地路由表中安置具有非等代价的多个、无环的路由条目。例如:如果这个值被设置成1,只有具有相同度量值的继任者才会被安置在本地路由表中。但是如果这个值设置成2,则任意一个由EIGRP了解的路由只要它的度量值小于继任者路由度量值的2倍,都将被安置在本地路由表中(当然,这个路由必须已经是一个可行的继任者路由)。
6.router(config-router)#metric maximum-hops
#默认时,EIGRP的最大跳计数值为100,我们可以通过这个命令来更改这个默认值,允许的范围是1~255。需要注意的是虽然EIGRP在路径计算中不使用跳计数,协议仍然会使用这个最大跳计数来限制AS的大小。
7.router(config-router)#redistribute rip metric bandwidthdelayreliabilityloadMTU
#配置RIP到EIGRP的“重分发”。语法中的bandwidth表示带宽(取值为1-4294967295),delay表示延迟(取值为0-4294967295),reliability表示可靠性(取值为0-255),load表示负载(取值为1-255),MTU表示最小MTU值(取值为1-65535)。
8.router(config)#int e0
router(config-if)#bandwidth number     #此命令用于指定带宽度量值(取值为1-10000000)
router(config-if)#delay number     #此命令用于指定延迟的度量值(取值为1-16777215)
9.router(config-if)#ip split-horizon     #开启接口水平分割

EIGRP实验
1.jpg
一 基本配置步骤
1.1 在Router8
Router#confi t
Router(config)#route eigrp 10
Router(config-router)#network 192.168.0.0
Router(config-router)#network 192.168.1.0
Router(config-router)#network 192.168.2.0
1.2 在Router2 上
Router#confi t
Router(config)#router eigrp 10
Router(config-router)#network 192.168.2.0
Router(config-router)#network 192.168.3.0
Router(config-router)#
1.3 在Router3 上
Router#confi t
Router(config)#router eigrp 10
Router(config-router)#network 192.168.4.0
Router(config-router)#network 192.168.3.0
Router(config-router)#
1.4 在Router4 上
Router#confi t
Router(config)#router eigrp 10
Router(config-router)#network 192.168.4.0
Router(config-router)#network 192.168.5.0
Router(config-router)#
1.5 在Router5 上
Router#confi t
Router(config)#router eigrp 10
Router(config-router)#network 192.168.5.0
Router(config-router)#network 192.168.6.0
Router(config-router)#network 192.168.7.0
Router(config-router)#
1.6 在Router7 上
Router#confi t
Router(config)#router eigrp 10
Router(config-router)#network 192.168.8.0
Router(config-router)#network 192.168.7.0
Router(config-router)#
1.7 在Router0 上
Router#confi t
Router(config)#router rip
Router(config-router)#network 192.168.8.0
Router(config-router)#network 192.168.9.0
Router(config-router)#version 2
Router(config-router)#
1.8 在Router1 上
Router#confi t
Router(config)#router eigrp 10
Router(config-router)#network 192.168.0.0
Router(config-router)#network 192.168.9.0
Router(config-router)#
二 检测配置结果
2.1 在Router8 上显示路由表
Router#show ip route
Codes: C - connected, S - static, I - IGRP, 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, 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
C 192.168.0.0/24 is directly connected, Serial3/0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
C 192.168.2.0/24 is directly connected, Serial2/0
D 192.168.3.0/24 [90/21024000] via 192.168.2.2, 00:04:24, Serial2/0
D 192.168.4.0/24 [90/21536000] via 192.168.2.2, 00:03:59, Serial2/0
D 192.168.5.0/24 [90/22048000] via 192.168.2.2, 00:03:35, Serial2/0
D 192.168.6.0/24 [90/22050560] via 192.168.2.2, 00:03:11, Serial2/0
[90/22050560] via 192.168.0.1, 00:00:53, Serial3/0
D 192.168.7.0/24 [90/22048000] via 192.168.0.1, 00:00:53, Serial3/0
D 192.168.8.0/24 [90/21536000] via 192.168.0.1, 00:00:53, Serial3/0
D 192.168.9.0/24 [90/21024000] via 192.168.0.1, 00:00:56, Serial3/0
Router#
可以看到192.168.6.0/24 网段的两条等价路由,管理距离是90 度量值22050560,
2.2 在Router8 上显示EIGRP 接口
Router#show ip eigrp interfaces
IP-EIGRP interfaces for process 10
Xmit Queue Mean Pacing Time Multicast
Pending
Interface Peers Un/Reliable SRTT Un/Reliable Flow Timer Routes
Fa0/0 0 0/0 1236 0/10 0 0
Ser2/0 1 0/0 1236 0/10 0 0
Ser3/0 1 0/0 1236 0/10 0 0
Router#
2.3 在PC0 上测试到PC1 的连通性
PC>ping 192.168.6.2
Pinging 192.168.6.2 with 32 bytes of data:
Request timed out.
Reply from 192.168.6.2: bytes=32 time=39ms TTL=123
Reply from 192.168.6.2: bytes=32 time=34ms TTL=123
Reply from 192.168.6.2: bytes=32 time=23ms TTL=123
Ping statistics for 192.168.6.2:
Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
Minimum = 23ms, Maximum = 39ms, Average = 32ms

三 关闭Router3 的S2/0 端口,模拟网络故障
3.1 在Router3 上
Router#confi t
Router(config)#int serial 2/0
Router(config-if)#shutdown
%LINK-5-CHANGED: Interface Serial2/0, changed state to administratively down
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial2/0, changed state to dow
3.2 立即查看Router8 的路由表
Router#show ip route
Codes: C - connected, S - static, I - IGRP, 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, 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
C 192.168.0.0/24 is directly connected, Serial3/0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
C 192.168.2.0/24 is directly connected, Serial2/0
D 192.168.3.0/24 [90/21024000] via 192.168.2.2, 00:01:03, Serial2/0
D 192.168.5.0/24 [90/22560000] via 192.168.0.1, 00:00:10, Serial3/0
D 192.168.6.0/24 [90/22050560] via 192.168.0.1, 00:13:58, Serial3/0
D 192.168.7.0/24 [90/22048000] via 192.168.0.1, 00:13:58, Serial3/0
D 192.168.8.0/24 [90/21536000] via 192.168.0.1, 00:13:58, Serial3/0
D 192.168.9.0/24 [90/21024000] via 192.168.0.1, 00:14:01, Serial3/0
Router#到192.168.6.0/24 立即变成了一条路径,收敛速度比RIP 快。
3.3 在PC0 上测试到PC1 连通性
PC>ping 192.168.6.2
Pinging 192.168.6.2 with 32 bytes of data:
Reply from 192.168.6.2: bytes=32 time=34ms TTL=123
Reply from 192.168.6.2: bytes=32 time=30ms TTL=123
Reply from 192.168.6.2: bytes=32 time=31ms TTL=123
Reply from 192.168.6.2: bytes=32 time=33ms TTL=123
Ping statistics for 192.168.6.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 30ms, Maximum = 34ms, Average = 32ms
网络立即处于稳定状态。

发表于 2018-10-11 14:24:54 | 显示全部楼层
感謝喬幫主!
沙发 2018-10-11 14:24:54 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2020-7-21 14:56:03 | 显示全部楼层
感謝樓主分享
地板 2020-7-21 14:56:03 回复 收起回复
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2024-4-19 18:55 , Processed in 0.058598 second(s), 10 queries , Redis On.  

  Powered by Discuz!

  © 2001-2024 HH010.COM

快速回复 返回顶部 返回列表