Introduction To VTP (VLAN Trunking Protocol)
Introduction To VTP (VLAN Trunking Protocol)
Protocol)
Let’s say you have a network with 20 switches and 50 VLANs. Usually, you would
have to configure each switch separately and create those VLANs on every switch.
That’s a time-consuming task, so there is something to help us called VTP (VLAN
Trunking Protocol). VTP will let you create VLANs on one switch, and all the other
switches will synchronize themselves.
We have one VTP server. This is the switch where you create/modify or delete
VLANs. The other switches are VTP clients. The VTP configuration has a revision
number that increases every time you make a change. Every time you make a
change on the VTP server, this will be synchronized to the VTP clients. Oh, and by
the way, you can have multiple VTP servers since it also functions as a VTP client, so
you can make changes on multiple switches in your network. To make VTP work,
you need to set up a VTP domain name, which you can just make up as long as you
configure it to be the same on all your switches.
Besides the VTP server and VTP client, there’s also a VTP transparent, which is a bit
different. Let me show you an example:
Should you use VTP? It might sound useful, but VTP has a considerable security
risk…the problem with VTP is that a VTP server is also a VTP Client, and any VTP
client will synchronize itself with the highest revision number. The following
situation can happen with VTP:
You have a network with a single VTP server and a couple of VTP client switches, and
everything is working fine, but one day you want to test some stuff and decide to
take one of the VTP clients out of the network and put it in a lab environment.
What do you think the result will be? The revision number of VTP on the switch we
played with is higher than the revision number on the switches of our production
network. The VTP client will advertise its information to the other switches. They
synchronize to the latest information, and POOF all your VLANs are gone! A VTP
client can overwrite a VTP server if the revision number is higher because a VTP
server is also a VTP client.
Yes, I know this sounds silly, but this is the way it works…very dangerous since you’ll
lose all your VLAN information. Your interfaces won’t go back to VLAN 1 by default
but will float around in no man’s land…
One more thing about VTP, let me give you another picture:
You see, we have computers in VLAN 10, 20 and 30. The links between the switches
are trunks using the 802.1Q protocol and carrying all VLAN traffic. One of our
computers in VLAN 10 sends a broadcast frame. Where do you think this broadcast
frame will go?
Broadcast frames must be flooded by our switches, and since our trunks carry all
VLANs, this broadcast will go everywhere. However, if you look at the switch in the
middle, do you see any computer in VLAN 10? Nope, there’s only VLAN 20 there,
which means this broadcast is wasted bandwidth. By enabling VTP pruning, we’ll
ensure there is no unnecessary VLAN traffic on trunks when there’s nobody in a
particular VLAN. Depending on your switch model, VTP pruning is either turned on
or off by default.
Let’s take a look at the configuration of VTP. I will be using three switches for this
task. I erased the VLAN database and the startup configuration on all switches.