ensp 链路聚合--手工负载分担

链路聚合(link aggregation)是将一组相同属性的物理接口捆绑在一起为一个逻辑接口来增加带宽和可靠性的一种方法。

--增加带宽

--提高冗余

--分担负载

--节省成本

--配置量少

2台交换机之间通过3条以太网物理链路相连,将这3条链路捆绑在一起,就成为了一条eth-trunk逻辑链路,这条逻辑链路的带宽等于原先3条以太网物理链路的带宽总和。

注意事项:

--成员接口不能配置任何业务和静态mac地址

--成员接口加入eth-trunk链路时,必须为默认的hybrid类型接口

--eth-trunk接口不能嵌套

--一个以太网接口只能加入到一个eth-trunk

--可以将不同接口板上的以太网接口加入到同一个eth-trunk接口

--eth-trunk本地接口,对端直连的也必须是eth-trunk接口

--成员接口的速率要一致

--当成员接口加入eth-trunk接口后,学习mac地址时是按照eth-trunk接口来学习的。而不是按照成员接口来学习。

链路聚合模式

手工负载分担模式

手工配置eth-trunk、成员接口的加入,不需要链路聚合控制协议的参与。该模式下所有活动链路都参与数据的转发,平均分担流量。

配置

1 创建vlan,配置turnk

S1-S6

<Huawei>system-view
[Huawei]vlan batch 10 20
S1与S3\S5之间的trunk
[Huawei]interface GigabitEthernet 0/0/4
[Huawei-GigabitEthernet0/0/4]port link-type trunk
[Huawei-GigabitEthernet0/0/4]port trunk allow-pass vlan 10
[Huawei]interface GigabitEthernet 0/0/5
[Huawei-GigabitEthernet0/0/5]port link-type trunk
[Huawei-GigabitEthernet0/0/5]port trunk allow-pass vlan 20
S2与S4\S6之间的trunk
[Huawei]interface GigabitEthernet 0/0/4
[Huawei-GigabitEthernet0/0/4]port link-type trunk
[Huawei-GigabitEthernet0/0/4]port trunk allow-pass vlan 10
[Huawei]interface GigabitEthernet 0/0/5
[Huawei-GigabitEthernet0/0/5]port link-type trunk
[Huawei-GigabitEthernet0/0/5]port trunk allow-pass vlan 20
配置S3\S4\S5\S6的trunk
[Huawei]interface GigabitEthernet 0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type trunk
[Huawei-GigabitEthernet0/0/1]port trunk allow-pass vlan 10
S5
[Huawei]interface GigabitEthernet 0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type trunk
[Huawei-GigabitEthernet0/0/1]port trunk allow-pass vlan 20

同理S4,S6分别于S3,S5配置相同

2 配置S1S2之间的eth-trunk,有两种方法

S1--第一种

[Huawei]interface Eth-Trunk 1 //创建链路聚合组1
[Huawei]interface GigabitEthernet 0/0/1 //把接口加入链路聚合组1
[Huawei-GigabitEthernet0/0/1]eth-trunk 1
[Huawei]interface GigabitEthernet 0/0/2
[Huawei-GigabitEthernet0/0/2]eth-trunk 1
[Huawei]interface GigabitEthernet 0/0/3
[Huawei-GigabitEthernet0/0/3]eth-trunk 1
S2--第二种方法
[Huawei]interface Eth-Trunk 1 //创建链路聚合1
[Huawei-Eth-Trunk1]trunkport GigabitEthernet 0/0/1 to 0/0/3 //直接把接口加入以太网通道,物理接口下会自动添加配置
S1查看
[Huawei]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: 3                     
---------------------------------------------------------------------
PortName                      Status      Weight 
GigabitEthernet0/0/1          Up          1      
GigabitEthernet0/0/2          Up          1      
GigabitEthernet0/0/3          Up          1 
S2查看
[Huawei]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: 3                     
---------------------------------------------------------------------
PortName                      Status      Weight 
GigabitEthernet0/0/1          Up          1      
GigabitEthernet0/0/2          Up          1      
GigabitEthernet0/0/3          Up          1 

注:在默认情况下,eth-trunk的工作模式为手工负载分担模式。

