cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1533
Views
0
Helpful
1
Replies

Why SNMP output different from CLI output? SNMP incorrect?

genewolfe
Level 1
Level 1

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 Reply 1

Joe Clarke
Cisco Employee
Cisco Employee

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.

Review Cisco Networking for a $25 gift card