During the early days of networking, it was difficult to implement VLANs across networks. Each VLAN was manually configured on each network switch. Managing a large switched network used to be a complicated tasks, VLAN trunking methods has helped to ease this problem.
VLAN Trunking Protocol (VTP) is a Cisco Proprietary which basic aim is to manage all configured VLANs across a switched network. VTP helps to propagate and maintain VLAN configurations consistency to other switches on the network.
VTP is a messaging protocol that uses layer 2 trunk frames to add, delete and rename VLANs on a single domain. It helps to centralize changes which are sent to other switches on the network.
A switch had to be configured in the role of a VTP server to manage your VLAN configuration on your network. The sever(s) will share VLAN information with other switches on the network which must use the same domain name.
VTP learns only normal-range VLANs (VLAN IDs 1 to 1005).
The primary role of VTP is to maintain VLAN configuration consistency across a network administration domain.
VTP stores VLAN configurations in the VLAN database called vlan.dat.
After a trunk is established between switches, VTP advertisement is exchanged between the switches. Both the server switch and client exchange and monitor advertisement from one another to ensure each has an accurate record of VLAN information. VTP advertisement will not be exchanged if the trunk between the switches is inactive.
In the diagram above, a trunk link is configured between switch S1, - VTP Server, S2 and S3 - VTP client. After a trunk is established between the switches, VTP summary advertisement is exchanged among the switches.
VTP Configuration Guidelines
Follow these steps to configure a Cisco Catalyst switch to use VTP successfully:
VTP Server Switches
i. Before you begin configuration, ensure that all of the switches are set to their default settings.
ii. Always reset the configuration revision number before installing a previously configured switch into a VTP domain. Not resetting the configuration revision number allows for potential disruption in the VLAN configuration across the rest of the switches in the VTP domain.
iii. Configure at least two VTP server switches in your network. Because only server switches can create, delete, and modify VLANs, you should make sure that you have one backup VTP server in case the primary VTP server becomes disabled. If all the switches in the network are configured in VTP client mode, you cannot create new VLANs on the network.
iv. Configure a VTP domain on the VTP server. Configuring the VTP domain on the first switch enables VTP to start advertising VLAN information. Other switches connected through trunk links receive the VTP domain information automatically through VTP advertisements.
v. If there is an existing VTP domain, make sure that you match the name exactly. VTP domain names are case-sensitive.
vi. If you are configuring a VTP password, ensure that the same password is set on all switches in the domain that need to be able to exchange VTP information. Switches without a password or with the wrong password reject VTP advertisements.
vii. Ensure that all switches are configured to use the same VTP protocol version. VTP version 1 is not compatible with VTP version 2. By default, Cisco Catalyst 2960 switches run version 1 but are capable of running version 2. When the VTP version is set to version 2, all version 2 capable switches in the domain auto configure to use version 2 through the VTP announcement process. Any version 1-only switches cannot participate in the VTP domain after that point.
viii. Create the VLAN after you have enabled VTP on the VTP server. VLANs created before you enable VTP are removed. Always ensure that trunk ports are configured to interconnect switches in a VTP domain. VTP information is only exchanged on trunk ports.
VTP Client Switches
i. As on the VTP server switch, confirm that the default settings are present.
ii. Configure VTP client mode. Recall that the switch is not in VTP client mode by default. You have to configure this mode.
iii. Configure trunks. VTP works over trunk links.
iv. Connect to a VTP server. When you connect to a VTP server or another VTP-enabled switch, it takes a few moments for the various advertisements to make their way back and forth to the VTP server.
v. Verify VTP status. Before you begin configuring the access ports, confirm that the revision mode and number of VLANs have been updated.
vi. Configure access ports. When a switch is in VTP client mode, you cannot add new VLANs. You can only assign access ports to existing VLANs.