Hi,

i am facing trobles in using snmpget for more than oneweek.
i dont know  whether i am doing mistakes in configuring agent(snmpd). also


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.o 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\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 is the mistake?

whether snmpd.conf contains correct inforamtion?

i have been sending the same mail for one week.

kinldy help and suggest me inthis regard.

Looking forward to the response.

Kinldy send your response to the email address

ganeshyell...@bel.co.in



Thank you 

withregards

Ganesh 




















     
  
 

------------------------------------------------------------------------------
Download Intel&#174; 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

Reply via email to