We’ve already learned that using VTP makes it is possible to make configuration changes on one or more switches and have those changes automatically advertised to all the other switches in the same VTP domain. In a typical network some switches are configured as VTP servers and other switches are configured as VTP clients. A VLAN created on a VTP server switch is automatically advertised to all switches inside the same VTP domain.
To exchange VTP messages, five requirements must be met:
1. a switch has to be configured as either a VTP server or VTP client
2. the VTP domain name has to be the same on both switches
3. if present, the VTP domain password has to be the same
4. VTP versions have to match
5. the link between the switches has to be a trunk link
Consider the following example network:
We have a network of three switches connected via trunk links. On SW1, we will configure the VTP domain name using the vtp domain NAME command and VTP password using the vtp password PASSWORD commands:
SW1(config)#vtp domain study-ccna Changing VTP domain name from NULL to study-ccna SW1(config)#vtp password cisco Setting device VLAN database password to cisco
SW2(config)#vtp mode client Setting device to VTP CLIENT mode. SW2(config)#vtp domain study-ccna Changing VTP domain name from NULL to study-ccna SW2(config)#vtp password cisco Setting device VLAN database password to cisco SW3(config)#vtp mode client Setting device to VTP CLIENT mode. SW3(config)#vtp domain study-ccna Changing VTP domain name from NULL to study-ccna SW3(config)#vtp password cisco Setting device VLAN database password to cisco
SW2 and SW3 will create the VLAN 30 automatically. We can use the show vlan command on both switches to verify this (in this example VLAN 2 ‘Accounting’ was also already created on SW1):
To display the VTP configuration information, we can use the show vtp status command:
Switch#show vtp status VTP Version : 2 Configuration Revision : 3 Maximum VLANs supported locally : 255 Number of existing VLANs : 7 VTP Operating Mode : Client VTP Domain Name : study-ccna VTP Pruning Mode : Disabled VTP V2 Mode : Disabled VTP Traps Generation : Disabled MD5 digest : 0x82 0xA7 0xF2 0x89 0x5F 0xC3 0x98 0x52 Configuration last modified by 0.0.0.0 at 0-0-00 00:00:00
The most important field listed in the output above is the Configuration Revision number. This number indicates the level of revision for a VTP packet. Each device tracks the VTP configuration revision number that is assigned to it. This information is used in order to determine whether the received information is more recent than the current version.
Each time you make a VLAN change on a VTP server, the configuration revision number is incremented by one and a VTP advertisement is sent. The switch that receives a VTP packet compares the configuration revision to its own revision. If the configuration revision number in the received VTP advertisement is higher than its own revision number, the switch will overwrite its VLAN configurations with the new information that is being advertised.
Download our Free CCNA Study Guide PDF for complete notes on all the CCNA 200-301 exam topics in one book.
We recommend the Cisco CCNA Gold Bootcamp as your main CCNA training course. It’s the highest rated Cisco course online with an average rating of 4.8 from over 30,000 public reviews and is the gold standard in CCNA training: