In order to fulfill many different goals in a growing network, we need to configure multiple VLANs. For instance, in a network with 36 switches, you might need to configure 10 independent VLANs on each of these switches. This means you are gong to need to configure a total of 360 VLANs!
Virtual Trunking Protocol (VTP) saves administration time in a switched network. When you configure a new VLAN on one VTP server, the VLAN is distributed between all switches in the domain. VTP is a protocol developed by Cisco and is supported by most of the Cisco Catalyst switches.
We can configure VTP in three different ways. Each of these configurations have different behaviors in the network.
- Server: In VTP server mode, you are able to create, modify, and delete VLANs. VTP servers advertise their VLAN settings to other switches inside the same VTP domain and synchronize their VLAN configuration with other switches based on advertisements received from the trunk links. VTP server is the default mode and remember that you can have more than one VTP server in a single domain.
- Client: VTP clients behave the same way as VTP servers, but creating, changing or deleting VLANs is not possible on a VTP client. VTP clients receive the updates from VTP server and apply changes on the switch.
- Transparent: When a switch is configured as VTP transparent, it won’t participate in VTP. This switch will not advertise its own VLAN settings and does not synchronize its VLAN configuration based on the advertisements it recieved. Nevertheless, transparent switches do forward VTP advertisements that they receive on their trunk ports.
How VTP works
VTP protocol sends update message to other switches by using a certain number called Revision Number. A configuration revision number is made of a 32-bit number which shows the number of revision for a VTP packet.
When you add or delete any VLAN in VTP server, revision number will increase by one. The updated VLAN information will be sent to all switches that are in the same VTP domain.
When switches that are working in VTP client receive a VTP update packet with higher revision number than their own, they open the VTP packet and apply the changes.
By default, Cisco switches issue a Summary Advertisements in every five minute. Summary advertisements inform other switches of the current VTP domain about the name and also about the configuration revision number. This message is generating by VTP server and will be sent to all clients in order to inform them that the server switch is still working.
If we use VTP protocol in the network, all switches would know and recognize all VLAN numbers. So, when one switch in the network receives a packet with the broadcast address, all other switches will receive it as well.
Look at the below picture to understand the above statement better:
Notice that VTP Pruning has not been enabled in the figure above. Port 1 on Switch A and Port 2 on Switch C are assigned to the VLAN 10. If a broadcast is sent from the host connected to Switch A, Switch A floods the other switches with the broadcast and every switch in the network receives it, even though switches C, E, and F don’t have any ports inside VLAN 10. But VLAN 10 is configured in all switches with VTP protocol.
When VTP pruning is enabled on a VTP server, pruning is enabled for the entire management domain. If switch don’t have any access port to VLAN 10, the upper switch will not send traffic to that VLAN.
Remember that VLAN 1 and VLANs 1002 to 1005 are always pruning-ineligible; traffic from these VLANs cannot be pruned. Extended-range VLANs (VLAN IDs greater than 1005) are also pruning-ineligible.
Th figure above shows the same switched network we showed before but this time with VTP Pruning enabled. The broadcast traffic from Switch A is not forwarded to Switches F, D, and E because traffic for the VLAN 10 has been pruned. The pruned links are marked with red star (Port 5 on Switch B and Port 6 on Switch C).
Below videos shows step by step configuration guideline to setup Virtual Trunking Protocol (VTP) in Cisco switches.