SNMP question?
Stephen Ciccarelli
stephen.ciccarelli____acterna.com
Wed Jun 25 21:54:35 CEST 2003
Hi all,
I'm brand new on the list and I have what I hope is a simple question
regarding the snmpSet consoleExample. Not being familiar with the
intrinsics of the SNMP protocol, I'm puzzled by the following behavior.
Have you seen something like this before? I successfully learned about
-lresolv from searching back a year or so in the archives, but I've seen
nothing on this in months gone by.
In the log below, the first two commands are simply the Usage for the
snmpGet and snmpPut command line utilities. Then I do a Get to verify the
current value of a MIB variable, ActernaLab1250, at OID
1.3.6.1.4.1.1751.2.18.1.1.0 followed by a Set to attempt to alter it. The
return status from this first Set attempt (using SNMP v1.0) indicates that
the variable does not exist -- odd because I just fetched it! I then
reuse snmpGet to verify the old value is still present. Sure enough.
Lastly, a final attempt to set (using SNMP v2.0) indicates that there is
no write access to that variable.
Clearly the variable is settable and the agent is working properly. I can
set it using a copy of the SNMX script engine I'm also running. That
session log is at the bottom of this mail.
The snmx++ Get logic in both cases is working -- both as a stand alone
command line as well as the initial fetch embedded inside the snmpSet.
Bizarre.
Before tearing my hair out in frustration, I cannibalized snmpSet to
create snmpSet2, a version without the get (simple command-line
specification of char * value) thinking the reuse of the PDU might somehow
be corrupting it -- nope, same behavior. Any ideas on this one?
My system is Solaris 2.8 with the native compiler.
Here's the session log:
tourmaline% ./snmpGet
Usage:
/snmpGet IpAddress | DNSName [Oid] [options]
Oid: sysDescr object is default
options: -v1 , use SNMPV1, default
-v2 , use SNMPV2
-pPort , remote port to use
-CCommunity_name, specify community default is 'public'
-rN , retries default is N = 1 retry
-tN , timeout in hundredths of seconds; default is N = 100
tourmaline% ./snmpSet
Usage:
/snmpSet IpAddress | DNSName [Oid] [options]
Oid: sysDescr object is default
options: -v1 , use SNMPV1, default
-v2 , use SNMPV2
-pPort , remote port to use
-CCommunity_name, specify SET community default is 'public'
-GCommunity_name, specify GET community default is set community
value
-rN , retries default is N = 1 retry
-tN , timeout in hundredths of seconds; default is N = 100
tourmaline% ./snmpGet 10.10.61.62 1.3.6.1.4.1.1751.2.18.1.1.0
SNMP++ Get to 10.10.61.62 SNMPV1 Retries=1 Timeout=100ms Community=public
Oid = 1.3.6.1.4.1.1751.2.18.1.1.0
Value = ActernaLab1250
tourmaline% ./snmpSet 10.10.61.62 1.3.6.1.4.1.1751.2.18.1.1.0
SNMP++ Set to 10.10.61.62 SNMPV1 Retries=1 Timeout=100ms SET-community=public GET-community=public
Oid = 1.3.6.1.4.1.1751.2.18.1.1.0
Current Value = ActernaLab1250
Value Type is Octet String
Please enter new value: Act1250
Set Status = SNMP: Variable does not exist
tourmaline% ./snmpGet 10.10.61.62 1.3.6.1.4.1.1751.2.18.1.1.0
SNMP++ Get to 10.10.61.62 SNMPV1 Retries=1 Timeout=100ms Community=public
Oid = 1.3.6.1.4.1.1751.2.18.1.1.0
Value = ActernaLab1250
tourmaline% ./snmpSet 10.10.61.62 1.3.6.1.4.1.1751.2.18.1.1.0 -v2
SNMP++ Set to 10.10.61.62 SNMPV2 Retries=1 Timeout=100ms SET-community=public GET-community=public
Oid = 1.3.6.1.4.1.1751.2.18.1.1.0
Current Value = ActernaLab1250
Value Type is Octet String
Please enter new value: Act1250
Set Status = SNMP: Cannot access variable, No Access
tourmaline%
SNMX script engine session:
PSAX> pwd
Directory: /private/enterprises/lucent/mibs/acMIB/sysConfig
OID: 1.3.6.1.4.1.1751.2.18.1
PSAX> get siteName.0
ActernaLab1250
PSAX> set -snmp siteName.0 = "Act1250"
PSAX> get siteName.0
Act1250
PSAX>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.agentpp.org/pipermail/agentpp/attachments/20030625/f8c49abc/attachment.htm
More information about the AGENTPP
mailing list