EIGRP负载均衡
- 格式:docx
- 大小:1.02 MB
- 文档页数:7
R1 192.168.12.0/24 R2 192.168.23.0/24 R3.3R4实验目的:1、掌握EIGRP等价负载均衡的实现方法2、掌握EIGRP非等价负载均衡的实现方法3、修改EIGRP度量值的方法4、可行距离(FD)、通告距离(RD)、可行性条件(FC)深层含义实验步骤:(思科网络实验室路由交换实验指南,梁广民,P81改编实验)1、配置R1-R4每个端口IP地址,打开端口。
2、R1(CONFIG)#ROUTER EIGRP 1R1(CONFIG-ROUTER)#NO AUTO-SUMKMARYR1(CONFIG-ROUTER)#NET 192.168.14.0R1(CONFIG-ROUTER)#NET 192.168.12.03、R2(CONFIG)#ROUTER EIGRP 1R2(CONFIG-ROUTER)#NO AUTO-SUMKMARYR2(CONFIG-ROUTER)#NET 192.168.12.0R2(CONFIG-ROUTER)#NET 192.168.23.0R2(CONFIG-ROUTER)#NET 2.2.2.0 255.255.255.04、R3(CONFIG)#ROUTER EIGRP 1R3(CONFIG-ROUTER)#NO AUTO-SUMKMARYR3(CONFIG-ROUTER)#NET 192.168.23.0R3(CONFIG-ROUTER)#NET 192.168.34.05、R4(CONFIG)#ROUTER EIGRP 1R4(CONFIG-ROUTER)#NO AUTO-SUMKMARYR4(CONFIG-ROUTER)#NET 192.168.14.0R4(CONFIG-ROUTER)#NET 192.168.34.0R4(CONFIG-ROUTER)#NET 4.4.4.0 255.255.255.0(R4#SHOW IP ROUTE Eigrp2.2.2.0/24 show ip eigrp)6、R1-R4测试互PING7、R4#SHOW IP ROUTE 发现有 D 2.2.2.0 [90/2300416] via 192.168.14.1, 00:01:55,FastEthernet0/0虽然R4到达R2的LO0有两条路径,但是路由器将FD最小的放入路由表,选择走F0/0接口。
对于路由方面的负载均衡,我们常说的就是eigrp这个负载均衡问题了。
那么在这个方面,可以从两个角度进行分析,包括对等和非对等。
那么我们将把这两个内容串联到设置过程中为大家讲解,加深一下印象。
1、EIGRP默认支持四条链路的不等代价的负载均衡(所有路由基本上都支持);2、使用下面命令可支持六条:router EIGRP 10maximum-paths 6——设置成6条variance——后跟差异度量值,实现负载均衡。差异值为1时,只有相同度量才会安置到本地路由表中,为2时,任一由EIGRP发现的了解的路由,只有其度量少于继任度量的两倍,将会被安置到本地的路由表中。EIGRP Load Balancing 非等价负载均衡每个路由协议都支持等值路径的负载均衡.除此之外,IGRP和EIGRP也支持不等值路径的负载均衡,使用variance命令. Variance命令向路由器通告一个n值,n值使用variance命令指定.n值为1-128之间,默认为1。router E有三个路径到网络X◆E-B-A with a metric of 30◆E-C-A with a metric of 20◆E-D-A with a metric of 45Router E选择第二个路径,E-C-A的metric为20,20为三个路径的最小值,如果希望EIGRP选择优先E-B-A路径,配置variance值为乘数2 router eigrp 1network x.x.x.xvariance 2这样增加了metric到40(2*20=40)。这样EIGRP包括了所有metric小于40的路由,在上面的配置中,路由器使用了两个路径到达网络X,E-C-A 和E-B-A,因为两个路径的metric值都在40以下。因为E-D-A的metric 为45,大于40,所以eigrp不选择此路径到达网络X。而且,路由器D报告到达网络X的metric为25,这个值比可行的metric值20要大。这就意味着即使variance设置为3,E- D-A路径也不会被选择为负载均衡的路径,因为router D不是一个可行的后继者。Traffic SharingEigrp不仅支持不等值路径的负载均衡,而且也支持智能负载均衡,例如traffic sharing。有多个路由到达同一目的网络有不同cost的情况下,想要控制在不同路由上的traffic,可以使用traffic sharing命令。使用balanced关键字,路由器按照不同路由的metrics比率成比例的分配流量。这是默认设置。
在做实验之前我想先解释一下实现EIGRP负载的一些知识(图)!一:思考如果R1想去去往R5的话,那么它面临着有3条路可以走,但是我们可以请注意到,3条路的度量值是不一样的,所以度量值不一样即不能实现负载均衡,于是R1就会选择R3做为它的下一跳,把它放入路由表当中,那我们怎样实现非等价负载呢(即带宽不一致的情况)?二:术语AD(Advertise Distance):宣告距离(邻居到某网络的距离)FD (Feasible Distance):可行距离(自己到某网络的距离)如图所示: 如果R1从R3到R5,那么它的AD=10,FD=20.注:这个一定得搞清,不然接下来都不知道我讲什么.三:条件1.如果我在R1配置R1(config-router)#variance 2的话,那么R2会做为R1的另一条去住R5的路径,因为2*(FD)>(20+10=30),即从R2到R5的FD小于R3到R5的FD,所以才能实现负载.2.如果我variance设置为3的话,那么按我刚刚所说的从R4到R5的FD也小于2*(FD),那它会被加入的负载路径里面去吗?答案肯定不会,因为还有一个条件就是AD必需小于FD,从R4到R5的AD为25,而从R3到R5的FD为20,所以不满足,不能实现负载.实验:拓扑如下注:首先说明一下,由于51CTO只允许写8万字,所以步骤一只写了R1的配置,其它一样步骤一:首先先把所以接口信息以及EIGRP全部启用,并且查看信息.R1:Router>Router>enRouter#conf tRouter(config)#hostname R1R1(config)#interface f0/0R1(config-if)#ip address 192.168.12.1 255.255.255.0R1(config-if)#no shR1(config-if)#ip address 192.168.13.1 255.255.255.0R1(config-if)#no shR1(config-if)#exitR1(config)#router eigrp 1R1(config-router)#no auto-summaryR1(config-router)#network 192.168.12.0 0.0.0.255R1(config-router)#network 192.168.13.0 0.0.0.255R1(config-if)#endR1#R1上查看路由表:R1#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - 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 - ODRP - periodic downloaded static routeGateway of last resort is not set4.0.0.0/24 is subnetted, 1 subnetsD 4.4.4.0 [90/158720] via 192.168.13.2, 00:00:06, FastEthernet0/1[90/158720] via 192.168.12.2, 00:00:06, FastEthernet0/0C 192.168.12.0/24 is directly connected, FastEthernet0/0C 192.168.13.0/24 is directly connected, FastEthernet0/1D 192.168.24.0/24 [90/30720] via 192.168.12.2, 00:04:00, FastEthernet0/0 D 192.168.34.0/24 [90/30720] via 192.168.13.2, 00:03:50, FastEthernet0/1 R1#注:很清楚的看到,去往4.4.4.4有两条路可以走,因为其度量值一样,EIGRP自动实现负载均衡,步骤二:R1设置F0/1接口带宽为512KB,其两边度量值不一样,使得所以数据只向F0/ 0转发,产查看路由表与拓扑表.R1(config)#interface f0/1R1(config-if)#bandwidth 512R1(config-if)#endR1#查看路由表:R1#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - 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 - ODRP - periodic downloaded static routeGateway of last resort is not set4.0.0.0/24 is subnetted, 1 subnetsD 4.4.4.0 [90/158720] via 192.168.12.2, 00:08:43, FastEthernet0/0C 192.168.12.0/24 is directly connected, FastEthernet0/0C 192.168.13.0/24 is directly connected, FastEthernet0/1D 192.168.24.0/24 [90/30720] via 192.168.12.2, 00:12:37, FastEthernet0/0 D 192.168.34.0/24 [90/33280] via 192.168.12.2, 00:01:04, FastEthernet0/0 R1#//这里因为改变F0/1了带宽,所以去住4.4.4.4全部往F0/0转发.只有一条.步骤三:实现非等价负载均衡R1(config)#router eigrp 1R1(config-router)#variance 32 // 32=5133056除以158720,满足条件.查看路由表:R1#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - 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 - ODRP - periodic downloaded static routeGateway of last resort is not set4.0.0.0/24 is subnetted, 1 subnetsD 4.4.4.0 [90/5133056] via 192.168.13.2, 00:00:02, FastEthernet0/1[90/158720] via 192.168.12.2, 00:00:01, FastEthernet0/0C 192.168.12.0/24 is directly connected, FastEthernet0/0C 192.168.13.0/24 is directly connected, FastEthernet0/1D 192.168.24.0/24 [90/30720] via 192.168.12.2, 00:00:01, FastEthernet0/0 D 192.168.34.0/24 [90/30720] via 192.168.13.2, 00:00:02, FastEthernet0/1 R1#// 去往4.4.4.4的路由,又变成了两条. 实验完毕.。
EIGRP等价和非等价负载均衡
2015.9.21 实验
等价负载均衡
1.所有的路由器都运行EIGRP,并且所有的网段都被宣告进路由中。
在R1的路由器上查看路由表关于4.0.0.0有两条负载均衡的路径。
show ip protocols
2.关闭EIGRP的等价负载均衡,使R1的路由表中只显示1条关于4.0.0.0路由。
配置命令
再次查看R1路由表去往4.0.0.0只有一条路径,在拓扑表中存在去往4.0.0.0的所有路径。
非等价负载均衡
在R1的路由表中去往4.0.0.0路由只有一条路径。
配置非等价负载均衡:
variance 后面的参数指的是FD值的倍数,默认是1 。
再查看R1的路由表,关于4.0.0.0有两条度量值不同的路径。
EIGRP 负载均衡实验R1:iinterface Serial2/0ip address 12.1.1.1 255.255.255.0serial restart-delay 0clock rate 64000!interface Serial2/1ip address 13.1.1.1 255.255.255.0serial restart-delay 0clock rate 64000router eigrp 100network 0.0.0.0no auto-summaryR2:interface FastEthernet0/0ip address 23.1.1.1 255.255.255.0 duplex autospeed autointerface Serial2/0ip address 12.1.1.2 255.255.255.0 serial restart-delay 0router eigrp 100network 0.0.0.0no auto-summaryR3:interface FastEthernet0/0ip address 23.1.1.2 255.255.255.0 duplex autospeed autointerface Serial2/1ip address 13.1.1.2 255.255.255.0 serial restart-delay 0router eigrp 100network 0.0.0.0no auto-summaryR3路由表:R3#show ip rouGateway of last resort is not set23.0.0.0/24 is subnetted, 1 subnetsC 23.1.1.0 is directly connected, FastEthernet0/012.0.0.0/24 is subnetted, 1 subnetsD 12.1.1.0 [90/2172416] via 23.1.1.1, 00:01:06, FastEthernet0/0 //去12.1.1.0网段via f0/013.0.0.0/24 is subnetted, 1 subnetsC 13.1.1.0 is directly connected, Serial2/1R3#show ip eigrp toIP-EIGRP Topology Table for AS(100)/ID(23.1.1.2)Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,r - reply Status, s - sia StatusP 12.1.1.0/24, 1 successors, FD is 2172416via 23.1.1.1 (2172416/2169856), FastEthernet0/0via 13.1.1.1 (2681856/2169856), Serial2/1P 13.1.1.0/24, 1 successors, FD is 2169856via Connected, Serial2/1P 23.1.1.0/24, 1 successors, FD is 28160via Connected, FastEthernet0/0//拓扑表中有两条可以到12.1.1.0网段的路径,F0/0和S1/1,经过s1/1那条路径的AD小于正在使用路由条目的FD2172416,所以被选为FS放在拓扑表中.要想实验负载均衡,可以用的办法:等价负载均衡(1):使得metric值相同1.改带宽(不推荐,因为改带宽要用107 去除,会得到小数,)2.改延迟,在R3上改f0/0 或s1/1其中的一个R3#show inter f0/0FastEthernet0/0 is up, line protocol is upHardware is AmdFE, address is cc02.07fc.0000 (bia cc02.07fc.0000) Internet address is 23.1.1.2/24MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,-----------------------------------------------------------------------R3#show int s2/1Serial2/1 is up, line protocol is upHardware is M4TInternet address is 13.1.1.2/24MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,先改s2/1R3(config-if)#delay ?<1-16777215> Throughput delay (tens of microseconds)延迟路由器会自动乘以10所以这里要改成和f0/0 的DLY一样只需R3(config-if)#delay 10R3#clear ip eigrp neighbors邻居关系重新建立R3#show ip eigrp toIP-EIGRP Topology Table for AS(100)/ID(23.1.1.2)Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply, r - reply Status, s - sia StatusP 12.1.1.0/24, 2 successors, FD is 2172416via 13.1.1.1 (2172416/2169856), Serial2/1via 23.1.1.1 (2172416/2169856), FastEthernet0/0P 13.1.1.0/24, 1 successors, FD is 1660416via Connected, Serial2/1P 23.1.1.0/24, 1 successors, FD is 28160via Connected, FastEthernet0/0R3#show ip routeGateway of last resort is not set23.0.0.0/24 is subnetted, 1 subnetsC 23.1.1.0 is directly connected, FastEthernet0/012.0.0.0/24 is subnetted, 1 subnetsD 12.1.1.0 [90/2172416] via 23.1.1.1, 00:01:08, FastEthernet0/0 [90/2172416] via 13.1.1.1, 00:01:08, Serial2/113.0.0.0/24 is subnetted, 1 subnetsC 13.1.1.0 is directly connected, Serial2/1metric值已经相同,路由表中有两条路由,负载均衡成功!当然也可以修改f0/0R3(config)#int f0/0R3(config-if)#delay 2000 一样可能达到负载均衡的效果等价负载均衡(2): offset-listP 12.1.1.0/24, 1 successors, FD is 2172416via 23.1.1.1 (2172416/2169856), FastEthernet0/0via 13.1.1.1 (2681856/2169856), Serial2/1R3(config)#access-list 1 permit 12.1.1.0R3(config)#router eigrp 100R3(config-router)#offset-list 1 in 509440 f0/0在这里只能改小的,大的减小的即为偏移的值,其中有个参数”in”,如果对自己产生影响用”in”如果对外面产生影响用”out”,509440是偏移值,后面还有个接口,是说,在这个接口上加上偏移值,如果不定义接口,默认在所有接口加偏移值.R3#show ip routGateway of last resort is not set23.0.0.0/24 is subnetted, 1 subnetsC 23.1.1.0 is directly connected, FastEthernet0/012.0.0.0/24 is subnetted, 1 subnetsD 12.1.1.0 [90/2681856] via 23.1.1.1, 00:00:04, FastEthernet0/0 [90/2681856] via 13.1.1.1, 00:00:04, Serial2/113.0.0.0/24 is subnetted, 1 subnetsC 13.1.1.0 is directly connected, Serial2/1不等价负载均衡:varianceP 12.1.1.0/24, 1 successors, FD is 2172416via 23.1.1.1 (2172416/2169856), FastEthernet0/0via 13.1.1.1 (2681856/2169856), Serial2/1R3(config)#router eigrp 100R3(config-router)#varR3(config-router)#variance ?<1-128> Metric variance multiplierR3(config-router)#variance 2R3#show ip rouGateway of last resort is not set23.0.0.0/24 is subnetted, 1 subnetsC 23.1.1.0 is directly connected, FastEthernet0/012.0.0.0/24 is subnetted, 1 subnetsD 12.1.1.0 [90/2172416] via 23.1.1.1, 00:00:45, FastEthernet0/0[90/2681856] via 13.1.1.1, 00:00:45, Serial2/113.0.0.0/24 is subnetted, 1 subnetsC 13.1.1.0 is directly connected, Serial2/1Variance 默认为1,以最小的取一个倍数大于或者等于最大的.就可以实现不等价负载均衡负载均衡默认时最大支持4条,修改后最大支持6条路径当两条路负载均衡的时候,是不是各走一个包呢?不是,以前是按6:1算,即一条走6个另外一条走1个,现在新版本的IOS按实际的带宽得出一个比例R3#show ip route 12.1.1.0Routing entry for 12.1.1.0/24Known via "eigrp 100", distance 90, metric 2172416, type internal Redistributing via eigrp 100Last update from 13.1.1.1 on Serial2/1, 00:02:12 agoRouting Descriptor Blocks:* 23.1.1.1, from 23.1.1.1, 00:02:12 ago, via FastEthernet0/0Route metric is 2172416, traffic share count is 120Total delay is 20100 microseconds, minimum bandwidth is 1544 Kbit Reliability 255/255, minimum MTU 1500 bytesLoading 1/255, Hops 113.1.1.1, from 13.1.1.1, 00:02:12 ago, via Serial2/1Route metric is 2681856, traffic share count is 97Total delay is 40000 microseconds, minimum bandwidth is 1544 Kbit Reliability 255/255, minimum MTU 1500 bytesLoading 1/255, Hops 1带”*”说明下一个包走这个路,关掉快速转发R3(config)#no ip cef用扩展PING当PING到第N个包时就会走下面的13.1.1.1为了只要我们PING的目的网段的包,可以加一条扩展的ACLR3(config)#access-list 100 permit icmp any anyR3#debug ip packet 100*Mar 1 01:04:54.543: IP: s=23.1.1.1 (FastEthernet0/0), d=23.1.1.2 (FastEthernet0/0), len 100, rcvd 3*Mar 1 01:04:55.367: IP: s=13.1.1.2 (local), d=12.1.1.0 (Serial2/1), len 100, sending*Mar 1 01:04:55.427: IP: tableid=0, s=13.1.1.1 (Serial2/1), d=13.1.1.2 (Serial2/1), routed via RIB*Mar 1 01:04:55.431: IP: s=13.1.1.1 (Serial2/1), d=13.1.1.2 (Serial2/1), len 100, rcvd 3*Mar 1 01:04:55.475: IP: tableid=0, s=13.1.1.2 (local), d=12.1.1.0 (Serial2/1), routed via RIB。
EIGRP负载均衡过程全解EIGRP(Enhanced Interior Gateway Routing Protocol)是一种边界网关协议(IGP),用于在网络中实现动态路由并实现负载均衡。
EIGRP负载均衡过程是一种自适应算法,它在网络中的不同路径之间分配流量,并确保数据包能够快速有效地到达目的地。
以下是EIGRP负载均衡过程的全面解释。
1. EIGRP邻居关系建立:EIGRP路由器之间的邻居关系是通过发送和接收Hello消息来建立的。
当一个路由器在接口上收到另一个EIGRP路由器的Hello消息时,它将认定这个路由器是它的邻居,并开始进行邻居关系的建立过程。
邻居关系建立后,路由器将周期性地发送和接收更新消息。
2.路由信息交换:一旦EIGRP邻居关系建立,路由器将开始交换路由信息。
在EIGRP脊柱路由器(也称为核心路由器)之间,会进行完整路由表的交换。
在非脊柱路由器之间,则会交换部分路由表信息。
路由器通过EIGRP更新消息广播自己的路由表,并监听其他路由器发送的路由信息。
3. 路由信息选择:EIGRP使用DUAL(Diffusing Update Algorithm)算法来选择最佳路径。
DUAL考虑了带宽、延时、可靠性和MTU等因素,来选择最佳路径。
每个路由器都维护一个路由表,其中包含可以达到目的地的所有路径和相关的度量指标。
路由器使用DUAL算法来选择具有最佳度量指标的路径,并将其加入到路由表中。
4.负载均衡:当存在多条等价路径时,EIGRP可以通过在这些路径间分配流量来实现负载均衡。
通过将数据流量分发到多个路径,可以减轻网络中一些路径的负载,提高整个网络的性能。
EIGRP默认情况下支持等价路径的负载均衡,但也可以通过配置来修改负载均衡的行为。
-路由器获得多个到达目的地的等价路径。
-路由器在其路由表中选择最佳路径,并将其用作主路径。
-路由器计算其他路径的可用带宽,并将其加入到负载均衡列表中。
Eigrp的认证,路由,非等价负载均衡配置R1配置:uilding configuration...Current configuration : 1049 bytes!version 12.4service timestamps debug datetime msecservice timestamps log datetime msecno service password-encryption!hostname R1!boot-start-markerboot-end-marker!!no aaa new-modelmemory-size iomem 5!!ip cefno ip domain lookup!key chain chai // 配置eigrp的认证钥匙链key 10 //配置密钥号key-string cisco //配置密钥为cisco!!!!interface FastEthernet0/0ip address 192.168.3.1 255.255.255.0duplex autospeed auto!interface Serial1/0ip address 192.168.1.1 255.255.255.0ip authentication mode eigrp 100 md5 //加密方式为md5ip authentication key-chain eigrp 100 chai //使用chai这个加密参数进行加密serial restart-delay 0!interface Serial1/1no ip addressshutdownserial restart-delay 0!interface Serial1/2no ip addressshutdownserial restart-delay 0!interface Serial1/3no ip addressshutdownserial restart-delay 0!router eigrp 100variance 2 //根据最大fd除以最小fd的方法来算得variance值,用以非等价负载均衡network 192.168.1.0network 192.168.3.0no auto-summary!ip http serverno ip http secure-server!!!!!control-plane!!!!!!!!!!line con 0exec-timeout 0 0no editingline aux 0line vty 0 4!!EndR1的路由表:Gateway of last resort is not setC 192.168.1.0/24 is directly connected, Serial1/0D 192.168.2.0/24 [90/2172416] via 192.168.3.2, 01:48:28, FastEthernet0/0[90/2681856] via 192.168.1.2, 01:48:28, Serial1/0C 192.168.3.0/24 is directly connected, FastEthernet0/0可以看到两条线路的metric值是不一样的,这就实现了负载均衡。
EIGRP路由协议EIGRP(Enhanced Interior Gateway Routing Protocol)是一种用于IP网络中的路由协议,它是基于距离矢量算法的一种增强型路由协议。
EIGRP是思科(Cisco)公司开发的一种专有协议,它可以在广域网(WAN)和局域网(LAN)中实现快速而可靠的路由选择。
1.快速收敛:EIGRP使用了增量更新的技术,只发送那些关于路由更新的部分,这样可以大大减少网络流量和带宽占用。
同时,EIGRP还使用了可靠的传输机制,确保路由信息的可靠传输。
这些技术使EIGRP能够快速地收敛,即使在大规模网络中也能保持网络的高效性能。
2.支持多种网络:EIGRP可以在多种网络环境中使用,包括IPv4和IPv6网络。
它可以在IP网络中与其他路由协议如OSPF(Open Shortest Path First Protocol)和RIP(Routing Information Protocol)共存,实现灵活的路由选择。
3.优先选择:EIGRP通过使用带有可调节的距离和可靠性因子来决定最佳路径。
这些因素可以根据网络的特点和要求进行调整,以便选择最佳路径。
此外,EIGRP还考虑了网络负载和延迟等因素,以确保选择的路径能够满足网络需求。
4.支持VLSM:EIGRP可以使用可变长度子网掩码(VLSM)来实现更有效的IP地址分配。
VLSM允许网络管理员将一个大的IP地址块分割为大小不同的子网,以适应不同的网络需求。
这种灵活性使网络管理更加简单和有效。
5.可扩展性:EIGRP使用了基于分层的路由转发算法,将网络划分为多个区域,并在每个区域中使用不同的路由器来进行路由计算。
这种分层的设计使EIGRP能够自动适应网络的扩展,将网络划分为更小的区域,以减少路由器之间的通信负载,提高网络的可扩展性。
6.支持可靠性:EIGRP使用了可靠性机制来确保路由信息的可靠传输。
当有路由信息发生变化时,EIGRP会将更新信息广播给周围的路由器,并等待对方的响应。
EIGRP发布和负载实验拓扑:实验要求:第一步:配置EIGRP路由协议,达到全网互连。
并实现EIGRP手动汇总的特性。
第二步:通过配置达到多条路径负载均衡,分别实现等价和非等价的负载均衡。
首先我们来回顾一下EIGRP的特性和原理:EIGRP是CISCO专有的增强内部网关路由选择协议,EIGRP也是一种距离向量协议,不同的是EIGRP有着OSPF的特性,它的工作原理也依赖于三张表,邻居表,拓扑表和路由表。
EIGRP的特性包括:快速收敛,无环路拓扑,VLSM与路由汇总,组播和增量更新。
最重要的两点就是,EIGRP的收敛时间比OSPF更快和永无环路。
EIGRP使用扩算更新算法(DUAL)来更新路由选择表,该算法通过在本地拓扑表中储存邻居的路由选择信息来实现非常快速的收敛,如果路由选择表中的主要路由失效,不需要与相邻的路由交谈来寻找前往接收站的替代路径,DUAL可以从拓扑表中取出备份路由,并将其放入到路由选择表中。
EIGRP的拓扑表里面保存着FD可行距离和AD通告距离,FD就是源到达目标的总共距离,AD是源的下一跳到达目标的距离,通常情况下只要AD大于FD就会产生环路,EIGRP正充分的利用了这一特点,只要AD大于FD,EIGRP就在拓扑表中将其排除,并且备份的AD大于FD的话也将被排除,这样就达到了一个永无环路的目的。
现在开始我们的实验:第一步实验:R1:Router(config)#host r1r1(config)#line con 0r1(config-line)#logging synr1(config-line)#exitr1(config)#no ip domain-lookupr1(config)#interface fa0/0r1(config-if)#ip add 172.16.1.1 255.255.255.0r1(config-if)#no shutr1(config)#interface s1/1r1(config-if)#clock rate 64000r1(config-if)#ip address 11.1.1.1 255.255.255.0 r1(config-if)#no shutr1(config-if)#int s1/2r1(config-if)#clock rate 64000r1(config-if)#ip address 10.1.1.1 255.255.255.0 r1(config-if)#no shutr1(config-if)#exitr1(config)#router eigrp 100r1(config-router)#no auto-summaryr1(config-router)#net 172.16.1.0r1(config-router)#net 11.1.1.0r1(config-router)#net 10.1.1.0R2:Router(config)#host r2r2(config)#line console 0r2(config-line)#logging synchronousr2(config-line)#exitr2(config)#no ip domain-lookupr2(config)#interface s1/0r2(config-if)#clock rate 64000r2(config-if)#ip address 11.1.1.2 255.255.255.0 r2(config-if)#no shutdownr2(config-if)#interface s1/1r2(config-if)#clock rate 64000r2(config-if)#ip address 22.1.1.1 255.255.255.0 r2(config-if)#no shutdownr2(config-if)#exitr2(config)#router eigrp 100r2(config-router)#no auto-summaryr2(config-router)#net 11.1.1.0r2(config-router)#net 22.1.1.0R3:Router(config)#host r3r3(config)#line console 0r3(config-line)#logging synchronousr3(config-line)#exitr3(config)#no ip domain-lookupr3(config)#interface s1/0r3(config-if)#clock rate 64000r3(config-if)#ip address 22.1.1.2 255.255.255.0 r3(config-if)#no shutdownr3(config-if)#interface s1/2r3(config-if)#clock rate 64000r3(config-if)#ip address 33.1.1.1 255.255.255.0r3(config-if)#no shutdownr3(config-if)#exitr3(config)#router eigrp 100r3(config-router)#no auto-summaryr3(config-router)#net 22.1.1.0r3(config-router)#net 33.1.1.0R4:Router(config)#hostname r4r4(config)#line console 0r4(config-line)#logging synchronousr4(config-line)#exitr4(config)#no ip domain-lookupr4(config)#interface s1/2r4(config-if)#clock rate 64000r4(config-if)#ip address 33.1.1.2 255.255.255.0r4(config-if)#no shutdownr4(config-if)#interface s1/0r4(config-if)#clock rate 64000r4(config-if)#ip address 10.1.1.2 255.255.255.0r4(config-if)#no shutdownr4(config-if)#interface loo0r4(config-if)#ip address 192.168.1.1 255.255.255.0r4(config-if)#no shutdownr4(config-if)#interface loo1r4(config-if)#ip address 192.168.5.1 255.255.255.0r4(config-if)#no shutdownr4(config-if)#interface loo2r4(config-if)#ip address 192.168.9.1 255.255.255.0r4(config-if)#no shutdownr4(config-if)#exitr4(config)#router eigrp 100r4(config-router)#no auto-summaryr4(config-router)#net 33.1.1.0r4(config-router)#net 10.1.1.0r4(config-router)#net 192.168.1.0r4(config-router)#net 192.168.5.0r4(config-router)#net 192.168.9.0上面所有的配置完成后,我们来查看一下路由表:R1:r1#show ip route 我们可以看到R1已经学习到所有的路由条目了。
配置过程如下:----PC1的配置-------PC1(config)#no ip routingPC1(config)#ip default-gateway 10.1.1.1PC1(config)#interface e0/0PC1(config-if)#ip address 10.1.1.100 255.255.255.0 PC1(config-if)#no shutdownPC1(config-if)#endPC1#----PC2的配置-------PC2#configure terminalPC2(config)#no ip routingPC2(config)#ip default-gateway 192.168.1.2PC2(config)#interface e0/0PC2(config-if)#ip address 192.168.1.100 255.255.255.0 PC2(config-if)#no shutdownPC2(config-if)#end----R1的配置-------R1#configure terminalR1(config)#interface f0/0R1(config-if)#ip address 10.1.1.1 255.255.255.0R1(config-if)#no shutdownR1(config-if)#interface s1/0R1(config-if)#ip address 12.12.12.1 255.255.255.0R1(config-if)#no shutdownR1(config-if)#interface s1/1R1(config-if)#ip address 21.21.21.1 255.255.255.0R1(config-if)#no shutdownR1(config-if)#exitR1(config)#router eigrp 100R1(config-router)#network 10.1.1.0 0.0.0.255R1(config-router)#network 12.12.12.0 0.0.0.255R1(config-router)#network 21.21.21.0 0.0.0.255R1(config-router)#no auto-summaryR1(config-router)#endR1#----R2的配置-------R2#configure terminalR2(config)#interface s1/0R2(config-if)#bandwidth 64R2(config-if)#ip address 12.12.12.2 255.255.255.0R2(config-if)#no shutdownR2(config-if)#interface s1/1R2(config-if)#bandwidth 128R2(config-if)#ip address 21.21.21.2 255.255.255.0R2(config-if)#no shutdownR2(config-if)#interface f0/0R2(config-if)#ip address 192.168.1.2 255.255.255.0R2(config-if)#no shutdownR2(config-if)#exitR2(config)#router eigrp 100R2(config-router)#network 192.168.1.0 0.0.0.255R2(config-router)#network 12.12.12.0 0.0.0.255R2(config-router)#network 21.21.21.0 0.0.0.255R2(config-router)#!variance 2R2(config-router)#no auto-summaryR2(config-router)#endR2#快捷配置方式,直接在SecurCRT标签中粘贴即可,SecurCRT的使用参考/bbs/viewthread.php?tid=186----PC1的配置-------configure terminalno ip routingip default-gateway 10.1.1.1interface e0/0ip address 10.1.1.100 255.255.255.0no shutdownend----PC2的配置-------configure terminalno ip routingip default-gateway 192.168.1.2interface e0/0ip address 192.168.1.100 255.255.255.0 no shutdownend----R1的配置-------configure terminalinterface f0/0ip address 10.1.1.1 255.255.255.0no shutdowninterface s1/0ip address 12.12.12.1 255.255.255.0no shutdowninterface s1/1ip address 21.21.21.1 255.255.255.0no shutdownexitrouter eigrp 100network 10.1.1.0 0.0.0.255network 12.12.12.0 0.0.0.255 network 21.21.21.0 0.0.0.255no auto-summaryend----R2的配置-------configure terminalinterface s1/0bandwidth 64ip address 12.12.12.2 255.255.255.0no shutdowninterface s1/1bandwidth 128ip address 21.21.21.2 255.255.255.0no shutdowninterface f0/0ip address 192.168.1.2 255.255.255.0 no shutdownexitrouter eigrp 100network 192.168.1.0 0.0.0.255 network 12.12.12.0 0.0.0.255 network 21.21.21.0 0.0.0.255no auto-summaryend验证:在没有修改variance的值之前,在R2上显示路由表R2#show ip routeGateway of last resort is not set21.0.0.0/24 is subnetted, 1 subnetsC 21.21.21.0 is directly connected, Serial1/110.0.0.0/24 is subnetted, 1 subnetsD 10.1.1.0 [90/20514560] via 21.21.21.1, 00:04:53, Serial1/112.0.0.0/24 is subnetted, 1 subnetsC 12.12.12.0 is directly connected, Serial1/0C 192.168.1.0/24 is directly connected, FastEthernet0/0可以看到只有一条到达10.1.1.0 的路径。
非等价负载均衡如图:R1通过R2到R3走的是Serial线路。
R1通过R4到R3走的是Ethernet线路。
因此是非等价的。
通常在这种情况下,路由表中只有R1->R4->R3一条路由。
现在我们通过非等价负载均衡的办法,将两条路由都放进路由表中。
环境配置R1Router>enableRouter#configure terminalRouter(config)#hostname r1r1(config)#line console 0r1(config-line)#logging synchronousr1(config-line)#exec-timeout 0r1(config-line)#exitr1(config)#interface loopback 0r1(config-if)#ip address 1.1.1.1 255.255.255.0r1(config-if)#exitr1(config)#interface serial 1/2r1(config-if)#ip address 12.12.12.1 255.255.255.252r1(config-if)#no shutdownr1(config-if)#exitr1(config)#interface ethernet 0/0r1(config-if)#ip address 12.12.12.9 255.255.255.252 r1(config-if)#no shutdownr1(config-if)#exitr1(config)#router eigrp 1r1(config-router)#network 1.1.1.1 0.0.0.255r1(config-router)#network 12.12.12.1 0.0.0.3r1(config-router)#network 12.12.12.9 0.0.0.3r1(config-router)#no auto-summaryr1(config-router)#exitr1(config)#exitR2Router>enableRouter#configure terminalRouter(config)#hostname r2r2(config)#line console 0r2(config-line)#logging synchronousr2(config-line)#exec-timeout 0r2(config-line)#exitr2(config)#interface loopback 0r2(config-if)#ip address 2.2.2.2 255.255.255.0r2(config-if)#exitr2(config)#interface serial 1/3r2(config-if)#ip address 12.12.12.2 255.255.255.252 r2(config-if)#no shutdownr2(config-if)#exitr2(config)#interface serial 1/2r2(config-if)#ip address 12.12.12.5 255.255.255.252 r2(config-if)#no shutdownr2(config-if)#exitr2(config)#router eigrp 1r2(config-router)#network 2.2.2.2 0.0.0.255r2(config-router)#network 12.12.12.2 0.0.0.3r2(config-router)#network 12.12.12.5 0.0.0.3r2(config-router)#no auto-summaryr2(config-router)#exitr2(config)#exitR3Router>enableRouter#configure terminalRouter(config)#hostname r3r3(config)#line console 0r3(config-line)#logging synchronousr3(config-line)#exec-timeout 0r3(config-line)#exitr3(config)#interface loopback 0r3(config-if)#ip address 3.3.3.3 255.255.255.0r3(config-if)#exitr3(config)#interface serial 1/3r3(config-if)#ip address 12.12.12.6 255.255.255.252 r3(config-if)#no shutdownr3(config-if)#exitr3(config)#interface ethernet 0/1r3(config-if)#ip address 12.12.12.4 255.255.255.252 r3(config-if)#no shutdownr3(config-if)#exitr3(config)#router eigrp 1r3(config-router)#network 3.3.3.3 0.0.0.255r3(config-router)#network 12.12.12.6 0.0.0.3r3(config-router)#network 12.12.12.14 0.0.0.3r3(config-router)#no auto-summaryr3(config-router)#exitr3(config)#exitR4Router>enableRouter#configure terminalRouter(config)#hostname r4R4(config)#line console 0R4(config-line)#logging synchronousr4(config-line)#exec-timeout 0r4(config-line)#exitr4(config)#interface loopback 0r4(config-if)#ip address 4.4.4.4 255.255.255.0r4(config-if)#exitr4(config)#interfaceethernet0/0r4(config-if)#ip address 12.12.12.10 255.255.255.252 r4(config-if)#no shutdownr4(config-if)#exitr4(config)#interfaceethernet0/1r4(config-if)#ip address 12.12.12.13 255.255.255.252r4(config-if)#no shutdownr4(config-if)#exitr4(config)#router eigrp 1r4(config-router)#network 4.4.4.4 0.0.0.255r4(config-router)#network 12.12.12.10 0.0.0.3r4(config-router)#network 12.12.12.13 0.0.0.3r4(config-router)#no auto-summaryr4(config-router)#exitr4(config)#exit显示路由表R1r1#show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static routeGateway of last resort is not set1.0.0.0/24 is subnetted, 1 subnetsC 1.1.1.0 is directly connected, Loopback02.0.0.0/24 is subnetted, 1 subnetsD 2.2.2.0 [90/2297856] via 12.12.12.2, 00:03:09, Serial1/23.0.0.0/24 is subnetted, 1 subnetsD 3.3.3.0 [90/435200] via 12.12.12.10, 00:02:23, Ethernet0/04.0.0.0/24 is subnetted, 1 subnetsD 4.4.4.0 [90/409600] via 12.12.12.10, 00:02:23, Ethernet0/012.0.0.0/30 is subnetted, 4 subnetsD 12.12.12.12 [90/307200] via 12.12.12.10, 00:02:24, Ethernet0/0C 12.12.12.8 is directly connected, Ethernet0/0D 12.12.12.4 [90/2221056] via 12.12.12.10, 00:02:23, Ethernet0/0 C 12.12.12.0 is directly connected, Serial1/2r1#show ipeigrp topologyIP-EIGRP Topology Table for AS(1)/ID(1.1.1.1)Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,r - reply Status, s - sia StatusP 12.12.12.12/30, 1 successors, FD is 307200via 12.12.12.10 (307200/281600), Ethernet0/0P 1.1.1.0/24, 1 successors, FD is 128256via Connected, Loopback0P 2.2.2.0/24, 1 successors, FD is 2297856via 12.12.12.2 (2297856/128256), Serial1/2P 3.3.3.0/24, 1 successors, FD is 435200via 12.12.12.10 (435200/409600), Ethernet0/0P 4.4.4.0/24, 1 successors, FD is 409600via 12.12.12.10 (409600/128256), Ethernet0/0P 12.12.12.8/30, 1 successors, FD is 281600via Connected, Ethernet0/0P 12.12.12.4/30, 1 successors, FD is 2221056via 12.12.12.10 (2221056/2195456), Ethernet0/0via 12.12.12.2 (2681856/2169856), Serial1/2P 12.12.12.0/30, 1 successors, FD is 2169856via Connected, Serial1/2R2r2#show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static routeGateway of last resort is not set1.0.0.0/24 is subnetted, 1 subnetsD 1.1.1.0 [90/2297856] via 12.12.12.1, 00:17:48, Serial1/32.0.0.0/24 is subnetted, 1 subnetsC 2.2.2.0 is directly connected, Loopback03.0.0.0/24 is subnetted, 1 subnetsD 3.3.3.0 [90/2297856] via 12.12.12.6, 00:17:48, Serial1/24.0.0.0/24 is subnetted, 1 subnetsD 4.4.4.0 [90/2323456] via 12.12.12.6, 00:17:48, Serial1/2[90/2323456] via 12.12.12.1, 00:17:48, Serial1/312.0.0.0/30 is subnetted, 4 subnetsD 12.12.12.12 [90/2195456] via 12.12.12.6, 00:17:49, Serial1/2D 12.12.12.8 [90/2195456] via 12.12.12.1, 00:17:48, Serial1/3C 12.12.12.4 is directly connected, Serial1/2r2#show ipeigrp topologyIP-EIGRP Topology Table for AS(1)/ID(2.2.2.2)Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,r - reply Status, s - sia StatusP 12.12.12.12/30, 1 successors, FD is 2195456via 12.12.12.6 (2195456/281600), Serial1/2via 12.12.12.1 (2221056/307200), Serial1/3P 1.1.1.0/24, 1 successors, FD is 2297856via 12.12.12.1 (2297856/128256), Serial1/3via 12.12.12.6 (2349056/435200), Serial1/2P 2.2.2.0/24, 1 successors, FD is 128256via Connected, Loopback0P 3.3.3.0/24, 1 successors, FD is 2297856via 12.12.12.6 (2297856/128256), Serial1/2via 12.12.12.1 (2349056/435200), Serial1/3P 4.4.4.0/24, 2 successors, FD is 2323456via 12.12.12.1 (2323456/409600), Serial1/3via 12.12.12.6 (2323456/409600), Serial1/2P 12.12.12.8/30, 1 successors, FD is 2195456via 12.12.12.1 (2195456/281600), Serial1/3via 12.12.12.6 (2221056/307200), Serial1/2P 12.12.12.4/30, 1 successors, FD is 2169856Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,r - reply Status, s - sia Statusvia Connected, Serial1/2P 12.12.12.0/30, 1 successors, FD is 2169856via Connected, Serial1/3从路由表里只能看到一条到R3的回环地址3.3.3.3(以下简称3.3.3.3)的路由3.0.0.0/24 is subnetted, 1 subnetsD 3.3.3.0 [90/435200] via 12.12.12.10, 00:02:23, Ethernet0/0这是从R1的Ethernet0/0接口出去经过R4到R3的3.3.3.3。
EIGRP 的不等价负载均衡实验拓扑:实验要求:三台路由器起 EIGRP 协议,使其能互相通信;在此基础之上实现 EIGRP 的不等价负载均衡。
IP 地址表:路由器接口 IP 地址 R1 S0 192.168.10.1/24 R1 E0 192.168.30.2/24 R2 S0192.168.10.2/24 R2 S1 192.168.20.1/24 R3 S0 192.168.20.2/24 R3 E0 192.168.30.1/24 福州 SPOTO TM (思博计算机高级技术培训中心Web :QQ :328065 电话:87115741 87115742以伙伴关系帮助客户成功,帮助员工成功,帮助合作伙伴成功。
——我们共创未来 !福州 SPOTO TM (思博计算机高级技术培训中心Web : QQ :328065 电话:87115741 87115742以伙伴关系帮助客户成功,帮助员工成功,帮助合作伙伴成功。
——我们共创未来 !实验配置: 一、基本配置配置 R1:Router>en Router#conf tRouter(config#host R1 R1(config#int S0R1(config-if#ip add 192.168.10.1 255.255.255.0 R1(config-if#no shut R1(config-if#exit R1(config#int E0R1(config-if#ip add 192.168.30.2 255.255.255.0 R1(config-if#no shutR1(config-if#exit R1(config#配置 R2 : Router>en Router#conf tRouter(config#host R2 R2(config#int S0R2(config-if#ip add 192.168.10.2 255.255.255.0R2(config-if#bandwidth 40 //设置带宽为 40M (这里为一个模拟值 ,使起符合不等价负载R2(config-if#no shut R2(config-if#exit R2(config#int S1R2(config-if#ip add 192.168.20.1 255.255.255.0R2(config-if#bandwidth 200 //设置带宽为 200M (这里为一个模拟值 ,使起符合不等价负载 R2(config-if#no shut R2(config-if#exit R2(config#配置 R3: Router>en Router#conf tRouter(config#host R3 R3(config#int S0R3(config-if#ip add 192.168.20.2 255.255.255.0 R3(config-if#no shutS PO T O 实验报告福州 SPOTO TM (思博计算机高级技术培训中心Web : QQ :328065 电话:87115741 87115742以伙伴关系帮助客户成功,帮助员工成功,帮助合作伙伴成功。
实验 EIGRP 负载均衡一、实验目的通过本实验可以掌握:(1)EIGRP 等价负载均衡的实现方法(2)EIGRP 非等价负载均衡的实现方法(3)修改EIGRP 度量值的方法二、实验要求:1):知道什么是负载均衡2): 知道如何配置EIGRP三、实验内容:1、通过拓朴图来研究EIGRP 负载均衡,使得链路有效利用四、实验步聚实验拓朴1).配置R1和R2的接口IP地址R1(config)#int S0/0R1(config-if)#ip add 10.1.1.1 255.255.255.0R1(config-if)#clock rate 64000R1(config-if)#no shR1(config)#int e1/0R1(config-if)#ip add 20.1.1.1 255.255.255.0R1(config-if)#no shR1(config)#int lo0R1(config-if)#ip add 1.1.1.1 255.255.255.0R2(config)#int S0/0R2(config-if)#ip add 10.1.1.2 255.255.255.0R2(config-if)#clock rate 64000R2(config-if)#no shR2(config)#int e1/0R2(config-if)#ip add 20.1.1.2 255.255.255.0R2(config-if)#no shR2(config)#int lo0R2(config-if)#ip add 2.2.2.2 255.255.255.02).配置R1和R2的EIGRPR1(config)#router eigrp 100R1(config-router)#net 10.1.1.0R1(config-router)#net 20.1.1.0R1(config-router)#net 1.1.1.0R1(config-router)#no auto-summaryR2(config)#router eigrp 100R2(config-router)#net 10.1.1.0R2(config-router)#net 20.1.1.0R2(config-router)#net 1.1.1.0R2(config-router)#no auto-summary3)查看R2上的路由表和拓朴表R2#sh ip route从输出结果中可以看到网络1.1.1.0的路径只有一条,下一跳地址为20.1.1.1R2#sh ip eigrp topologyIP-EIGRP Topology Table for AS(100)/ID(2.2.2.2)Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,r - reply Status, s - sia StatusP 1.1.1.0/24, 1 successors, FD is 409600via 20.1.1.1 (409600/128256), Ethernet1/0via 10.1.1.1 (2297856/128256), Serial0/0P 2.2.2.0/24, 1 successors, FD is 128256via Connected, Loopback0P 10.1.1.0/24, 1 successors, FD is 2169856via Connected, Serial0/0P 20.1.1.0/24, 1 successors, FD is 281600via Connected, Ethernet1/0可以看出通过20.1.1.1到达1.1.1.0网络的FD是409600,10.1.1.1到达1.1.1.0网络的FD是2297856,所以EIGRP选择FD值小的放入路由表,但是同是看到10.1.1.1到达1.1.1.0网络的FD是2297856的网络的AD(128256)小于通过20.1.1.1到达1.1.1..0网络的FD,满足可行性条件,所以被到拓朴表中。
配置EIGRP等价负载均衡和非等价负载均衡实验目标:配置R3到192.168.0.0/24网段可以走多条路.一:预配置:R1#interface Loopback0ip address1.1.1.1255.255.255.0 interface Loopback2ip address10.1.1.1255.255.255.252 interface Loopback3ip address10.1.1.5255.255.255.252 interface Loopback4ip address10.1.1.9255.255.255.252 interface FastEthernet0/0ip address172.16.0.1255.255.255.0 interface Serial2/1ip address192.168.0.1255.255.255.0R2#interface Loopback0ip address2.2.2.2255.255.255.0 interface Loopback2ip address10.1.2.1255.255.255.252 interface Loopback3ip address10.1.2.5255.255.255.252 interface Loopback4ip address10.1.2.9255.255.255.252 interface Serial2/1ip address192.168.0.2255.255.255.0 interface Serial2/2ip address23.0.0.2255.255.255.0R3#interface Loopback0ip address3.3.3.3255.255.255.0 interface Loopback2ip address10.1.3.1255.255.255.252 interface Loopback3ip address10.1.3.5255.255.255.252 interface Loopback4ip address10.1.3.9255.255.255.252 interface FastEthernet0/0ip address172.16.0.3255.255.255.0 interface Serial2/1ip address23.0.0.3255.255.255.0二:配置过程1:修改R1,R2,R3之间的链路带宽为64Kbps R1(config)#int s2/1R1(config-if)#bandwidth64R1(config-if)#int f0/0R1(config-if)#bandwidth64R2(config)#int s2/1R2(config-if)#bandwidth64R2(config-if)#int s2/2R2(config-if)#bandwidth64R3(config)#int s2/1R3(config-if)#bandwidth64R3(config-if)#int f0/0R3(config-if)#bandwidth642:配置EIGRPR1(config)#router eigrp100R1(config-router)#no auR1(config-router)#net10.0.0.0R1(config-router)#net172.16.0.0R1(config-router)#net192.168.0.0R1(config-router)#net1.1.1.1R2(config)#router eigrp100R2(config-router)#no auR2(config-router)#net10.0.0.0R2(config-router)#net2.2.2.2R2(config-router)#net23.0.0.0R2(config-router)#net192.168.0.0R3(config)#router eigrp100R3(config-router)#no auR3(config-router)#net10.0.0.0R3(config-router)#net3.3.3.3R3(config-router)#net172.16.0.0R3(config-router)#net23.0.0.0R1#show ip route1.0.0.0/24is subnetted,1subnetsC 1.1.1.0is directly connected,Loopback02.0.0.0/24is subnetted,1subnetsD 2.2.2.0[90/40640000]via192.168.0.2,00:01:58,Serial2/13.0.0.0/24is subnetted,1subnetsD 3.3.3.0[90/40130560]via172.16.0.3,00:01:58,FastEthernet0/023.0.0.0/24is subnetted,1subnetsD23.0.0.0[90/40514560]via172.16.0.3,00:01:58,FastEthernet0/0172.16.0.0/24is subnetted,1subnetsC172.16.0.0is directly connected,FastEthernet0/010.0.0.0/30is subnetted,9subnetsD10.1.3.8[90/40130560]via172.16.0.3,00:01:58,FastEthernet0/0D10.1.2.8[90/40640000]via192.168.0.2,00:01:58,Serial2/1C10.1.1.8is directly connected,Loopback4D10.1.3.0[90/40130560]via172.16.0.3,00:01:58,FastEthernet0/0D10.1.2.0[90/40640000]via192.168.0.2,00:01:58,Serial2/1C10.1.1.0is directly connected,Loopback2D10.1.3.4[90/40130560]via172.16.0.3,00:01:58,FastEthernet0/0D10.1.2.4[90/40640000]via192.168.0.2,00:01:58,Serial2/1C10.1.1.4is directly connected,Loopback3C192.168.0.0/24is directly connected,Serial2/1查看EIGRP邻接关系R1#show ip eigrp neiIP-EIGRP neighbors for process100H Address Interface Hold Uptime SRTT RTO Q Seq(sec)(ms)Cnt Num 1192.168.0.2Se2/11300:46:31442280015 0172.16.0.3Fa0/01200:46:461712280016R2#show ip eigrp neiIP-EIGRP neighbors for process100H Address Interface Hold Uptime SRTT RTO Q Seq(sec)(ms)Cnt Num 0192.168.0.1Se2/11400:47:0412********123.0.0.3Se2/21300:51:322602280017R3#show ip eigrp neiIP-EIGRP neighbors for process100H Address Interface Hold Uptime SRTT RTO Q Seq(sec)(ms)Cnt Num 0172.16.0.1Fa0/01400:47:352842280016123.0.0.2Se2/11300:51:484362616016查看R2的路由表R2#show ip route1.0.0.0/24is subnetted,1subnetsD 1.1.1.0[90/40640000]via192.168.0.1,00:48:03,Serial2/12.0.0.0/24is subnetted,1subnetsC 2.2.2.0is directly connected,Loopback03.0.0.0/24is subnetted,1subnetsD 3.3.3.0[90/40640000]via23.0.0.3,00:48:03,Serial2/223.0.0.0/24is subnetted,1subnetsC23.0.0.0is directly connected,Serial2/2172.16.0.0/24is subnetted,1subnetsD172.16.0.0[90/40514560]via23.0.0.3,00:48:03,Serial2/2[90/40514560]via192.168.0.1,00:48:03,Serial2/110.0.0.0/30is subnetted,9subnetsD10.1.3.8[90/40640000]via23.0.0.3,00:48:03,Serial2/2C10.1.2.8is directly connected,Loopback4D10.1.1.8[90/40640000]via192.168.0.1,00:48:03,Serial2/1D10.1.3.0[90/40640000]via23.0.0.3,00:48:03,Serial2/2C10.1.2.0is directly connected,Loopback2D10.1.1.0[90/40640000]via192.168.0.1,00:48:03,Serial2/1D10.1.3.4[90/40640000]via23.0.0.3,00:48:03,Serial2/2C10.1.2.4is directly connected,Loopback3D10.1.1.4[90/40640000]via192.168.0.1,00:48:03,Serial2/1C192.168.0.0/24is directly connected,Serial2/1查看R2的eigrp拓扑表R2#show ip eigrp topologyIP-EIGRP Topology Table for AS(100)/ID(10.1.2.9)Codes:P-Passive,A-Active,U-Update,Q-Query,R-Reply,r-reply Status,s-sia StatusP10.1.3.8/30,1successors,FD is40640000via23.0.0.3(40640000/128256),Serial2/2via192.168.0.1(40642560/40130560),Serial2/1P1.1.1.0/24,1successors,FD is40640000via192.168.0.1(40640000/128256),Serial2/1via23.0.0.3(40642560/40130560),Serial2/2P10.1.2.8/30,1successors,FD is128256via Connected,Loopback4P10.1.1.8/30,1successors,FD is40640000via192.168.0.1(40640000/128256),Serial2/1via23.0.0.3(40642560/40130560),Serial2/2P2.2.2.0/24,1successors,FD is128256via Connected,Loopback0P3.3.3.0/24,1successors,FD is40640000via23.0.0.3(40640000/128256),Serial2/2via192.168.0.1(40642560/40130560),Serial2/1P10.1.3.0/30,1successors,FD is40640000via23.0.0.3(40640000/128256),Serial2/2Codes:P-Passive,A-Active,U-Update,Q-Query,R-Reply, r-reply Status,s-sia Statusvia192.168.0.1(40642560/40130560),Serial2/1P10.1.2.0/30,1successors,FD is128256via Connected,Loopback2P10.1.1.0/30,1successors,FD is40640000via192.168.0.1(40640000/128256),Serial2/1via23.0.0.3(40642560/40130560),Serial2/2P10.1.3.4/30,1successors,FD is40640000via23.0.0.3(40640000/128256),Serial2/2via192.168.0.1(40642560/40130560),Serial2/1P10.1.2.4/30,1successors,FD is128256via Connected,Loopback3P10.1.1.4/30,1successors,FD is40640000via192.168.0.1(40640000/128256),Serial2/1via23.0.0.3(40642560/40130560),Serial2/2P23.0.0.0/24,1successors,FD is40512000via Connected,Serial2/2P192.168.0.0/24,1successors,FD is40512000via Connected,Serial2/1P172.16.0.0/24,2successors,FD is40514560via192.168.0.1(40514560/40002560),Serial2/1via23.0.0.3(40514560/40002560),Serial2/2查看R3的路由表R3#show ip route1.0.0.0/24is subnetted,1subnetsD 1.1.1.0[90/40130560]via172.16.0.1,00:50:48,FastEthernet0/02.0.0.0/24is subnetted,1subnetsD 2.2.2.0[90/40640000]via23.0.0.2,00:50:48,Serial2/13.0.0.0/24is subnetted,1subnetsconnected,Loopback0directlyconnected,C 3.3.3.0is directly23.0.0.0/24is subnetted,1subnetsconnected,Serial2/1directlyconnected,C23.0.0.0is directly172.16.0.0/24is subnetted,1subnetsconnected,FastEthernet0/0C172.16.0.0is directlydirectlyconnected,10.0.0.0/30is subnetted,9subnetsC10.1.3.8is directly connected,Loopback4D10.1.2.8[90/40640000]via23.0.0.2,00:50:48,Serial2/1D10.1.1.8[90/40130560]via172.16.0.1,00:50:48,FastEthernet0/0connected,Loopback2C10.1.3.0is directlydirectlyconnected,D10.1.2.0[90/40640000]via23.0.0.2,00:50:48,Serial2/1D10.1.1.0[90/40130560]via172.16.0.1,00:50:48,FastEthernet0/0C10.1.3.4is directly connected,Loopback3D10.1.2.4[90/40640000]via23.0.0.2,00:50:48,Serial2/1D10.1.1.4[90/40130560]via172.16.0.1,00:50:48,FastEthernet0/0D192.168.0.0/24[90/40514560]via172.16.0.1,00:50:50,FastEthernet0/0查看R3的eigrp拓扑表R3#show ip eigrp topologyIP-EIGRP Topology Table for AS(100)/ID(10.1.3.9)Codes:P-Passive,A-Active,U-Update,Q-Query,R-Reply,r-reply Status,s-sia StatusP10.1.3.8/30,1successors,FD is128256via Connected,Loopback4P1.1.1.0/24,1successors,FD is40130560via172.16.0.1(40130560/128256),FastEthernet0/0P10.1.2.8/30,1successors,FD is40640000via23.0.0.2(40640000/128256),Serial2/1P10.1.1.8/30,1successors,FD is40130560via172.16.0.1(40130560/128256),FastEthernet0/0P2.2.2.0/24,1successors,FD is40640000via23.0.0.2(40640000/128256),Serial2/1P3.3.3.0/24,1successors,FD is128256via Connected,Loopback0P10.1.3.0/30,1successors,FD is128256via Connected,Loopback2P10.1.2.0/30,1successors,FD is40640000via23.0.0.2(40640000/128256),Serial2/1P10.1.1.0/30,1successors,FD is40130560via172.16.0.1(40130560/128256),FastEthernet0/0Codes:P-Passive,A-Active,U-Update,Q-Query,R-Reply, r-reply Status,s-sia StatusP10.1.3.4/30,1successors,FD is128256via Connected,Loopback3P10.1.2.4/30,1successors,FD is40640000via23.0.0.2(40640000/128256),Serial2/1P10.1.1.4/30,1successors,FD is40130560via172.16.0.1(40130560/128256),FastEthernet0/0P23.0.0.0/24,1successors,FD is40512000via Connected,Serial2/1P192.168.0.0/24,1successors,FD is40514560via172.16.0.1(40514560/40512000),FastEthernet0/0via23.0.0.2(41024000/40512000),Serial2/1P172.16.0.0/24,1successors,FD is40002560via Connected,FastEthernet0/0配置R3非等价负载均衡R3(config)#router eigrp100R3(config-router)#variance2R3#show ip route1.0.0.0/24is subnetted,1subnetsD 1.1.1.0[90/40130560]via172.16.0.1,00:00:02,FastEthernet0/02.0.0.0/24is subnetted,1subnetsD 2.2.2.0[90/40640000]via23.0.0.2,00:00:02,Serial2/13.0.0.0/24is subnetted,1subnetsconnected,Loopback0C 3.3.3.0is directlydirectlyconnected,23.0.0.0/24is subnetted,1subnetsconnected,Serial2/1C23.0.0.0is directlydirectlyconnected,172.16.0.0/24is subnetted,1subnetsconnected,FastEthernet0/0C172.16.0.0is directlydirectlyconnected,10.0.0.0/30is subnetted,9subnetsC10.1.3.8is directly connected,Loopback4D10.1.2.8[90/40640000]via23.0.0.2,00:00:02,Serial2/1D10.1.1.8[90/40130560]via172.16.0.1,00:00:03,FastEthernet0/0connected,Loopback2directlyconnected,C10.1.3.0is directlyD10.1.2.0[90/40640000]via23.0.0.2,00:00:03,Serial2/1D10.1.1.0[90/40130560]via172.16.0.1,00:00:03,FastEthernet0/0C10.1.3.4is directly connected,Loopback3D10.1.2.4[90/40640000]via23.0.0.2,00:00:03,Serial2/1D10.1.1.4[90/40130560]via172.16.0.1,00:00:03,FastEthernet0/0D192.168.0.0/24[90/40514560]via172.16.0.1,00:00:03,FastEthernet0/0[90/41024000]via23.0.0.2,00:00:03,Serial2/1//看到现在有两条路可以走了!。
EIGRP可靠性计算公式及参数调整原则详解EIGRP(Enhanced Interior Gateway Routing Protocol)是一种高效且可靠的内部网关路由协议,它的设计目标是最大限度地提高路由信息的传输效率,同时保证网络的可靠性。
本文将详细讨论EIGRP的可靠性计算公式以及参数调整的原则。
一、EIGRP可靠性计算公式EIGRP可靠性计算公式是基于各个邻居路由器发送的Hello消息和ACK消息来计算的。
以下是EIGRP可靠性计算公式的详细步骤:1. 首先,每个EIGRP路由器都会周期性地发送Hello消息给它的邻居路由器,以便维护邻居关系。
Hello消息中包含了路由器的标识信息以及其它相关的参数。
2. 当一个路由器收到邻居路由器的Hello消息时,会对该消息进行认证和验证,以确保邻居关系的合法性和可靠性。
3. 在邻居关系确认后,每个EIGRP路由器会定期地发送ACK消息给邻居路由器,以确认对方收到了自己发送的路由更新信息。
4. 接收到ACK消息的路由器会将该消息作为可靠的路由信息并计入其路由表中。
5. 计算邻居路由器的可靠性时,EIGRP会根据Hello消息和ACK消息的发送和接收情况来判断。
综上所述,EIGRP的可靠性计算公式是基于Hello消息和ACK消息的发送和接收情况来计算的,只有在邻居关系确认并且收到对方的确认消息时,路由信息才会被认为是可靠的并计入路由表中。
二、参数调整原则为了提高EIGRP的可靠性,我们可以调整一些参数来适应不同的网络环境和需求。
以下是一些参数调整的原则:1. 增加Hello消息的发送频率:通过增加Hello消息的发送频率,可以更快地检测到邻居路由器的状态变化,从而提高网络的可靠性。
但是要注意,过高的发送频率可能会增加网络的负载,因此需要根据实际情况进行调整。
2. 调整ACK消息的超时时间:ACK消息的超时时间是指等待对方发送确认消息的时间。
通过调整ACK消息的超时时间,可以控制路由器对邻居路由器的等待时间,从而提高路由信息的及时性和可靠性。
Eigrp备注:lo 1 不加入路由进程中R1上下放默认路由:(1)R1(config)#ip route 0.0.0.0 0.0.0.0 null0R1(config-router)#redistribute staticR2#sh ip route测试:(2)R1(config)#ip route 0.0.0.0 0.0.0.0 null0R1(config)#router eigrp 1R1(config-router)#net 0.0.0.0 0.0.0.0测试:R4#show ip route(3)R1(config)#ip default-network 200.200.200.0R1(config)#router eigrp 1R1(config-router)#net 200.200.200.0 0.0.0.255 (主类网络)R3#sh ip route(4)R1(config-if)#int s1/0R1(config-if)#ip summary-address eigrp 1 0.0.0.0 0.0.0.0R3#show ip routeR1(config-if)#int E0/0R1(config-if)#ip summary-address eigrp 1 0.0.0.0 0.0.0.0R3#show ip route//两同时加入,则以e0/0为准,因为快速以太网延迟小,所以度量小。
负载均衡:R3上面看到达1.1.1.1的路由:非等价负载均衡:首先先查看R3的拓扑表:R4(config-if)#do show ipeigrptopoR4(config)#routereigrp 1R4(config-router)#variance 2 (variance 取值范围:1-128) 查看路由表的结果。
通过R3(config-router)#do show ip route 1.1.1.1查看数据包的分配。
这里我先写一下,心得:(我觉得要掌握EIGRP的非等价负载均衡,记住以下三条就行了)
1.第一阶段:需要满足FC的条件: 备用后继路由的AD必须小于后继路由的FD (感觉这句话就是经典,不像是随便说说而已)
2.第二阶段:后继路由的FD<后继路由的FD (经典2:FD最小的路由条目为最佳后继路由)
为什么呢?我经过了第二步,我就已经成为了后继路由了.要成为负载均衡,我们就需要定义一个在哪个范围以内的FD可以放入到路由条目中去.
3.第三阶段:如果你希望配置EIGRP的负载均衡的话,这一步你也是需要的.你需要定义一个乘数因子,最小FD与其的乘积,范围内的路由条目均可放入到路由条目中去.
实验准备:(本实验只是借用工大瑞普的拓补图,本文内容与其无关,谢谢)
1、使用模拟器或是真实的交换机
2、配置好EIGRP路由协议
说说其他的:
RIP、OSPF只能实现等价的负载均衡。
问:是什么来决定他们的是否使用负载均衡?
答:RIP>>>>>我用跳数决定>>>>>用眼睛数就行了。
呵呵。
OSPF>>>>我用COST开消值决定
>>>>>>>10000000/实际带宽
EIGRP>>>>我是用Metric值来决定
>>>>>>>256*(10000000/最小带宽+路径总延时/10)做实验,看拓补:
目标:实现从R1到R3(192.168.1.0/24)非等价的负载均衡。
分析:A、先让R2成为R1到R3(192.168.1.0/24)的备用后继路由。
>>>>>>>实现第一,第二阶段
B、配置R1的乘数因子,将R2的到达192.168.1.0/24的路由条目加入到R1的路由表中>>>>>>>>实现第三阶段
实现第一、第二阶段:
在这里,我们来分析一下,R1的完整的拓补表!
R2告诉R1,他到192.168.1.0这个网段的AD值为2291856
分析:第一条:备用后继路由器的AD<后继路由的FD,但是目前2297856>409600,很明显不满足这个条件,理所当然!
A >>>R1的FD=409600=256*(10000000/最小带宽+路径总延时/10)
>>>R1的AD其实也是R2的FD,FD=256*(10000000/最小带宽+路径总延时/10)≤409600
很简单,我们只需要让R2的AD值<R1的FD值就行了。
OK。
在这里我们需要改的也就是最小带宽与延时。
R2的S1/1接口,BW 1544 Kbit, DLY 20000 usec (这个信息你可以使用show inter s1/1中得到)
R3的lo192口对应地址为192.168.1.1 ,BW 8000000 Kbit, DLY 5000 usec,总延时为20000+5000=25000
现在我们需要实现的目的是:R2的FD=256*(10000000/最小带宽+路径总延时/10)≤409600
OK,问题,简单了,修改最小带宽,及接口延时。
任意设置为:带宽设置为10000,延时为200S
(这里的值通常会自动扩大10倍,因为这里设置的是微秒)
OK,验证一下:(满足了第一,第二个条件成功的成为了后继路由)
实现第三阶段,非等价的负载均衡
在这里我们又要研究这句话了:乘数因子与最小FD的乘积的范围,也就是说后备路由的FD=2302976≤最小FD409600*X 求得X≥5.6,在这里我们只取整数。
X≥6
在R1上给它EIGRP配置一下乘数因子吧!
OK,现在我们到R1上验证一下:
注意看图,看到那个小“*”了没?traffic share count is 240 traffic share count is 43
表示他们之间传包的比例为240:43。