Course contents

Chapter 5: LAN SwitchingLesson 9 of 12

Beyond CCNA (optional). This topic is not on the CCNA 200-301 exam. It is useful at work and in later study; skip it if you are preparing for the exam. (VTP was removed from the 200-301 blueprint (2.2 covers trunks, 802.1Q and the native VLAN).)

What is VTP?

Domains, modes, revision numbers, and why VTP can delete every VLAN in a network.

Intermediate · 8 min read

Technical definition

VTP (VLAN Trunking Protocol) is a Cisco protocol that copies the VLAN database (VLAN numbers and names) from a switch in server mode to the other switches in the same VTP domain, using advertisements sent over trunk links. It does not assign ports to VLANs; that is still configured on each switch.

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

ModeCan create VLANs?Syncs from others?Forwards adverts?
Server (classic v1/v2 default)YesYesYes
ClientNoYesYes
TransparentYes, locally onlyNoYes (v2 forwards them unchanged)
OffYes, locally onlyNoNo

VLAN 30 travels from SW1 to SW4

Diagram
A VTP advertisement spreading through a domain
A VTP advertisement spreading through a domain
trunktrunktrunkSW1serverSW2clientSW3transparentSW4client

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. 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. 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. 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.

Diagram
A switch with a higher revision number wiping out VLANs
A switch with a higher revision number wiping out VLANs
trunknew trunkSW1serverSW2clientLab switchclient · rev 50 · VLAN 1 only

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. 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. 2. Its database wins. The production switches see revision 50 > 5 and accept the lab switch's database.
  3. 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

Diagram
What changed in VTP versions 1, 2 and 3
What changed in VTP versions 1, 2 and 3
VersionNotable features
1Original; transparent switches forward adverts only for their own domain
2Transparent switches forward adverts regardless of domain; Token Ring support; consistency checks
3Primary server (protects against accidental overwrites), extended VLANs 1006–4094, private VLANs, MST database, off mode, hidden passwords
Each item on the left, with what it means on the right.

Quiz: modes and revision numbers

Predict · scenario 1

Which VTP mode keeps its own VLANs but still forwards VTP advertisements to other switches?

Predict · scenario 2

A VTP v2 client with a higher revision joins matching server/client peers over a working trunk. Domain and authentication match. What can happen?

Cisco reference

Cisco: understanding VTP