Fifty switches, one new VLAN
With fifty switches, creating VLAN 30 by hand on every one is slow and error-prone. VTP (VLAN Trunking Protocol, Cisco) lets you create, rename or delete a VLAN on one switch and have the change copied to every switch in the same VTP domain, over trunk links.
Port assignments, access/trunk roles and allowed lists remain local configuration. In v1/v2, VTP distributes normal-range VLANs; extended VLAN support differs in v3.
This explanation uses VTP v1/v2 VLAN behaviour unless stated otherwise. Version 3 uses a primary-server role; defaults and mode support vary by platform.
Server, client, transparent and off
| Mode | Can create VLANs? | Syncs from others? | Forwards adverts? |
|---|---|---|---|
| Server (classic v1/v2 default) | Yes | Yes | Yes |
| Client | No | Yes | Yes |
| Transparent | Yes, locally only | No | Yes (v2 forwards them unchanged) |
| Off | Yes, locally only | No | No |
VLAN 30 travels from SW1 to SW4
Device key: SW1, SW2, SW3, SW4 (switch)
Lines show the example’s network connections. The coloured path and envelope follow the current step; its text identifies the sender, receiver and traffic type.
- 1. VLAN 30 created on the server. SW1's revision number goes from 4 to 5, and it advertises the new database out its trunks.
- 2. The client applies it. SW2 sees revision 5 is newer than its 4, so it copies the database: VLAN 30 now exists there.
- 3. Transparent passes it on, untouched. SW3 ignores the change for itself but forwards the advert, so SW4 (a client) still gets VLAN 30.
The revision number, and the lab switch that wipes production
Every change increases the configuration revision number. Server/client switches can accept a database with a higher revision when the domain, version and authentication requirements match. In VTP versions 1 and 2, even a client with a higher revision can overwrite the server.
Device key: SW1, SW2 (switch)
Lines show the example’s network connections. The coloured path and envelope follow the current step; its text identifies the sender, receiver and traffic type.
- 1. An old lab switch is plugged in. It's in the same domain name, with revision 50 (from months of lab changes) and almost no VLANs.
- 2. Its database wins. The production switches see revision 50 > 5 and accept the lab switch's database.
- 3. VLANs vanish everywhere. Every switch deletes the missing VLANs; ports in those VLANs go inactive and users are cut off.
Before connecting any switch to a VTP network, reset its revision to 0: change it to transparent mode (or a different domain name) and back. Many networks avoid the risk entirely by running every switch in transparent mode, or use VTP version 3, where only the designated primary server can make changes.
Advertisements and pruning
- Summary adverts: sent every 5 minutes and after every change, carrying the domain and revision.
- Subset adverts: the actual VLAN details, sent after a change.
- Requests: a switch asks for the database when it needs it (for example after a reload).
- VTP pruning: stops flooded traffic (broadcasts, unknown unicasts) for a VLAN from being sent down trunks toward switches that have no ports in that VLAN.
A new switch with a blank domain name adopts the domain from the first VTP advertisement it receives on a trunk.
What changed in VTP versions 1, 2 and 3
| Version | Notable features |
|---|---|
| 1 | Original; transparent switches forward adverts only for their own domain |
| 2 | Transparent switches forward adverts regardless of domain; Token Ring support; consistency checks |
| 3 | Primary server (protects against accidental overwrites), extended VLANs 1006–4094, private VLANs, MST database, off mode, hidden passwords |
Quiz: modes and revision numbers
Which VTP mode keeps its own VLANs but still forwards VTP advertisements to other switches?
A VTP v2 client with a higher revision joins matching server/client peers over a working trunk. Domain and authentication match. What can happen?