Home > VLAN Trunking Protocol VTP Tutorial

VLAN Trunking Protocol VTP Tutorial

July 10th, 2011 Go to comments

This topic describes the features that VLAN Trunking Protocol (VTP) offers to support VLANs. To help you understand the basic concept, this is a summary of what VTP is:

“VTP allows a network manager to configure a switch so that it will propagate VLAN configurations to other switches in the network”

VTP minimizes misconfigurations and configuration inconsistencies that can cause problems, such as duplicate VLAN names or incorrect VLAN-type specifications. VTP helps you simplify management of the VLAN database across multiple switches.

VTP is a Cisco-proprietary protocol and is available on most of the Cisco switches.

Why we need VTP?

To answer this question, let’s discuss a real and popular network topology.

Suppose you are working in a medium company in a 5-floor office. You assigned each floor to a switch for easy management and of course they can be assigned to different VLANs. For example, your bosses can sit in any floor and still access Manage VLAN (VLAN 7). Your technical colleagues can sit anywhere on the floors to access Technical VLAN (VLAN 4). This is the best design because each person’s permission is not limited by the physical location.


VTP_building_needed.jpg

Now let’s discuss about VTP role in this topology! Suppose VTP is not running on these switches. One day, your boss decides to add a new department to your office, the Support Department, and you are tasked to add a new SUPPORT VLAN for this department. How will you do that? Well, without VTP you have to go to each switch to enable this new VLAN. Fortunately your office only has 5 floors so you can finish this task in some hours :)

But just imagine if your company was bigger with 100-floor office and some VLANs needed to be added every month! Well, it will surely become a daunting task to add a new VLAN like this. Luckily, Cisco always “thinks big” to create a method for you to just sit at the “Main Sw”, adding your new VLANs and magically, other switches automatically learn about this VLAN, sweet, right? It is not a dream, it is what VTP does for you!

How VTP Works

To make switches exchange their VLAN information with each other, they need to be configured in the same VTP domain. Only switches belonging to the same domain share their VLAN information. When a change is made to the VLAN database, it is propagated to all switches via VTP advertisements.

To maintain domain consistency, only one switch should be allowed to create (or delete, modify) new VLAN. This switch is like the “master” of the whole VTP domain and it is operated in Server mode. This is also the default mode.

Other switches are only allowed to receive and forward updates from the “server” switch. They are operated in Client mode.

VTP_modes.jpg

In some cases, the network manager doesn’t want a switch to learn VTP information from other switches. He can set it to Transparent mode. In this mode, a switch maintains its own VLAN database and never learn VTP information from other switches (even the server). However, it still forwards VTP advertisements from the server to other switches (but doesn’t read that update). A transparent switch can add, delete and modify VLAN database locally.

Now return to the example above, we can configure any switches as the “server” but for our convenience, the “Main Sw” should be assigned this function and we should place it in a safe place.

VTP_modes_assigned.jpg

As said above, VTP advertisements bring VLAN information to all the switches in a VTP domain. Each VTP advertisement is sent with a Revision number. This number is used in order to determine whether the VTP advertisement is more recent than the current version of that switch. Because each time you make a VLAN change in a switch, the configuration revision is incremented by one. So the higher the revision number, the better your VTP advertisement.

For example, the first time the Main Sw sends a VTP advertisement, its Revision number is 1. When you add a new VLAN to the Main Sw, it will send a VTP advertisement with the Revision number of 2. Client switches first receive the VTP advertisement with the Revision number of 1, which is bigger than its current Revision number (0) so it updates its VLAN database. Next it receives the VTP advertisement with the Revision number of 2, it continues comparing with its current Revision number (1) -> it continues update its VLAN database.

One important thing you must know is when a switch receives a better VTP advertisement, it deletes its whole VTP information and copy the new information from the better VTP advertisement to its VLAN database. A switch does not try to compare its own VLAN database with information from the received VTP advertisements to find out and update the difference!

