VLAN配置方法
1:基于端口的VLAN配置实例 SWA vlan 10 port e1/0/1 quit vlan 20 port e1/0/2 quit int e1/0/24 port link-type trunk port trunk permit vlan 10 20 quit SWB vlan 10 port e1/0/1 quit vlan 20 port e1/0/2 quit int e1/0/24 port link-type trunk port trunk permit vlan 10 20 quit
2基于MAC地址的VLAN配置 vlan 10 vlan 20 mac-vlan mac-address 0010-5ce5-fb02 vlan 10 mac-vlan mac-address 0016-ec71-ea50 vlan 20 interface GigabitEthernet 1/0/1 port link-type hybrid port hybrid vlan 10 20 untagged mac-vlan enable interface GigabitEthernet 1/0/2 port link-type hybrid port hybrid vlan 10 20 untagged mac-vlan enable
3基于协议的VLAN的配置 vlan 10 protocol-vlan ipv4 vlan 20 protocol-vlan ipv6 interface Ethernet 1/0/1 port link-type hybrid port hybrid vlan 10 20 untagged port hybrid protocol-vlan vlan 10 0 port hybrid protocol-vlan vlan 20 0 interface Ethernet 1/0/2 port link-type hybrid port hybrid vlan 10 20 untagged port hybrid protocol-vlan vlan 10 0 port hybrid protocol-vlan vlan 20 0
4基于IP子网的VLAN配置 vlan 10 ip-subnet-vlan ip 10.10.10.0 255.255.255.0 vlan 20 ip-subnet-vlan ip 20.20.20.0 255.255.255.0 interface Ethernet 1/0/1 port link-type hybrid port hybrid vlan 10 20 untagged port hybrid ip-subnet-vlan vlan 10 port hybrid ip-subnet-vlan vlan 20 interface Ethernet 1/0/2 port link-type hybrid port hybrid vlan 10 20 untagged port hybrid ip-subnet-vlan vlan 10 port hybrid ip-subnet-vlan vlan 20