Re: vtp question

From: Carlos G Mendioroz <tron_at_huapi.ba.ar>
Date: Fri, 16 Oct 2009 06:57:24 -0300

If what you are trying to do is preprovision/reprovision a known
switch state, then "vlan database" is the way to go AFAIK:

sw#vlan database
% Warning: It is recommended to configure VLAN from config mode,
  as VLAN database mode is being deprecated. Please consult user
  documentation for configuring VTP/VLAN in config mode.

sw(vlan)#show
  VLAN ISL Id: 1
    Name: default
    Media Type: Ethernet
    VLAN 802.10 Id: 100001
    State: Operational
    MTU: 1500
    Backup CRF Mode: Disabled
    Remote SPAN VLAN: No

  VLAN ISL Id: 2
    Name: Lab
...
You'll have to digest this info to reprogram it. I do it using a perl
script and encode it in the same config file as comments like:

! Vlan1: default
! Vlan2: Lab

-Carlos

GAURAV MADAN @ 15/10/2009 14:17 -0300 dixit:
> still trying to get ur question .... u mean via console access only ..
> you somehow wants to read Vlan.dat file ..
>
> If yes ...
> more flash:vlan.dat .... There will be mix o/p but smartly u can make sense ..
>
> Example :
>
> Rack1SW4#sh vlan
>
> VLAN Name Status Ports
> ---- -------------------------------- --------- -------------------------------
> 1 default active Fa1/0/1, Fa1/0/2, Fa1/0/3
> Fa1/0/5, Fa1/0/6, Fa1/0/7
> Fa1/0/8, Fa1/0/9, Fa1/0/10
> Fa1/0/11, Fa1/0/12, Fa1/0/13
> Fa1/0/14, Fa1/0/15, Fa1/0/17
> Fa1/0/18, Fa1/0/20, Fa1/0/21
> Fa1/0/22, Fa1/0/23, Fa1/0/24
> Gi1/0/1, Gi1/0/2
> 3 VLAN0003 active
> 4 VLAN0004 active
> 7 VLAN0007 active
> 13 VLAN0013 active
> 45 VLAN0045 active Fa1/0/4
> 52 VLAN0052 active
> 53 VLAN0053 active
> 67 VLAN0067 active
> 1001 VLAN1001 active
> 1002 fddi-default act/unsup
> 1003 token-ring-default act/unsup
> 1004 fddinet-default act/unsup
>
> Rack1SW4#
> Rack1SW4#
> Rack1SW4#
> Rack1SW4#more flash:vlan.dat
> 00000000: BADB100D 00000002 03074343 49454C41 :[.. .... ..CC IELA
> 00000010: 42000000 00000000 00000000 00000000 B... .... .... ....
> 00000020: 00000000 00000000 00000000 00000000 .... .... .... ....
> 00000030: 00000000 00000001 30303030 30303030 .... .... 0000 0000
> 00000040: 30303030 1A2E56D2 43461AE4 7E9EFC26 0000 ..VR CF.d ~.|&
> 00000050: A65F4A6D 00000000 00000000 00000000 &_Jm .... .... ....
> 00000060: 00000000 00000000 00000000 00000000 .... .... .... ....
> 00000070: 00000000 00000000 00000000 00000000 .... .... .... ....
> 00000080: 00000000 00000000 00000000 00000000 .... .... .... ....
> 00000090: 00000000 0000000E 02020000 043C5B60 .... .... .... .<[`
> 000000A0: 07646566 61756C74 00000000 00000000 .def ault .... ....
> 000000B0: 00000000 00000000 00000000 00000000 .... .... .... ....
> 000000C0: 00000101 05DC0001 000186A1 00000000 .... .\.. ...! ....
> 000000D0: 00000000 00000000 00000000 08564C41 .... .... .... .VLA
> 000000E0: 4E303030 33000000 00000000 00000000 N000 3... .... ....
> 000000F0: 00000000 00000000 00000000 00000101 .... .... .... ....
> 00000100: 05DC0003 000186A3 00000000 00000000 .\.. ...# .... ....
> 00000110: 00000000 00000000 08564C41 4E303030 .... .... .VLA N000
> 00000120: 34000000 00000000 00000000 00000000 4... .... .... ....
> 00000130: 00000000 00000000 00000101 05DC0004 .... .... .... .\..
> 00000140: 000186A4 00000000 00000000 00000000 ...$ .... .... ....
> 00000150: 00000000 08564C41 4E303030 37000000 .... .VLA N000 7...
> 00000160: 00000000 00000000 00000000 00000000 .... .... .... ....
> 00000170: 00000000 00000101 05DC0007 000186A7 .... .... .\.. ...'
> 00000180: 00000000 00000000 00000000 00000000 .... .... .... ....
> 00000190: 08564C41 4E303031 33000000 00000000 .VLA N001 3... ....
> 000001A0: 00000000 00000000 00000000 00000000 .... .... .... ....
> 000001B0: 00000101 05DC000D 000186AD 00000000 .... .\.. ...- ....
> 000001C0: 00000000 00000000 00000000 08564C41 .... .... .... .VLA
> 000001D0: 4E303034 35000000 00000000 00000000 N004 5... .... ....
> 000001E0: 00000000 00000000 00000000 00000101 .... .... .... ....
> 000001F0: 05DC002D 000186CD 00000000 00000000 .\.- ...M .... ....
> 00000200: 00000000 00000000 08564C41 4E303035 .... .... .VLA N005
> 00000210: 32000000 00000000 00000000 00000000 2... .... .... ....
> 00000220: 00000000 00000000 00000101 05DC0034 .... .... .... .\.4
> 00000230: 000186D4 00000000 00000000 00000000 ...T .... .... ....
> 00000240: 00000000 08564C41 4E303035 33000000 .... .VLA N005 3...
> 00000250: 00000000 00000000 00000000 00000000 .... .... .... ....
> 00000260: 00000000 00000101 05DC0035 000186D5 .... .... .\.5 ...U
> 00000270: 00000000 00000000 00000000 00000000 .... .... .... ....
> 00000280: 08564C41 4E303036 37000000 00000000 .VLA N006 7... ....
> 00000290: 00000000 00000000 00000000 00000000 .... .... .... ....
>
>
> HTH
> Gaurav Madan
> CCIE # 23863
>
> On Thu, Oct 15, 2009 at 1:38 AM, scuba diver <scuba1934_at_gmail.com> wrote:
>> i already knew that vlan.dat stored vtp and vlan info but that still doesn't
>> solve my problem. i don't have ethernet access to the switch to download
>> vlan.dat, i only have console. so i still have to reconfigure vtp and vlans
>> from scratch everytime i access the rack after somebody else uses it and
>> does wr erase
>>
>> On Wed, Oct 14, 2009 at 2:21 PM, Marko Milivojevic <markom_at_markom.info>wrote:
>>
>>> ( Which, to illustrate my rant from earlier today is in fact covered
>>> by CCENT curriculum :-) )
>>>
>>> On Wed, Oct 14, 2009 at 18:04, Justin Mitchell <jgmitchell_at_gmail.com>
>>> wrote:
>>>> VLAN info is saved in vlan.dat
>>>>
>>>> Justin G. Mitchell
>>>> http://www.google.com/profiles/jgmitchell
>>>>
>>>>
>>>>
>>>> On Wed, Oct 14, 2009 at 12:59 PM, scuba diver <scuba1934_at_gmail.com>
>>> wrote:
>>>>> actually, what i meant was that if i erase the configuration and reload
>>> ,
>>>>> since it is not saved in sh run, i have to reconfigure vtp from scratch,
>>>>> since i am renting rack time from people, this happens to me very
>>> frequently
>>>>> where i have to reconfigure it every time, hope this clears this up :)
>>>>>
>>>>> On Wed, Oct 14, 2009 at 12:54 PM, scuba diver <scuba1934_at_gmail.com>
>>> wrote:
>>>>>> How can I save the vtp configuration ? When I configure vtp, it does
>>> it
>>>>>> not show up in the sh run. So even if I save the configuration and
>>> reload,
>>>>>> I have to reconfigure vtp all over again from scratch.
>>>>>>
>>>>>> thanks
>>>>>>
>>>>>> scuba
>>>>>
>>>>> Blogs and organic groups at http://www.ccie.net
>>>>>
>>>>> _______________________________________________________________________
>>>>> Subscription information may be found at:
>>>>> http://www.groupstudy.com/list/CCIELab.html
>>>>
>>>> Blogs and organic groups at http://www.ccie.net
>>>>
>>>> _______________________________________________________________________
>>>> Subscription information may be found at:
>>>> http://www.groupstudy.com/list/CCIELab.html
>>
>> Blogs and organic groups at http://www.ccie.net
>>
>> _______________________________________________________________________
>> Subscription information may be found at:
>> http://www.groupstudy.com/list/CCIELab.html
>
>
> Blogs and organic groups at http://www.ccie.net
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html
>
>
>
>
>
>
>

-- 
Carlos G Mendioroz  <tron_at_huapi.ba.ar>  LW7 EQI  Argentina
Blogs and organic groups at http://www.ccie.net
Received on Fri Oct 16 2009 - 06:57:24 ART

This archive was generated by hypermail 2.2.0 : Sun Nov 01 2009 - 07:51:00 ART