[c-nsp] VTP domain.

Chris Adams cmadams at hiwaay.net
Tue Feb 10 22:55:55 EST 2009


Once upon a time, Dale Shaw <dale.shaw+cisco-nsp at gmail.com> said:
> The VTP domain name string can be up to 32 characters. It starts at
> position 0xA (10) and goes through to 0x29 (41). I suppose there's a
> strong possibility other parts of the file (other than the domain name
> string) are changed with a domain name change.

The byte before that is the length of the domain name, so you'd have to
change that too.

I don't know if this is documented anywhere, but I figured out most of
the interesting (for me anyway) contents of vlan.dat:

off len description
  8   1 VTP Version
  9   1 VTP Domain Name length
 10   - VTP Domain Name (length from offset 9)
 44   4 Configuration Revision
 48   4 Last modified from this IP
 56   2 Last modified time - 2 digit year (not Y2K!)
 58   2 Last modified time - month
 60   2 Last modified time - day
 62   2 Last modified time - hour
 64   2 Last modified time - minute
 66   2 Last modified time - second
148   4 Number of existing VLANs

Starting at offset 160, there is an array of 60 byte entries for each
defined VLAN (number of entries from offset 148):

off len description
  0   1 VLAN name length
  1   - VLAN name (length from offset 0)
 34   1 VLAN type
 36   2 VLAN MTU
 38   2 VLAN ID
 40   2 VLAN SAID

I'm sure there's more in there that is useful, but that was enough for
my home-grown config saver to store a text config in CVS instead of a
binary vlan.dat.
-- 
Chris Adams <cmadams at hiwaay.net>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.


More information about the cisco-nsp mailing list