Note: VTP advertisements are sent as multicast frames and all neighbors in that domain receive the frames.

The “show vtp status” command analysis

The most important command to view the status of VTP on Cisco switches that each CCNA learners must grasp is the “show vtp status” command. Let’s have a look at the output of this command:

show vtp status.jpg

+ VTP Version: displays the VTP version the switch is running. By default, the switch runs version 1 but can be set to version 2. Within a domain, the two VTP versions are not interoperable so make sure to configure the same VTP version on every switch in a domain.
+ Configuration Revision: current Revision number on this switch.
+ Maximum VLANs Supported Locally: maximum number of VLANs supported locally.
+ Number of Existing VLANs: Number of existing VLANs.
+ VTP Operating Mode: can be server, client, or transparent.
+ VTP Domain Name: name that identifies the administrative domain for the switch.

By default, a switch operates in VTP Server mode with a NULL (blank) domain name with no password configured (the password field is not listed in the output)

+ VTP Pruning Mode: displays whether pruning is enabled or disabled. We will discuss about VTP Pruning later.
+ VTP V2 Mode: displays if VTP version 2 mode is enabled. VTP version 2 is disabled by default.
+ VTP Traps Generation: displays whether VTP traps are sent to a network management station.
+ MD5 Digest: a 16-byte checksum of the VTP configuration.
+ Configuration Last Modified: date and time of the last configuration modification. Displays the IP address of the switch that caused the configuration change to the database.

VTP Pruning

To understand what VTP Pruning is, let’s see an example:

VTP_Pruning_example.jpg

When PC A sends a broadcast frame on VLAN 10, it travels across all trunk links in the VTP domain. Switches Server, Sw2, and Sw3 all receive broadcast frames from PC A. But only Sw3 has user on VLAN 10 and it is a waste of bandwidth on Sw2. Moreover, that broadcast traffic also consumes processor time on Sw2. The link between switches Server and Sw2 does not carry any VLAN 10 traffic so it can be “pruned”.

VTP_Pruning_Enabled.jpg

VTP Pruning makes more efficient use of trunk bandwidth by forwarding broadcast and unknown unicast frames on a VLAN only if the switch on the receiving end of the trunk has ports in that VLAN. In the above example, Server switch doesn’t send broadcast frame to Sw2 because Sw2 doesn’t have ports in VLAN 10.

When a switch has a port associated with a VLAN, the switch sends an advertisement to its neighbors to inform that it has active ports on that VLAN. For example, Sw3 sends an advertisement to Server switch to inform that it has active port for VLAN 10. Sw2 has not advertised about VLAN 10 so Server switch will prune VLAN 10 on the trunk to Sw2.

You only need to enable pruning on one VTP server switch in the domain.

VTP Configuration

Main Sw(config)#vtp version 2
Main Sw(config)#vtp domain 9tut
Main Sw(config)#vtp mode server
Main Sw(config)#vtp password keepitsecret

On client switches

Client(config)#vtp version 2
Client(config)#vtp domain 9tut
Client(config)#vtp password keepitsecret
Client(config)#vtp mode client

Notice: Before configuring VTP make sure the links between your switches are trunk links. Your trunk link can automatically be formed if both of your switches are not 2960 or 3560 because ports on the 2960 and 3560 switches are set to dynamic auto by default. If both sides are set to dynamic auto, the link will remain in access mode. To configure trunk between these ports, use these commands:

Client(config)#interface fa0/1 (or the interface on the link you want to be trunk)
Client(config-if)#switchport mode trunk

These commands only need to be used on one of two switches to form the trunk.

Below summaries important notes about VTP:

+ Whenever a change occurs in the VLAN database, the VTP server increments its configuration revision number and then advertises the new revision throughout the VTP domain via VTP advertisements.
+ VTP operates in one of three modes: server, transparent, or client.

VTP modes:

