08-15-2010 10:46 PM - edited 03-06-2019 12:29 PM
Hi,
Is there any specific reason for having all VLAN info only in VLAN.dat file?.Though we are configuring it manually then why can't we see it in Running-config?
Regards,
Hardik
Solved! Go to Solution.
08-15-2010 11:11 PM
Hello Hardik,
The vlan.dat file provides a permanent storage for VLAN configuration independent of running-config and/or startup-config. If your switch participates in a VTP domain, the changes to the VLAN configuration (VLANs, their IDs, names, states and other properties) may change over time as modifications are made. Bear in mind that a switch never saves the running-config to the startup-config on its own. If all VLAN configuration was present only in the running-config, it would be necessary to manually copy the running-config to startup-config on every switch in the VTP domain after each VLAN database modification, otherwise the changes would be lost after reboot.
The vlan.dat solves this problem. The switch is allowed to overwrite the vlan.dat automatically after each VLAN database modification, independently of the runnning-config. This makes it safe to modify the VLAN database without worrying that some changes are being made to the running-config, and without needing to save it to the startup-config over the entire VTP domain.
Note that when you configure the switch to the VTP Transparent mode, all VLAN configuration in fact appears in the running-config as well, although it is still maintained also in the vlan.dat file. It is consistent with the description above - a VTP Transparent switch does not participate in VTP domain and thus no external modifications to its VLAN configuration will take place, so there is no problem in maintaining the VLAN config in the running configuration.
This is how I see it.
Best regards,
Peter
08-15-2010 11:11 PM
Hello Hardik,
The vlan.dat file provides a permanent storage for VLAN configuration independent of running-config and/or startup-config. If your switch participates in a VTP domain, the changes to the VLAN configuration (VLANs, their IDs, names, states and other properties) may change over time as modifications are made. Bear in mind that a switch never saves the running-config to the startup-config on its own. If all VLAN configuration was present only in the running-config, it would be necessary to manually copy the running-config to startup-config on every switch in the VTP domain after each VLAN database modification, otherwise the changes would be lost after reboot.
The vlan.dat solves this problem. The switch is allowed to overwrite the vlan.dat automatically after each VLAN database modification, independently of the runnning-config. This makes it safe to modify the VLAN database without worrying that some changes are being made to the running-config, and without needing to save it to the startup-config over the entire VTP domain.
Note that when you configure the switch to the VTP Transparent mode, all VLAN configuration in fact appears in the running-config as well, although it is still maintained also in the vlan.dat file. It is consistent with the description above - a VTP Transparent switch does not participate in VTP domain and thus no external modifications to its VLAN configuration will take place, so there is no problem in maintaining the VLAN config in the running configuration.
This is how I see it.
Best regards,
Peter
08-15-2010 11:25 PM
Hi Peter,
Thanks for your interest,
But is it just because we modify and do not copy runnig-config to stratup-config we cant see vlan info in Runnig or startup config? If we are doing any config chage and although saving too, than we should get it in our startup config? along with VLAN.dat file?
Regards,
Hardik
08-16-2010 12:26 AM
Hello Hardik,
The Cisco obviously made a design decision years ago when they first implemented the VTP functionality in the CatOS that the VLAN database will be stored independently of the running configuration in a separate non-volatile storage. Despite the configuration now being made in the configuration mode, the changes to the VLAN database are always reflected in the vlan.dat. If you remember the older 2900XL or 2950 series switches and the older IOSes for those switches, there was even a separate mode for configuring only the VLANs - you entered it using the command vlan database in the privileged EXEC mode. The VLANs, at that time, were not even configured in the global configuration mode. This may be the source of your confusion - originally, the VLANs were not configured in the configure terminal mode.
Cisco probably decided that it is more consistent to use a single configuration mode for whatever configuration, and migrated from using the vlan database mode to the configuration mode also for the VLAN modification. Still, the concept of maintaining the vlan.dat file remained, just the means to modify it were slightly changed.
While the switch operates in the VTP Server or Client mode, the entire VLAN configuration is held exclusively in the vlan.dat file. It will not appear in running-config nor in startup-config. If the switch operates in the VTP Transparent mode then the configuration is present both in vlan.dat and in running-config (and if you save it, you will also see it in the startup-config). What is funny, though, is that if you have VLAN database configured both in vlan.dat and the startup-config and these two configurations do not align perfectly, the contents of the vlan.dat take precedence and the VLAN configuration in the startup-config will be ignored.
There is no rock-solid technical reason why the VLAN configuration cannot be present in the running-config at all times. This is an implementor's decision that separating the VLAN database from the running configuration simplifies the management of both. And it really does.
I am not sure if this helped... please ask further.
Best regards,
Peter
08-16-2010 12:48 AM
Hi Peter,
Ya it was very convincing. I was wondering and was bit confuse too with that old vlan database and new configuration technique, but now its clear seems that cisco has retained their old way of storing vlan info with new configuration mode. I hope cisco may come up with new feature that might give us chance to see that info in running-config too.
What the funny part is, every one on their initial stage, when they are not aware about vlan database; always tries to find the vlan info in to running-config. And by not having this in theri lookup they always get confuse and start looking and all the thing to get back their configuration.
I guess it also help on the security perspective, because when you share show running with someone, it dont accidently leak your vlan info since we dont have anything over running config.
Had a good discussion with you, Thansk a lot for all this valuable info.
Regards,
Hardik
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide