close

 

 

 

 


應用於Switch之間的多鏈路捆綁技術

目的
1.增加頻寬
2.負載平衡
3.增加網路穩定性及安全性

※當EtherChannel中某一條line failed,EtherChannel中其他link照常工作

LACP (Link Aggregation Control Protocol)-IEEE標準(802.3AD)
PAGP (Port Aggregation Protocol)-Cisco專有協議


LACP模式
Active  : 表示該端口會主動發LACP封包與對端進行協商
Passive  : 表示該端口不會主動發LACP封包與對端進行協商


PAGP模式
Desirable : 表示該端口會主動發PAGP封包與對端進行協商
Auto        : 表示該端口不會主動發PAGP封包與對端進行協商
On          : 表示強制將該端口加入EtherChannel,不需PAGP與對端協商


基本配置


#interface rang fa 0/3 - 11
#channel-protocol lacp
#channel-group 1 mode active
 
#interface port-channel 1
#switchport trunk encapsulation dot1q
#switchport mode trunk

 

負載平衡配置
 

(config)#port-channel load-balance ?
  dst-ip          Dst IP Addr
  dst-mac       Dst Mac Addr
  src-dst-ip    Src XOR Dst IP Addr
  src-dst-mac  Src XOR Dst Mac Addr
  src-ip          Src IP Addr
  src-mac      Src Mac Addr


(config)#port-channel load-balance src-ip


檢視狀態


#show etherchannel detail
#show etherchannel load-balance
#show etherchannel port
#show etherchannel port-channel
#show etherchannel protocol
#show etherchannel summary 
※狀態  D-Down  , P-正常  , I-Stand alone (一邊Down 一邊UP) 
 

負載平衡補充

根據網上文獻,Switch 會檢查 Packet Source IP 的最後 3 Bits 去計算一個叫 Port ID 值
請看以下的一些例子:

192.168.1.11 -> 00001011 -> 只取最尾 3 Bits: 011 -> 再變回十進數,Port ID 結果是 3
192.168.1.46 -> 00101110 -> 只取最尾 3 Bits: 110 -> 再變回十進數,Port ID 結果是 6
172.16.20.97 -> 01100001 -> 只取最尾 3 Bits: 001 -> 再變回十進數,Port ID 結果是 1
10.198.45.22 -> 00010110 -> 只取最尾 3 Bits: 110 -> 再變回十進數,Port ID 結果是 6

Port ID 結果會是 0 至 7 其中一個值
同個Port ID 會分配在同一個Port,但並不知道Port ID分別所屬哪個Port。


其他參考網站
http://systw.net/note/af/sblog/more.php?id=223
http://www.cisco.com/en/US/docs/switches/lan/catalyst3550/software/release/12.1_8_ea1/configuration/guide/swethchl.html

https://www.jannet.hk/zh-Hant/post/etherchannel-pagp-lacp/#balance
 

 

 

 

 

 

 

arrow
arrow
    全站熱搜

    鵝 發表在 痞客邦 留言(0) 人氣()