The job of VTP is best explained from the perspective of the VTP server. All switches, by default, are VTP servers. The VTP server is where you would create, remove, or modify VLANs.
This VTP server sends an advertisement, across the domain, every 5 minutes or whenever a change is made in the VLAN database. That advertisement contains all the different VLAN names, VLAN numbers, what switches have ports in what VLANs, and a revision number. Whenever a switch receives an update with a larger revision number than the last one it applied, it applies that revision.
Keep in mind that VTP is a Cisco proprietary protocol. So, to use VTP between your switches, you must have all Cisco switches.
VTP Modes
VTP switches can be in three different modes. Those modes are:
• Server – the default where all VLAN adds, changes, and removals are allowed
• Client – where no changes can be made, only new revisions can be received from the VTP server switches.
• Transparent – where local VLAN information can be changed but that information is not sent out to other switches. Transparent switches also do not apply VTP advertisements from other switches but they do forward those advertisements on.
Usually, you would want a few of your core switches to be servers and all remaining remote or access layer switches to be clients. You would only make changes on the server switches and those changes would be propagated to the client switches.
VTP Versions
VTP version 2 supports the following features not supported in version 1:
Token Ring:Token Ring Bridge Relay Function (TrBRF) and Token Ring Concentrator Relay Function (TrCRF) VLAN are supported
Unrecognized Type-Length-Value (TLV):In V2, a server will propagate TLVs even those it does not understand. It also saves them in NVRAM when the switch is in VTP server mode. This could be useful if not all devices are at the same version or release level.
Version-Dependent Transparent Mode:Version 1 supports multiple domains while Version 2 supports only 1. Normal behavior for V1 would be to forward messages only if they match the destination domain name and version. VTPv2 does not do this check before forwarding.
Consistency Checks:VTPv1 does more consistency checking on messages, which can add overhead. As long as the MD5 digest on a message is correct, VTPv2 will forward it. VTPv2 will consistency-check new configuration information added through the configuration editor, Cluster Management Software or SNMP.
Configure VTP:
To configure VTP, you use the vtp global configuration mode command. With this command you can specify the following:
• VTP domain – the name of the VTP domain. All switches communicating with VTP in the same domain, must have the same VTP domain name.
• VTP mode – either server, client, or transparent.
• VTP password – a password to control who can and cannot receive VTP information.
• VTP pruning – VTP pruning is either turned on or off.
Configuration Commands
Step 1: Define the VTP domain name (Case sensitive)
vtp domain name
Step 2: Set which VTP version to run
vtp version #
Step 3 :( Optional) Set a password for the VTP domain.
vtp password password
Step 4: Verify the VTP configuration.
show vtp status