EIGRP负载均衡配置

1、  实验目的:

通过本次的实验,我们可以掌握如技能

1)        EIGRP等价负载均衡的实现方法。

2)        EIGRP非等价负载均衡的实现方法。

3)        修改EIGRP度量值的方法。

4)        可行距离(FD)、通告距离(RD)、以及可行性条件(FC)的深层理解。

2、  实验拓扑图:

clip_image002

3、  实验步骤:

(1)       根据拓扑图,配置各个路由器的接口地址,想必大家都会了,这里就不在详解了。

(2)       配置EIGRP协议,并宣告网络

R1(config)#router eigrp 1

R1(config-router)#no auto-summary

R1(config-router)#net

R1(config-router)#network 192.168.1.0

R1(config-router)#net

R1(config-router)#network 19.168.4.0

 

 

 

R2(config)#router eigrp 1

R2(config-router)#no auto-summary

R2(config-router)#net

R2(config-router)#network 192.168.1.0

R2(config-router)#net

R2(config-router)#network 192.168.2.0

R2(config-router)#network 2.2.2.0 255.255.255.0

 

 

 

R3(config)#router eigrp 1

R3(config-router)#no auto-summary

R3(config-router)#net

R3(config-router)#network 192.168.3.0

R3(config-router)#network 192.168.2.0

R3(config-router)#

 

 

R4(config)#router eigrp 1

R4(config-router)#no auto-summary

R4(config-router)#network 192.168.3.0

R4(config-router)#net

R4(config-router)#network 192.168.4.0

R4(config-router)#network 4.4.4.0 255.255.255.0

R4(config-router)#

(3)       实验测试

从路由器R1ping各个路由器结果

R1#

R1#ping 192.168.3.1

 

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.3.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 47/59/62 ms

 

R1#ping 192.168.3.2

 

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.3.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 78/84/94 ms

 

R1#

R1#

R1#ping 192.168.1.2

 

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 19/28/32 ms

 

R1#ping 192.168.3.2

 

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.3.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 78/87/94 ms

 

R1#ping 192.168.4.1

 

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.4.1, timeout is 2 seconds:

.!!!!

Success rate is 80 percent (4/5), round-trip min/avg/max = 17/27/32 ms

 

R1#ping 192.168.4.2

 

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.4.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 0/12/16 ms

 

R1#

 

以上出现了一串!!!!!表明各个路由器都可以通信了!!!!!!

 

下面来查看路由表情况

R4#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

 

     2.0.0.0/24 is subnetted, 1 subnets

D       2.2.2.0 [90/21152000] via 192.168.3.1, 00:01:04, Serial2/0

     4.0.0.0/24 is subnetted, 1 subnets

C       4.4.4.0 is directly connected, Loopback0

D    192.168.1.0/24 [90/21536000] via 192.168.3.1, 00:08:21, Serial2/0

D    192.168.2.0/24 [90/21024000] via 192.168.3.1, 00:08:21, Serial2/0

C    192.168.3.0/24 is directly connected, Serial2/0

C    192.168.4.0/24 is directly connected, FastEthernet0/0

R4#

  本实验只关注路由器R2lookback0,虽然R4到达R2lookback0有两条路径,但是路由器会将FD最小的放入路由表,选择s2/0接口。那么另外一条是不是可行后继路由呢?我们可以看一下R4的拓扑表:

R4#show ip eigrp top

R4#show ip eigrp topology

IP-EIGRP Topology Table for AS 1

 

Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,

       r - Reply status

 

P 192.168.3.0/24, 1 successors, FD is 20512000

         via Connected, Serial2/0

P 192.168.2.0/24, 1 successors, FD is 21024000

         via 192.168.3.1 (21024000/20512000), Serial2/0

P 192.168.1.0/24, 1 successors, FD is 21536000

         via 192.168.3.1 (21536000/21024000), Serial2/0

P 192.168.4.0/24, 1 successors, FD is 28160

         via Connected, FastEthernet0/0

P 2.2.2.0/24, 1 successors, FD is 21152000

         via 192.168.3.1 (20642560/20640000), Serial2/0

         via 192.168.4.2 (21152000/20640000), FastEthernet0/0

P 4.4.4.0/24, 1 successors, FD is 128256

         via Connected, Loopback0

R4#

   从上面是输出可以看出,第二条路径的AD20640000,而最优路由的FD20642560AD<FD,满足可行性条件,所以第二条路径在最优路由的可行后继路由。

 

   通过适当的配置,就可以在路由器R4上看到R2loopback0的路由条目的等价的,从而实现了等价的负载均衡。根据前面讲的EIGRP度量值的计算公式,这两条路径的最小带宽是相同的,只要的他妈的延迟之和相同,就是等价路由。因此在R4上做如下配置:

R4(config)#interface fastEthernet 0/0

R4(config-if)#delay 2000

R4(config-if)#end

 

   在查看一下路由表:

R4#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

 

     2.0.0.0/24 is subnetted, 1 subnets

D       2.2.2.0 [90/21152000] via 192.168.3.1, 00:22:27, Serial2/0

[90/21152000] via 192.168.3.1, 00:22:27, FastEthernet0/0

     4.0.0.0/24 is subnetted, 1 subnets

C       4.4.4.0 is directly connected, Loopback0

D    192.168.1.0/24 [90/21536000] via 192.168.3.1, 00:29:44, Serial2/0

D    192.168.2.0/24 [90/21024000] via 192.168.3.1, 00:29:44, Serial2/0

C    192.168.3.0/24 is directly connected, Serial2/0

C    192.168.4.0/24 is directly connected, FastEthernet0/0

R4#

   由上面可以看出路由条目2.2.2.0确实有两条等价路由,表明EIGRP是支持负载均衡的。

 

OK,实验到此就结束了!!!!