Cisco VTP (Virtual Truking Protocol) Tutorial With Examples


This is my first post about my CCNP journey. I have all ready pass Routing exam. Now I am working on Switching. So my post would be about Switching for a period of time. To day I will write about VTP protocol. There is a lot of articles about VTP but I want to describe it from my point of view to understand it better.

VTP (Virtual Trunking Protocol) is used to manage vlan info (addition,deletion, …) between switches that reside in an area. It workes on layer 2. If correctly configured managing vlans in the domain is very easy. Domain is a collecion of switches that is configured with the same domain name. Adding a vlan to a switch will result the creation of the same vlan in other switches which are in the same domain.But in order to get updates we should configure domain and password. Domain is not related any other system like Windows Domain. It is just used in VTP nothing another else. Vlan trunking Protocol have versions. These are 1,2,3 but 3 is compatible with 1,2 and 2 compatible with

Now the vlan info can be exchanged. Vtp info has a version number after a change the SW which make change increments current version number and then disseminate vlan info with new version number. If we add a SW into the domain which have previous vtp database (which holds vlan info and version) and if his version is bigger then the domain, the new sw vlan info override current domain vlan info. To avoid this you should double check the vtp database.The best way is to delete database file which resides on sw disk named vlan.dat.

Switches which have VTP have 4 modes in the domain.

LEARN MORE  How To Discover Network Hosts With Nmap?

Server mode: Server mode is given to switches to manage vlans. Server mode add,delete and change vlan info. After the operation the info is disseminated into other switches in the same domain.

Client mode:This mode is like read only mode. This type of switches just get vlan info and then send it other switches. It updates its vlan database according to this info. In VTP version 1and 2 vlan info resides in ram but in version 3 it is saved in to nvram.

Transparent mode: In version 1 updates doesn’t disseminated, but in version 2&3 updates are disseminated. But updates doesn’t used to update vlan database. Transparent switch doesn’t use or modify domains vlan info. Transparent switches can use vlan database in its own and his vlan database doen’t used by other switches. There are extended and private vlan issues but I will not cover them here. In this mode created vlans are stored in running and startup configurations.

Off mode: This mode is like transparent mode, but in this mode vtp updates doesn’t disseminated.

Vtp pakets is advertised by sending packets to reserved multicast address in through trunk links. So there is no advertisement in nontrunk(tagged) links.

These are global info about update packet means all packets own this infos;

  • VTP domain name

  • VTP configuration revision number

  • Update identity and update timestamp

  • MD5 digest VLAN configuration, including maximum transmission unit (MTU) size for each VLAN.

  • Frame format

And these area about vlans

  • VLAN IDs (ISL and IEEE 802.1Q)

  • VLAN name

  • VLAN type

  • VLAN state

  • Additional VLAN configuration information specific to the VLAN type

In Vtp version 3 also includes

  • Primary server ID

  • An instance number,

  • Start index

Vtp operates by default in version 1. You should decide which version to use.

LEARN MORE  Linux Traceroute Command Tutorial With Examples

Vtp pruning eliminates unused vlans to disseminate through domain. Vtp pruning is not enabled by default. Vlans between 2-1001 are pruned by default but you can change pruning-list.

Here is some default Vtp defaults.

VTP domain name


VTP mode


VTP version


MSTP database mode


VTP version 3 server type


VTP password


VTP pruning


Vtp information is saved into vlan database but if the switch is in transparent mode it is saved into running confiuration. Switches in transparent mode do not exchange update information.

Password configuration is not neccary but if used in domain all exchaging switches should configuration with password.


Vtp version 1-2 does not support extanded and privates vlans so to create the type of vlans the switch should be in transparent mode.

If in version 3 extended vlans are configured can not change to lower versions.

After setting domain name it can not be removed.


Setting domain name

SW1(config)#vtp domain

Changing VTP domain name from a to

We changed our domain name from a to

Setting password

SW1(config)#vtp password ismail ?

hidden Set the VTP password hidden option

secret Specify the vtp password in encrypted form


SW1(config)#vtp password ismail hidden

Here there is two type of password hidden and secret. Secret is hashed version of password so to make it easy we chose hidden.

Setting vtp mode

SW1(config)#vtp mode ?

client Set the device to client mode.

off Set the device to off mode.

server Set the device to server mode.

transparent Set the device to transparent mode.

SW1(config)#vtp mode server

Device mode already VTP Server for VLANS.

Switch says “Device mode is allready VTP Server for VLANS.” because previous mode was server too. We can shutdown VTP with off mode

LEARN MORE  How To Enable BitTorrent Ports In Linux Firewall?

Setting vtp version

SW1(config)#vtp version ?

<1-3> Set the administrative domain VTP version number

SW1(config)#vtp version 3

VTP version is already in V3.

It says there is 3 version and we chose version 3 which is allready set 🙂

Vtp pruning

SW1(config)#vtp pruning ?


SW1(config)#vtp pruning

Pruning switched on

Switch on it

Port based vtp configurations


SW1(config-if)#no vtp

On a trunk port vtp can be turned on or off but only in version 3

Vtp counters

SW1#sh vtp counters

VTP statistics:

Summary advertisements received : 0

Subset advertisements received : 0

Request advertisements received : 0

Summary advertisements transmitted : 0

Subset advertisements transmitted : 0

Request advertisements transmitted : 21

Number of config revision errors : 0

Number of config digest errors : 0

Number of V1 summary errors : 0

VTP pruning statistics:

Trunk Join Transmitted Join Received Summary advts received from

non-pruning-capable device

—————- —————- —————- —————————

Et0/0 52 29 0

They are generally related to packet counts

Vtp on each interface

SW1#show vtp interface

Interface VTP Status


Ethernet0/0 disabled

Ethernet0/1 enabled

Ethernet0/2 enabled

Ethernet0/3 enabled

Show vtp status on each interface

Show password

SW1#show vtp password

VTP Password: 182A9AFD19560209C84AC9E570C9C61D

Because we set it hidden it looks like this

General information about vtp

SW1#show vtp status

VTP Version capable : 1 to 3

VTP version running : 3

VTP Domain Name :

VTP Pruning Mode : Enabled

VTP Traps Generation : Disabled

Device ID : aabb.cc00.0100

Feature VLAN:


VTP Operating Mode : Server

Number of existing VLANs : 6

Number of existing extended VLANs : 0

Maximum VLANs supported locally : 4096

Configuration Revision : 0

Primary ID : 0000.0000.0000

Primary Description :

MD5 digest : 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

Feature MST:


VTP Operating Mode : Transparent

Feature UNKNOWN:


VTP Operating Mode : Transparent

All info about vtp