Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Getting snmpd to respond to DISMAN-PING-MIB requests

75 views
Skip to first unread message

Niels Baggesen

unread,
Sep 13, 2011, 7:42:15 AM9/13/11
to
On Fri, Sep 02, 2011 at 03:08:33PM -0400, Doug Manley wrote:
> It can do an snmpget on sysDescr.0 just fine with the "private"
> rwcommunity string, but anything after that [in relation to
> DISMAN-PING-MIB] doesn't work.

What version of Net-SNMP is this?
Are you sure that you have configured the "private" community to allow snmpset?

/Niels

--
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers --- R W Hamming

------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the
BlackBerry® mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry® DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1
_______________________________________________
Net-snmp-coders mailing list
Net-snm...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Doug Manley

unread,
Sep 13, 2011, 6:57:56 PM9/13/11
to
NB> What version of Net-SNMP is this?
NB> Are you sure that you have configured the "private" community to
allow snmpset?

I have confirmed this on net-snmp 5.4.3 (gentoo), 5.4.3 (ubuntu), and
5.7 (source). My community string is set up as:
rwcommunity private
You can see that it is used in the "snmpset" commands below.

I get the following error messages (with their commands). Note that
the error is always "notWritable", which seems to indicate an internal
state of snmpd, NOT "noAccess", which would indicate a
community-string problem.

If you have gotten this working, I would appreciate any configuration
files, version numbers, etc.--anything that can get me on my way.

# See if we can destroy a row that may or may not be there.
Error in packet.
Reason: notWritable (That object does not support modification)
Failed object: SNMPv2-SMI::mib-2.80.1.2.1.23.1.1.1.1
>>> Got 2 from snmpset -v 2c -c 'private' '127.0.0.1:161' 1.3.6.1.2.1.80.1.2.1.23.1.1.1.1 i 6

# Create a STANDARD DISMAN-PING setup (this will NOT work under
net-snmp, but we try anyway).
Error in packet.
Reason: notWritable (That object does not support modification)
Failed object: SNMPv2-SMI::mib-2.80.1.2.1.3.1.1.1.1
>>> Got 2 from snmpset -v 2c -c 'private' '127.0.0.1:161' 1.3.6.1.2.1.80.1.2.1.3.1.1.1.1 i 1 1.3.6.1.2.1.80.1.2.1.4.1.1.1.1 x 01010101 1.3.6.1.2.1.80.1.2.1.23.1.1.1.1 i 4

# Try for the "official" net-snmp way, since that works on some D-Link switches.
Error in packet.
Reason: notWritable (That object does not support modification)
Failed object: SNMPv2-SMI::mib-2.80.1.2.1.3.1.1.1.1
>>> Got 2 from snmpset -v 2c -c 'private' '127.0.0.1:161' 1.3.6.1.2.1.80.1.2.1.3.1.1.1.1 i 1 1.3.6.1.2.1.80.1.2.1.4.1.1.1.1 s 1.1.1.1 1.3.6.1.2.1.80.1.2.1.23.1.1.1.1 i 4

# Leave out the address type, since that works on some D-Link switches.
Error in packet.
Reason: notWritable (That object does not support modification)
Failed object: SNMPv2-SMI::mib-2.80.1.2.1.4.1.1.1.1
>>> Got 2 from snmpset -v 2c -c 'private' '127.0.0.1:161' 1.3.6.1.2.1.80.1.2.1.4.1.1.1.1 s 1.1.1.1 1.3.6.1.2.1.80.1.2.1.23.1.1.1.1 i 4

Niels Baggesen

unread,
Sep 14, 2011, 5:38:29 AM9/14/11
to
Den 14-09-2011 00:57, Doug Manley skrev:
> If you have gotten this working, I would appreciate any configuration
> files, version numbers, etc.--anything that can get me on my way.

Just to make sure I downloaded the 5.7 release tar file from the
homepage to my CentOS 5.6 x86_64 system, and configured as useal with

=============================================
./configure \
--enable-new-features \
--enable-mfd-rewrites \
--enable-ipv6 \
--with-mib-modules="smux ucd-snmp/lmsensorsMib ucd-snmp/diskio
sctp-mib \
ip-mib/ipv4InterfaceTable ip-mib/ipv6InterfaceTable \
disman/expression disman/nslookup-mib \
disman/ping-mib disman/traceroute-mib \
etherlike-mib tunnel \
tsm-mib tlstm-mib snmp-usm-dh-objects-mib" \
--with-transports="Callback Alias IPX SSH TLSTCP" \
--with-security-modules="tsm " \
--with-mysql \
--with-defaults \
--enable-developer \
--with-cflags="-g -Wchar-subscripts" \
--enable-silent-libtool
====================================

and setup a snmpd.conf file like this

=====================================
[snmp] logTimeStamp yes

agentaddress 7161
smuxsocket 127.0.0.1:7199

rocommunity public
rwcommunity private
=======================================

Started snmpd like this

# agent/snmpd -Lo -f -C -c snmpd.conf

and it works with the snmpping script I posted earlier

Your notWritable response could be a result of not having the ping mib
compiled in at all. Have you enabled it when you ran configure?

/Niels

--
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers --- R W Hamming

------------------------------------------------------------------------------

Wes Hardaker

unread,
Sep 14, 2011, 7:02:32 PM9/14/11
to
>>>>> On Wed, 7 Sep 2011 12:36:50 -0400, Bill Fenner <fen...@gmail.com> said:

BF> I started down this path, then decided to rewrite it from scratch, since the
BF> implementation is so poor. (There were many points that fed into this
BF> decision, but the primary one was that it would block the rest of the agent
BF> while it's running its own tests, since it has its own main loop cribbed
BF> from "ping".).

FYI (historical note), we had a long debate over whether to include the
current implementation because we knew it had issues. But we figured
it'd be better to have it in place and hopefully have someone look into
improving it than not having it around at all...

We'd love a rewrite ;-)
--
Wes Hardaker
Please mail all replies to net-snm...@lists.sourceforge.net
0 new messages