華為ethtrunk默認格式
㈠ 華為交換機清除聚合鏈路與添加埠VLAN
將指定成員介面從聚合組中刪除
刪除成員介面有如下兩種方式,請根據需要選擇其一即可。
在Eth-Trunk介面視圖下執行命令undo trunkport interface-type { interface-number1 [ to interface-number2 ] } &<1-8>。
<HUAWEI> system-view / sys
[HUAWEI] display Eth-trunk 1 \查看該鏈路聚合情況
[HUAWEI] interface Eth-trunk 1 \進入Eth-trunk 1
[HUAWEI-Eth-Trunk1] undo trunkport gigabitethernet 0/0/1 \清除埠
在成員介面視圖下執行命令undo Eth-trunk。
<HUAWEI> system-view / sys
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] undo Eth-trunk
刪除聚合組
將所有的成員介面從聚合組中刪除,然後在系統視圖下執行命令undo interface eth-trunk trunk-id。
<HUAWEI> system-view
[HUAWEI] undo interface Eth-trunk 10
<Huawei>system-view /sys \進入系統視圖
[Huawei]vlan 10
[Huawei]display vlan \查看現有vlan
[Huawei]interface g0/0/1 \進入網口0/0/1視圖
[Huawei-GigabitEthernet0/0/1]port link-type access \配置網口模式為access
[Huawei-GigabitEthernet0/0/1]port default vlan 10 \配置網口Vlan為10
[Huawei-GigabitEthernet0/0/1]display this \查看配置
[Huawei-GigabitEthernet0/0/1]q
[Huawei]port-group 1 \創建埠組1
[Huawei-port-group-1]group-member g0/0/2 to g0/0/5 \把網口0/0/2-0/0/5加入埠組1
[Huawei-port-group-1]port link-type access \配置埠組1的所有網口模式為access
[Huawei-GigabitEthernet0/0/2]port link-type access \自動生成,無需輸入
[Huawei-GigabitEthernet0/0/3]port link-type access \自動生成,無需輸入
[Huawei-GigabitEthernet0/0/4]port link-type access \自動生成,無需輸入
[Huawei-GigabitEthernet0/0/5]port link-type access \自動生成,無需輸入
[Huawei-port-group-1]port default vlan 20 \配置埠組1所有網口的Vlan為20
[Huawei-GigabitEthernet0/0/2]port default vlan 20 \自動生成,無需輸入
[Huawei-GigabitEthernet0/0/3]port default vlan 20 \自動生成,無需輸入
[Huawei-GigabitEthernet0/0/4]port default vlan 20 \自動生成,無需輸入
[Huawei-GigabitEthernet0/0/5]port default vlan 20 \自動生成,無需輸入
[Huawei-port-group-1]q
[Huawei]undo vlan 50 \刪除ID為50的VLAN
[Huawei]undo port-group 1 \刪除ID為1的埠組
退出前記得保存
㈡ 華為鏈路聚合配置
配置鏈路聚合
1、創建聚合組
sys
interface eth-trunk 2
2、配置聚合模式為手工模式
interface eth-trunk 2
mode manual load-balance 表示手工模式
mode lacp lacp模式,可以自動檢測鏈路是否錯誤;
3、將介面成員加入聚合組
interface eth-trunk 2
trunkport g1/0/1 to 1/0/3 mode { active | passive }
或者進到介面模式下:
interface g1/0/1
eth-trunk 2 mode { active | passive }
注意:
一個乙太網介面只能加入到一個Eth-Trunk介面;
當成員介面加入Eth-Trunk後,學習MAC地址或ARP地址時是按照Eth-Trunk來學習的,而不是按照成員介面來學習;
刪除聚合組時需要先刪除聚合組中的成員介面
4、配置鏈路聚合的負載分擔方式(可選)
Eth-Trunk的負載分擔是逐流進行的,逐流負載分擔能保證包的順序,保證了同一數據
流的幀在同一條物理鏈路轉發。而不同數據流在不同的物理鏈路上轉發從而實現分擔負載;
可以配置普通負載分擔模式,基於報文的IP地址或MAC地址來分擔負載;
由於負載分擔只對出方向的流量有效,因此鏈路兩端介面的負載分擔模式可以不一致,兩端互不影響;
配置普通負載分擔方式:
interface eth-trunk 2
load-balance { dst-ip | dst-mac | src-ip | src-mac | src-dst-ip | src-dstmac }
dst-ip(目的IP地址)模式:根據目的IP地址進行負載分擔;
dst-mac(目的MAC地址)模式;
src-ip(源IP地址)模式;
src-mac(源MAC地址)模式;
src-dst-ip(源IP地址異或目的IP地址)模式:根據源IP異或目的IP地址的結果進行負載分擔。
src-dst-mac(源MAC地址異或目的MAC地址)模式;
5、檢查配置結果
display eth-trunk 2 查看Eth-Trunk的配置信息;
display trunkmembership eth-trunk 2,查看Eth-Trunk的成員介面信息
㈢ 華為交換機如何做埠聚合
[Huawei]sysnamesw1
[sw1]interfaceeth-trunk1
[sw1-Eth-Trunk1]modelacp-static
[sw1-Eth-Trunk1]load-balancesrc-dst-ip//根據源目的ip逐流負載分擔
[sw1-Eth-Trunk1]maxactive-linknumber2//最大激活2條鏈路
[sw1-Eth-Trunk1]lacppreemptenable//開啟搶占模式,故障恢復後優先的鏈路才可恢復通信
[sw1-Eth-Trunk1]bpenable
[sw1-Eth-Trunk1]portlink-typetrunk
[sw1-Eth-Trunk1]porttrunkallow-passvlanall
[sw1-Eth-Trunk1]q
[sw1]lacppriority100//系統優先順序默認32768,越小越優先,據此確定主動端
[sw1]inte0/0/1
[sw1-Ethernet0/0/1]eth-trunk1
Info:.Pleasewaitforamoment...done.
[sw1-Ethernet0/0/1]lacppriority100//埠優先順序默認32768,小好,據此確定哪個埠鏈路處於selected
[sw1-Ethernet0/0/1]q
[sw1]inte0/0/2
[sw1-Ethernet0/0/2]eth-trunk1
[sw1-Ethernet0/0/2]lacppriority100
[sw1-Ethernet0/0/2]q
[sw1]
[sw1]inte0/0/3
[sw1-Ethernet0/0/3]eth-trunk1
[sw1-Ethernet0/0/3]lacppriority300
[sw1-Ethernet0/0/3]q
sw2配置:
[sw2]interfaceeth-trunk1
[sw2-Eth-Trunk1]modelacp-static
[sw2-Eth-Trunk1]bpenable
[sw2-Eth-Trunk1]portlink-typetrunk
[sw2-Eth-Trunk1]porttrunkallow-passvlanall
[sw2-Eth-Trunk1]q
[sw2]lacppriority300
[sw2]inte0/0/1
[sw2-Ethernet0/0/1]eth-trunk1
[sw2-Ethernet0/0/1]q
[sw2]inte0/0/2
[sw2-Ethernet0/0/2]eth-trunk1
[sw2-Ethernet0/0/2]q
[sw2]inte0/0/3
[sw2-Ethernet0/0/3]eth-trunk1
[sw2-Ethernet0/0/3]q
㈣ 華為eth-trunk配置
VRRP與介面狀態聯動簡介
VRRP主備備份功能有時需要額外的技術來完善其工作。例如,Master設備到達某網路的鏈路突然斷掉時,VRRP無法感知故障進行切換,導致主機無法通過Master設備遠程訪問該網路。此時,可以通過VRRP與介面狀態聯動,解決這個問題。
當Master設備發現上行介面發生故障時,Master設備降低自己的優先順序(使得Master設備的優先順序低於Backup設備的優先順序),並立即發送VRRP報文。Backup設備接收到優先順序比自己低的VRRP報文後,切換至Master狀態,充當VRRP備份組中新的Master設備,從而保證了流量的正常轉發。
配置注意事項
· 保證同一備份組的設備上配置相同的備份組號(virtual-router-id)。
· 不同備份組之間的虛擬IP地址不能重復,並且必須和介面的IP地址在同一網段。
· 一個VRRP備份組最多可以配置監視8個介面。並且,當設備為IP地址擁有者時,不允許對其配置監視介面。
組網需求
如圖1所示,用戶通過Switch雙歸屬到SwitchA和SwitchB。用戶希望實現:
· 正常情況下,主機以SwitchA為默認網關接入Internet,當SwitchA或者其上下行介面故障時,SwitchB接替作為網關繼續進行工作,實現網關的冗餘備份。
· SwitchA和SwitchB之間增加帶寬,實現鏈路冗餘備份,提高鏈路可靠性。
· SwitchA故障恢復後,可以在20秒內重新成為網關。
配置思路
採用VRRP主備備份實現網關冗餘備份,配置思路如下:
1. 配置各設備介面IP地址及路由協議,使各設備間網路層連通。
2. 在SwitchA和SwitchB上部署VLAN聚合,實現VLAN101~VLAN180二層隔離三層互通,節省了IP地址。
3. 在SwitchA和SwitchB上創建Eth-Trunk介面並加入成員介面,實現增加鏈路帶寬,提供鏈路冗餘備份。
4. 在SwitchA和SwitchB上配置VRRP備份組。其中,SwitchA上配置較高優先順序和20秒搶占延時,作為Master設備承擔流量轉發;SwitchB上配置較低優先順序,作為備用設備,實現網關冗餘備份。
5. 在SwitchA上配置VRRP與介面狀態聯動,監視介面GE1/0/1和介面GE1/0/2,實現主設備故障時,VRRP備份組及時感知並進行主備切換。
㈤ 華為路由器上多配了個eth-trunk,該怎麼刪除它啊,eth-trunk裡面已經沒有介面了為什麼還是刪不掉啊。。。
[lsw6]dis cu 得Eth-Trunk3到以下信息
#
interface Eth-Trunk3
port link-type trunk
port trunk allow-pass vlan 2 to 4094
mode lacp-static
#
[lsw6]int Eth-Trunk3 #進入Eth-Trunk3
[lsw6-Eth-Trunk3]undo mode #刪除運行模式不用加lacp-static
[lsw6-Eth-Trunk3]undo port trunk allow-pass vlan all #刪除所有連接vlan
[lsw6-Eth-Trunk3]port trunk allow-pass vlan 1 #刪除默認可通過的vlan1(新版)
[lsw6-Eth-Trunk3]undo port link-type #刪除通信模式
[lsw6-Eth-Trunk3]q #退出Eth-Trunk3
[lsw6]undo interface Eth-Trunk 3 #在系統示圖下刪除interface Eth-Trunk 3記得要有interface不然刪不了。
好了你了[lsw6]dis cu #Eth-Trunk3不見了
㈥ 華為交換機防止環路配置
直接把兩條交換機之間的trunk互聯口。做成
eth-trunk 1
鏈路聚合。交換機會把這兩個埠虛擬成一個端虧正口。
命令如下。
interface eth-trunk 1
port link-type trunk
interface g0/0/1
eth-trunk 1
interface g0/0/2
eth-trunk 1
那麼這兩個口就聚合了
兩台交換機都這么數旦設置。
還有,你模擬器裡面默認開啟了stp協議。ensp默認的是 stp mode mstp
有這個協議在,一般環不了。銷畢悔
㈦ 華為交換機常見鏈路聚合操作整理 第十三天
1、將成員介面批量加入聚合組。
在Eth-Trunk1中批量加入10個成員介面。
腳本:
system-view
interface eth-trunk 1
trunkport gigabitethernet 1/0/10 to 1/0/20
2、將指定成員介面從聚合組中刪除,有兩種方式。
(1)在Eth-Trunk介面視圖下使用命令undo trunkport進行刪除。
例如:
system-view
interface eth-trunk 1
undo trunkport gigabitethernet 1/0/10
(2)在成員介面視圖下執行命令undo eth-trunk進行刪除。
例如:
system-view
interface gigabitethernet 1/0/10
undo eth-trunk
3、刪除聚合組
首先需要將所有的成員從聚合組中刪除。
在系統視圖下使用命令undo interface eth-trunk trunk-id.
例如:
system-view
undo interface eth-trunk 2
4、查看Eth-trunk介面的配置信息。
display eth-trunk #查看所有Eth-trunk介面配置信息。
display eth-trunk 10 #查看eth-trunk 10介面的配置信息。
5、查看Eth-trunk的成員介面信息。
display trunkmembership eth-trunk 1 #查看ID為1的Eth-trunk的成員介面信息。
6、查看設備支持的鏈路聚合組數目和成員介面數目。
display trunk configuration