V Commands

vtp password

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

Syntax Description

password-value

ASCII password for the VTP administrative domain. The maximum size is 64 characters.

Command Default

None

Command Modes

Global configuration

Supported User Roles

network-admin

vdc-admin

Command History

Release

Modification

5.1(1)

This command was introduced.

Usage Guidelines

This command does not require a license.

Examples

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)# 

Related Commands

Command

Description

show vtp password

Displays the VTP password value.

vtp primary-server

To specify a VLAN Trunking Protocol (VTP) Version 3 primary server type, use the vtp primary-server command.

vtp primary-server [ vlan | mst ] [force]

Syntax Description

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.

Command Default

The switch will send a takeover message for the VLAN database.

Command Modes

EXEC mode

Command History

Release

Modification

7.1(1)D1(0)

This command was introduced.

Usage Guidelines

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:

  • System reload.
  • Switchover between redundant supervisors.
  • Takeover from another server.
  • Change in the mode configuration.
  • Any domain configuration change (version, domain name, domain password).

The takeover mechanism has two functions:

  1. Changes the operational state of the switch from a secondary server to a primary server.
  2. Advertises the configuration of the switch to the entire domain and and removes any existing partitions.

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.

Examples

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#

Related Commands

Command

Description

show vtp password

Displays the VTP password value.

show vtp status

Displays VTP information.

vtp password

Creates a VTP password,

vtp pruning

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

Syntax Description

This command has no arguments or keywords.

Command Default

Disabled

Command Modes

Global configuration

Supported User Roles

network-admin

vdc-admin

Command History

Release

Modification

5.1 (1)

This command was introduced.

Usage Guidelines

This command does not require a license.

Examples

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)#

Related Commands

Command

Description

show vtp status

Displays VTP information.

vtp version

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

Syntax Description

1

Specifies VTP version 1.

2

Specifies VTP version 2.

Command Default

1

Command Modes

Global configuration

Supported User Roles

network-admin

vdc-admin

Command History

Release

Modification

4.1 (2)

This command was introduced.

Usage Guidelines

This command is not available if VTP is not enabled.

This command does not require a license.

Examples

This example shows how to configure the VTP version:

switch(config)# vtp version 2
switch(config)# 

Related Commands

Command

Description

show vtp status

Displays VTP information.

vlan (global configuration mode)

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 }

Syntax Description

vlan-id

Number of the VLAN; the range of valid values is from 1 to 4094.

Note    You cannot create, delete, or modify VLAN1 or any of the internally allocated VLANs.

vlan-range

Range of configured VLANs; see the “Usage Guidelines” section for a list of valid values.

Command Default

None

Command Modes

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

Command History

Release

Modification

4.0

This command was introduced.

Usage Guidelines

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.

Examples

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)#

Related Commands

Command

Description

show vlan

Displays VLAN information.

vlan configuration

To configure a VLAN prior to or without needing to actually create the VLAN, use the vlan configuration command.

vlan configuration vlan-id

Syntax Description

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.

Command Default

None

Command Modes

Global configuration mode (config)

Command History

Release

Modification

5.2(1)

This command was introduced.

Usage Guidelines

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.

Examples

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)#

Related Commands

Command

Description

show running-config vlan

Displays the running configuration for a specified VLAN.

vtp domain

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

Syntax Description

domain-name

Name of the VTP administrative domain. The domain name can be a maximum of 32 characters.

Command Default

None

Command Modes

Global configuration

Supported User Roles

network-admin

vdc-admin

Command History

Release

Modification

4.1 (2)

This command was introduced.

Usage Guidelines

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.

Examples

This example shows how to configure the VTP domain name:

switch(config)# vtp domain acconting
switch(config)# 

Related Commands

Command

Description

show vtp status

Displays VTP information.

vtp file

To set the name of a Virtual Trunking Protocol (VTP) file, use the vtp file command.

vtp file file-name

Syntax Description

file-name

ASCII name of the IFS file system file where VTP configuration is stored.

Command Default

None

Command Modes

Global configuration

Supported User Roles

network-admin

vdc-admin

Command History

Release

Modification

5.1(1)

This command was introduced.

Usage Guidelines

This command does not require a license.

Examples

This example shows how to set a name of a VTP file:

switch(config)# vtp file eng_vlans.info
switch(config)# 

Related Commands

Command

Description

show vtp status

Displays VTP information.

vtp mode

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

Syntax Description

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.

Command Default

None

Command Modes

Global configuration

Supported User Roles

network-admin

vdc-admin

Command History

Release

Modification

5.1(1)

This command was introduced.

Usage Guidelines

This command does not require a license.

Examples

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)# 

Related Commands

Command

Description

show vtp status

Displays VTP information.

vtp mode transparent

To configure the Virtual Trunking Protocol (VTP) mode, use the vtp mode transparent command.

vtp mode transparent

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes

Global configuration

Supported User Roles

network-admin

vdc-admin

Command History

Release

Modification

4.1 (2)

This command was introduced.

Usage Guidelines

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.

Examples

This example shows how to configure the VTP mode:

switch(config)# vtp mode transparent
switch(config)# 

Related Commands

Command

Description

show vtp status

Displays VTP information.