在SW1和SW2之间架设2条物理链路,采用LACP链路聚合的方式进行通道搭建。写出huawei配置代码
时间: 2024-04-09 09:28:17 浏览: 211
下面是华为设备配置代码示例,用于在SW1和SW2之间设置两个物理链路,并使用LACP进行链路聚合(端口聚合):
在SW1上的配置代码:
```
# 创建一个聚合组
interface Bridge-Aggregation1
description LACP Trunk to SW2
port link-type trunk
port trunk allow-pass vlan 1
mode lacp-static
lacp system-priority 100
lacp max-active-linknumber 2
lacp priority 100
link-aggregation mode dynamic
# 配置聚合组的物理接口
interface GigabitEthernet1/0/1
description LACP Trunk to SW2
port link-type trunk
port trunk allow-pass vlan 1
port link-aggregation group 1
interface GigabitEthernet1/0/2
description LACP Trunk to SW2
port link-type trunk
port trunk allow-pass vlan 1
port link-aggregation group 1
```
在SW2上的配置代码:
```
# 创建一个聚合组
interface Bridge-Aggregation1
description LACP Trunk to SW1
port link-type trunk
port trunk allow-pass vlan 1
mode lacp-static
lacp system-priority 100
lacp max-active-linknumber 2
lacp priority 100
link-aggregation mode dynamic
# 配置聚合组的物理接口
interface GigabitEthernet1/0/1
description LACP Trunk to SW1
port link-type trunk
port trunk allow-pass vlan 1
port link-aggregation group 1
interface GigabitEthernet1/0/2
description LACP Trunk to SW1
port link-type trunk
port trunk allow-pass vlan 1
port link-aggregation group 1
```
请注意,上述示例中的聚合组号(Bridge-Aggregation1)和物理接口(GigabitEthernet1/0/1和GigabitEthernet1/0/2)仅作为示例。您可以根据实际需要自定义聚合组号和物理接口号。此外,示例中的VLAN 1是允许通过的示例VLAN,您可以根据需要修改或添加允许通过的VLAN。
阅读全文