CCNA · Lesson 7 of 13
VTP: How VLANs Are Copied Between Switches
If you have 30 switches, do you create VLAN 10 on all 30? VTP lets you create it once. But it carries a risk you must know.
In a nutshell
VTP copies the VLAN list from one switch to the others over trunks. It is convenient, but a badly added switch can wipe the VLANs of the whole network.
In this lesson
What is VTP?
VTP (VLAN Trunking Protocol) is a Cisco proprietary protocol. A switch advertises its VLAN database (create, delete, rename) and the other switches in the same VTP domain copy it. Advertisements travel only over trunk links.
Note: VTP does not assign ports to VLANs. It only synchronizes which VLANs exist. Ports are configured on each switch.
VTP modes
| Mode | Creates VLANs? | Synchronizes? | Forwards advertisements? |
|---|---|---|---|
| Server (default) | Yes | Yes | Yes |
| Client | No | Yes | Yes |
| Transparent | Yes, local only | No | Yes (in VTPv2) |
| Off | Yes, local only | No | No |
To remember
The client is an employee who only obeys; transparent is a neighbor who passes the letters along without reading them.
The revision number: the danger of VTP
Each time you change something on a server, the revision number goes up by 1. Switches always accept the database with the highest revision number.
Very common real mistake
You plug in a used switch from another lab, with the same domain and a higher revision number. Its VLAN list (maybe empty) replaces the one of the whole network and users lose service.
To avoid it, reset the revision of a used switch to 0 before connecting it: change the domain name, or move it to transparent mode and back.
Requirements to synchronize
- Same VTP domain name (case sensitive).
- Same VTP password, if configured.
- Same VTP version in the domain.
- Connected through trunk links.
Configuration and verification
SW1(config)# vtp domain COMPANY
SW1(config)# vtp mode server
SW1(config)# vtp password Cisco123
SW1(config)# vtp version 2
SW2(config)# vtp domain COMPANY
SW2(config)# vtp mode client
SW2(config)# vtp password Cisco123
SW2# show vtp status
VTP Version capable : 1 to 3
VTP version running : 2
VTP Domain Name : COMPANY
VTP Operating Mode : Client
Number of existing VLANs : 8
Configuration Revision : 4
Versions and the extended range
VTP v1 and v2 only advertise normal-range VLANs (1–1005). To create extended-range VLANs with those versions the switch must be in transparent mode. VTPv3 does advertise the extended range and adds the primary server role to reduce the risk of overwrites.
Best practice
Many companies run VTP in transparent or off mode and create VLANs by hand (or with automation) to avoid the revision number risk.
What you must remember
- VTP synchronizes the VLAN list (not ports) over trunks.
- Modes: server (default), client, transparent and off.
- The database with the highest revision number wins.
- Requirements: same domain, password and version, and trunk links.
Check what you learned
4 exam-style questions. Some have one answer and others ask you to choose several. Answer them all to complete the lesson.