1.VTP作用:可以在一台交换机上管理整个企业网络的VLAN。
2.VTP配置命令有:
       (1)配置域名
       (config)#  vtp  domain  域名
       (2)配置模式
       (config)#  vtp  mode  server / client / transparent
       (3)配置密码
       (config)#  vtp  password  密码
       (4)配置修剪
       (config)#  vtp  pruning
       (5)配置版本
       (config)#  vtp  version  1 / 2
3.配置要求
       VTP域名:benet
       VTP密码:benet123
       VTP修剪:启用修剪
       VTP版本:版本1
       VTP服务器与客户机: S1为服务器,S2,S3为客户机
4.具体配置
(1)S1的配置
S1> en
S1# vlan  data
S1(vlan)# vlan  10  name  CW
S1(vlan)# vlan  20  name  YF
S1(vlan)# vtp  domain  benet
S1(vlan)# vtp  server
S1(vlan)# vtp  password  benet123
S1(vlan)# exit
S1# config  t
S1(config)# int  f0/1
S1(config-if)# switchport  mode  trunk
S1(config-if)# no  shut
( 以下是把接口划分给VLAN,可以随意指定 )
S1(config-if)# int  range  f0/3 – 10
S1(config-if-range)# swi       tchport  mode  access
S1(config-if-range)# switchport  access  vlan  10
S1(config-if-range)# no  shut
S1(config-if-range)#exit
S1(config)# int  range  f0/11 – 15
S1(config-if-range)# swi       tchport  mode  access
S1(config-if-range)# switchport  access  vlan  20
S1(config-if-range)# no  shut
S1(config-if-range)#end
S1#

(2)S2的配置
S2> en
S2# vlan  database
S2(vlan)# vtp  domain  benet
S2(vlan)# vtp  password  benet123
S2(vlan)# vtp  client
S2(vlan)#exit
S2# config  t
S2(config)# int  range  f0/1 – 2
S2(config-if-range)# switchport  mode  trunk
S2(config-if-range)# no  shut
S2(config-if-range)# end
S2#
( 接下来要把接口划分给VLAN,可以随意指定 )
 
(3)S3的配置
S3>en
S3# vlan  data
S3(vlan)# vtp  domain  benet
S3(vlan)# vtp  password  benet123
S3(vlan)# vtp  client
S3(vlan)# exit
S3#config  t
S3(config)# int  f0/1
S3(config-if)# switchport  mode  trunk
S3(config-if)# no shut
S3(config-if)# exit
( 接下来要把接口划分给VLAN,可以随意指定 )