配置LACP模式的跨设备链路聚合(单机)示例
组网需求
如图3-22所示,DeviceA双归接入DeviceB和DeviceC,在DeviceA上部署LACP模式的Eth-Trunk接口,成员口分别与DeviceB和DeviceC的10GE1/0/1~10GE1/0/2连接,10GE1/0/1~10GE1/0/2的接口速率和双工模式相同,现在需要使流量可以在两台设备上负载分担。
配置思路
采用如下的思路配置跨设备LACP模式链路聚合:
分别在DeviceA、DeviceB、DeviceC上创建Eth-Trunk1,并配置为静态LACP模式,将成员接口加入Eth-Trunk1,实现链路聚合功能。
在DeviceB和DeviceC上配置相同的LACP系统ID。
在DeviceB和DeviceC上配置相同的系统LACP优先级。
在DeviceC上配置Eth-Trunk成员接口在LACP协议中的编号扩展,使成员接口编号均增加32768,避免和设备DeviceB上的成员接口在LACP协议中的编号相同。
操作步骤
- 分别在DeviceA、DeviceB和DeviceC上创建Eth-Trunk1并配置为LACP模式,并将成员口加入Eth-Trunk1。
<HUAWEI> system-view [~HUAWEI] sysname DeviceA [*HUAWEI] commit [~DeviceA] interface eth-trunk 1 [*DeviceA-Eth-Trunk1] mode lacp-static [*DeviceA-Eth-Trunk1] trunkport 10ge 1/0/1 to 1/0/4 [*DeviceA-Eth-Trunk1] commit [~DeviceA-Eth-Trunk1] quit
<HUAWEI> system-view [~HUAWEI] sysname DeviceB [*HUAWEI] commit [~DeviceB] interface eth-trunk 1 [*DeviceB-Eth-Trunk1] mode lacp-static [*DeviceB-Eth-Trunk1] trunkport 10ge 1/0/1 to 1/0/2 [*DeviceB-Eth-Trunk1] commit
<HUAWEI> system-view [~HUAWEI] sysname DeviceC [*HUAWEI] commit [~DeviceC] interface eth-trunk 1 [*DeviceC-Eth-Trunk1] mode lacp-static [*DeviceC-Eth-Trunk1] trunkport 10ge 1/0/1 to 1/0/2 [*DeviceC-Eth-Trunk1] commit
- 配置DeviceB和DeviceC的系统ID为00e0-cf00-0000。
[~DeviceB-Eth-Trunk1] lacp system-id 00e0-cf00-0000 [*DeviceB-Eth-Trunk1] commit [~DeviceB-Eth-Trunk1] quit
[~DeviceC-Eth-Trunk1] lacp system-id 00e0-cf00-0000 [*DeviceC-Eth-Trunk1] commit [~DeviceC-Eth-Trunk1] quit
- 在DeviceB和DeviceC上配置系统LACP优先级为100。
[~DeviceB] lacp priority 100 [*DeviceB] commit
[~DeviceC] lacp priority 100 [*DeviceC] commit
- 在DeviceC上配置Eth-Trunk成员接口编号扩展,使成员接口编号均增加32768。
[~DeviceC] interface eth-trunk 1 [~DeviceC-Eth-Trunk1] lacp port-id-extension enable [*DeviceC-Eth-Trunk1] commit
- 验证配置结果
# 查看各Device设备的Eth-Trunk信息,查看链路是否协商成功。
[~DeviceA] display eth-trunk 1 Eth-Trunk1's state information is: Local: LAG ID: 1 Working Mode: Static Preempt Delay: Disabled Hash Arithmetic: profile default System Priority: 100 System ID: e468-a356-0cb1 Least Active-linknumber: 1 Max Active-linknumber: 16 Operating Status: up Number Of Up Ports In Trunk: 4 Timeout Period: Slow -------------------------------------------------------------------------------- ActorPortName Status PortType PortPri PortNo PortKey PortState Weight 10GE1/0/1 Selected 10GE 32768 3 321 10111100 1 10GE1/0/2 Selected 10GE 32768 1 321 10100010 1 10GE1/0/3 Selected 10GE 32768 4 321 10111100 1 10GE1/0/4 Selected 10GE 32768 2 321 10100010 1 Partner: -------------------------------------------------------------------------------- ActorPortName SysPri SystemID PortPri PortNo PortKey PortState 10GE1/0/1 100 00e0-cf00-0000 32768 32769 321 10111100 10GE1/0/2 100 00e0-cf00-0000 32768 32770 321 10111100 10GE1/0/1 100 00e0-cf00-0000 32768 4 321 10111100 10GE1/0/2 100 00e0-cf00-0000 32768 5 321 10111100
[~DeviceB] display eth-trunk 1 Eth-Trunk1's state information is: Local: LAG ID: 1 Working Mode: Static Preempt Delay: Disabled Hash Arithmetic: profile default System Priority: 100 System ID: 00e0-cf00-0000 Least Active-linknumber: 1 Max Active-linknumber: 32 Operating Status: up Number Of Up Ports In Trunk: 2 Timeout Period: Slow -------------------------------------------------------------------------------- ActorPortName Status PortType PortPri PortNo PortKey PortState Weight 10GE1/0/1 Selected 10GE 32768 4 321 10111100 1 10GE1/0/2 Selected 10GE 32768 5 321 10111100 1 Partner: -------------------------------------------------------------------------------- ActorPortName SysPri SystemID PortPri PortNo PortKey PortState 10GE1/0/3 100 e468-a356-0cb1 32768 4 321 10111100 10GE1/0/4 100 e468-a356-0cb1 32768 2 321 10100010
[~DeviceC] display eth-trunk 1 Eth-Trunk1's state information is: Local: LAG ID: 1 Working Mode: Static Preempt Delay: Disabled Hash Arithmetic: profile default System Priority: 100 System ID: 00e0-cf00-0000 Least Active-linknumber: 1 Max Active-linknumber: 16 Operating Status: up Number Of Up Ports In Trunk: 2 Timeout Period: Slow -------------------------------------------------------------------------------- ActorPortName Status PortType PortPri PortNo PortKey PortState Weight 10GE1/0/1 Selected 10GE 32768 32769 321 10111100 1 10GE1/0/2 Selected 10GE 32768 32770 321 10111100 1 Partner: -------------------------------------------------------------------------------- ActorPortName SysPri SystemID PortPri PortNo PortKey PortState 10GE1/0/1 100 e468-a356-0cb1 32768 3 321 10111100 10GE1/0/2 100 e468-a356-0cb1 32768 1 321 10100010
通过以上显示信息可以看到,各Device的Operating Status均为Up,表明Eth-Trunk1已经协商成功。DeviceB和DeviceC上的成员接口成为活动接口,处于“Selected”状态,表示DeviceB和DeviceC上的成员接口均可以负载分担。DeviceC的PortNo显示成员口的LACP编号已经增加32768。
配置文件
DeviceA的配置文件
# sysname DeviceA # interface Eth-Trunk1 mode lacp-static # interface 10GE1/0/1 eth-trunk 1 # interface 10GE1/0/2 eth-trunk 1 # interface 10GE1/0/3 eth-trunk 1 # interface 10GE1/0/4 eth-trunk 1 # return
DeviceB的配置文件
# sysname DeviceB # lacp priority 100 # interface Eth-Trunk1 mode lacp-static lacp system-id 00e0-cf00-0000 # interface 10GE1/0/1 eth-trunk 1 # interface 10GE1/0/2 eth-trunk 1 # return
DeviceC的配置文件
# sysname DeviceC # lacp priority 100 # interface Eth-Trunk1 mode lacp-static lacp system-id 00e0-cf00-0000 lacp port-id-extension enable # interface 10GE1/0/1 eth-trunk 1 # interface 10GE1/0/2 eth-trunk 1 # return