VTP Concepts and Configuration
One of the many things to master as a network engineer/administrator is the ability to optimize different job tasks. The easier and quicker it is to perform a specific task, the more time can be spent on more pressing issues. When administering a large switched network, one of the tasks that can take a lot of time is setting up separate VLANs across each of the switches. This article takes a look at Cisco’s VLAN Trunk Protocol (VTP), how it operates, and how it can be configured on Cisco equipment to lower the administrative burden of network engineers/administrators.
VLAN Trunk Protocol Concepts
In a network without the use of VTP, when an administrator wants to make configuration changes to global VLANs on the network, each VLAN would need to be manually configured on each individual switch. A method of reducing this administrative burden is to use Cisco’s proprietary VTP. VTP allows a VLAN to be added, configured or deleted on one VTP server switch; this switch will then replicate these actions out to all other supporting VTP switches. Using this method, VLAN configuration changes only need to be completed once, making the administration of global VLANs much less burdensome.
There are three versions of VTP available; versions 1 and 2 are very similar with the only difference being that version 2 adds support for token ring networks. Version 3 is newer and is only available on CatOS 8.1 and higher devices and will not be covered in this article as it is not as common.
Each VTP device is given a specific role or mode, these different modes include:
- ServerA device that is in VTP server mode is able to add, configure and delete VLANs as well as set a number of different configuration parameters including VTP version, pruning and authentication settings.
- ClientA device that is in VTP client mode is not able to make any changes to the VLAN database; it simply takes the database and implements it as dictated by the devices in VTP server mode.
- TransparentA device that is in VTP transparent mode does not participate in VTP at all; they do, however, forward VTP advertisements across the network.
VTP requires the use of either IEEE 802.1q VLAN trunking or Cisco’s Inter-Switch Link (ISL) trunking, which are used to transmit VTP advertisements between supporting switches. VTP keeps track of the most up-to-date VLAN configuration changes by using a configuration revision number. The switch advertising a change with the highest revision number is considered to be the most recent change and is used to change the VTP configuration of VTP supported switches. Since VTP devices assume that this advertisement with the highest revision number is a valid change, it is possible for an administrator to mistakenly bring a new switch into the network that has a higher revision number from a previously attached network. This event can alter the configuration of every supporting VTP device; ensure that any new switch being inserted into an existing switched VTP supported network have a cleared configuration and a lower configuration revision number then the current switched network.
A couple of different configuration elements must match for VTP devices to communicate and be integrated into the VTP network. These different elements include a VTP domain name and the VTP password (if one exists). VTP supports authentication using the VTP password, a hash of this password using MD5 is then created and inserted into VTP advertisements.
VLAN Trunk Protocol Configuration
The configuration of VTP is rather simple. By default, most Cisco IOS devices are in VTP server mode with no configured VTP domain name. New devices will automatically join (the first VTP network that is communicates with) an existing adjacent VTP network if no VTP password is set.
VLAN Trunk Protocol Configuration Commands
The following are the common configuration commands used for VTP:
- The vtp mode server command is used to configure a Cisco IOS device as a VTP server.
- The vtp mode client command is used to configure a Cisco IOS device as a VTP client.
- The vtp mode server command is used to configure a Cisco IOS device to be VTP transparent and to pass VTP advertisements.
- The vtp domain domain-name command is used to set the VTP domain name of a Cisco IOS device. The domain-name is case sensitive and can be up to 32 characters in length.
- The vtp password password command is used to set the VTP password of a Cisco IOS device. The password is case sensitive and can be up to 32 characters in length.
- The vtp version 2 command is used to set the version of VTP to version 2. This is typically only used when support for a token ring network is required.
VLAN Trunk Protocol Configuration Examples
Both of the examples that are shown in this section will use the same topology as shown in Figure 1 below:
Figure 1 VTP Configuration Example Topology
The first example depicts how to configure SW1, SW2 and SW3 to support VTP using a domain name of ‘CisCo’.
Table 1 VTP Configuration Example 1
1 |
Enter global configuration mode. |
switch#configure terminal |
2 |
Configure the switch with a VTP domain name of ‘CisCo’. |
switch(config)#vtp domain CisCo |
|
Repeat these steps on SW1, SW2 and SW3. |
|
The second example depicts how to configure a VTP network using the domain name ‘CisCo’, a password of ‘Password’ and by making SW2 transparent.
Table 2 VTP Configuration Example 2
1 |
Enter global configuration mode. |
switch#configure terminal |
2 |
Configure the switch with a VTP domain name of ‘CisCo’. |
switch(config)#vtp domain CisCo |
3 |
Configure the switch with a VTP password of ‘Password’. |
switch(config)#vtp password Password |
|
Repeat these steps on SW1 and SW3. |
|
1 |
Enter global configuration mode. |
switch#configure terminal |
2 |
Configure the switch to be VTP transparent. |
switch(config)#vtp mode transparent |
|
Repeat these steps on SW2. |
|
Summary
While the use of VTP is restricted to Cisco devices, is has been configured on many networks since its creation. Many modern networks are moving away from the use of global VLANs on the network in exchange for routing at the access layer verus switching. Knowing the VTP concepts are still quite important as it has been deployed in a number of networks and should be familiar to any good Cisco network engineer.