[mrtg] Re: 3com Switches and VLAN

Strutt, Simon simon.strutt at thomson.com
Wed May 5 12:42:51 MEST 2004


Problem with switches is they tend to set the port as down, with a speed of
0, when not in use so theres no way to get the CFGmaker to not comment out
the ports with the standard options.  As you've not that many ports to worry
about you can run the CFGmaker and then uncomment the ports and set the
speeds to be sensible (a bit tedious but does the job).  
Or you can hack the CFGmaker to always assume the port speed to be a set
value (100 meg is usually what you want).  Comment out the following bit of
the CFGmaker like so (this stops the interface being commented out)...

		# Do some futher investigation if the interface makes, sense
to collect on
		# 
		# if ($$i{ifSpeed} == 0 && $$router_dev{Vendor} eq 'foundry'
&& $$i{ifType} == 194) {
            #       # foundry ATM subinterfaces always report 0 speed, make
it 155Mbps instead.
            #       $$i{ifSpeed} = 155000000;
            #    }
            #    elsif ($$i{ifSpeed} == 0) {
		#    push @prob, "has a speed of $$i{ifSpeed} which makes no
sense";
		#    $if_ok = 0;
		#}

Then alter this bit so that it forces the intreface speeds to 100 Meg

    # interface speed var depends on snmp version

    my $snmp_version = ($router =~ /:/)? (split(':', $router, 6))[5] : 1;

    if ( $snmp_version eq '2' ) {
        debug('base',"Walking ifSpeed");
        my @ifSpeed = snmpwalk($router, 'ifSpeed');
        debug('base',"Walking ifHighSpeed");
        my @ifHighSpeed = snmpwalk($router, 'ifHighSpeed');
        for ( my $i=0; $i<=$#ifHighSpeed; $i++ ) {
                my ($if,$value) = split /:/, $ifHighSpeed[$i], 2;
                $value = $value * 1000000;  # highSpeed = contador * 10^6
                if ( !$value ) {
                        ($if, $value) = split /:/, $ifSpeed[$i], 2;
                        #debug('base',"Speed: $if - $value");
                }
                $routers->{$router}{$if}{'ifSpeed'} = 100000000;
        }
    } else {
        debug('base',"Walking ifSpeed");
        foreach my $tuple (snmpwalk($router, 'ifSpeed')){
        my($if,$value) = split /:/, $tuple, 2;
        $routers->{$router}{$if}{'ifSpeed'} = 100000000;
        }
    }

Obviously make a copy of the CFGmaker 1st before you start abusing it.

Enjoy
Simon

-----Original Message-----
From: asa at manino.com [mailto:asa at manino.com]
Sent: 05 May 2004 11:09
To: mrtg at list.ee.ethz.ch
Subject: [mrtg] 3com Switches and VLAN


Hi everyone,
I have 3 superstack II switches all of them in the same VLAN and I would
like to monitor all the ports of all of them. One of the switches controls
the VLAN and the other two switches are just like hubs. How can I monitor
all the ports of all of them?

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi


"This communication is intended solely for the addressee and is confidential and not for third party unauthorised distribution."



--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list