一、華為鏈路聚合說明及簡介
1.1 鏈路聚合的作用:
1)提高鏈路帶寬
2)提供高可靠性
3)實現負載均衡
1.2 鏈路聚合的兩種模式:
1)手工負載分擔:所有活動成員都參與數據的轉發(fā),平均分攤流量
2)LACP(鏈路匯聚控制協議):通過LACP報文進行協商,確定活動接口和非活動接口
1.3 兩種模式的區(qū)別:
1)手工負載分擔模式中,所有成員處于轉發(fā)狀態(tài)。
2)LACP中,一些鏈路可充當備份,也叫M:N模式
M代表代表活動鏈路
N代表非活動鏈路,用于冗余備份。
1.4 注意事項:
1)兩邊配置的模式必須一樣,否則鏈路聚合端口無法UP
2)聚合的線路默認最多為8條
二、兩種模式配置舉例
2.1 SW1 和SW2 配置鏈路聚合手工負載分擔模式,配置Trunk,放行vlan
2.2 SW1 和SW2 配置鏈路聚合LACP模式,配置Trunk,放行vlan
三、手工負載分擔模式配置
3.1 SW1 SW2 創(chuàng)建鏈路聚合?Eth-Trunk 1 設置模式為手工負載分擔模式(默認模式)
[SW1]int Eth-Trunk 1
[SW1-Eth-Trunk1]mode manual load-balance #設置鏈接聚合模式為手工模式(默認,可不配置)
[SW1-Eth-Trunk1]trunkport GigabitEthernet 0/0/23 to 0/0/24 #添加聚合的端口
------------------------------------------------------------
[SW2]int Eth-Trunk 1
[SW2-Eth-Trunk1]mode manual load-balance #設置鏈接聚合模式為手工模式 (默認,可不配置)
[SW2-Eth-Trunk1]trunkport GigabitEthernet 0/0/23 to 0/0/24 #添加聚合的端口
3.2? SW1 SW2? 分別在?Eth-Trunk 1 配置Trunk? 放行所有VLAN
[SW1]int eth 1
[SW1-Eth-Trunk1]port link-type trunk
[SW1-Eth-Trunk1]port trunk allow-pass vlan all
-------------------------------------------------
[SW2]int eth 1
[SW2-Eth-Trunk1]port link-type trunk
[SW2-Eth-Trunk1]port trunk allow-pass vlan all
四、LACP?模式配置
4.1??SW1 SW2 創(chuàng)建鏈路聚合?Eth-Trunk 1 設置模式為LACP模式
[SW1]int Eth-Trunk 1
[SW1-Eth-Trunk1]mode lacp-static #設置鏈接聚合模式為lacp
[SW1-Eth-Trunk1]trunkport GigabitEthernet 0/0/23 to 0/0/24 #添加聚合的端口
[SW1-Eth-Trunk1]max active-linknumber 2 #配置lacp最大活動鏈路為2
[SW1-Eth-Trunk1]lacp preempt enable #開啟lacp端口搶占(端口down掉,默認不搶占)
[SW1-Eth-Trunk1]lacp preempt delay 10 #配置lacp搶占時間為10秒
--------------------------------------------------------------------
[SW2]int Eth-Trunk 1
[SW2-Eth-Trunk1]mode lacp-static #設置鏈接聚合模式為lacp
[SW2-Eth-Trunk1]trunkport GigabitEthernet 0/0/23 to 0/0/24 #添加聚合的端口
[SW2-Eth-Trunk1]max active-linknumber 2 #配置lacp最大活動鏈路為2
[SW2-Eth-Trunk1]lacp preempt enable #開啟lacp端口搶占,(端口down掉,默認不搶占)
[SW2-Eth-Trunk1]lacp preempt delay 10 #配置lacp搶占時間為10秒
4.2? SW1? SW2配置g0/0/24 lacp端口優(yōu)先級為100,默認32768,越小越優(yōu)先?
[SW1]int g0/0/24
[SW1-GigabitEthernet0/0/24]lacp priority 100 #配置lacp端口優(yōu)先級,用于lacp搶占
---------------------------------------------------------------------
[SW2]int g0/0/24
[SW2-GigabitEthernet0/0/24]lacp priority 100 #配置lacp端口優(yōu)先級,用于lacp搶占
4.3?SW1 SW2 在?Eth-Trunk 1 配置Trunk? 放行所有VLAN
[SW1]int eth 1
[SW1-Eth-Trunk1]port link-type trunk
[SW1-Eth-Trunk1]port trunk allow-pass vlan all
-------------------------------------------------
[SW2]int eth 1
[SW2-Eth-Trunk1]port link-type trunk
[SW2-Eth-Trunk1]port trunk allow-pass vlan all
五、配置三層聚合和加入不同速率端口
5.1 默認聚合為二層,執(zhí)行undo portswitch 修改為三層聚合文章來源:http://www.zghlxwxcb.cn/news/detail-453613.html
[SW1]int Eth-Trunk 1
[SW1-Eth-Trunk1]undo portswitch #配置三層聚合
[SW1-Eth-Trunk1]load-balance dst-ip #配置基于目標IP的負載均衡
-------------------------------------
[SW2]int Eth-Trunk 1
[SW2-Eth-Trunk1]undo portswitch #配置三層聚合
[SW2-Eth-Trunk1]load-balance dst-ip #配置基于目標IP的負載均衡
5.2 ?當設備存在千兆和萬兆端口時,執(zhí)行??mixed-rate link enable 可將不同速率端口加入到鏈路聚合中文章來源地址http://www.zghlxwxcb.cn/news/detail-453613.html
[SW2]int Eth-Trunk 1
[SW2]mixed-rate link enable
六、查看鏈路聚合
dis eth-trunk
dis int eth-trunk
到了這里,關于華為鏈路聚合手工負載分擔和 lacp 模式的文章就介紹完了。如果您還想了解更多內容,請在右上角搜索TOY模板網以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網!