华为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