3 S1S2 配置,允许vlan 10 20

[Huawei]interface Eth-Trunk 1
[Huawei-Eth-Trunk1]mode manual load-balance //默认的模式

[Huawei-Eth-Trunk1]port link-type trunk
[Huawei-Eth-Trunk1]port trunk allow-pass vlan 10 20
查看放行结果 S1和S2显示相同
[Huawei]display port vlan
Port                    Link Type    PVID  Trunk VLAN List
---------------------------------------------------------------------
Eth-Trunk1              trunk        1     1 10 20
GigabitEthernet0/0/1    hybrid       0     -                                   
GigabitEthernet0/0/2    hybrid       0     -                                   
GigabitEthernet0/0/3    hybrid       0     -                                   
GigabitEthernet0/0/4    trunk        1     1 10
GigabitEthernet0/0/5    trunk        1     1 20

4 配置eth-trunk负载分担方式

//分担方式为源目MAC地址,S1S2配置一样

[Huawei]interface Eth-Trunk 1
[Huawei-Eth-Trunk1]load-balance src-dst-mac
[Huawei-Eth-Trunk1]display eth-trunk 1
Eth-Trunk1's state information is:
WorkingMode: NORMAL         Hash arithmetic: According to SA-XOR-DA //        
Least Active-linknumber: 1  Max Bandwidth-affected-linknumber: 8              
Operate status: up          Number Of Up Port In Trunk: 3                     
---------------------------------------------------------------------
PortName                      Status      Weight 
GigabitEthernet0/0/1          Up          1      
GigabitEthernet0/0/2          Up          1      
GigabitEthernet0/0/3          Up          1

分担方式

--dst-ip(目的ip地址)

--dst-mac(目的mac地址)

--src-ip(源ip地址)

--src-mac(源mac地址)

--src-dst-ip(源ip地址与目的ip地址的异或)

--src-dst-mac(源mac地址与目的mac地址的异或)

5 配置接口的阈值

设置活动接口数下阈值是为了保证最小带宽,当前活动链路数目小于下限阈值时,eth-trunk接口的状态转为down

S1

[Huawei-Eth-Trunk1]least active-linknumber 3

S3

[Huawei-Eth-Trunk1]least active-linknumber 2

如果两个交换机值不一样,以下限阈值较大的一端为准

上限阈值最大8,可用修改--max bandwidth-affected-linknumber 4

6 检查最终结果

S1

S1
[Huawei]display eth-trunk 1
Eth-Trunk1's state information is:
WorkingMode: NORMAL         Hash arithmetic: According to SA-XOR-DA           
Least Active-linknumber: 3  Max Bandwidth-affected-linknumber: 8              
Operate status: up          Number Of Up Port In Trunk: 3                     
---------------------------------------------------------------------
PortName                      Status      Weight 
GigabitEthernet0/0/1          Up          1      
GigabitEthernet0/0/2          Up          1      
GigabitEthernet0/0/3          Up          1 
S2
[Huawei]display eth-trunk 1
Eth-Trunk1's state information is:
WorkingMode: NORMAL         Hash arithmetic: According to SA-XOR-DA           
Least Active-linknumber: 2  Max Bandwidth-affected-linknumber: 8              
Operate status: up          Number Of Up Port In Trunk: 3                     
---------------------------------------------------------------------
PortName                      Status      Weight 
GigabitEthernet0/0/1          Up          1      
GigabitEthernet0/0/2          Up          1      
GigabitEthernet0/0/3          Up          1 
查看详细信息
[Huawei]display trunkmembership eth-trunk 1
Trunk ID: 1 
Used status: VALID 
TYPE: ethernet 
Working Mode : Normal 
Number Of Ports in Trunk = 3
Number Of Up Ports in Trunk = 3
Operate status: up 
  
Interface GigabitEthernet0/0/1, valid, operate up, weight=1
Interface GigabitEthernet0/0/2, valid, operate up, weight=1
Interface GigabitEthernet0/0/3, valid, operate up, weight=1
posted @ 2020-06-17 16:57  春困秋乏夏打盹  阅读(2718)  评论(0编辑  收藏  举报