1.VLAN的创建和删除

Switch#vlan database

Switch(vlan)#vlan 2
Switch(vlan)#vlan 3  name kefu
Switch(vlan)#no vlan 2               
Switch(vlan)#exit

2.给VLAN分配IP

Switch1#config

Switch(config)#config vlan2
Switch(config-if)#ip address 192.168.2.1 255.255.255.0
Switch(config-if)#no shutdown

3.配VTP

Switch1#

Switch1#config
Switch1(config)#vtp domain cisco
Switch1(config)#vtp mode server
Switch1(config)#end

4.配置trunk

Switch1#config
Switch1(config)#interface gigabitethernet0/1
Switch1(config-if)#switchport trunk encapsulation dot1q
Switch1(config-if)#switchport mode trunk
Switch1(config-if)#end