端口匯聚 (1)采用手工匯聚方式: [Switch]link-aggregation group 1 mode manual # 創(chuàng)建手工匯聚組 1 # 將以太網(wǎng)端口 GigabitEthernet1/0/1 至 GigabitEthernet1/0/3 加入?yún)R聚組 1。 [Switch]interface GigabitEthernet 1/0/1 [Switch-GigabitEthernet1/0/1] port link-aggregation group 1 [Switch-GigabitEthernet1/0/1] interface GigabitEthernet 1/0/2 [Switch-GigabitEthernet1/0/2] port link-aggregation group 1 [Switch-GigabitEthernet1/0/2] interface GigabitEthernet 1/0/3 [Switch-GigabitEthernet1/0/3] port link-aggregation group 1 (2)采用靜態(tài) LACP 匯聚方式: # 創(chuàng)建靜態(tài)匯聚組 1。 [Switch] link-aggregation group 1 mode static # 將以太網(wǎng)端口 GigabitEthernet1/0/1 至 GigabitEthernet1/0/3 加入?yún)R聚組 1。 [Switch] interface GigabitEthernet 1/0/1 [Switch-GigabitEthernet1/0/1] port link-aggregation group 1 [Switch-GigabitEthernet1/0/1] interface GigabitEthernet 1/0/2 [Switch-GigabitEthernet1/0/2] port link-aggregation group 1 [Switch-GigabitEthernet1/0/2] interface GigabitEthernet 1/0/3 [Switch-GigabitEthernet1/0/3] port link-aggregation group 1 (3)采用動態(tài) LACP 匯聚方式: # 開啟以太網(wǎng)端口 GigabitEthernet1/0/1 至 GigabitEthernet1/0/3 的 LACP 協(xié)議。 [Switch] interface GigabitEthernet1/0/1 [Switch-GigabitEthernet1/0/1] lacp enable [Switch-GigabitEthernet1/0/1] interface GigabitEthernet 1/0/2 [Switch-GigabitEthernet1/0/2] lacp enable [Switch-GigabitEthernet1/0/2] interface GigabitEthernet 1/0/3 [Switch-GigabitEthernet1/0/3] lacp enable ------------------------------------- H3C S5120-SI 端口聚合: #interface Bridge-Aggregation1 //創(chuàng)建聚合接口,創(chuàng)建好后會自動創(chuàng)建一個編號和這個編號一樣的聚合group #interface GigabitEthernet1/0/1 port link-type trunk port trunk permit vlan all speed 100 duplex full port link-aggregation group 1 //把端口加入聚合組,加入聚合組的端口須強制全雙工和速率,并且一致 # #interface GigabitEthernet1/0/2 port link-type trunk port trunk permit vlan all speed 100 duplex full port link-aggregation group 1 #interface Bridge-Aggregation1 一定要在聚合接口上啟用trunk并且允許所有vlan,不然就算在上面2個口上啟用了trunk允許所有vlan還是不能信 port link-type trunk port trunk permit vlan all //在聚合口上設置link-type 和允許通過的vlan,設置后會自動同步到聚合組中所有接口上 # link-aggregation load-sharing mode destination-ip source-ip //設置負載均衡方式 [H3C]dis link-aggregation summary //查看聚合組狀態(tài) Aggregation Interface Type: BAGG -- Bridge-Aggregation, RAGG -- Route-Aggregation Aggregation Mode: S -- Static, D -- Dynamic Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing Actor System ID: 0x8000, 0cda-4134-dfab AGG AGG Partner ID Select Unselect Share Interface Mode Ports Ports Type ------------------------------------------------------------------------------- BAGG1 S none 2 0 Shar [H3C]dis interface Bridge-Aggregation 1 Bridge-Aggregation1 current state: UP IP Packet Frame Type: PKTFMT_ETHNT_2, Hardware Address: 0cda-4134-dfad Description: Bridge-Aggregation1 Interface 200Mbps-speed mode, full-duplex mode Link speed type is autonegotiation, link duplex type is autonegotiation PVID: 1 Port link-type: trunk VLAN passing : 1(default vlan), 100, 300 VLAN permitted: 1(default vlan), 2-4094 Trunk port encapsulation: IEEE 802.1q Last clearing of counters: Never ----------------------------------------- H3C S3000端口聚合方式: 把需要加入到聚合組中的端口強制百兆,強制全雙工,口上不要應用其他任何策略 link-aggregation Ethernet0/13 to Ethernet0/14 both //建立聚合組把13口和14口加入進去,必須是連續(xù)的端口 interface Ethernet0/13 description to s1520 duplex full speed 100 port link-type trunk port trunk permit vlan all traffic-limit inbound link-group 4000 rule 0 5 exceed drop //在一個口上應用限速策略后,另一個口會同步 # interface Ethernet0/14 description to s1520 duplex full speed 100 port link-type trunk port trunk permit vlan all traffic-limit inbound link-group 4000 rule 0 5 exceed drop 手工聚合 手工匯聚端口的LACP協(xié)議為關閉狀態(tài),禁止用戶使能手工匯聚端口的LACP協(xié)議。 被聚合的設備間無需交互協(xié)議報文,端口的聚合完全由管理員手工指定。 靜態(tài)LACP聚合 在靜態(tài)LACP聚合方式下,需要啟動LACP協(xié)議,但不允許系統(tǒng)自動向聚合組中添加端口。此時本端(Actor)設備和對端(Partner)設備有了LACP的交互,在靜態(tài)LACP聚合方式下,設備不僅僅參考人工配置的哪些端口在一個聚合組,設備還要通過LACP協(xié)議交互,來確定這些被人工聚合的端口是否真的可以被聚合在一起。 動態(tài)聚合 動態(tài)LACP聚合方式,無需手工創(chuàng)建聚合組,也無需指定端口的聚合組,設備間交互LACPDU,根據(jù)每個端口上接收到的對端設備ID等參數(shù),本設備硬件限制等,來確定哪些端口具備被聚合的條件,進而給每個端口分配相同的Key值,那么這些端口就可以被聚合。
|
|