set vtp

Use the set vtp command to set the options for VTP.

set vtp [domain domain_name] [mode {client | server | transparent}] [passwd passwd] [pruning {enable | disable}] [v2 {enable | disable}]

Syntax Description
domain domain_name  (Optional) Keywords used to define the name that identifies the VLAN management domain. The domain_name can be 1 to 32 characters in length. 
mode {client | server | transparent}  (Optional) Keywords that specify the VTP mode. 
passwd passwd  (Optional) Keyword used to define the VLAN trunk protocol password. The VTP password can be 8 to 64 characters in length. 
pruning {enable | disable}  (Optional) Keywords that enable or disable VTP pruning for the entire management domain. 
v2 {enable | disable}  (Optional) Keyword used to set version 2 mode. 
Default

The defaults are as follows: server mode, no password, pruning disabled, and v2 disabled.

Command Type

Switch command.

Command Mode

Privileged.

Usage Guidelines

All switches in a VTP domain must run the same version of VTP. VTP version 1 and VTP version 2 do not operate on switches in the same VTP domain. VTP version 2 is supported in software release 3.1(1) and later and is disabled by default.

If all switches in a domain are VTP version 2-capable, you only need to enable VTP version 2 on one switch (using the set vtp v2 enable command); the version number is then propagated to the other version 2-capable switches in the VTP domain.

VTP supports three different modes: server, client, and transparent. If you make a change to the VTP or VLAN configuration on a switch in server mode, that change is propagated to all of the switches in the same VTP domain.

If the receiving switch is in server mode, the configuration is not changed.

If the receiving switch is in client mode, the client switch changes its configuration to duplicate the configuration of the server. If you have switches in client mode, make sure to make all VTP or VLAN configuration changes on a switch in server mode.

If the receiving switch is in transparent mode, the configuration is not changed. Switches in transparent mode do not participate in VTP. If you make VTP or VLAN configuration changes on a switch in transparent mode, the changes are not propagated to the other switches in the network.

If you assign a VTP password, no VTP or VLAN configuration changes can be made without first entering the password.

The pruning keyword is used to enable or disable VTP pruning for the VTP domain. VTP pruning causes information about each pruning eligible VLAN to be removed from VTP updates if there are no stations belonging to that VLAN out a particular switch port. Use the set vtp pruneeligible and clear vtp pruneeligible commands to specify which VLANs should or should not be pruned when pruning is enabled for the domain.

To disable VTP, enter the set vtp domain domain name mode transparent command. This disables VTP from the domain, but does not remove the domain from the switch. Use the clear config all command to remove the domain from the switch.

   Be careful when you use the clear config all command. This command clears the entire switch configuration, not just the VTP domain. 
Example

This example shows how to use the set vtp command:

Console> (enable) set vtp domain Engineering mode client
VTP domain Engineering modified
Console> (enable)
  
Related Command

show vtp domain
set vlan
clear vlan
show vlan
set vtp pruneeligible
clear vtp pruneeligible