Introduction
This document describes how to configure VLAN Trunk Protocol (VTP).
Prerequisites
Requirements
There are no specific requirements for this document.
Components Used
This document is not restricted to specific software and hardware versions.
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, ensure that you understand the potential impact of any command.
Conventions
Refer to Cisco Technical Tips Conventions for more information about document conventions.
Background Information
VTP reduces administration in a switched network. When you configure a new VLAN on one VTP server, the VLAN is distributed through all switches in the domain. This reduces the need to configure the same VLAN everywhere. VTP is a Cisco-proprietary protocol that is available on most of the Cisco Catalyst series products.
Refer toUnderstand VLAN Trunk Protocol (VTP)for more information on VTP.
Note: Only registered Cisco users can access internal site, tools, and documents.
Configure
VTP Configuration Guidelines
This section provides some guidelines for the configuration of VTP in the network.
-
All switches have the same VTP domain name, unless the network design requires different VTP domains.
Note: Trunk negotiation does not work across VTP domains. Refer to the Data Traffic Blocked between VTP Domains section of Configure VLAN Trunk Protocol (VTP) for more information.
-
All switches in a VTP domain must run the same VTP version.
-
All switches in a VTP domain have the same VTP password, if there are any.
-
All VTP Server switch(es) must have the same configuration revision number and it must also be the highest in the domain.
-
When you move a VTP mode of a switch from Transparent to Server, VLANs configured on the VTP Transparent switch must exist on the Server switch.
VTP Configuration on Catalyst Switches
This section provides some basic commands in order to configure VTP on the most commonly used Catalyst switches.
There were two methods in order to configure VTP, as this section shows. The availability of these methods can differ from the version of Cisco IOSĀ® software. For example, Method 1 is not available on newer versions of Cisco IOS, on the other hand Method 2 (the Global Configuration mode) is not available in legacy software versions.
-
Method 1, in VLAN database mode:
In Cisco IOS Software, you can configure the VTP domain name, the VTP mode, and the VLANs in VLAN configuration mode.
-
In EXEC mode, issue this command in order to enter VLAN configuration mode:
Switch#vlan database
!--- Issue this command in privileged EXEC mode,
!--- not in global configuration mode.
Switch(vlan)#
!--- This is VLAN configuration mode.
-
Issue this command in order to set the VTP domain name:
Switch(vlan)#vtp domain example
-
Issue this command in order to set the VTP mode:
Switch(vlan)#vtp {client | server | transparent}
-
Issue the exit command in order to exit VLAN configuration mode.
Note: The end and the Ctrl-Z commands do not work in this mode.
Switch(vlan)#end
Switch(vlan)#^Z
% Invalid input detected at '^' marker.
Switch(vlan)#
Swtch(vlan)#exit
APPLY completed.
Exiting....
Switch#
-
Method 2, in global configuration mode:
In Cisco IOS Software global configuration mode, you can configure all VTP parameters with Cisco IOS Software commands. This is the command format:
Switch(config)#vtp ?
domain Set the name of the VTP administrative domain.
file Configure IFS filesystem file where VTP configuration is stored.
interface Configure interface as the preferred source for the VTP IP updater
address.
mode Configure VTP device mode
password Set the password for the VTP administrative domain
pruning Set the administrative domain to permit pruning
version Set the administrative domain to VTP version
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vtp domain ?
WORD The ascii name for the VTP administrative domain.
Switch(config)#vtp domain example
Changing VTP domain name from example to example
Switch(config)#vtp mode server
-
Issue these commands in order to monitor VTP operation and status:
Switch#show vtp status
VTP Version capable : 1 to 3
VTP version running : 2
VTP Domain Name : example
VTP Pruning Mode : Disabled
VTP Traps Generation : Disabled
Device ID : 6400.f13e.dc40
Configuration last modified by 10.122.190.226 at 0-0-00 00:00:00
Local updater ID is 10.122.190.226 on interface Fa1 (first layer3 interface found)
Feature VLAN:
--------------
VTP Operating Mode : Server
Maximum VLANs supported locally : 1005
Number of existing VLANs : 16
Configuration Revision : 0
MD5 digest : 0x0A 0xF4 0xFD 0xE9 0x99 0xD7 0xAB 0x3F
0x0A 0x64 0x04 0x7C 0x42 0x98 0xD8 0xE5
Switch#
Switch#show vtp counters
VTP statistics:
Summary advertisements received : 0
Subset advertisements received : 0
Request advertisements received : 0
Summary advertisements transmitted : 0
Subset advertisements transmitted : 0
Request advertisements transmitted : 0
Number of config revision errors : 0
Number of config digest errors : 0
Number of V1 summary errors : 0
VTP pruning statistics:
Trunk Join Transmitted Join Received Summary advts received from
non-pruning-capable device
---------------- ---------------- ---------------- ---------------------------
Switch#
Practical Examples
Example 1:
This example involves two Catalyst 4500 switches that are connected by a TenGigabitEthernet link:
-
Switch-A is a new switch that has no VTP domain name and no VLAN. Switch-C is a switch that currently exists and runs with 16 VLANs in the VTP domain test.
-
In this sample output from the show vtp status command, you can see that the VTP version is defaulted to 1. And Switch-A is VTP V2-capable. However, the switch does not run VTP V2 in this case. The switch only runs VTP V2 if the V2 version is configured with the vtp version 2 command. In this example, Switch-A is configured as VTP Client. It is also important to make sure that the switch connected has a Configuration Revision of 0, or lower value than current VTP Server before it is connected into the network:
Switch-A#show vtp status
VTP Version capable : 1 to 3
VTP version running : 1
VTP Domain Name :
VTP Pruning Mode : Disabled
VTP Traps Generation : Disabled
Device ID : 6400.f13e.dc40
Configuration last modified by 0.0.0.0 at 0-0-00 00:00:00
Local updater ID is 10.122.190.226 on interface Fa1 (first layer3 interface found)
Feature VLAN:
--------------
VTP Operating Mode : Server
Maximum VLANs supported locally : 1005
Number of existing VLANs : 5
Configuration Revision : 0
MD5 digest : 0x57 0xCD 0x40 0x65 0x63 0x59 0x47 0xBD
0x56 0x9D 0x4A 0x3E 0xA5 0x69 0x35 0xBC
Switch-A#
Switch-A#
Switch-A#
Switch-A#show vlan brief
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Gi1/1, Gi1/2, Gi1/4, Gi1/5
Gi1/6, Gi1/7, Gi1/8, Gi1/9
Gi1/10, Gi1/11, Gi1/12, Gi1/13
Gi1/14, Gi1/15, Gi1/16, Gi1/17
Gi1/18, Gi1/19, Gi1/20, Gi1/21
Gi1/22, Gi1/23, Gi1/24, Gi1/25
Gi1/26, Gi1/27, Gi1/28, Gi1/29
Gi1/30, Gi1/31, Gi1/32, Gi1/33
Gi1/34, Gi1/35, Gi1/36, Gi1/37
Gi1/38, Gi1/39, Gi1/40, Gi1/41
Gi1/42, Gi1/43, Gi1/44, Gi1/45
Gi1/46, Gi1/47, Gi1/48, Te3/2
Te3/3, Te3/4, Te3/5, Te3/6
Te3/7, Te3/8
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
Switch-A#
Switch-C#show vtp status
VTP Version capable : 1 to 3
VTP version running : 2
VTP Domain Name : test
VTP Pruning Mode : Disabled
VTP Traps Generation : Disabled
Device ID : 503d.e583.3b40
Configuration last modified by 10.122.190.227 at 11-24-22 13:44:22
Local updater ID is 10.122.190.227 on interface Fa1 (first layer3 interface found)
Feature VLAN:
--------------
VTP Operating Mode : Server
Maximum VLANs supported locally : 1005
Number of existing VLANs : 16
Configuration Revision : 4
MD5 digest : 0xCB 0x67 0x2A 0xF1 0x9A 0x8D 0xD3 0x1B
0xA8 0xB3 0x89 0xB2 0x32 0x63 0xA6 0xD0
Switch-C#
Switch-C#show vlan brief
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Gi1/1, Gi1/2, Gi1/3, Gi1/4
Gi1/5, Gi1/6, Gi1/7, Gi1/8
Gi1/9, Gi1/10, Gi1/11, Gi1/12
Gi1/13, Gi1/14, Gi1/15, Gi1/16
Gi1/17, Gi1/18, Gi1/19, Gi1/20
Gi1/21, Gi1/22, Gi1/23, Gi1/24
Gi1/25, Gi1/26, Gi1/27, Gi1/28
Gi1/29, Gi1/30, Gi1/31, Gi1/32
Gi1/33, Gi1/34, Gi1/35, Gi1/36
Gi1/37, Gi1/38, Gi1/39, Gi1/40
Gi1/41, Gi1/42, Gi1/43, Gi1/44
Gi1/45, Gi1/46, Gi1/47, Gi1/48
Te3/2, Te3/3, Te3/4, Te3/5
Te3/6, Te3/7, Te3/8
2 VLAN0002 active
3 VLAN0003 active
4 VLAN0004 active
5 VLAN0005 active
6 VLAN0006 active
7 VLAN0007 active
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
8 VLAN0008 active
9 VLAN0009 active
10 VLAN0010 active
11 VLAN0011 active
12 VLAN0012 active
1002 fddi-default act/unsup
1003 trcrf-default act/unsup
1004 fddinet-default act/unsup
1005 trbrf-default act/unsup
Switch-C#
Switch-A#
Switch-A#configure terminal
Switch-A(config)#vtp version 2
Switch-A(config)#vtp mode client
Setting device to VTP Client mode for VLANS.
Switch-A(config)#end
Switch-A#
Switch-A#show vtp status
VTP Version capable : 1 to 3
VTP version running : 2
VTP Domain Name :
VTP Pruning Mode : Disabled
VTP Traps Generation : Disabled
Device ID : 6400.f13e.dc40
Configuration last modified by 10.122.190.226 at 11-25-22 02:34:10
Feature VLAN:
--------------
VTP Operating Mode : Client
Maximum VLANs supported locally : 1005
Number of existing VLANs : 5
Configuration Revision : 1
MD5 digest : 0xD2 0x3F 0x31 0x25 0x6D 0xD1 0x3E 0x27
0x62 0x77 0x7C 0xAF 0x0F 0xF6 0x72 0x02
Switch-A#
-
At this stage, a trunk was manually created between the two switches. Notice how they synchronize and watch the VTP packet exchange:
Switch-A#debug sw-vlan vtp events
vtp events debugging is on
Switch-A#debug sw-vlan vtp packets
vtp packets debugging is on
Switch-A#
Switch-A#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch-A(config)#interface tenGigabitEthernet3/2
Switch-A(config-if)#no shut
Switch-A(config-if)#end
Switch-A#
-
Switch-C sends a summary advertisement to Switch-A. Switch-A then learns the VTP domain name from it, as shown in this sample output:
!--- On Switch-A:
*Nov 25 02:45:46.580: VTP LOG RUNTIME: switchport trunk mode on Te3/2 has changed
*Nov 25 02:45:46.580: VTP LOG RUNTIME: delaying first flood on new trunk
*Nov 25 02:45:51.100: VTP LOG RUNTIME: Summary packet received in NULL domain state
*Nov 25 02:45:51.100: VTP LOG RUNTIME: Summary packet received, domain = test, rev = 4, followers = 0, length 80, trunk Te3/2
!--- This indicates that Switch-A has received its first summary advertisement.
*Nov 25 02:45:51.100: VTP LOG RUNTIME: Validate TLVs : #tlvs 1, max blk size 4
*Nov 25 02:45:51.100: VTP LOG RUNTIME: Validate TLVs : #00, val 6, len 4
*Nov 25 02:45:51.100:
*Nov 25 02:45:51.100: summary: 02 01 00 04 74 65 73 74 00 00 00 00 00 00 00 00 ....test........
*Nov 25 02:45:51.100: summary: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
*Nov 25 02:45:51.100: summary: 00 00 00 00 00 00 00 04 0A 7A BE E3 32 32 31 31 .........z>c2211
*Nov 25 02:45:51.100: summary: 32 34 31 34 30 31 31 35 8D 07 FE 82 E5 FE 49 AD 24140115..~.e~I-
*Nov 25 02:45:51.100: summary: 1A 6E A5 AB D0 35 C2 CA 00 00 00 01 06 01 00 02 .n%+P5BJ........
*Nov 25 02:45:51.100:
*Nov 25 02:45:51.108: VTP LOG RUNTIME: Transitioning from NULL to test domain
!--- This is where Switch-A gets the VTP domain name.
-
With the debug enabled, you can see that Switch-A receives a summary advertisement with no followers. Therefore, Switch-A updates its domain name and sends advertisement requests to obtain the VLAN information, as shown in this sample output:
!--- On Switch-A
*Nov 25 02:45:51.108: VTP LOG RUNTIME: Summary packet rev 4 greater than domain test rev 0
*Nov 25 02:45:51.108: VTP LOG RUNTIME: Domain test currently not in updating state
*Nov 25 02:45:51.108: VTP LOG RUNTIME: Summary packet with followers field zero
*Nov 25 02:45:51.108: VTP LOG RUNTIME: Transmit vtp request, domain test, start value 0
!--- This is where the advertisement request is sent.
-
Switch-C sends another summary advertisement with field followers to VLAN 1. The subset advertisement that contains all VLANs is shown in this output. Then Switch-A configures all the VLANs:
!--- On Switch-A:
*Nov 25 02:45:51.595: VTP LOG RUNTIME: Summary packet received, domain = test, rev = 4, followers = 1, length 80, trunk Te3/2
!--- Switch-A has received its second summary advertisement.
!--- This configuration revision is higher than that on Switch-A.
*Nov 25 02:45:51.595: VTP LOG RUNTIME: Validate TLVs : #tlvs 1, max blk size 4
*Nov 25 02:45:51.595: VTP LOG RUNTIME: Validate TLVs : #00, val 6, len 4
*Nov 25 02:45:51.595:
*Nov 25 02:45:51.596: summary: 02 01 01 04 74 65 73 74 00 00 00 00 00 00 00 00 ....test........
*Nov 25 02:45:51.596: summary: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
*Nov 25 02:45:51.596: summary: 00 00 00 00 00 00 00 04 0A 7A BE E3 32 32 31 31 .........z>c2211
*Nov 25 02:45:51.596: summary: 32 34 31 34 30 31 31 35 8D 07 FE 82 E5 FE 49 AD 24140115..~.e~I-
*Nov 25 02:45:51.596: summary: 1A 6E A5 AB D0 35 C2 CA 00 00 00 01 06 01 00 02 .n%+P5BJ........
*Nov 25 02:45:51.596:
*Nov 25 02:45:51.596: VTP LOG RUNTIME: Summary packet rev 4 greater than domain test rev 0
*Nov 25 02:45:51.596: VTP LOG RUNTIME: Domain test currently not in updating state
*Nov 25 02:45:51.596: VTP LOG RUNTIME: pdu len 80, #tlvs 1
*Nov 25 02:45:51.596: VTP LOG RUNTIME: Subset packet received, domain = test, rev = 4, seq = 1, length = 420
!--- Switch-A has received its subset advertisement.
*Nov 25 02:45:51.596: subset: 02 02 01 04 74 65 73 74 00 00 00 00 00 00 00 00 ....test........
*Nov 25 02:45:51.596: subset: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
*Nov 25 02:45:51.596: subset: 00 00 00 00 00 00 00 04 14 00 01 07 00 01 05 DC ...............\
*Nov 25 02:45:51.596: subset: 00 01 86 A1 64 65 66 61 75 6C 74 00 14 00 01 08 ...!default.....
*Nov 25 02:45:51.596: subset: 00 02 05 DC 00 01 86 A2 56 4C 41 4E 30 30 30 32 ...\..."VLAN0002
*Nov 25 02:45:51.596: subset: 14 00 01 08 00 03 05 DC 00 01 86 A3 56 4C 41 4E .......\...#VLAN
*Nov 25 02:45:51.596: subset: 30 30 30 33 14 00 01 08 00 04 05 DC 00 01 86 A4 0003.......\...$
*Nov 25 02:45:51.596: subset: 56 4C 41 4E 30 30 30 34 14 00 01 08 00 05 05 DC VLAN0004.......\
*Nov 25 02:45:51.596: subset: 00 01 86 A5 56 4C 41 4E 30 30 30 35 14 00 01 08 ...%VLAN0005....
*Nov 25 02:45:51.596: subset: 00 06 05 DC 00 01 86 A6 56 4C 41 4E 30 30 30 36 ...\...&VLAN0006
*Nov 25 02:45:51.596: subset: 14 00 01 08 00 07 05 DC 00 01 86 A7 56 4C 41 4E .......\...'VLAN
*Nov 25 02:45:51.596: subset: 30 30 30 37 14 00 01 08 00 08 05 DC 00 01 86 A8 0007.......\...(
*Nov 25 02:45:51.596: subset: 56 4C 41 4E 30 30 30 38 14 00 01 08 00 09 05 DC VLAN0008.......\
*Nov 25 02:45:51.596: subset: 00 01 86 A9 56 4C 41 4E 30 30 30 39 14 00 01 08 ...)VLAN0009....
*Nov 25 02:45:51.596: subset: 00 0A 05 DC 00 01 86 AA 56 4C 41 4E 30 30 31 30 ...\...*VLAN0010
*Nov 25 02:45:51.596: subset: 14 00 01 08 00 0B 05 DC 00 01 86 AB 56 4C 41 4E .......\...+VLAN
*Nov 25 02:45:51.596: subset: 30 30 31 31 14 00 01 08 00 0C 05 DC 00 01 86 AC 0011.......\...,
*Nov 25 02:45:51.596: subset: 56 4C 41 4E 30 30 31 32 18 00 02 0C 03 EA 05 DC VLAN0012.....j.\
*Nov 25 02:45:51.596: subset: 00 01 8A 8A 66 64 64 69 2D 64 65 66 61 75 6C 74 ....fddi-default
*Nov 25 02:45:51.596: subset: 30 00 03 0D 03 EB 11 78 00 01 8A 8B 74 72 63 72 0....k.x....trcr
*Nov 25 02:45:51.596: subset: 66 2D 64 65 66 61 75 6C 74 00 00 00 01 01 0C CC f-default......L
*Nov 25 02:45:51.596: subset: 04 01 03 ED 07 01 00 02 08 01 00 07 09 01 00 07 ...m............
*Nov 25 02:45:51.596: subset: 20 00 04 0F 03 EC 05 DC 00 01 8A 8C 66 64 64 69 ....l.\....fddi
*Nov 25 02:45:51.596: subset: 6E 65 74 2D 64 65 66 61 75 6C 74 00 03 01 00 01 net-default.....
*Nov 25 02:45:51.596: subset: 24 00 05 0D 03 ED 11 78 00 01 8A 8D 74 72 62 72 $....m.x....trbr
*Nov 25 02:45:51.596: subset: 66 2D 64 65 66 61 75 6C 74 00 00 00 02 01 00 0F f-default.......
*Nov 25 02:45:51.596: subset: 03 01 00 02 ....
*Nov 25 02:45:51.596:
*Nov 25 02:45:51.666: VTP LOG RUNTIME: Transmit vtp summary, domain test, rev 4, followers 1, tlv blk size 8 (inc #tlv field),
MD5 digest calculated = 8D 07 FE 82 E5 FE 49 AD 1A 6E A5 AB D0 35 C2 CA
-
At this point, both switches are synchronized:
Switch-A#show vtp status
VTP Version capable : 1 to 3
VTP version running : 2
VTP Domain Name : test
VTP Pruning Mode : Disabled
VTP Traps Generation : Disabled
Device ID : 6400.f13e.dc40
Configuration last modified by 10.122.190.227 at 11-24-22 14:01:15
Feature VLAN:
--------------
VTP Operating Mode : Client
Maximum VLANs supported locally : 1005
Number of existing VLANs : 16
Configuration Revision : 4
MD5 digest : 0x8D 0x07 0xFE 0x82 0xE5 0xFE 0x49 0xAD
0x1A 0x6E 0xA5 0xAB 0xD0 0x35 0xC2 0xCA
Switch-A#show vlan brief
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Gi1/1, Gi1/2, Gi1/4, Gi1/5
Gi1/6, Gi1/7, Gi1/8, Gi1/9
Gi1/10, Gi1/11, Gi1/12, Gi1/13
Gi1/14, Gi1/15, Gi1/16, Gi1/17
Gi1/18, Gi1/19, Gi1/20, Gi1/21
Gi1/22, Gi1/23, Gi1/24, Gi1/25
Gi1/26, Gi1/27, Gi1/28, Gi1/29
Gi1/30, Gi1/31, Gi1/32, Gi1/33
Gi1/34, Gi1/35, Gi1/36, Gi1/37
Gi1/38, Gi1/39, Gi1/40, Gi1/41
Gi1/42, Gi1/43, Gi1/44, Gi1/45
Gi1/46, Gi1/47, Gi1/48, Te3/3
Te3/4, Te3/5, Te3/6, Te3/7
Te3/8
2 VLAN0002 active
3 VLAN0003 active
4 VLAN0004 active
5 VLAN0005 active
6 VLAN0006 active
7 VLAN0007 active
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
8 VLAN0008 active
9 VLAN0009 active
10 VLAN0010 active
11 VLAN0011 active
12 VLAN0012 active
1002 fddi-default act/unsup
1003 trcrf-default act/unsup
1004 fddinet-default act/unsup
1005 trbrf-default act/unsup
Example 2:
This example shows how to verify the VTP configuration on a Catalyst 6000 that runs Cisco IOS Software:
Switch#show vtp status
VTP Version: 2
Configuration Revision: 247
Maximum VLANs supported locally: 1005
Number of existing VLANs: 33
VTP Operating Mode: Client
VTP Domain Name: Lab_Network
VTP Pruning Mode: Enabled
VTP V2 Mode: Disabled
VTP Traps Generation: Disabled
MD5 digest: 0x45 0x52 0xB6 0xFD 0x63 0xC8 0x49 0x80
Configuration last modified by 0.0.0.0 at 8-12-99 15:04:49
Switch#
Example 3:
This example shows how to display VTP statistics on a Catalyst 6000 that runs Cisco IOS Software:
Switch#show vtp counters
VTP statistics:
Summary advertisements received: 7
Subset advertisements received: 5
Request advertisements received: 0
Summary advertisements transmitted: 997
Subset advertisements transmitted: 13
Request advertisements transmitted: 3
Number of config revision errors: 0
Number of config digest errors: 0
Number of V1 summary errors: 0
VTP pruning statistics:
Trunk Join Transmitted Join Received Summary advts received
from on-pruning-capable device
---------------- ---------------- ---------------- ---------------------------
Fa5/8 43071 42766 5
Troubleshoot VTP
Refer to Configure VLAN Trunk Protocol (VTP) for information to troubleshoot VTP.
Note: Only registered Cisco users can access internal site, tools, and documents.
Related Information