二层链路聚合配置
一、手工负载分担模式配置
(1)
LSW1:
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysn LSW1
[LSW1-Eth-Trunk1]mode ?
注意:eth-trunk工作模式分为手工负载分担模式和lacp模式两种
Eth-Trunk1's state information is:
--------------------------------------------------------------------------------
(2)LSW2也需要同样的配置
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysn LSW2
[LSW2]int eth-trunk 1
[LSW2-Eth-Trunk1]trunkport GigabitEthernet 0/0/1 to 0/0/3
Info: This operation may take a few seconds. Please wait for a moment...
[LSW2-Eth-Trunk1]dis eth-trunk 1
Eth-Trunk1's state information is:
--------------------------------------------------------------------------------
(3)
回显信息中WorkingMode: NORMAL ,表示eth-trunk1的工作模式为收工负载分担模式,eth-trunk1包含了3个成员端口G0/0/1,G0/0/2,G0/0/3,
此时,两台设备之间的三条物理链路聚合在一起,已绑定成为一条逻辑上的链路。
二、静态LACP模式配置
(1)删除LSW1和LSW2上的G0/0/1,G0/0/2和G0/0/3接口下的配置。
LSW1:
[LSW1]int g0/0/1
[LSW1-GigabitEthernet0/0/1]int g0/0/2
[LSW1-GigabitEthernet0/0/2]undo eth-trunk
[LSW1-GigabitEthernet0/0/2]int g0/0/3
[LSW1-GigabitEthernet0/0/3]q
[LSW1]
LSW2:
[LSW2]int g0/0/1
[LSW2-GigabitEthernet0/0/1]int g0/0/2
[LSW2-GigabitEthernet0/0/2]int g0/0/3
[LSW2-GigabitEthernet0/0/3]q
[LSW2]
(2)创建eth-trunk端口,配置为lacp模式,将g0/0/1,g0/0/2,g0/0/3加入eth-trunk端口
LSW1:
[LSW1]int Eth-Trunk 1
[LSW1-Eth-Trunk1]mode lacp
[LSW1-Eth-Trunk1]trunkport GigabitEthernet 0/0/1 to 0/0/3
Local:
--------------------------------------------------------------------------------
Partner:
--------------------------------------------------------------------------------
LSW2:
[LSW2]interface Eth-Trunk 1
[LSW2-Eth-Trunk1]mode lacp
[LSW2-Eth-Trunk1]trunkport GigabitEthernet 0/0/1 to 0/0/3
Eth-Trunk1's state information is:
Local:
--------------------------------------------------------------------------------
Partner:
--------------------------------------------------------------------------------
LSW1:
[LSW1]interface Eth-Trunk 1
LSW2:
[LSW2]interface Eth-Trunk 1
[LSW2-Eth-Trunk1]max active-linknumber 2
查看:
[LSW1]dis Eth-Trunk 1
Eth-Trunk1's state information is:
Local:
--------------------------------------------------------------------------------
Partner:
--------------------------------------------------------------------------------
当g0/0/1或者g0/0/2的端口处于中断状态时,lacp将会自动协商,将g0/0/3转变为转发(select)状态,维持链路的正常,这就是lacp模式的作用
========
三层链路聚合配置与二层链路聚合配置类似,假如在路由器上配置三层链路聚合,需要先创建Eth-Trunk接口,然
后在Eth-Trunk逻辑口上执行undo portswitch命令,把聚合链路从二层转为三层链路。执行undo portswitch命令后,可以为Eth-Trunk逻辑口
分配一个IP地址。
原文:http://blog.51cto.com/12184141/2148209