Discussion:
snmpd - snmpget and snmpwalk inconsistent
Ryan Goodfellow
2017-04-21 18:43:03 UTC
Permalink
Hi,

I have observed a puzzling inconsistency between the get and walk requests
from snmpd. I am running the daemon on a Cumulus Linux switch. The
following shell sessions shows the issue.

### SERVER (stem) ###

***@stem$ snmpd --version
NET-SNMP version: 5.7.3

***@stem$ service snmpd restart

***@stem$ pgrep -lfa snmpd
1298 /usr/sbin/snmpd -y -LF d /var/log/snmp -DALL -u snmp -g snmp -I -smux
-p /run/snmpd.pid -f


### CLIENT ###

## initial request for ifNumber using GET returns 0 (wrong)
ry$ date && snmpget -c public -v2c stem .1.3.6.1.2.1.2.1.0
Fri Apr 21 18:20:15 UTC 2017
iso.3.6.1.2.1.2.1.0 = INTEGER: 0

## initial request for ifNumber using WALK returns 11 (correct)
ry$ date && snmpwalk -c public -v2c stem .1.3.6.1.2.1.2.1.0
Fri Apr 21 18:20:20 UTC 2017
iso.3.6.1.2.1.2.1.0 = INTEGER: 11

## subsequent requests for ifNumber using GET returns 11 (correct)
ry$ date && snmpget -c public -v2c stem .1.3.6.1.2.1.2.1.0
Fri Apr 21 18:20:24 UTC 2017
iso.3.6.1.2.1.2.1.0 = INTEGER: 11

## after some time passes GET is back to being incorrect
ry$ date && snmpget -c public -v2c stem .1.3.6.1.2.1.2.1.0
Fri Apr 21 18:21:58 UTC 2017
iso.3.6.1.2.1.2.1.0 = INTEGER: 0

In doing some tests, I have determined that the value goes back to 0
exactly 1 minute after the walk was executed.
--
*ry**@isi*
Ulrich Windl
2017-04-24 06:11:19 UTC
Permalink
Post by Ryan Goodfellow
Hi,
I have observed a puzzling inconsistency between the get and walk requests
from snmpd. I am running the daemon on a Cumulus Linux switch. The
following shell sessions shows the issue.
### SERVER (stem) ###
NET-SNMP version: 5.7.3
1298 /usr/sbin/snmpd -y -LF d /var/log/snmp -DALL -u snmp -g snmp -I -smux
-p /run/snmpd.pid -f
### CLIENT ###
## initial request for ifNumber using GET returns 0 (wrong)
ry$ date && snmpget -c public -v2c stem .1.3.6.1.2.1.2.1.0
Fri Apr 21 18:20:15 UTC 2017
iso.3.6.1.2.1.2.1.0 = INTEGER: 0
## initial request for ifNumber using WALK returns 11 (correct)
ry$ date && snmpwalk -c public -v2c stem .1.3.6.1.2.1.2.1.0
Fri Apr 21 18:20:20 UTC 2017
iso.3.6.1.2.1.2.1.0 = INTEGER: 11
What happens if you start with snmpwalk? It looks like if the first query after some pause returns the incorrect value, independent of the method.
Post by Ryan Goodfellow
## subsequent requests for ifNumber using GET returns 11 (correct)
ry$ date && snmpget -c public -v2c stem .1.3.6.1.2.1.2.1.0
Fri Apr 21 18:20:24 UTC 2017
iso.3.6.1.2.1.2.1.0 = INTEGER: 11
## after some time passes GET is back to being incorrect
ry$ date && snmpget -c public -v2c stem .1.3.6.1.2.1.2.1.0
Fri Apr 21 18:21:58 UTC 2017
iso.3.6.1.2.1.2.1.0 = INTEGER: 0
In doing some tests, I have determined that the value goes back to 0
exactly 1 minute after the walk was executed.
--
Ryan Goodfellow
2017-05-23 23:01:37 UTC
Permalink
snmpwalk always returns the correct value

On Sun, Apr 23, 2017 at 11:11 PM, Ulrich Windl <
Nachricht
Post by Ryan Goodfellow
Hi,
I have observed a puzzling inconsistency between the get and walk
requests
Post by Ryan Goodfellow
from snmpd. I am running the daemon on a Cumulus Linux switch. The
following shell sessions shows the issue.
### SERVER (stem) ###
NET-SNMP version: 5.7.3
1298 /usr/sbin/snmpd -y -LF d /var/log/snmp -DALL -u snmp -g snmp -I
-smux
Post by Ryan Goodfellow
-p /run/snmpd.pid -f
### CLIENT ###
## initial request for ifNumber using GET returns 0 (wrong)
ry$ date && snmpget -c public -v2c stem .1.3.6.1.2.1.2.1.0
Fri Apr 21 18:20:15 UTC 2017
iso.3.6.1.2.1.2.1.0 = INTEGER: 0
## initial request for ifNumber using WALK returns 11 (correct)
ry$ date && snmpwalk -c public -v2c stem .1.3.6.1.2.1.2.1.0
Fri Apr 21 18:20:20 UTC 2017
iso.3.6.1.2.1.2.1.0 = INTEGER: 11
What happens if you start with snmpwalk? It looks like if the first query
after some pause returns the incorrect value, independent of the method.
Post by Ryan Goodfellow
## subsequent requests for ifNumber using GET returns 11 (correct)
ry$ date && snmpget -c public -v2c stem .1.3.6.1.2.1.2.1.0
Fri Apr 21 18:20:24 UTC 2017
iso.3.6.1.2.1.2.1.0 = INTEGER: 11
## after some time passes GET is back to being incorrect
ry$ date && snmpget -c public -v2c stem .1.3.6.1.2.1.2.1.0
Fri Apr 21 18:21:58 UTC 2017
iso.3.6.1.2.1.2.1.0 = INTEGER: 0
In doing some tests, I have determined that the value goes back to 0
exactly 1 minute after the walk was executed.
--
--
*ry**@isi*
Loading...