华为交换机添加vlan命令

发布时间:2024-06-24 11:53:54
命令 功能 示例 vlan 创建 VLAN vlan 10 name 为 VLAN 设置名称 name "Marketing" port link-type access 将端口设置为接入模式 interface GigabitEthernet 0/0/1
port link-type access
port default vlan 设置端口的默认 VLAN port default vlan 10 port trunk allow-pass vlan 配置端口允许通过的 VLAN port trunk allow-pass vlan 10,20 port trunk permit vlan 配置端口允许通过的 VLAN port trunk permit vlan 10,20 undo port trunk allow-pass vlan 删除端口允许通过的 VLAN undo port trunk allow-pass vlan 10,20 undo port trunk permit vlan 删除端口允许通过的 VLAN undo port trunk permit vlan 10,20 port trunk pvid 设置端口的 PVID port trunk pvid 10 port trunk mode static 设置端口为静态 Trunk 模式 interface GigabitEthernet 0/0/1
port trunk mode static
port trunk mode dynamic desirable 设置端口为动态可协商 Trunk 模式 interface GigabitEthernet 0/0/1
port trunk mode dynamic desirable
port trunk mode dynamic auto 设置端口为动态自动协商 Trunk 模式 interface GigabitEthernet 0/0/1
port trunk mode dynamic auto
undo port trunk mode 取消端口 Trunk 模式 interface GigabitEthernet 0/0/1
undo port trunk mode