How to Setup VLAN Trunking Protocol (VTP) on Cisco Switches

by David Davis - January 7, 2009

How to Setup VLAN Trunking Protocol (VTP) on Cisco Switches

In our last article about VLAN’s (Read ore about it on the What is a VLAN? How to Setup a VLAN on a Cisco Switch article), we learned about how VLAN’s provide greater performance and security for your LAN. Unfortunately, if you have more than a couple of switches, configuring VLAN’s can be a real pain. To make life easier, Cisco developed VLAN Trunking Protocol (VTP). Let’s find out what VTP can do for you.

How can VTP help me?

Say that you have 20 switches in your large office building. On each of these switches, you have four VLAN’s. Without VTP, you have to create each of these four VLANs on each of these switches. With VTP, you only have to create the four VLANs once, on one switch, and all other switches learn about the four VLANs.

In other words, the job of VTP is to distribute VLAN configuration information between all the switches.

How does it work?

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.

What about pruning?

VTP pruning is the process of not sending IP broadcast traffic for certain VLANs to switches that do not have any ports in that VLAN. The switches that choose not to send these broadcasts know that they can not do this because of VTP. With VTP telling them what ports the other switches have, this switch knows that they don’t have to send them broadcast packets, because they know that the other switches don’t need them.

Pruning saves LAN bandwidth because broadcasts don’t have to be sent to switches that don’t need them.

How do you 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

Here is a sample configuration:

To see what is going on with VTP, you can use show vtp status, like this:

Article Summary

In summary, here is what we have learned:

  • VTP is used to distribute VLAN configuration information between switches

  • VTP is Cisco proprietary and can only be used on Cisco switches.

  • By using VTP, you can also prune your VLANs, saving bandwidth

  • The command to configure VTP is the global configuration mode command, vtp

  • The command to check status is the privileged mode command, show vtp status

Related articles

You might also want to read the following related articles:



Join The Petri Insider - Weekly IT Tutorial and Tips, Whitepaper and Webinars