Hi i am facing trobles in using snmpget for more than oneweek. Also i am not knowing whether i am doing mistakes in configuring agent(snmpd.
I am extending agent using microsoft visual c++. what i have done is below. 1. i put NET-SNMP-TUTORIAL-MIB in the folder c:\usr\share\snmp\mibs 2. i copied nstAgentModuleObject.h nstAgentModuleObject.h into C:\net-snmp-5.5\agent\mibgroup\ folder 3. i added #include "mibgroup/nstAgentModuleObject.h" to the file c:\net-snmp-5.5\win32\mib_module_includes.h and i added if (should_init("nstAgentModuleObject")) init_nstAgentModuleObject(); to the file c:\net-snmp-5.5\win32\mib_module_inits.h 4. i compile nstAgentmoduleobject.c into agent.( netsnmpmibssdk project) The object file nstAgentModuleObject.obj is located inthe folder C:\net-snmp-5.5\win32\netsnmpmibssdk\debug\ 5. i built snmpdsdk project(net snmp agent). Next i configured the agent . snmpd.conf contains the following: ############################################################################ # snmpd.conf # # - created by the snmpconf configuration program # ########################################################################### # SECTION: Access Control Setup # # This section defines who is allowed to talk to your running # snmp agent. # rocommunity: a SNMPv1/SNMPv2c read-only access community name # arguments: community [default|hostname|network/bits] [oid] rocommunity public localhost # rwcommunity: a SNMPv1/SNMPv2c read-write access community name # arguments: community [default|hostname|network/bits] [oid] rwcommunity private localhost ########################################################################### # SECTION: System Information Setup # # This section defines some of the information reported in # the "system" mib group in the mibII tree. # syslocation: The [typically physical] location of the system. # Note that setting this value here means that when trying to # perform an snmp SET operation to the sysLocation.0 variable will make # the agent return the "notWritable" error code. IE, including # this token in the snmpd.conf file will disable write access to # the variable. # arguments: location_string syslocation COMMUNICATIONS-CRL # syscontact: The contact information for the administrator # Note that setting this value here means that when trying to # perform an snmp SET operation to the sysContact.0 variable will make # the agent return the "notWritable" error code. IE, including # this token in the snmpd.conf file will disable write access to # the variable. # arguments: contact_string syscontact "GANESH YELLAPU" I restarted the agent. c:\usr\bin\snmptranslate -On -IR nstAgentModuleObject.0 .1.3.6.1.4.1.8072.2.4.1.1.1 C:\usr\bin\snmpget -c public -v 2c localhost nstAgentModuleObject.0 NET-SNMP-TUTORIAL-MIB::nstAgentModuleObject.0 :: No suchobnject available on this agent at this OID C:\usr\bin\snmpset -c private -v 2c localhost nstAgentModuleObject.0 i 999 Error in packet. Reason:not writable <that object doesnot support modification> Failed object: NET-SNMP-TUTORIAL-MIB::nstAgentModuleObject.0 I tried the below command also. C:\usr\bin>snmpget -c public -v 1 localhost nstAgentModuleObject.0 Sending 46 bytes to UDP: [127.0.0.1]:161->[0.0.0.0] 0000: 30 2C 02 01 00 04 06 70 75 62 6C 69 63 A0 1F 02 0,.....public .. 0016: 02 74 21 02 01 00 02 01 00 30 13 30 11 06 0D 2B .t!......0.0...+ 0032: 06 01 04 01 BF 08 02 04 01 01 01 00 05 00 ....?......... Received 46 bytes from UDP: [127.0.0.1]:161->[0.0.0.0] 0000: 30 2C 02 01 00 04 06 70 75 62 6C 69 63 A2 1F 02 0,.....public".. 0016: 02 74 21 02 01 02 02 01 01 30 13 30 11 06 0D 2B .t!......0.0...+ 0032: 06 01 04 01 BF 08 02 04 01 01 01 00 05 00 ....?......... Error in packet Reason: (noSuchName) There is no such variable name in this MIB. Failed object: NET-SNMP-TUTORIAL-MIB::nstAgentModuleObject.0 C:\usr\bin\snmptranslate -Dparse NET-SNMP-TUTORIAL-MIB::nstAgentModuleObject this command showed parse-mibs:Module NET-SNMP-TUTORIAL-MIB already loaded. NET-SNMP-TUTORIAL-MIB::nstAgentModuleObject What and where is the mistake? whether snmpd.conf contains correct configur inforamtion? i have been sending the same mail for one week. kinldy help and suggest me inthis regard. Looking forward to the response. Thank you very much withregards Ganesh Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Bharat Electronics or supp...@bel.co.in immediately and destroy all copies of this message and any attachments. ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users