11 Replies Latest reply: Sep 8, 2013 11:26 PM by Oxymoron RSS

    VTP confusion - Where is VLAN configuration stored

    sdelen

      Everyone,

       

      A lot has been written about where VTP client, server and trasparent modes store the VLAN configuration

      I am also sure that for a lot of people this is still unclear because of the huge amount of resources that contradict each other

       

      Via this posting I hope someone with recent gear and recent IOS can do some testing (for the sake of simplicity let's not talk about CattOS)

      I like to believe that Cisco Exames are based on recent IOS version (at least for CCNA)

      I'm also under the impression that this behaviour differs between older and newer IOS versions

       

      Setup should be two switches in an isolated environment, trunked together

      Please let us know which switch models you used and which IOS version

       

      I think the following steps should clarify a lot.  Of course this is a discussion group so we are all open for discussion and improvements in the setup.

       

       

      Step 1

      ----------

      Create one VTP domain for Switch A and Switch B

      Configure Switch A as VTP server.  Configure Switch B as VTP client

      Add VLAN TEST on Switch A

       

      Is there a vlan.dat file on Switch A and Switch B ?

      Where is the vlan.dat file located ?  Is it visible using the show flash command ?

      Is the VLAN TEST visible on both switches ?

       

      This might point out that vlan.dat is stored on flash (where ios is stored) and not on nvram (where startup config is stored)

       

      Step 2

      ----------

      Disconnect Switch B from Switch A and issue a reload on Switch B (which is the VTP client switch)(without a copy run start)

      Is the vlan.dat file still present on Switch B ?

      Is the VLAN TEST still visible when using a show vlan brief command ?

       

      This might point out that VTP client mode does not get the complete vlan informatoin database from the VTP server each time it reloads.  Instead it would only get updated vlan information from other VTP client or servers (if their revision number is higher)

       

      Step 3

      ----------

      On Switch B issue the write erase command and also the delete vlan.dat command

      Issue a reload command on switch B

      After reload change the VTP mode on switch B to transparent (because of the delete and erase it should have defaulted to server mode)

      Create VLAN TRANSPARENT on Switch B

      Issue the copy run start command on Switch B

      Reattach Switch B to Switch A

       

      Is there a vlan.dat file on Switch B and if so,  where is it located ?

      According to the Wendell Odom books for CCNA, transparent switches store vlan configuration both in Flash and in running-config

      Can you see vlan configuration when you issue show running config ?

       

      Step 4

      ---------

      Create VLAN TRANSPARENT_TWO  on Switch B

      Issue a reload command on Switch B (without copying the running config the )

       

      Is there a VLAN TRANSPARENT on Switch B ?

      Is there a VLAN TRNASPARENT_TWO on Switch B ?

       

      If only VLAN_TRANSPARENT is present this would mean that the vlans are not automically saved to vlan.dat on VTP transparent mode switches and that copy run start is needed

       

       

      Thanks in advance for cooperation

      Stijn Delen

        • 1. Re: VTP confusion - Where is VLAN configuration stored
          Michael Law

          Stijen,

           

          Hi, this was a large question. I have answers for you for step one but cannot continue to answer question for steps 2 and 3 and 4 because it will erase what happens in step one.

           

          Here's how you set up VTP:

          • Switch 1 - "vtp mode server"
          • Switch 1 - "vtp domain cisco"
          • Switch 1 - "vtp password cisco"

           

          • Switch 2 - "vtp mode client"
          • Switch 2 - "vtp domain cisco"
          • Switch 2 - "vtp password cisco"

           

          Now, when you create a VLAN on Switch 1, if you issue the "show vtp status" command you will see that the configuration revision number has been incremented by 1. Every time, you make a VLAN-based command, this configuration revision number is going to increment by one. If you wish to clear the configuration revision number, issue the "vtp mode transparent" command it will clear the number.

           

          VTP only runs over trunks. Your switches must have some sort of trunk enabled for VTP traffic to flow. If you issue a "show vtp counters" command and notice that no VTP updates are being issued or received, this is because communication isn't functioning. Catalyst switches default to "switchport mode dynamic auto" when they are booted. This will allow for trunking to be set up if the far end switch is set to "switchport mode dynamic desirable". This is the method used for establishing trunks via DTP. If you wish to set up a permanent trunk, you will need to issue the command "switchport mode trunk" on both sides.

           

          The VLAN.DAT file is located on the flash:. You can view this by issuing the "show flash:" command.

           

          A note about VTP configuration revision. Both clients and servers have the capability of overriding switches if they have a higher revision. The initial idea is that only a server can override a client. This is a misconception. Clients can override clients if they have a higher revision. The only thing that a server can do over a client is edit its VLAN.DAT file.

           

          Therefore, when step 2 says "reload the switch", if you haven't saved any of the configurations, you will lose them (especially the switchport configurations described above). Now, you won't lose the VLAN.DAT file which means that it will still be present in the "show vlan" command. That will remain forever until you issue the "delete vlan.dat" command. A server/client will only allow its vlan database to be altered by another switch if it means 3 conditions: domain and password are the same and the configuration revision number is higher on the other switch.

           

          So to recap, here are your big concerns. For establishing communication, a trunk needs to be present. To allow VTP communication to be exchanged, you must have the same domain and password established.

           

          I hope that clears things up. I'm sorry for not answering all your questions. You may be able to resolve your issue with these facts.

           

          Good Luck

           

          Mike

          • 2. Re: VTP confusion - Where is VLAN configuration stored
            sdelen

            Hi Michael,

             

            Thanks for the nice summary on VTP (greatly appreciated)


            But a summary was not really what is was hoping to receive as feedback


            I created this long question because I think there is a lot of confusion on this subject, because VTP operation depends on ios verion, and because different sources tell different things.  I was hoping someone could do some tests on a new IOS version


            Some articles to backup the confusion:

            https://learningnetwork.cisco.com/message/17797#17797
            https://learningnetwork.cisco.com/message/7724#7724
            https://learningnetwork.cisco.com/message/23199#23199


            And what about the following article ?
            http://www.cisco.com/en/US/docs/switches/lan/catalyst2960/software/release/12.2_25_fx/configuration/guide/swvtp.html

             

            It states:

            In VTP client mode, VLAN configurations are not saved in NVRAM.
            In VTP server mode, VLAN configurations are saved in NVRAM. VTP server is the default mode.

             

            And then we are not even talking about transparent mode

            If the VTP mode is transparent in the startup configuration and the VLAN database and the VTP domain name from the VLAN database matches that in the startup configuration file, the VLAN database is ignored (cleared), and the VTP and VLAN configurations in the startup configuration file are used. The VLAN database revision number remains unchanged in the VLAN database

            • 3. Re: VTP confusion - Where is VLAN configuration stored
              Michael Law

              Are you just stating that there is confusion or are you wanting some answers?

               

              The VLAN.DAT file is not cleared or deleted when you change VTP modes. I don't know what they were writing in the other articles but I just did a test on the question and it does not clear the contents. If the VLAN.DAT files hasn't been altered, then the VLANs are still present in the "show vlan" command.

               

              The VLAN.DAT file is not ignored in any VTP mode. Unless you delete the VLAN.DAT file, it doesn't go away.

               

              VTP transparent mode will not accept but continue to pass VTP information out its trunks. This mode allows the administrator to bypass the VTP domain and edit the local VLAN.DAT file without the fear of VTP propagations destroying the current VLAN setup. Setting a switch to VTP transparent mode clears the configuration revision counters. If you wish to change the VTP mode from transparent to client/server, the VTP information will update the configuration revision number along with the VLAN database to the current revision number of the network.

               

              Mike

              • 4. Re: VTP confusion - Where is VLAN configuration stored
                whwolfeii

                1st.  It is important to understand that in Cisco Catalyst Switches running IOS the VLAN.DAT file is stored in flash: and not nvram:  There is a VLAN.DAT file regardless of the mode server, client, or transparent.  Only Server and Client VLAN databases (VLAN.DAT) are synchronized.

                 

                2nd. VTP Advertisements only propogate over Trunks Links between switches.

                 

                3rd.  Realize that given switches belonging to the same VTP DOMAIN the highest CONFIGURATION REVISION NUMBER takes precedence when it comes from either a Server or Client as a VTP SUMMARY Advertisement before the VTP REQUEST which synchronizes all switches in the domain (The issue with placing an old client switch, same domain, higher revision number into a production environment and wiping out the vlan database for that domain!)

                 

                4th.  Only in transparent mode is the VLAN.DAT file modified in such a manner as to remain locally significant.  This VLAN.DAT file on the transparent mode switch is never synchronized with the rest of the domain.

                • 5. Re: VTP confusion - Where is VLAN configuration stored
                  Michael Law

                  whwolfeii,

                   

                  You are exactly correct. Thank you for confirming.

                   

                  Mike

                  • 6. Re: VTP confusion - Where is VLAN configuration stored
                    sdelen

                    Thank you all for the feedback

                    Did some testing myself in the meawhile and the above comments are indeed correct

                     

                    Kind Regards

                    • 7. Re: VTP confusion - Where is VLAN configuration stored
                      Capn Phil

                      It has always been my understanding that a VTP server switch will have a file or settings saved in a flash file. So whatever VTP client switches are connected to the server switch via trunking will inherit the VLAN settings. VTP transperant does not care about VLAN. however, you can make a tranperant switch a VLAN x switch by configuring the VLAN setting of the port leading from a VTP client or server switch to VLAN x. All machines connected to the transperant switch will then be automatically VLAN x.

                      • 8. Re: VTP confusion - Where is VLAN configuration stored
                        Mark Heick

                        Just one more thing to add, and maybe a source for some of the confusion. What is stored in the NVRAM is the VTP revision number which of course is not altered by a power cycle. Cisco has two recommendations when it comes to adding a server to an existing network:

                        1. To change the switch'es VTP mode to transparent and then back to server.
                        2. Change the switch's VTP domain to a bogus name and then change the VTP domain back to the original name.

                        This will force the VTP revision number back to zero. This is a good practice because it is typical for organizations to reuse switches from one part of the network where they had an entirely different vlan.dat configuration, and subsequently have a different configuration number, that in fact may be higher. So it isn't necessarily the saving of the vlan.dat that is the threat, it is the saving of the revision number.

                        • 9. Re: VTP confusion - Where is VLAN configuration stored
                          Dhayanithi

                          Hi all,

                           

                          I’ am still confused over this…

                           

                          In CISCO CCNP Switch 642 – 813 Official certification guide by David Hucaby, Chapter 5: Page92

                           

                          It says...

                           

                          Catalyst switches in server mode store VTP information separately from the switch configuration in NVRAM. VLAN and VTP data are saved in the vlan.dat file on the switch’s flash memory file system. All VTP information, including the VTP configuration revision number, is retained even when the switch power is off. In this manner, a switch can recover the last known VLAN configuration from its VTP database after it reboots.

                           

                          now... my confusio is..

                           

                          1. Do VTP in server mode store in NVRAM & what about client & transport mode?

                           

                          2. What will be there in VTP Info(in server mode as above statement)

                           

                          3. What will be there in vlan.dat(which hold VLAN & VTP data)

                           

                          4. What the difference between VTP information & VTP data, & y they used words "Information" & "data"?

                           

                          Pls reply me,

                          Thanxs

                          Dhaya

                          • 10. Re: VTP confusion - Where is VLAN configuration stored
                            Chris

                            I've gotta say that this has side swiped me too. I have just been watching Chris Bryants video (Switching 2) from Transignal CCNA materials and he sates that:

                             

                            "In client mode, the switch cannot modify,

                            create, or delete VLANs. VTP clients cannot

                            retain VLAN configuration information upon

                            reboot. VTP clients keep this information in

                            their running configuration, but not in

                            NVRAM. If a VTP client is reloaded, it

                            must obtain this information from a VTP

                            server when it comes back up. VTP clients

                            can accept and process summary

                            advertisements."

                             

                            This is repeated on many websites. Is this simply old infoamtion (I have found something dating back to at least 2006)? Am I right in thinking that modern switches do not behaive in this manor and that VLAN info is retained on reboot/reload no mater what mode the switch is in (assuming you don 't actually delete the VLAN.dat file?

                            • 11. Re: VTP confusion - Where is VLAN configuration stored
                              Oxymoron

                              When I get more time I'm going to put this in the "iron" to test.

                              from

                              http://www.cisco.com/en/US/products/hw/switches/ps607/products_tech_note09186a00800c4546.shtml

                               

                              On the Catalyst modular or fixed configuration switches running Cisco      IOS Software, a separate file stores the VLAN information. The file is called      vlan.dat file and is stored in NVRAM for modular switches or in Flash for fixed      configuration switches.

                              and from

                              http://www.cisco.com/en/US/products/hw/switches/ps5213/products_tech_note09186a0080a49dbf.shtml

                               

                              VTP client and server systems require VTP updates from other VTP      servers to be immediately saved in NVRAM without user intervention. The VTP      update requirements are met by the default CatOS operation, but the Cisco IOS      software update model requires an alternative update operation. For this, a      VLAN database was introduced to Cisco IOS software for Catalyst switches as a      method to immediately save VTP updates for VTP clients and servers. This VLAN      database is in the form of a separate file in NVRAM called the      vlan.dat file.

                               

                              I believe that clients have a vlan.dat and store the config with the right rev.  If your VTP server went down, you could make a client the server and where did he get his database?!?