1.配置VLAN
添加vlan:
S1#conf t
S1(config)#vlan vlan的id
S1(config-vlan)#name vlan的名字
S1(config-vlan)#end
校驗:
S1#show vlan brief
分配交換機端口:
S1#conf t
S1(config)#int 接口id
S1(config-if)#switchport mode access
S1(config-if)#switchport access vlan vlan的id
S1(config-if)#end
校驗:
S1#show vlan brief
配置中繼:
S1#config terminal
S1(config)#interface 接口id
S1(config-if)#switchport mode trunk
S1(config-if)#switchport trunk native vlan vlan的id
S1(config-if)#end
校驗:
S1#show interfaces 接口id switchport
2.配置VTP
配置vtp域名:
S1(config)#vtp domain 域名
配置vtp版本:
S1(config)#vtp version 1
S1(config)#exit
校驗:
S1#show vtp status
啓用客戶端模式:
S2#conf t
S2(config)#vtp mode client
配置接入端口的vlan