Mailing List Archive

Do you need 'sh vlan' output on your switch?
Terry Kennedy provided a patch for issues from rancid's choice of
'terminal'...

>>I have been running rancid for a little more than a year now and have been
>>enduring the one little nagging problem I have... until today. :)
>>
>>I have a cisco 3750 switch with vlans configured on it that keeps sending
>>me diffs for a non-change event. Here it is:
>
> [snip]
>
>>The information is just a slightly different format of the version from
>>before. Is there an easy way to "fix" this?

In addition to the patch Terry suggested, it'd be interesting to know if
people need the "show vlan" output from their switches anymore?

Do the non-malibu switches (i.e., does the 2950) store its VLAN table in
the main configuration, or only in vlan.dat? If the former, well, we
can tell rancid not to include the "show vlan" output for that model of
switch (however, both modes are available, so a default option means
some people won't get their VLAN table stored).

As you may be aware, "show vlan" parsing to RANCID was added for the
2924/3500 series (malibu) switch because cisco (due to possible
autonymous updates from VTP) put the VLAN config in a seperate mode
("vlan database"). Parsing "show vlan" was a bit of a hack to get
around not seperately backing up the vlan.dat file from the switch.

Newer boxes when running extended VLAN IDs (required for Multi-instance
STP config, for example) force the switch into VTP transparent mode, and
then VLANs are configured inside the main config (phew!). Looking for
the command and then optionally running 'sh vlan' parser requires some
big changes to the code...

-andrew
Do you need 'sh vlan' output on your switch? [ In reply to ]
> In addition to the patch Terry suggested, it'd be interesting to know if
> people need the "show vlan" output from their switches anymore?

Yup 8-)

> As you may be aware, "show vlan" parsing to RANCID was added for the
> 2924/3500 series (malibu) switch because cisco (due to possible
> autonymous updates from VTP) put the VLAN config in a seperate mode
> ("vlan database"). Parsing "show vlan" was a bit of a hack to get
> around not seperately backing up the vlan.dat file from the switch.

I added "show vlan" to RANCID. I'm not sure if the current implementation
is from me, or if it was done by somebody else (I added a lot of stuff in the
1.5/1.6 timeframe).

At the time, I only had C55xx's and C2900XL's to work with. Since then, I
have added 650x's and various C2550 / C3500XL / C3550 boxes. My techs find
the "show vlan" output useful as it is saved by RANCID on all platforms in
a consistent manner. It also means that changes that ripple through the net-
work (for example, a learned VLAN via an update from another switch) show
up. I don't think that happens when parsing "show run", though I could be
mistaken.

Terry Kennedy http://www.tmk.com
terry at tmk.com New York, NY USA
Do you need 'sh vlan' output on your switch? [ In reply to ]
Terry Kennedy wrote:

> At the time, I only had C55xx's and C2900XL's to work with. Since then, I
> have added 650x's and various C2550 / C3500XL / C3550 boxes. My techs find
> the "show vlan" output useful as it is saved by RANCID on all platforms in
> a consistent manner. It also means that changes that ripple through the
> net-
> work (for example, a learned VLAN via an update from another switch) show
> up. I don't think that happens when parsing "show run", though I could be
> mistaken.

Right; this is the 'problem'. VTP managed switches require this
command's output, non-VTP managed switches, well, don't (perhaps). (And
if you want to use VLAN IDs >1005 you'll setting vtp mode transparent).
Commands in write term/show run output are purely static definitions
(since that only happens when vtp is set transparent and 'extended'
(full) VLAN range is confiured) (at least on IOS switches).

Cheers,
Andrew