vtp file

To store the VLAN Trunking Protocol (VTP) configuration information in a file, use the vtp file command. To stop storing the configuration in a file, use the no form of this command.

vtp file bootflash: server [ directory /] filename

no vtp file

Syntax Description

Specifies that the VTP configuration file is to be stored in the bootflash memory of the NVRAM. The colon character (:) is required after the file system name.
Name of the server. Valid values are /// , //module-1/ , //sup-1/ , //sup-active/ , or //sup-local /. The double slash (//) is required.
(Optional) Name of the destination directory. The directory name is case sensitive.
Name of the VTP configuration file.

Note There can be no spaces in the bootflash: // server / directory / filename string. Individual elements of this string are separated by colons (:) and slashes (/).

Command Default

VTP database file, vlan.dat

Command Modes

Global configuration mode

Command History

This command was introduced.

Usage Guidelines

Before you use this command, you must enable VTP on the switch by using the feature vtp command.

The default configuration file is stored in the VTP database, vlan.dat, in NVRAM. VTP configuration information is also stored in the startup configuration file.

Note Do not delete the vlan.dat file.

When a switch in a VTP domain reloads, the switch updates the VTP domain and VLAN configuration information from the information contained in the VTP database file (vlan.dat) or the startup configuration file. Depending on the VTP mode configured for the switch, the information is updated as follows:


This example shows how to store the VTP configuration to a file named myvtp.txt in the local writable storage file system, bootflash:

switch(config)# vtp file bootflash:///myvtp.txt

Related Commands

feature vtp
Enables VTP on the switch.
show running-config vtp
Displays the running VTP configuration.
show vtp status
Displays VTP information.