华为交换机管理vlan与业务vlan配置命令
时间: 2023-08-31 15:06:24 浏览: 218
华为相关的-VLAN命令.pdf
华为交换机管理VLAN的配置命令如下:
1. 创建VLAN:
```
vlan vlan-id
```
2. 设置VLAN名称:
```
name vlan-name
```
3. 将端口加入VLAN:
```
interface interface-type interface-number
port link-type {access | trunk}
port default vlan vlan-id
```
4. 将VLAN作为本地VLAN:
```
vlan vlan-id
private-vlan primary
private-vlan association add {vlan-id | vlan-range}
```
业务VLAN的配置命令如下:
1. 创建业务VLAN:
```
vlan vlan-id
```
2. 设置业务VLAN名称:
```
name vlan-name
```
3. 将端口加入业务VLAN:
```
interface interface-type interface-number
port link-type {access | trunk}
port default vlan vlan-id
```
4. 配置VLAN间路由:
```
vlan vlan-id
quit
interface vlanif vlan-id
ip address ip-address {mask | mask-length}
```
注意:华为交换机的命令可能会因不同的设备型号和操作系统版本而有所不同,以上命令仅供参考。
阅读全文