基于端口

1、批量创建Vlan
[Switch]# vlan {vlan-id1 to vlan-id2}
2、进入Vlan
[Switch]# vlan vlan-id
3、在Vlan中添加端口
[Switch-vlan10]# port interface-list
4、配置端口的链路为Trunk类型
[Switch-Ethernet1/0/1]# port link-type trunk
5、允许指定的Vlan通过当前Trunk端口
[Switch-Ethernet1/0/1]# port trunk permit vlan {vlan-id-list | all }
6、设置trunk端口的缺省Vlan
[Switch-Ethernet1/0/1]# port trunk pvid vlan vlan-id
7、配置端口的链路类型为Hybrid类型
[Switch-Ethernet1/0/1]# port-link-type hybrid
8、允许指定的Vlan通过当前Hybrid端口
[Switch-Ethernet1/0/1]# port hybrid vlan vlan-id-list{tagged | untagged}
9、设置Hybrid端口的缺省Vlan
[Switch-Ethernet1/0/1]# port hybrid pvid vlan vlan-id


基于协议

1、配置基于协议的Vlan并指定协议模板
[Switch-vlan10]# protocol-vlan [ procotol-index ] { at | ipv4 | ipv6 | ipx { ethernetii | llc | raw | snap } | mode { ethernetii etype etype-id | llc { dsap dsap-id [ ssap ssap-id ] | ssap ssap-id } | snap etype etype-id } }
2、取消原来所配置的协议模板。
undo protocol-vlan protocol-index [ to protocol-end ] | all }
3、配置Hybrid端口与基于协议的Vlan关联
[Switch-Ethernet1/0/1]# port hybrid protocol-vlan vlan vlan-id


基于IP子网

1、Vlan与IP子网关联
[Switch-vlan10]# ip-subnet-vlan {ip-subnet-index} ip ip-address {mask}
2、端口与IP子网的Vlan关联
[Switch-Ethernet1/0/1]# port hybrid ip-subnet-vlan vlan vlan-id