EIGRP协议在这里就不多做介绍了,下面在EIGRP上通过修改端口的延迟来达到其等价负载均衡的效果。 (注:现实环境中可能很少用到,但在NP的考试中可能会考到这样的算法,还是需要了解地......)


实验目的:通过修改R2端口延迟,实现到目的地网络3.3.3.0网络的等价均衡




如图所示:运行EIGRP后,R2可以学到两条3.3.3.0的路由,一条从R3学到,另一条从R1学到。
R2# sh ip eigrp topology all-links 
IP-EIGRP Topology Table for AS(90)/ID(23.1.1.2)

Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status 

P 3.3.3.0/24, 1 successors, FD is 156160, serno 4
        via 23.1.1.3 (156160/128256), FastEthernet0/0
        via 12.1.1.1 (2809856/2297856), Serial1/0

很明显,发往3.3.3.0的包优先会走F0/0,但需要达到实验目的则需修改它的端口延迟(因为改大延迟数要比改小来得容易,所以修改F0/0的端口延迟使其与S1/0一致就可以了)

笔墨伺候,公式套上->  Metric = 256*(10000000/BW+DLY/10)

注意:
1、BW取路由传递路径上的最小带宽值
2、DLY是取路由来的方向的入接口的延迟总和(该图中取R3的loopback口)

几种常用接口的带宽和延迟:
Interface  BW(kbps)  DLY(μsec)
Ethernet   10000    1000
FAST          100000       100
Serial    1544     20000
Loopback   8000000   5000

计算开始:Metric = 256*(10000000/BW+DLY/10)
 
          2809856 = 256*(10000000/100000 + x+5000/10)

          x = 103760

算出了需要修改的值了103760,进入端口;
R2# conf ter
Enter configuration commands, one per line.  End with CNTL/Z.
R2(config)# inter f0/0
R2(config-if)#delay ?
  <1-16777215>  Throughput delay (tens of microseconds)

R2(config-if)# delay 10376   

因为系统提示 tens of microseconds,所以只需写上10376就可以了,查看结果:

R2# sh ip eigrp topology all-links 
IP-EIGRP Topology Table for AS(90)/ID(23.1.1.2)

Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status 

P 3.3.3.0/24, 2 successors, FD is 156160, serno 10
        via 23.1.1.3 (2809856/128256), FastEthernet0/0
        via 12.1.1.1 (2809856/2297856), Serial1/0

R2#sh ip route 
Codes: C - connected, S - static, 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
       i - IS-IS, su - IS-IS summary, 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

     3.0.0.0/24 is subnetted, 1 subnets
D       3.3.3.0 [90/2809856] via 23.1.1.3, 00:00:35, FastEthernet0/0
                [90/2809856] via 12.1.1.1, 00:00:35, Serial1/0

小提示:
·EIGRP可做等价负载均衡,也可做不等价负载均衡。默认只做等价的。
·EIGRP默认支持4条路径的负载均衡,最大支持16条。