* Server: The default mode. When you make a change to the VLAN configuration on a VTP server, the change is propagated to all switches in the VTP domain. VTP messages are transmitted out of all the trunk connections. In Server mode we can create, modify, delete VLANs.

* Client: cannot make changes to the VLAN configuration when in this mode; however, a VTP client can send any VLANs currently listed in its database to other VTP switches. VTP client also forwards VTP advertisements (but cannot create VTP advertisements).

* Transparent: When you make a change to the VLAN configuration in this mode, the change affects only the local switch and does not propagate to other switches in the VTP domain. VTP transparent mode does forward VTP advertisements that it receives within the domain.

VTP Pruning makes more efficient use of trunk bandwidth by forwarding broadcast and unknown unicast frames on a VLAN only if the switch on the receiving end of the trunk has ports in that VLAN.

For more information about VTP, I highly recommend you to visit the official tutorial about VTP published by Cisco. It is very comprehensive: http://www.cisco.com/warp/public/473/vtp_flash/

Comments (305) Comments
Comment pages
  1. Jazz
    February 20th, 2013

    i am giving exam in march plz forward me latest DUMPS mjahanzaib@hotmail.com

  2. Jay
    March 2nd, 2013

    i am giving exam in march plz forward me latest DUMPS alleno92@gmail.com

  3. abu
    March 3rd, 2013

    Hi,

    If a switch is configured in client mode in VTP configurations then which below statements is more correct.

    1)The switch learns VLAN information but does not save it to NVRAM
    2)The switch can create VLANs locally but will not forward this information to other switches.
    3)The switch learns VLAN information and updates the local VLAN database in NVRAM.

    Can anyone please tell me which one is correct and why?
    After reading the above tutorial i understand it is no 3 but from Sekhar dump i found the ans is no 1.

  4. Aman
    March 5th, 2013

    please any one can send the latest dump thank for help

  5. Roman
    March 15th, 2013

    Thanks for good and also simple language material. Very good site.

  6. Onike
    March 18th, 2013

    i am giving exam in march plz forward me latest DUMPS taophycnicky@yahoo.com

  7. prasad
    March 21st, 2013

    9TUT you are doing a great job .these tutorials are very helpful.Im doing the exam on next month.can anyone send me the latest dump.My email is “dpwaruna@gmail.com”
    Thanks

  8. shashi
    March 23rd, 2013

    Thanks 9tut.com

  9. Mawuli
    March 26th, 2013

    Thanks for this tutorials, you’ve made my day….

  10. Mawuli
    March 26th, 2013

    please forward any tips on VTP security to me on emmacoffie@gmail.com

  11. Vasanth
    April 2nd, 2013

    thanks for this tutorial , I’m writing my ICND2 in April, Please send the dumps to vasanthkumar15@yahoo.com

  12. Manish
    April 8th, 2013

    thanks for this tutorial, i am giving exam in march plz forward me latest DUMPS punkmanish11@gmail.com

  13. Anonymous
    April 9th, 2013

    Thanks for sharing such valuable knowledge to us, keep it up

  14. Debbie
    April 16th, 2013

    to abu. the info is saved to the file vlan.dat which is saved in flash not nvram

  15. yogesh
    April 29th, 2013

    i am giving exam in may plz forward me latest DUMPS to darwai_yogesh18@yahoo.com

  16. Mohammed
    May 8th, 2013

    am writing the exam nxt 3 wks please forward latest dumps to me taofat747@gmail.com

  17. Anonymous
    May 8th, 2013
  18. Ishan
    May 15th, 2013

    9TUT you are doing a great job .these tutorials are very helpful. I am doing the exam on next month.can anyone send me the latest dump.My email is “dharminderk62@gmail.com”
    Thanks

  19. Grex
    May 20th, 2013

    Cheers once again, great stuff.

  20. Randy18z
    May 22nd, 2013

    Kudos on your site. This material is well written and easy to follow.

  21. Mulu
    May 23rd, 2013

    To the point and clear.

  22. ndane
    May 24th, 2013

    Thank to 9tut because the explanation is simple and understanding

  23. pranav
    May 31st, 2013

    I am taking CCNA soon. Plz send me latest dump- nairpranav007@gmail.com

  24. neo
    June 1st, 2013

    wel said 9tut u doing a great job thanks a lot…….

  25. Viral
    June 7th, 2013

    Great Stuff, thank you!!
    Can you send me latest stuff – patel.viral2020@gmail.com for ICND2.

  26. Khalid
    June 8th, 2013

    dear i need dump for going for exam.
    dcs.khalid@gmail.com

  27. Harold
    June 18th, 2013

    i need a dump for CCNA exam, can you send me dumps haroldjohn09@gmail.com

  28. Anonymous
    June 22nd, 2013

    I completed ccna with 986/1000 .I prepard exam only with the help of pass4sure v10 653 questions .Which was realy helpful .
    http://6c11e1d9.qqc.co refer this site

  29. satham sheriffs
    June 23rd, 2013

    I am have a plans to right CCNA exam please send me the latest dump, sathamsheirffs@gmail.com

  30. San
    June 24th, 2013

    Thanks alot!

  31. San
    June 24th, 2013

    Thanks a lot!

  32. sheriff
    June 25th, 2013

    thanks.. 9tut

  33. Drew Arc
    June 26th, 2013

    I am taking the exam in august can anyone please send me the latest dumps? So stoked to take this test! andrew.arcurio@gmail.com. Thank you!

  34. Jaouad
    June 27th, 2013

    Thanks a lot 9tut

    very nice article and a very very nice flash by cisco

  35. ndane
    July 1st, 2013

    I am taking the exam in August ending can some one kindly send me the latest dump via elishamanka@rocketmail.con

  36. ndane
    July 1st, 2013

    There is one thing disturbing me i don`t know how i am going to pay my own premium membership money since i don`t have a credit card number can 9tut help ans this question

  37. 9tut
    July 1st, 2013

    @ndane: That is the only way to pay for Premium Membership, ndane.

  38. farhan`
    July 10th, 2013

    please forward me the latest dumps at farhandalwai.official@gmail.com

  39. Thanga
    July 11th, 2013

    Thanks alot and may any one send the latest dumps at chikpraise@gmail.com

  40. pavan
    July 16th, 2013

    thanx a lot to 9tut team, could u pealse send the latest dumps at pavansaikrish@gmail.com

  41. cudl
    July 17th, 2013

    thanks allot,could you please send the latest dumps at ayblaq@gmail.com

  42. era
    July 18th, 2013

    thanx a lot to 9tut team, could u pealse send the latest dumps at erangadpm@gmail.com

  43. obam
    July 18th, 2013

    I would like to thank 9tut team for their good tutorials. Please, could you send the latest dumps at krys3306@hotmail.com

  44. WindzZ
    July 27th, 2013

    Thank you so much!

  45. Hans
    August 9th, 2013

    pls i am taking exams in September , pls send me latest dumps for ccna hanskiyo@gmail.com

  46. shakthi
    August 10th, 2013

    pls i am taking exams in the upcoming days , pls send me latest dumps for ccna sakthikumaranssn@gmail.com

  47. Steftek
    August 13th, 2013

    Taking the test in two weeks please send me the latest dumps for ccna njstef@gmail.com

  48. Juan Matos
    August 16th, 2013

    please send me the latest dumps for ccna lic.juanmatos@gmail.com

  49. Anonymous
    August 16th, 2013

    I am taking the CCNA soon also….could I also get the dumps sent to jgblack2@gmal.com?

  50. Jgblack2
    August 16th, 2013

    that is jgblack2@gmail.com…sorry please forward me the dumps

Comment pages
Add a Comment