Why SNMP output different from CLI output? SNMP incorrect?

Unanswered Question
Dec 8th, 2009
User Badges:


I'm using various Cisco routers and switches. Cisco 2811, 1841 routers. Cisco 3560 switches.

I'm using net-snmp tools in UNIX.



The output below is snipped to show what's important. When I use snmpwalk I see interfaces with errors. When I use the Cisco CLI to show interfaces no interfaces have errors.


Am I doing something wrong or is the SNMP information wrong?


My only goal is to get accurate interface errors on multiple cisco devices on all interfaces as quickly as possible. I wanted to use SNMP because it snmpwalk seems faster than an expect script or any script which logs into each device over telnet and runs show interface commands.


If I could filter it to show only the interfaces with errors that would be even better but I haven't been able to find or create a script which will do that yet.


Thanks in advance.



snmpwalk -v 2c -c public -OQsT 192.168.0.1 ifInErrors


ifInErrors.1 = 0

ifInErrors.100 = 0

ifInErrors.10101 = 0

ifInErrors.10102 = 0

ifInErrors.10103 = 0

ifInErrors.10104 = 0

ifInErrors.10105 = 54


#show int | incl error

     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored

     0 output errors, 0 interface resets

     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored

     0 output errors, 0 interface resets

     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored

     0 output errors, 0 collisions, 0 interface resets

     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored

     0 output errors, 0 collisions, 0 interface resets

     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored

     0 output errors, 0 collisions, 0 interface resets

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Joe Clarke Wed, 12/09/2009 - 06:20
User Badges:
  • Cisco Employee,
  • Hall of Fame,

    Founding Member

CLI counters are designed for human consumption where as SNMP counters are designed more for programmatic consumption.  As such, CLI counters can be cleared (i.e. reset to 0).  SNMP counters cannot be cleared.  They will continue to increase until the device is reloaded.  So, if the show interface counters have been cleared, then they can certainly be out of sync with their SNMP counterparts.

Actions

This Discussion

Related Content