# 创建VLAN10
[SW1]vlan 10
# 创建VLAN20
[SW1]vlan 20
# 查看VLAN配置
[SW1]dis vlan
# 修改g0/0/1接口类型
[SW1-GigabitEthernet0/0/1]port link-type access
# 配置g0/0/1接口的默认vlan
[SW1-GigabitEthernet0/0/1]port default vlan 10
# 修改g0/0/2接口类型
[SW1-GigabitEthernet0/0/2]port link-type access
# 配置g0/0/2接口的默认vlan
[SW1-GigabitEthernet0/0/2]port default vlan 20
# 配置g0/0/3接口类型为trunk
[SW1-GigabitEthernet0/0/3]port link-type trunk
# 放行vlan10和20
[SW1-GigabitEthernet0/0/3]port trunk allow-pass vlan 10 20
# 批量创建vlan
[SW3]vlan batch 2 3 100
# 设置hybrid接口的pvid
[SW3-GigabitEthernet0/0/1]port hybrid pvid vlan 2
[SW3-GigabitEthernet0/0/3]port hybrid pvid vlan 3
[SW4-GigabitEthernet0/0/2]port hybrid pvid vlan 100
[SW3-GigabitEthernet0/0/1]port hybrid untagged vlan 2 100
[SW3-GigabitEthernet0/0/3]port hybrid untagged vlan 3 100
[SW4-GigabitEthernet0/0/2]port hybrid untagged vlan 2 3 100
[SW3-GigabitEthernet0/0/2]port hybrid tagged vlan 2 3 100
[SW4-GigabitEthernet0/0/1]port hybrid tagged vlan 2 3 100