VTP VLAN Trunking Protocol: Simplified Way of Learning
Introduction
VTP VLAN trunking protocol is a layer 2 Cisco proprietary protocol that distributes VLANs across the whole network. It manages, creates, deletes, and renames VLANs on switches from a centralized location. It reduces the time required for configuring VLANs on each switch, so there is no need to configure the same VLAN on every switch in the network. There are three versions of VTP: V1, V2, and V3.
Why do we need VTP?
Creating the same VLAN on each switch is not hard if our network has a few switches. But, if our environment has 10,20,30 or more than it, then creating VLAN on each switch is difficult to complete because it will consume more time.
To simplify our task, Cisco developed it, which creates the same vlan on each switch in the network. As the administrator creates a VLAN, it will be distributed across all the Switches.
All the Vlans are created from a centralized switch. The centralized switch will act as a server.
VTP Modes
VTP has three modes which are below:
· VTP Server Mode
VTP server is a default mode. All the new switches act as servers. The server creates, deletes, modifies VLANs and at the end, it distributes the created VLANs to the rest of the network’s switches.
· VTP client Mode
VTP mode neither creates deletes nor deletes VLANs, but it imports the VLAN database from the server. If any change occurs the server on the server; the client will receive that update also.
· VTP Mode Transparent
In VTP transparent mode, the switch only relays VTP advertisements from the server, but it doesn’t update its own database.
VTP Versions
There are three versions of VTP which are VTP v1, v2, and v3.
- VTP Version 1: It was the first and basic version supported by Cisco switches. It supports VLAN IDs from 1 to 1005.
- VTP Version 2: VTP Version 2 is an enhanced VLAN Trunking Protocol that supports features like VLAN pruning and extended VLANs for improved network management.
- VTP Version 3: VTP v3 has extended features than V1 and V2. It also supports VLANs from 1006 to 4094 and has much more security than V1 and V2 such as password encryption and hidden password.
Version 2 Configuration on Cisco Switch
We will use the following lab topology to configure the VTP vlan trunking protocol on the Cisco Switches.
Configure VTP mode Server, Transparent, and Client on Switch1, Switch2 and Switch3, respectively.
Configure trunk links on all the switches.
After confiuguring trunk link on all the switches, configure the vtp domain and password also as below;
Check vtp on all the three switches
Create VLAN on Swtich1 (Server)
Now check the configured VLAN 10 on Switch2 and Switch3, whether they received it or not.
There is no VLAN reached to Switch2, while Switch3 received it, because Switch2 is in Transparent mode, while Switch3 is in client mode.
Create a VLAN on Switch2;
We created VLAN on Switch2, now check it on Switch3, whether it received it or not. Switch3 will not receive it because Switch2 is in transparent mode, and the VLAN created on Switch2 will not propagate to other switches.
We can’t create VLANs on client switches as below;
VTP Revision Number
Create some VLAN on Switch1 and then check vtp status by examining the revision number;
Run the “Show vtp status” command on Switch3 and check the revision number also on Switch3 (client).
Client Switch (Switch3) has also updated its Revision number.
Similarly, remove vlan from Switch1 (server), and then check the revision number;
The transparent switch doesn’t update its revision number according to the server; however, check the vtp status on the transparent switch (Switch2).
This time create some VLANs on the transparent switch (Switch2), and then run the “show vtp status” command to check the revision number;
The VLANs created on transparent switches will not propagate to any other switch in the network, whether the receiver will server or client!
If you want to reset the revision number on the server or client Switch, then change the vtp domain name and then rejoin the previously configured domain as below;
Similarly, you can reset the revision number by changing the vtp version from 2 to 1 and then back from 1 to 2.
Changing vtp modes can also reset the revision number, e.g. changing vtp mode server to transparent and then back from transparent to server.
Configure VTP Version 3
lab topology for VTP v3
Configure VTP v3 on Switch1 and Switch2. Switch1 will act as a server, and Switch2 will act as the client swtich.
Set the vtp domain name first, then configure vtp v3 on switch.
Similarly, also configure vtp v3 on switch3;
When you are creating vlan on Switches in vtp v3 mode, then you should configure it as a primary server.
Run the command “vtp primary vlan” on switch1. After this command, it will be able to create VLANs;
Vtp has passwords in plain text if we don’t encrypt or hide it such as below, which can be easily detected.
However, vtp v3 can convert the plain text password into encrypted form through the following command;
Now, the password is in encrypted form which are not readable.
VTP Off Mode
Besides server, client, and transparent mode, there is also another mode of vtp, which is VTP Off mode. When you configure this command, the switch is not participate in vtp process.
Now, it will not participate in the VTP process.