The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
To create a Virtual Trunking Protocol (VTP) password, use the vtp password command. To delete the password, use the no form of this command.
vtp password password-value
no vtp password
password-value |
ASCII password for the VTP administrative domain. The maximum size is 64 characters. |
None
Global configuration
Supported User Roles
network-admin
vdc-admin
Release |
Modification |
---|---|
5.1(1) |
This command was introduced. |
This command does not require a license.
This example shows how to create a VTP password:
switch(config)# vtp password squ1rrel switch(config)#This example shows how to delete a VTP password:
switch(config)# no vtp password squ1rrel switch(config)#
Command |
Description |
---|---|
show vtp password |
Displays the VTP password value. |
To specify a VLAN Trunking Protocol (VTP) Version 3 primary server type, use the vtp primary-server command.
vtp primary-server [ vlan | mst ] [force]
vlan |
(Optional) Specifies that this device is the primary server for the VTP VLAN feature. |
mst |
(Optional) Specifies that this device is the primary server for the VTP Multiple Spanning Tree (MST) feature. |
force |
(Optional) Forces the device to become the primary server. |
The switch will send a takeover message for the VLAN database.
EXEC mode
Release |
Modification |
---|---|
7.1(1)D1(0) |
This command was introduced. |
The vtp primary-server command does not have a no form. To return to the secondary server status, one of the following conditions must be met:
The takeover mechanism has two functions:
Note | If a password is configured with the vtp password password-value hidden or vtp password password-value secret command, you will be prompted to re-enter it. |
If the force keyword is not specified, the switch first tries to discover the conflicting servers in the domain. Conflicting servers are servers that are following a primary server other than the one in which the takeover was issued. The switch will prompt for confirmation before proceeding to do the takeover. Taking over the domain implies overwriting the configuration of the conflicting servers.
If the vlan or mst keywords are not specified, the switch will send a takeover message for the VLAN database. If a vlan or mst keyword is specified, the switch will start a takeover for the specified feature.
This command does not require a license.
This example shows how to configure this device as the primary server for the VTP VLAN feature when the domain VTP password is set with the hidden or secret keyword:
switch# vtp primary-server vlan Enter VTP password: cisco This switch is becoming Primary server for vlan feature in the VTP domain VTP Database Conf Switch ID Primary Server Revision System Name ------------ ---- -------------- -------------- -------- -------------------- VLANDB Yes 00d0.00b8.1400=00d0.00b8.1400 1 stp7 Do you want to continue (y/n) [n]? y switch#
Command |
Description |
---|---|
show vtp password |
Displays the VTP password value. |
show vtp status |
Displays VTP information. |
vtp password |
Creates a VTP password, |
To set the Virtual Trunking Protocol (VTP) administrative domain to permit pruning, use the vtp pruning command. To remove the VTP domain permit pruning, use the no form of this command.
vtp pruning
no vtp pruning
This command has no arguments or keywords.
Disabled
Global configuration
Supported User Roles
network-admin
vdc-admin
Release |
Modification |
---|---|
5.1 (1) |
This command was introduced. |
This command does not require a license.
This example shows how to set the VTP administrative domain to permit pruning:
switch(config)# vtp pruning Pruning switched on. switch(config)#
This example shows how to remove the VTP administrative domain to permit pruning:
switch(config)# no vtp pruning Pruning switched off. switch(config)#
Command |
Description |
---|---|
show vtp status |
Displays VTP information. |
To configure the Virtual Trunking Protocol (VTP) version you want to use, use the vtp version command. To return to default values, use the no vtp version command.
vtp version { 1 | 2 }
no vtp version
1 |
Specifies VTP version 1. |
2 |
Specifies VTP version 2. |
1
Global configuration
Supported User Roles
network-admin
vdc-admin
Release |
Modification |
---|---|
4.1 (2) |
This command was introduced. |
This command is not available if VTP is not enabled.
This command does not require a license.
This example shows how to configure the VTP version:
switch(config)# vtp version 2 switch(config)#
Command |
Description |
---|---|
show vtp status |
Displays VTP information. |
To add a VLAN or to enter the VLAN configuration mode, use the vlan command. To delete the VLAN and exit the VLAN configuration mode, use the no form of this command.
vlan { vlan-id | vlan-range }
no vlan { vlan-id | vlan-range }
vlan-id |
Number of the VLAN; the range of valid values is from 1 to 4094.
|
||
vlan-range |
Range of configured VLANs; see the “Usage Guidelines” section for a list of valid values. |
None
Global configuration
Note | You can also create and delete VLANs in the VLAN configuration submode using these same commands. |
Supported User Roles
network-admin
vdc-admin
Release |
Modification |
---|---|
4.0 |
This command was introduced. |
When you enter the vlan vlan-id command, a new VLAN is created with all default parameters and causes the CLI to enter VLAN configuration submode. If the vlan-id argument that you entered matches an existing VLAN, nothing happens except that you enter VLAN configuration submode.
You can enter the vlan-range using a comma (,), a dash (-), and the number.
VLAN 1 parameters are factory configured and cannot be changed; you cannot create or delete this VLAN. Additionally, you cannot create or delete VLAN 4095 or any of the internally allocated VLANs.
When you delete a VLAN, all the access ports in that VLAN are shut down and no traffic flows. On trunk ports, the traffic continues to flow for the other VLANs allowed on that port, but the packets for the deleted VLAN are dropped. However, the system retains all the VLAN-to-port mapping for that VLAN, and when you reenable, or recreate, that specified VLAN, the device automatically reinstates all the original ports to that VLAN.
This command does not require a license.
This example shows how to add a new VLAN and enter VLAN configuration submode:
switch(config)# vlan 2 switch(config-vlan)#
This example shows how to add a range of new VLANs and enter VLAN configuration submode:
switch(config)# vlan 2,5,10-12,20,25,4000 switch(config-vlan)#
This example shows how to delete a VLAN:
switch(config)# no vlan 2 switch(config)#
Command |
Description |
---|---|
show vlan |
Displays VLAN information. |
To configure a VLAN prior to or without needing to actually create the VLAN, use the vlan configuration command.
vlan configuration vlan-id
vlan-id |
VLAN ID. The range is from 1 to 2499 and from 2628 to 4093. The VLAN range can be specified in the format shown in this example: 1-5, 10 or 2-5,7-19. |
None
Global configuration mode (config)
Release |
Modification |
---|---|
5.2(1) |
This command was introduced. |
If you use the vlan configuration command to configure a VLAN that you have not yet created and you later want to create that VLAN, use the vlan command to create the configured VLAN.
The show vlan command does not display any VLAN until and unless you actually create the VLAN.
This command does not require a license.
This example shows how to configure a VLAN and enter the VLAN configuration mode:
switch# configure terminal switch(config)# vlan configuration 2-5,7-19 switch(config-vlan-config)#
Command |
Description |
---|---|
show running-config vlan |
Displays the running configuration for a specified VLAN. |
To set the name of the Virtual Trunking Protocol (VTP) administrative domain, use the vtp domain command. To remove the VTP domain name, use the no form of this command.
vtp domain domain-name
no vtp domain domain-name
domain-name |
Name of the VTP administrative domain. The domain name can be a maximum of 32 characters. |
None
Global configuration
Supported User Roles
network-admin
vdc-admin
Release |
Modification |
---|---|
4.1 (2) |
This command was introduced. |
This command is not available if VTP is not enabled.
A network device can be in only one VTP domain. A VTP domain is made up of one or more network devices that share the same VTP domain name and that are inconnected with trunk interfaces.
This command does not require a license.
This example shows how to configure the VTP domain name:
switch(config)# vtp domain acconting switch(config)#
Command |
Description |
---|---|
show vtp status |
Displays VTP information. |
To set the name of a Virtual Trunking Protocol (VTP) file, use the vtp file command.
vtp file file-name
file-name |
ASCII name of the IFS file system file where VTP configuration is stored. |
None
Global configuration
Supported User Roles
network-admin
vdc-admin
Release |
Modification |
---|---|
5.1(1) |
This command was introduced. |
This command does not require a license.
This example shows how to set a name of a VTP file:
switch(config)# vtp file eng_vlans.info switch(config)#
Command |
Description |
---|---|
show vtp status |
Displays VTP information. |
To configure the Virtual Trunking Protocol (VTP) device mode, use the vtp mode command. To return to default values, use the no form of this command.
vtp mode { client | off | server | transparent }
no vtp mode
client |
Sets the device to client mode. |
off |
Sets the device to off mode. |
server |
Sets the device to server mode. |
transparent |
Sets the device to transparent mode. |
None
Global configuration
Supported User Roles
network-admin
vdc-admin
Release |
Modification |
---|---|
5.1(1) |
This command was introduced. |
This command does not require a license.
This example shows how to set the device to client mode:
switch(config)# vtp mode client switch(config)#
This example shows how to set the device to off mode:
switch(config)# vtp mode off switch(config)#
This example shows how to set the device to server mode:
switch(config)# vtp mode server switch(config)#
Command |
Description |
---|---|
show vtp status |
Displays VTP information. |
To configure the Virtual Trunking Protocol (VTP) mode, use the vtp mode transparent command.
vtp mode transparent
This command has no arguments or keywords.
None
Global configuration
Supported User Roles
network-admin
vdc-admin
Release |
Modification |
---|---|
4.1 (2) |
This command was introduced. |
This command is not available if VTP is not enabled. This command is optional because VTP runs only in transparent mode.
This command does not require a license.
This example shows how to configure the VTP mode:
switch(config)# vtp mode transparent switch(config)#
Command |
Description |
---|---|
show vtp status |
Displays VTP information. |