MRTG and Cisco-problem for unrouted VLAN’s

We had a problem with mrtg (version 2.14.5) and Cisco-routers (Cisco IOS Software, c7600s72033). The problem was that cfgmaker did not find the 64-bit traffic counters for ”unrouted vlan’s”, instead it used the 32-bit counter. When the utilization of such a port reached above 100 Mbit the counter ”rolled over” to zero and the graph looked like it was cut.

If you need to troubleshoot cfgmaker you should use snmpwalk to manually look at the counters from the device that you are monitoring. By doing so you can watch the traffic-numbers from the source. These are some of the ones that cfgmaker uses.

Get basic system information
snmpwalk -c community -v 2c ip-address system

Listing 32-bit traffic counters
snmpwalk -c community -v 2c ip-address ifinOctets

Listing 64-bit traffic counters
snmpwalk -c community -v 2c ip-adress ifHCInOctets

Check the interfaces speed
snmpwalk -c community -v 2c ip-adress ifSpeed
snmpwalk -c community -v 2c ip-adress ifHighSpeed

Check status of the interfaces
snmpwalk -c community -v 2c ip-adress ifOperStatus
snmpwalk -c community -v 2c ip-adress ifAdminStatus

List everything about the interfaces
snmpwalk -c community -v 2c ip-adress if

When I tested my router I could clearly see that it had 64-bit counters. However, cfgmaker couldn’t find them. Why?

IF-MIB::ifHCInOctets.1 = Counter64: 0
IF-MIB::ifHCInOctets.11 = Counter64: 1436496000
IF-MIB::ifHCInOctets.21 = Counter64: 1657770660
IF-MIB::ifHCInOctets.31 = Counter64: 8220
IF-MIB::ifHCInOctets.41 = Counter64: 219538030

There is a bug that is responsible for this behavior. Maybe the bug belongs to Cisco because they mark these interfaces as having zero speed. Very strange!

The workaround is (as stated in the bug report) to modify row 907 in cfgmaker to:
if((!defined $speed) or $counter eq ”” or $counter !~ /\d/ or $SNMP_Session::errmsg or $Net_SNMP_util::ErrorMessage?){

If you want to debug cfgmaker change to the rows below in the beginning of the cfgmaker program-file:

@main::DEBUG=qw(base snpo coca);
#@main::DEBUG=qw();

Kommentera

E-postadressen publiceras inte. Obligatoriska fält är märkta *

Denna webbplats använder Akismet för att minska skräppost. Lär dig hur din kommentardata bearbetas.