In this lab, we will set up Cisco VTP modes and configure them in packet tracer.
VTP (Virtual trunking protocol) replicates the VLAN information from one switch to other switches in the network.
VTP protocol is enabled by default in every switch however it only works or replicates the data if the domain name and password will match.
VTP modes also play a role when VTP replicates the data. VTP mode defines how a switch will act when the VTP update will be received.
Three types of VTP modes
VTP server: VTP server switch can create VLANs and it can send and receive VTP updates within the network.
VTP client: VTP client switch cannot create VLANs however it receives the VTP updates and it updates its VLAN database according to the update.
VTP transparent: VTP transparent switch can create VLANs however it ignores the VTP updates but it passes the VTP updates to other switches in the network. This mode is useful when we want to disable VTP on some of the switches in the network but we want those switches to pass the information to other switches that have VTP enabled.
In this lab, we will configure four switches with different VTP modes.
Switch 0 will be the VTP server
Switch 1 and 3 will be the VTP client
Switch 2 will be configured with VTP transparent mode.
We will see that Switch 2 will not update its database with VTP updates however it will pass the information to Switch 3 so Switch 3 will have its database updated with the VLAN information received from the server.
We have to use the following commands to configure VTP on Cisco Switch. Please make sure that a trunk connection is established between all switches otherwise VTP will not work.
By default, all switches are configured with server mode however we will change that using the following commands.
Command to change VTP mode
Switch(config)#vtp mode client
Setting device to VTP CLIENT mode.
Command to assign VTP domain name
Switch(config)#vtp domain Lab
Changing VTP domain name from NULL to Lab
Command to assign VTP password
Switch(config)#vtp password Cisco
Setting device VLAN database password to Cisco
To check the VTP configuration and which VTP mode is running on the switch, we can use the command.
Show VTP status
You can see the configuration of VTP in switch 1
The switch is running VTP version 2.
The domain name is configured as Lab.
VTP mode is the client.
VTP password configured is not visible using the status command so we have to use the following command to check the configured password.
Switch#show vtp password
VTP Password: Cisco
We can see the configured password so this command is useful if we want to check the configured password or we are not sure if the password is configured or not.
Once configured, we can see that switch 1 and switch 3 received the update from switch 0 so VLAN information about VLAN 10 and 20 have been received and both switches have these two VLANs in their database while switch 2 has ignored the update and these two VLANs cannot be found in its database.
VTP should only be used if required otherwise it can be disabled on our network devices. Check why VTP is not recommended by some network experts.