配置手工模式
配置LACP模式
sy
[SW1]interface Eth-Trunk 1
[SW1-Eth-Trunk1]trunkport Ethernet 0/0/1 to 0/0/3
SW2:
[SW2]interface Eth-Trunk 2
[SW2-Eth-Trunk2]trunkport Ethernet 0/0/1 to 0/0/3
执行命令mode manual load-balance可以设置执行模式,默认模式为手动配置,所以此处可以省略
SW1:
[SW1-Eth-Trunk1]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
Ethernet0/0/1 Up 1
Ethernet0/0/2 Up 1
Ethernet0/0/3 Up 1
SW2:
[SW2-Eth-Trunk2]display eth-trunk 2
Eth-Trunk2'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
Ethernet0/0/1 Up 1
Ethernet0/0/2 Up 1
Ethernet0/0/3 Up 1
从以上信息看出Eth-Trunk 1中包含3个成员接口Ethernet1/0/1、Ethernet1/0/2和Ethernet1/0/3。成员接口的状态都为Up。
注:
在Eth-Trunk接口视图下:执行以下任一个步骤,添加 Eth-Trunk成员接口。
1、 执行 trunkport interface-type { interface-number1 [ to interface-number2] } &<1-16>命令,批量增加成员接口。
2、执行 trunkport interface-type interface-number命令,增加一个成员接口。
SW1:
[SW1]int Eth-Trunk 10
[SW1-Eth-Trunk10]mode lacp-static
[SW1-Eth-Trunk10]trunkport GigabitEthernet 0/0/1 to 0/0/4
[SW1-Eth-Trunk10]lacp preempt enable
[SW1-Eth-Trunk10]lacp preempt delay 10
[SW1-Eth-Trunk10]max active-linknumber2
[SW1]int g0/0/4
[SW1-Ethernet0/0/1]lacp priority 4096
[SW1-Ethernet0/0/3]lacp priority 4096
SW2:
[SW2]int Eth-Trunk 20
[SW2-Eth-Trunk20]mode lacp-static
[SW2-Eth-Trunk20]trunkport GigabitEthernet 0/0/1 to 0/0/4
[SW2-Eth-Trunk20]lacp preempt enable
[SW2-Eth-Trunk20]lacp preempt delay 10
[SW2-Eth-Trunk20]max active-linknumber 2
[SW2]int g0/0/4
[SW2-Ethernet0/0/1]lacp priority 4096
[SW2-Ethernet0/0/3]lacp priority 4096
1.创建聚合口
2.配置聚合模式
3.添加端口成员
4。配置系统的优先级
5.确认活动端口上限
6.修改端口优先
SW1:
[SW1-Eth-Trunk10]dis eth-trunk 10
Eth-Trunk10's state information is:
Local:
LAG ID: 10 WorkingMode: STATIC
Preempt Delay Time: 10 Hash arithmetic: According to SIP-XOR-DIP
System Priority: 32768 System ID: 4c1f-cc03-58bf
Least Active-linknumber: 1 Max Active-linknumber: 2
Operate status: up Number Of Up Port In Trunk: 2
--------------------------------------------------------------------------------
ActorPortName Status PortType PortPri PortNo PortKey PortState Weight
Ethernet0/0/1 Selected 100M 4096 2 2593 10111100 1
Ethernet0/0/2 Unselect 100M 32768 3 2593 10100000 1
Ethernet0/0/3 Selected 100M 4096 4 2593 10111100 1
Ethernet0/0/4 Unselect 100M 32768 5 2593 10100000 1
Partner:
--------------------------------------------------------------------------------
ActorPortName SysPri SystemID PortPri PortNo PortKey PortState
Ethernet0/0/1 32768 4c1f-cc27-11a2 4096 2 5153 10111100
Ethernet0/0/2 32768 4c1f-cc27-11a2 32768 3 5153 10100000
Ethernet0/0/3 32768 4c1f-cc27-11a2 4096 4 5153 10111100
Ethernet0/0/4 32768 4c1f-cc27-11a2 32768 5 5153 10100000
SW2:
[SW2-Eth-Trunk20]dis eth-trunk 20
Eth-Trunk20's state information is:
Local:
LAG ID: 20 WorkingMode: STATIC
Preempt Delay Time: 10 Hash arithmetic: According to SIP-XOR-DIP
System Priority: 32768 System ID: 4c1f-cc27-11a2
Least Active-linknumber: 1 Max Active-linknumber: 2
Operate status: up Number Of Up Port In Trunk: 2
--------------------------------------------------------------------------------
ActorPortName Status PortType PortPri PortNo PortKey PortState Weight
Ethernet0/0/1 Selected 100M 4096 2 5153 10111100 1
Ethernet0/0/2 Unselect 100M 32768 3 5153 10100000 1
Ethernet0/0/3 Selected 100M 4096 4 5153 10111100 1
Ethernet0/0/4 Unselect 100M 32768 5 5153 10100000 1
Partner:
--------------------------------------------------------------------------------
ActorPortName SysPri SystemID PortPri PortNo PortKey PortState
Ethernet0/0/1 32768 4c1f-cc03-58bf 4096 2 2593 10111100
Ethernet0/0/2 32768 4c1f-cc03-58bf 32768 3 2593 10100000
Ethernet0/0/3 32768 4c1f-cc03-58bf 4096 4 2593 10111100
Ethernet0/0/4 32768 4c1f-cc03-58bf 32768 5 2593 10100000
可以看出,由于0/0/1和0/0/3的接口优先级小,接口成为了活动接口,而0/0/2和0/0/4接口根据选举规则,变成了备份接口
1.创建链路聚合组:Interface eth-trunk trunk-id (0-63)
2.配置链路聚合模式:[huawei- Eth-Trunk 1] mode {lacp/manual load-balance},Mode lacp配置链路聚合模式为lacp模式,mode manual load-balance配置链路集合模式为手工模式。默认为手工模式。注:需要保持两端链路聚合模式一致。
3.将接口加入链路聚合组中:
4.配置系统|lacp优先级:[huawei] lacp priority priority-level,系统lacp优先级值越小优先级越高,缺省情况下系统lacp优先级为32768。
5.配置接口lacp优先级:[huawei GigabiaEthernet0/0/1] lacp priority priority,在接口视图下配置接口lacp优先级,缺省情况下,接口的lacp优先级是32768.接口优先级值越小,接口的lacp优先级越高。只有在接口已经加入到链路聚合中才可以配置该命令。
7.配置最大活动接口数:[huawei Eth-Trunk1] max active-linknumber {number},注:保持本端和对端的最大活动接口数一致, 只有lacp模式支持配置最大活动接口数。
1、什么是链路聚合
链路聚合是把两台设备之间的链路聚集在一块,当做一条逻辑链路使用。
2、链路聚合带来的好处
LACP的作用是根据系统本地信息以及与对端系统动态交换的信息,自动形成链路的汇聚或解汇聚,并控制链路的报文收发状态。没有运行LACP的聚合,称之为手工聚合,由管理员指定聚合成员,并根据端口的up/down状态来确定是否聚合。