华为交换机配置堆叠Eth-Trunk

Lear 2025-07-17 10:20:00
Categories: > > Tags:

华为交换机配置堆叠Eth-Trunk

组网需求

如图1-4所示,DeviceA和DeviceB采取堆叠组网。为了扩展上行链路带宽,可在堆叠上行端口上配置堆叠Eth-Trunk;为了提高可靠性,可将下游设备双归接入堆叠,并配置堆叠下行端口的堆叠Eth-Trunk。在堆叠组网中,推荐采用上下行堆叠Eth-Trunk。

图1-4 配置堆叠Eth-Trunk组网图

图片

配置思路

将堆叠与上、下游设备DeviceC、DeviceD、DeviceE相连的接口加入Eth-Trunk。

操作步骤

  1. 配置堆叠Eth-Trunk。

    # 在堆叠上创建接口Eth-Trunk10、Eth-Trunk20和Eth-Trunk30,并将堆叠与上、下游设备DeviceC、DeviceD、DeviceE相连的接口加入Eth-Trunk中。

<HUAWEI> system-view

[HUAWEI] sysname Stack

[Stack] interface eth-trunk 10

[Stack-Eth-Trunk10] trunkport 10ge 1/0/5

[Stack-Eth-Trunk10] trunkport 10ge 2/0/5

[Stack-Eth-Trunk10] quit

[Stack] interface eth-trunk 20

[Stack-Eth-Trunk20] trunkport 10ge 1/0/6

[Stack-Eth-Trunk20] trunkport 10ge 2/0/6

[Stack-Eth-Trunk20] quit

[Stack] interface eth-trunk 30

[Stack-Eth-Trunk30] trunkport 10ge 1/0/7

[Stack-Eth-Trunk30] trunkport 10ge 2/0/7

[Stack-Eth-Trunk30] return

# 在DeviceC上创建接口Eth-Trunk10,并将其与堆叠相连的接口加入Eth-Trunk10中。

<HUAWEI> system-view

[HUAWEI] sysname DeviceC

[DeviceC] interface eth-trunk 10

[DeviceC-Eth-Trunk10] trunkport 10ge 1/0/1

[DeviceC-Eth-Trunk10] trunkport 10ge 1/0/2

[DeviceC-Eth-Trunk10] return

# 在DeviceD上创建接口Eth-Trunk20,并将其与堆叠相连的接口加入Eth-Trunk20中。

<HUAWEI> system-view

[HUAWEI] sysname DeviceD

[DeviceD] interface eth-trunk 20

[DeviceD-Eth-Trunk20] trunkport 10ge 1/0/1

[DeviceD-Eth-Trunk20] trunkport 10ge 1/0/2

[DeviceD-Eth-Trunk20] return

# 在DeviceE上创建接口Eth-Trunk30,并将其与堆叠相连的接口加入Eth-Trunk30中。

<HUAWEI> system-view

[HUAWEI] sysname DeviceE

[DeviceE] interface eth-trunk 30

[DeviceE-Eth-Trunk30] trunkport 10ge 1/0/1

[DeviceE-Eth-Trunk30] trunkport 10ge 1/0/2

[DeviceE-Eth-Trunk30] return

2. 验证配置结果。

上述配置成功后,在任意视图下执行命令display eth-trunk membership trunk-id,可以看到Eth-Trunk接口的成员口信息。以堆叠上Eth-Trunk10的显示为例。

<Stack> display eth-trunk membership 10

Trunk ID: 10

Used Status: Valid

Type: Ethernet

Working Mode: Normal

Number Of Ports in Trunk: 2

Number Of Up Ports in Trunk: 2O

perating Status: up

Interface 10GE1/0/5, valid, operate up, weight=1

Interface 10GE2/0/5, valid, operate up, weight=1

配置脚本

堆叠功能的相关配置均保存在设备内存中,不会写入配置文件。

*#*sysname Stack

*#*interface Eth-Trunk10

# interface Eth-Trunk20

# interface Eth-Trunk30

# interface 10GE1/0/5 eth-trunk 10

# interface 10GE1/0/6 eth-trunk 20

# interface 10GE1/0/7 eth-trunk 30

# interface 10GE2/0/5 eth-trunk 10

*#*interface 10GE2/0/6 eth-trunk 20

*#*interface 10GE2/0/7 eth-trunk 30

# return

Device C的配置文件

*#*sysname DeviceC

# interface Eth-Trunk10

# interface 10GE1/0/1 eth-trunk 10

# interface 10GE1/0/2 eth-trunk 10

*#*return

Device D的配置文件

*#*sysname DeviceD

# interface Eth-Trunk20

# interface 10GE1/0/1 eth-trunk 20

# interface 10GE1/0/2 eth-trunk 20

*#*return

DeviceE的配置文件

*#*sysname DeviceE

# interface Eth-Trunk30

# interface 10GE1/0/1 eth-trunk 30

# interface 10GE1/0/2 eth-trunk 30

*#*return