VLAN Trunking Protocol
VLAN Trunking Protocol is used by Cisco switches to exchange VLAN information. In VTP, synchronization of VLAN information, such as VLAN ID or VLAN name can be done with switches inside the same VTP domain.
VTP domain is a group of trunked switches with the matching VTP settings such as domain name, password and VTP version. All switches present in the same VTP domain share their VLAN information with each other.
For better understanding of VTP, consider an example network with 50 switches. Without VTP, if we want to create a VLAN on each switch, you should manually enter VLAN configuration commands on every switch. But when comes to VTP, it enables you to create the VLAN only on a single switch. That Particular switch can propagate information about the VLAN to every other switch on the network and cause other switches to create it. Similarly, if we delete a VLAN, the change is automatically transmitted to every other switch inside the same domain.
VTP share VLANs information through VTP messages. VTP messages can only be transmitted through the trunk connections. So we need to establish trunk connection between switches. VTP messages are transmitted as layer 2 multicast frames.VTP does not publicize information about which switch ports are assigned to which VLAN.
Related – VDC vs VLAN
VLAN Trunking Protocol VERSIONS:
There are three versions in VTP
- Version 1
- Version 2
- Version 3
Among the three, Version 3 is most popular and has following features –
- Enhanced authentication
- Support for extended VLANs (1006 to 4094). It also support for private VLAN
- VTP mode off that disables VTP
- Backward compatibility with VTP V1 and V2
VLAN Trunking Protocol (VTP) MODES:
VTP can be configured in four different modes
- VTP Server Mode
- VTP Client Mode
- VTP Transparent Mode
- VTP Off Mode
VTP Server Mode:
- VLANs can be created, modified, and deleted in VTP server and configuration parameters, such as VTP version and VTP pruning can also be specified for the entire VTP domain.
- VTP servers publicize their VLAN configuration to other switches in the same VTP domain and synchronize their VLAN configuration with other switches based on advertisements received over trunk links.
- VTP server is the default mode.
- Saves Configuration in NVRAM
VTP Client Mode:
- VTP clients are similar to the VTP servers. The only difference is that we cannot create, change, or delete VLANs on a VTP client.
- Doesn’t save Configuration in NVRAM
VTP Transparent Mode:
- VTP transparent switches do not take part in VTP.
- VTP transparent switch does not publicize its VLAN configuration and does not synchronize its VLAN configuration based on received advertisements, but transparent switches forward VTP advertisements that they receive from trunk ports.
- In addition to supporting private VLANs in client and server modes, VTP version 3 also supports creating extended-range VLANs in client or server mode
VTP Off Mode:
It is similar to the transparent mode. The only difference is that a switch using this mode will not forward received VTP updates. It is supported only in VTP Version3.
Configuration Revision Number:
- Vlan Trunking Protocol switches use a pointer called the VTP configuration Revision Number to notify the most recent information.
- Configuration revision number is zero (0) when VTP advertisement process starts.
- When modification is made on a VTP server, the revision number is incremented by one before the advertisement is sent.
How to add a new switch into the existing VLAN Trunking Protocol Domain
- While adding a switch to an existing VTP domain, make sure that the switch VTP Revision number is 0 before adding it to a network.
- Reform the switches VTP mode to transparent and then change the mode back to server.
- VTP domain name should be changed to a fake name (a nonexistent vtp domain), and then change the VTP domain back to original name.
- Remove the Vlan .Dat file inside the flash and reload it.
VLAN Trunking Protocol (VTP) CONFIGURATION
There are some prerequisites for VTP to transmit VLAN information between switches.
- Switches which are to be VTP configured should be with the same domain name and same version.
- There must be one server switch among the switches.
- Authentications like Password should match if applied.
Below is a sample lab setup showcasing VTP Server, Client and transparent mode for Switch1, Switch2 and Switch3 respectively.
Configuration of VTP Server Mode in Switch 1
Configuration of VTP Client Mode in Switch 2
Configuration of VTP Transparent Mode in Switch 3
Below is the VTP mode after configuring the mode as server in Switch1.
Note: As per the output, VLAN 10 & VLAN 20 are created in switch 1. Henceforth, VLAN 10 & VLAN 20 are also created in Switch2 by automatically (by VTP) because Switch 1 is VTP server, Switch 2 is VTP Client. Note: As per the output, no VLANs are created automatically in switch 3, because Switch 3 is VTP transparent. Related – VTP Interview Q&A
Below is the information of VTP mode after configuring the mode as client in Switch2.
Below is the information of VTP mode after configuring the mode as transparent in Switch3.
VLAN 10 & VLAN 20 configuration on switch 1.
Showing the information about VLANs in Switch 1 use “show vlan brief” command.
Showing the information about VLANs in Switch 2.
Information about VLAN 10 & VLAN 20 in Switch 3.
Note: As per the output, VLAN 10 & VLAN 20 are created in switch 1. Henceforth, VLAN 10 & VLAN 20 are also created in Switch2 by automatically (by VTP) because Switch 1 is VTP server, Switch 2 is VTP Client.
Note: As per the output, no VLANs are created automatically in switch 3, because Switch 3 is VTP transparent.
Related – VTP Interview Q&A