5

I'm developing a SNMP Monitor for my company. I've done it before, and that is why I'm not sure why I have the behavior, and because I'm not a network engineer, I'm not a 100% sure where to go and trouble shoot the problem.

I'm requesting OID 1.3.6.1.2.1.2.2.1.10 (In Octets for an interface) and I receive a value. However, If I request it again 5 seconds later, I get exactly the same value, but 5 seconds later there is movement. If I request it every 10 seconds, there is movement all the time. (I do request the Out Octets as well, and experience the same behavior)

If I log on to the router and I run sh int fastEthernet 0/0/0 the input bytes changes the whole time like I expect.

At my previous company I did a similar monitor, and I requested the value every 2 seconds, and it worked fine. Unfortunately I cannot remember the series of the Cisco routers there.

Running Wireshark I see the requests and responses, and the response from the router definitely returns the same value.

I have 3 questions regarding this.

  • Is there a setting or configuration that I can set?
  • Will it be better to use traps instead of query?
  • Is this native to the 1900 series to only update the SNMP agent (forgive me if this is the wrong terminology) like it is doing at the moment.

Any help in any direction will be appreciated. If there is any information that you need that I might have left out, please ask. Like I said, I'm not a network engineer.

Thanks in advance

6
  • Is this native to the 1900 series to only update the SNMP agent (forgive me if this is the wrong terminology) like it is doing at the moment.

What you're seeing is expected behavior. IOS has cached IF-MIB statistics for on 10-second intervals (by default) for a while, for instance see this entry in the SNMP FAQ.

That said, I have a few switches which seem to defy this "typical" 10-second SNMP stats export interval.

  • Is there a setting or configuration that I can set?

Use service counters max age [age-in-seconds]; this command will show up in the running configuration; however, it's not available in older versions of IOS.

You can also change the IF-MIB 64-bit counters to update interval with this hidden command: snmp-server hc poll [interval], where the interval is measured in hundredths of seconds; however, this command will not show up in the running configuration.

  • Will it be better to use traps instead of query?

It won't matter whether you push or pull, unless your platform exports the stats quickly enough.

  • Thanks Mike, just a something. I type configure terminal to go into config mode, then the command you shown above. Is there something specific I need to do to "activate" the setting? – Jaques Dec 15 '14 at 10:06
  • Which command, service counters max age? The command should take effect immediately. – Mike Pennington Dec 15 '14 at 10:08
  • The service counters max age didn't seem to had an effect, I used the second command and that worked. Thanks again – Jaques Dec 15 '14 at 10:14
  • 1
    Certainly... FYI, I think snmp-server hc poll only changes export of the IF-MIB "HC" counters. It seems that's all you need, so perhaps you'll be ok. Leaving this comment for future readers though. – Mike Pennington Dec 15 '14 at 10:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.