1.创建vlan,并关联协议
[LSW2]vlan batch 10 20
[LSW2-vlan10]protocol-vlan ipv4
[LSW2-vlan20]protocol-vlan ipv6
2.接口管理协议vlan
[LSW2-GigabitEthernet0/0/1]protocol-vlan vlan 10 all priority 5
[LSW2-GigabitEthernet0/0/2]protocol-vlan vlan 20 all priority 6
3.配置接口
[LSW1]vlan batch 10 20
[LSW1-GigabitEthernet0/0/1]port link-type trunk
[LSW1-GigabitEthernet0/0/1]port trunk allow-pass vlan 10
[LSW1-GigabitEthernet0/0/2]port link-type trunk
[LSW1-GigabitEthernet0/0/2]port trunk allow-pass vlan 20
[LSW2-Ethernet0/0/3]port link-type trunk
[LSW2-Ethernet0/0/3]port trunk allow-pass vlan 10 20
[LSW2-Ethernet0/0/1]port link-type hybrid
[LSW2-Ethernet0/0/1]port hybrid untagged vlan 10
[LSW2-Ethernet0/0/2]port link-type hybrid
[LSW2-Ethernet0/0/2]port hybrid untagged vlan 20
4.验证配置