вторник, 27 июня 2017 г.

Managing vlan.dat File

During Switch Bootup

During boot up, the switch compares the content in the vlan.dat file and the configuration in startup-config to determine if it should use the configuration in vlan.dat or startup-config. When you save VTP mode, domain name, and VLAN configurations in the switch startup configuration file and reboot the switch, the VTP and VLAN configurations are selected by these conditions:
  • If both the VLAN database and the configuration file show the VTP mode as transparent and the VTP domain names match, the VLAN database is ignored. The VTP and VLAN configurations in the startup configuration file are used. The VLAN database revision number remains unchanged in the VLAN database.
  • If the startup VTP mode is server mode, or the startup VTP mode or domain names do not match the VLAN database, VTP mode and VLAN configuration for the first 1005 VLANs are selected by VLAN database information, such as the vlan.dat file. VLANs greater than 1005 are configured from the switch configuration file.
If there is no vlan.dat file, or if the vlan.dat cannot be read, the switch boots with these characteristics:

AttributeDefault Values
VTP ModeServer
VTP Domain Name(no name / empty)
VLANs1, 1002-1005

Filename and Location

By default, the VLAN database file name is vlan.dat.
You can use the vtp file <filename> command to rename the file. You cannot use the vtp file command to load a new database. You can use it only to rename the file in which the existing database is stored.
This example shows how to specify the IFS file system file where the VTP configuration is stored:
Switch(config)#vtp file vtpconfig

Setting device to store VLAN database at filename vtpconfig.   
Switch(config)#
The vlan.dat stored in NVRAM alone can be accessed by the switch. The vlan.dat file can be copied from its location for backup purposes. The memory location name where the vlan.dat file is stored varies from device to device. Refer to the respective product documentation before you issue the copycommand.
In Cisco Catalyst 6500/6000 series switches, it is const_nvram:. Similarily for Catalyst 4500/4000 switches, it is cat4000_flash:. In Cisco Catalyst 29xx series and Cisco Catalyst 35xx, 3750 series, it is referred to as flash:.
Cat6K-IOS#dir const_nvram: 
Directory of const_nvram:/ 
1 -rwx 856 <no date> vlan.dat 
129004 bytes total (128148 bytes free)

Viewing VLAN Information

In order to display all the VLAN configurations, the VLAN ID, name, and so forth, that are stored in the binary vlan.dat file, you must issue the show vlancommand.
You can display the VTP information, the mode, domain, and so forth, with use of the show vtp status command.
The VLAN information and the VTP information are not displayed in the show running-config command output when the switch is in the VTP server/client mode. This is normal behavior of the switch.
Switch#show run | include vlan
vlan internal allocation policy ascending
Switch#

Switch#show run | include vtp
Switch#
Switches that are in VTP transparent mode display the VLAN and VTP configurations in the show running-config command output because this information is also stored in the configuration text file.

Комментариев нет:

Отправить комментарий