华为5700s配置链路聚合

华为官网配置案例:http://support.huawei.com/enterprise/KnowledgebaseReadAction.action?contentId=KB1000067551
http://support.huawei.com/enterprise/docinforeader!loadDocument1.action?contentId=DOC1000088724&partNo=10212
================================================================================
 问题描述

S交换机eth-trunk 链路聚合配置

此功能在S交换机中通用,如S2700,S3700,S5700,S6700,S7700,S9300,S9700

 

 解决方案

[SwitchA] interface Eth-Trunk1

[SwitchA-Eth-Trunk1] trunkport gigabitethernet 0/0/1 to 0/0/3

[SwitchA-Eth-Trunk1] quit

[SwitchA] interface Eth-Trunk1   //按需配置接口的vlan

[SwitchA-Eth-Trunk1] port link-type trunk

[SwitchA-Eth-Trunk1] port trunk allow-pass vlan 10 20

如果需要使用LACP的方式,添加mode lacp。如果是已添加接口,转换时需要先去除接口。

[SwitchA] interface eth-trunk 1

[SwitchA-Eth-Trunk1] mode lacp


==================================================================================================



华为S5700的手工链路聚合配置


1、建立 eth-trunk ID


2、将配置eth-trunl的link-type为trunk


3、设置允许通过的vlan


4、将端口加入eth-trunk




配置实例:




#


int eth-trunk 1


port link-type trunk


port trunk allow vlan 10 to 100


#


int g0/0/1


eth-trunk 1


#int g0/0/2


eth-trunk 1


#


return



验证命令:


dis trunkmembership  验证是否创建成功,端口是否加入


dis eth-trunk 1   查看eth-trunk 1的配置


 ==========================================================================================



interface
Eth-Trunk 1 /创建聚合链路,数值可以随意。 port link-type trunk /设置成trunk模式。(如果是接入vlan的话,link-type acess) port trunk allow-pass vlan all /设置允许所有vlan.(接入vlan的话,port default vlan 20) mode manual load-balance /设置为手动负载 trunkport g0/0/10 to g0/0/13 /加入接口。

trunkport g0/0/10 to g0/0/14 /加入接口。

查看效果:

[txkj2]display eth-trunk 1
Eth-Trunk1's state information is:
WorkingMode: NORMAL Hash arithmetic: According to SIP-XOR-DIP
Least Active-linknumber: 1 Max Bandwidth-affected-linknumber: 8
Operate status: up Number Of Up Port In Trunk: 2
--------------------------------------------------------------------------------
PortName Status Weight
GigabitEthernet0/0/13 Up 1
GigabitEthernet0/0/14 Up 1



[txkj2]display trunkmembership eth-trunk 1
Trunk ID: 1
Used status: VALID
TYPE: ethernet
Working Mode : Normal
Number Of Ports in Trunk = 2
Number Of Up Ports in Trunk = 2
Operate status: up

Interface GigabitEthernet0/0/13, valid, operate up, weight=1
Interface GigabitEthernet0/0/14, valid, operate up, weight=1

华为端口聚合分为两种,手工负载分担eth-trunk链路和LACP eth-trunk链路,我这里只介绍前者。

       手动的eth-trunk,可以把他看成是一种接口,可以是access,也可以是trunk,创建好了后,配置完全和配置接口一样。我这里演示成trunk模式。
一、场景模拟为 pc1--sw1-----sw2--pc2
vlan 2 sw1:192.168.20.1 ,sw2:192.168.20.33;pc1:192.168.20.11,pc2 19219.168.20.22
(pc端的vlan配置不讲了,大家应该都会。)另外,sw2配置也相同,当然,聚合的接口自定义。
interface Eth-Trunk 1 /创建聚合链路,数值可以随意。
 port link-type trunk  /设置成trunk模式。(如果是接入vlan的话,link-type acess)
port trunk allow-pass vlan all /设置允许所有vlan.(接入vlan的话,port default vlan 20)
mode manual load-balance /设置为手动负载
trunkport g0/0/10 to g0/0/11 /加入接口。
port-group group-member g0/0/10 to g0/0/11  /创建临时端口组,同时进入接口10和11
eth-trunk 1   /加入eth-trunk 1
效果:[sw1]dis eth-trunk 1
Eth-Trunk1's state information is:
WorkingMode: NORMAL         Hash arithmetic: According to SIP-XOR-DIP         
Least Active-linknumber: 1  Max Bandwidth-affected-linknumber: 8              
Operate status: up          Number Of Up Port In Trunk: 2                     
--------------------------------------------------------------------------------
PortName                      Status      Weight 
GigabitEthernet0/0/10         Up          1      
GigabitEthernet0/0/11         Up          1     
这里简单解释一下:
Operate status:显示成员接口状态,如果是down表示在物理接口上出现故障。
      workingMode:nomal是普通负载分担方式,static 表示静态LACP负载分担方式
      portName:接口名
二、还可以根据源mac,ip,目的mac,ip进行负载,load-balance 命令后很多。可以根据实际情况加
三、故障排除。
我配置的时候出现过,用dis的时候portname下面是空的情况。原来是自己没有加入eth-trunk 1。
第二个问题,原来g0/0/10 和11 是trunk.我更改接口的时候出现Error: Please renew the default configurations。我百度了一下,发现是因为接口下有非默认配置的配置,所以无法直接更改成eth-trunk,必须先清除原来的配置,但是清除接口时任然报这个错。就是因为默认接口是加入vlan 1 的。
解决:1. 首先undo trunk port allow-pass vlan all./清除trunk所有vlan
  然后 2. port trunk allow-pass vlan 1,将vlan 1重新加入
           3. undo port link-type trunk /清除trunk。这个时候就不会报错了。
           4.然后就可以加入eth-trunk 1 了。
原文地址:https://www.cnblogs.com/sysk/p/6237521.html