拓扑:
3560配置:
Switch#vlan database   注:有VTP时PT5.2不支持在全局配置模式下创 建 VLAN,我试了
% Warning: It is recommended to configure VLAN from config mode,
  as VLAN database mode is being deprecated. Please consult user
  documentation for configuring VTP/VLAN in config mode.
Switch(vlan)#vlan 2
VLAN 2 added:
    Name: VLAN0002
Switch(vlan)#vlan 3
VLAN 3 added:
    Name: VLAN0003
Switch(vlan)#exit
APPLY completed.
Exiting....
 
Switch(config)#vtp mode server
Device mode already VTP SERVER.
Switch(config)#vtp do A
Changing VTP domain name from NULL to A
Switch(config)#vtp pass ccna
Setting device VLAN database password to ccna

Switch(config)#do sh vtp sta
VTP Version                     : 2
Configuration Revision          : 0
Maximum VLANs supported locally : 1005
Number of existing VLANs        : 7
VTP Operating Mode              : Server
VTP Domain Name                 : A
VTP Pruning Mode                : Disabled
VTP V2 Mode                     : Disabled
VTP Traps Generation            : Disabled
MD5 digest                      : 0x3D 0xEE 0x57 0x43 0x1F 0xB8 0xFF 0x7C
Configuration last modified by 0.0.0.0 at 3-1-93 00:00:50
Local updater ID is 0.0.0.0 (no valid interface found)
 
Switch#sh run
interface FastEthernet0/1
 switchport mode trunk
!
interface FastEthernet0/2
 switchport mode trunk
interface Vlan2                交换机虚拟接口,实现VLAN间路由功能
 ip address 192.168.1.1 255.255.255.0
interface Vlan3
 ip address 192.168.2.1 255.255.255.0
 
ip dhcp pool vlan2               DHCP地址池,并指定网关
 network 192.168.1.0 255.255.255.0
 default-router 192.168.1.1
ip dhcp pool vlan3
 network 192.168.2.0 255.255.255.0
 default-router 192.168.2.1
 
Sw1配置:
Switch(config)#vtp mode client
Setting device to VTP CLIENT mode.
Switch(config)#vtp do A
Changing VTP domain name from NULL to A
Switch(config)#vtp pass ccna
Setting device VLAN database password to ccna
 
interface FastEthernet0/1
 switchport mode trunk
!
interface FastEthernet0/2
 switchport access vlan 2
 switchport mode access
!
interface FastEthernet0/3
 switchport access vlan 3
 switchport mode access
 
Sw2配置差不多不说了。