2016年5月5日 星期四

EIGRP Load-Balance 負載均衡

Load-balance
  • Default 是四條等價load-balance(可透過maximum-paths x)做修改
  • 非等價Load-balance
    • 條件:必需是有FS路由
    • 設定:修改variance
    • FSAD值必需小於目前FD x variance值,則可達非等價load-balance

如圖目前在R2上看到33.1.1.1路由為等價Load-balance
     33.0.0.0/24 is subnetted, 1 subnets
D       33.1.1.0 [90/156160] via 23.1.2.3, 00:00:21, FastEthernet2/0
                 [90/156160] via 23.1.1.3, 00:00:21, FastEthernet1/0
修改R2 f2/0介面的delay使得路由改為非等價。
interface FastEthernet2/0
 ip address 23.1.2.2 255.255.255.0
 delay 1000

     33.0.0.0/24 is subnetted, 1 subnets
D       33.1.1.0 [90/156160] via 23.1.1.3, 00:00:16, FastEthernet1/0
R2路由表目前只有一筆路由,並沒有非等價load-balance
查看R2 topology table

P 33.1.1.0/24, 1 successors, FD is 156160
        via 23.1.1.3 (156160/128256), FastEthernet1/0<-較低放進路由表
        via 23.1.2.3 (409600/128256), FastEthernet2/0
修改variance值時,必需是156160 x variance > 409600,則可以達到非等價load-balance,這個地方我們改成3就可以。

R2(config)#router ei
R2(config)#router eigrp 1
R2(config-router)#var
R2(config-router)#variance 3
查看R2路由表達到非等價load-balance

     33.0.0.0/24 is subnetted, 1 subnets
D       33.1.1.0 [90/409600] via 23.1.2.3, 00:00:10, FastEthernet2/0
                 [90/156160] via 23.1.1.3, 00:00:10, FastEthernet1/0
Load-balance的比例為2360
R2#sh ip route 33.1.1.1
Routing entry for 33.1.1.0/24
  Known via "eigrp 1", distance 90, metric 156160, type internal
  Redistributing via eigrp 1
  Last update from 23.1.2.3 on FastEthernet2/0, 00:00:39 ago
  Routing Descriptor Blocks:
    23.1.2.3, from 23.1.2.3, 00:00:39 ago, via FastEthernet2/0
      Route metric is 409600, traffic share count is 23
      Total delay is 15000 microseconds, minimum bandwidth is 100000 Kbit
      Reliability 255/255, minimum MTU 1500 bytes
      Loading 1/255, Hops 1
  * 23.1.1.3, from 23.1.1.3, 00:00:39 ago, via FastEthernet1/0
      Route metric is 156160, traffic share count is 60
      Total delay is 5100 microseconds, minimum bandwidth is 100000 Kbit
      Reliability 255/255, minimum MTU 1500 bytes
      Loading 1/255, Hops 1
Cisco default 的轉發機制為cef,並且default為per-destination,查看cefload-balanceCEF會照比例來調整轉發的chnnel,達到非等價load-balance,改變之後hash結果選到f2/0的機會變小。
何為16channel呢?因為max load-balance16,達最大load-balance時,剛好是11 channel
R2(config)#router ei
R2(config)#router eigrp 1
R2(config-router)#max
R2(config-router)#maximum-paths ?
  <1-16>  Number of paths

R2(config-router)#maximum-paths 16
R2#show ip cef 33.1.1.1 internal <-隱藏指令
33.1.1.0/24, version 20, epoch 0, per-destination sharing
0 packets, 0 bytes
  via 23.1.2.3, FastEthernet2/0, 0 dependencies
    traffic share 23
    next hop 23.1.2.3, FastEthernet2/0
    valid adjacency
  via 23.1.1.3, FastEthernet1/0, 0 dependencies
    traffic share 60
    next hop 23.1.1.3, FastEthernet1/0
    valid adjacency
  0 packets, 0 bytes switched through the prefix
  tmstats: external 0 packets, 0 bytes
           internal 0 packets, 0 bytes
  Load distribution: 0 1 0 1 0 1 0 1 1 1 1 1 1 1 1 1 (refcount 1)

  Hash  OK  Interface                 Address         Packets
  1     Y   FastEthernet2/0           23.1.2.3              0
  2     Y   FastEthernet1/0           23.1.1.3              0
  3     Y   FastEthernet2/0           23.1.2.3              0
  4     Y   FastEthernet1/0           23.1.1.3              0
  5     Y   FastEthernet2/0           23.1.2.3              0
  6     Y   FastEthernet1/0           23.1.1.3              0
  7     Y   FastEthernet2/0           23.1.2.3              0
  8     Y   FastEthernet1/0           23.1.1.3              0
  9     Y   FastEthernet1/0           23.1.1.3              0
  10    Y   FastEthernet1/0           23.1.1.3              0
  11    Y   FastEthernet1/0           23.1.1.3              0
  12    Y   FastEthernet1/0           23.1.1.3              0
  13    Y   FastEthernet1/0           23.1.1.3              0
  14    Y   FastEthernet1/0           23.1.1.3              0
  15    Y   FastEthernet1/0           23.1.1.3              0
  16    Y   FastEthernet1/0           23.1.1.3              0
  refcount 6
R2# 













沒有留言:

張貼留言