华为交换机eth-trunk配置
时间: 2024-01-08 20:01:51 浏览: 64
要配置华为交换机的eth-trunk,需要执行以下步骤:
1. 创建eth-trunk接口:在交换机的全局配置模式下,使用以下命令创建eth-trunk接口:
```
interface eth-trunk <trunk id>
```
其中,trunk id为eth-trunk的编号,可以是任何数字或字母组合。
2. 向eth-trunk接口添加物理端口:使用以下命令将物理端口添加到eth-trunk接口中:
```
interface GigabitEthernet <interface id>
port link-type trunk
port trunk allow-pass vlan <vlan id>
```
其中,interface id为物理端口的编号,vlan id为需要通过eth-trunk传输的VLAN ID。
3. 配置eth-trunk的工作模式和链路聚合方式:使用以下命令配置eth-trunk的工作模式和链路聚合方式:
```
mode lacp|manual
```
其中,lacp表示使用LACP协议进行链路聚合,manual表示手动配置链路聚合。
4. 配置eth-trunk的负载均衡方式:使用以下命令配置eth-trunk的负载均衡方式:
```
load-balance <mode>
```
其中,mode为负载均衡的方式,可以是src-ip、dst-ip、src-mac、dst-mac等。
5. 验证eth-trunk配置是否生效:使用以下命令查看eth-trunk接口的状态:
```
display interface eth-trunk <trunk id>
```
如果eth-trunk接口的状态为UP,则表示配置成功。