[rancid] No "Show VLAN" on Cisco 3750

Hagen, Skye (skyeh@uidaho.edu) skyeh at uidaho.edu
Tue Apr 1 21:02:41 UTC 2014


Check your VTP setting. If it is set to 'client', it will not pick up the VLAN information.

Here is part of the relevant code, assuming version 2.3.6. I have slightly modified this to work with the Cisco ME3600

Skye.

sub ShowVTP {
    print STDERR "    In ShowVTP: $_" if ($debug);

    while (<INPUT>) {
        tr/\015//d;
        last if (/^$prompt/);
        next if (/^(\s*|\s*$cmd\s*)$/);
        return(1) if /^\s*\^\s*$/;
        return(1) if (/Line has invalid autocommand /);
        return(1) if (/(Invalid (input|command) detected|Type help or )/i);
        #return(1) if ($type !~ /^(2900XL|3500XL|6000)$/);
        return(-1) if (/command authorization failed/i);
        next if (/^Configuration last modified by/);
        # the pager can not be disabled per-session on the PIX
        if (/^(<-+ More -+>)/) {
            my($len) = length($1);
            s/^$1\s{$len}//;
        }
        if (/^VTP Operating Mode\s+:\s+(Transparent|Server)/) {    <====== Check and set flag here
            $DO_SHOW_VLAN = 1;
        }
        ProcessHistory("COMMENTS","keysort","I0","!VTP: $_");
    }
    ProcessHistory("COMMENTS","keysort","I0","!\n");
    return(0);
}

# This routine parses "show vlan"
sub ShowVLAN {
    print STDERR "    In ShowVLAN: $_" if ($debug);

    # ($_ = <INPUT>, return(1)) if (!$DO_SHOW_VLAN);     <====== Skip if flag set

    while (<INPUT>) {
        tr/\015//d;
        last if (/^$prompt/);
        next if (/^(\s*|\s*$cmd\s*)$/);
        return(1) if /^\s*\^\s*$/;
        return(1) if (/Line has invalid autocommand /);
        return(1) if (/(Invalid (input|command) detected|Type help or )/i);
        return(1) if (/Ambiguous command/i);
        return(-1) if (/command authorization failed/i);
        # the pager can not be disabled per-session on the PIX
        if (/^(<-+ More -+>)/) {
            my($len) = length($1);
            s/^$1\s{$len}//;
        }

        ProcessHistory("COMMENTS","keysort","IO","!VLAN: $_");
    }
    ProcessHistory("COMMENTS","keysort","IO","!\n");
    return(0);
}


From: Shane Ronan <SRonan at eexchange.com<mailto:SRonan at eexchange.com>>
Date: Tuesday, April 1, 2014 1:46 PM
To: "Rancid-discuss at shrubbery.net<mailto:Rancid-discuss at shrubbery.net>" <Rancid-discuss at shrubbery.net<mailto:Rancid-discuss at shrubbery.net>>
Subject: [rancid] No "Show VLAN" on Cisco 3750


I am trying to determine why Rancid isn't recording the output of "show vlan" on my Cisco 3750G, (WS-C3750G-24TS) running 12.1(14r)EA1a

It collects and records this data for all other Cisco equipment types.

Help is appreciated.
Shane Ronan, Vice President - Technology Architect
State Street Global Exchange | 600 College Road East | Princeton, NJ 08540
P  (212) 259-3023    |  M (347) 413-4503
sronan at eexchange.com<mailto:sronan at eexchange.com>

________________________________

http://www.statestreet.com/emaildisclaimer/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20140401/db54fd28/attachment.html>


More information about the Rancid-discuss mailing list