Three switches in the ROUTELEARN domain
Device key: SW1, SW2, SW3 (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. Goal: VLANs created on SW1 appear on SW2 automatically; SW3 keeps its own VLANs but still passes adverts on.
Based on Cisco IOS / IOS XE documentation, not run in a lab here. Start from switches with no important VLANs: VTP changes affect every switch in the domain.
Use isolated lab switches. Before connecting a reused switch, verify its mode, domain and revision with show vtp status; do not attach a higher-revision v1/v2 database to an existing domain.
Step 1: SW1 as the server
vtp domain ROUTELEARN
vtp version 2
vtp mode server
vtp password Lab-Secret
vlan 10
name EMPLOYEES
vlan 20
name GUESTSDomain name and password are case-sensitive and must match on every switch.
Step 2: SW2 as a client
vtp domain ROUTELEARN
vtp version 2
vtp mode client
vtp password Lab-SecretClients can't create VLANs; 'vlan 30' here returns an error.
Step 3: SW3 transparent
vtp domain ROUTELEARN
vtp version 2
vtp mode transparent
vlan 99
name LOCAL-ONLYVLAN 99 exists only on SW3 and is saved in its running configuration rather than shared.
Step 4: make sure the links are trunks
interface GigabitEthernet1/0/1
switchport mode trunkApply static trunking to each link at both ends, using the actual cabled interface names. Verify operational trunking, not just the administrative mode.
Reading show vtp status on SW2
SW2#show vtp status VTP Version capable : 1 to 3 VTP version running : 2 VTP Domain Name : ROUTELEARN VTP Pruning Mode : Disabled VTP Traps Generation : Disabled Device ID : 0200.0000.0002 Configuration last modified by 0.0.0.0 at 10-5-26 10:15:03 Feature VLAN: -------------- VTP Operating Mode : Client Maximum VLANs supported locally : 1005 Number of existing VLANs : 7 Configuration Revision : 2 MD5 digest : 0x3A 0x1F ...
show vlan briefOn SW2: VLANs 10 and 20 should appear without having been created there. On SW3 they won't (but VLAN 99 will).
show vtp passwordConfirms the password configured on this switch.
Adding a switch without wiping the domain
- Before connecting it, run
vtp mode transparent(this resets its revision to 0). - Then set the domain, version and password, and only then
vtp mode client. - Connect it and check
show vtp status: its revision should match the server's.
Many production networks avoid the question altogether: every switch runs in transparent mode and VLANs are added per switch, often by a script or a management platform.
A new VLAN and a client that learns nothing
Task 1: create VLAN 30 named PRINTERS so it reaches SW2. Where do you configure it?
Show answer
vlan 30
name PRINTERSOn SW1, the server. SW1's revision goes up by one, and SW2 shows VLAN 30 shortly after.
Task 2: SW2 shows revision 0 and none of the VLANs. List three things to check.
Show answer
- The link between SW1 and SW2 is really a trunk (
show interfaces trunk). - The domain name matches exactly, including case.
- The password and VTP version match (a password mismatch shows up as an MD5 digest error in the logs).