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