配置端口为access
[Huawei]vlan 10 //创建vlan 10 [Huawei]interface GigabitEthernet 0/0/2 //进入g0/0/2端口 [Huawei-GigabitEthernet0/0/2]port link-type access //选择端口类型 [Huawei-GigabitEthernet0/0/2]port default vlan 10 //划分VLAN 技巧:[S2]vlan batch 3 to 5 //创建VLAN3、4、5
配置端口的Hybrid类型
[SW1]vlan 10 [SW1-GigabitEthernet0/0/1]port hybrid pvid vlan 10 [SW1-GigabitEthernet0/0/1]port hybrid untagged vlan 10 30 //对VLAN10和30去标签
配置端口的Trunk类型
[SW1]interface g0/0/24 [SW1-GigabitEthernet0/0/24]port link-type trunk [SW1-GigabitEthernet0/0/24]port trunk allow-pass vlan all //允许所有VLAN通过
更改Trunk端口的PVID
[SW1-GigabitEthernet0/0/24]port trunk pvid vlan 10
创建Eth-trunk 1,并将接口加入Eth-trunk 1
[S1]interface Eth-Trunk 1 [S1]int g0/0/9 [S1-GigabitEthernet0/0/9]eth-trunk 1 或 [S1]interface Eth-Trunk 1 [S1-Eth-Trunk1]trunkport g0/0/9
配置Eth-trunk 1链路配置为access
[S1]interface Eth-Trunk 1 [S1-Eth-Trunk1]port link-type access [S1-Eth-Trunk1]port default vlan 5
原文地址: