This example uses two Cisco 3524 switches to demonstrate how to use VTP to announce VLAN configuration.
Switch A - VTP Server Switch B - VTP Client
Switch A: !This will open the VLAN database vlan database !Define this switch to be the server vtp server !Define the VTP Domain called "switchaction" vtp domain switchaction !We will make vlan #2 called "newvlan2" vlan 2 name newvlan2 apply exit
config t interface fastethernet0/1 description Port assigned to VLAN2 !Tell the switch to make this port a member of vlan2 switchport access vlan 2 interface GigabitEthernet0/1 description Trunk port to Switch B !Tell the switch to use ISL as the trunk encapsulation switchport trunk encapsulation isl !Tell the switch to use this interface as a trunk switchport mode trunk exit exit
wr mem exit
Switch B: !This will open the VLAN database vlan database !Define this switch to be the VTP client vtp client !Define the VTP Domain called "switchaction" vtp domain switchaction apply exit
config t interface GigabitEthernet0/1 description Trunk port to Switch A !Tell the switch to use ISL as the trunk encapsulation switchport trunk encapsulation isl !Tell the switch to use this interface as a trunk switchport mode trunk exit exit wr mem exit
At this point, you should see if VTP has transfered the VLAN # 2 to switch B by issuing a "show vtp status" on switch B. You should notice something like this:
switch-b#show vtp status VTP Version : 2 Configuration Revision : 12 Maximum VLANs supported locally : 1005 Number of existing VLANs : 6 VTP Operating Mode : Client VTP Domain Name : switchaction VTP Pruning Mode : Enabled VTP V2 Mode : Disabled VTP Traps Generation : Disabled MD5 digest : 0x6D 0x19 0x35 0x84 0x52 0x6B 0xCE 0xA0 Configuration last modified by 192.168.0.254 at 3-3-93 03:49:55 Local updater ID is 192.168.0.254 on interface Vl1 (lowest numbered VLAN interface found)
This tells us when the VTP server last updated the configurations, and how many VLANS where send by the VTP server. You can issue the "show vlan" command to list all the vlans currently on the switch. Verify that VLAN2 is on the switch, and go ahead and assign a port to the new VLAN on switch B.
switch-b#config t interface fastethernet0/1 !Assign Fa0/1 to vlan2 switchport access vlan 2 exit exit wr mem
Now you are all set and running. If you need to add additional vlans, simply add them to the VTP server (switch A) and the server will update the client (switch B).