VTP stands for VLAN Trunking Protocol. It is a layer 2 protocol.
In small network, number of switches are less, so we can configure VLANs individually in all switches. But in large network, it’s not easy task to configure VLANs individually in all switches. So, VTP is the solution for this, by putting one switch in VTP server mode and other switches in VTP client mode, you can configure VLANs in one go.
VTP allows you to configure VLANs on a central VTP server switch and other switches (VTP clients) will synchronise their VLAN database to server.
By default, all switches are in server mode.
What is configuration number (CR number)?
CR number represents the total count of changes which are done in configuration. When there is any update in the configuration, CR value is incremented by 1. CR value and revision number both are same thing.
There are 3 different VTP modes.
- VTP server mode
- VTP client mode
- VTP transparent mode
- OFF mode (only VTPv3 supports this mode)
VTP Server Mode
- It allows you to add, modify and delete VLANs.
- It stored VLAN database in NVRAM.
- Revision number (CR value) increases every time when a new VLAN is added or deleted.
VTP server advertise all VLANs on trunk port, VTP client synchronize their database to it so whenever a new VLAN is added in VTP server, it automatically created in VTP clients and CR number is also updated (CR value is same as VTP server).
VTP server also behave as VTP client. Therefore, a VTP server will synchronize to another VTP server with a higher revision number.
VTP Client Mode
- You can’t add, modify or delete VLANs in this mode.
- Don’t store VLAN database in NVRAM.
VTP Transparent Mode
- Switch which configured in transparent mode, doesn’t participate in the VTP domain, simply forward the advertisements that are in the same domain.
- Maintain their own VLAN database in NVRAM. You can add or delete VLAN in this mode. But these VLANs will not advertise in VTP domain.
VTP Off mode
A switch doesn’t participate in VTP advertisements and also doesn’t forward the advertisements. It means VLANs are only locally configured.
In total, there are 3 VTP message.
- VTP summary advertisement
- VTP subset advertisement
- Client Request
VTP summary advertisement: This VTP message includes VTP version, VTP domain, CR number and time stamps. VTP summary message occurs every 300sec (5 min.) when a VLAN is added, removed or changed.
Subset message: This message contains all the information of VLANs that are required by VTP clients to synchronise their VLAN database to server.
Client Request: This message is sent by VTP client. After receiving summary message, when VTP client found, a larger CR value in summary message, it send client request message for detailed subset advertisements.