I had problem while setting my snmp agent in my
system..so here is what i did...i used al the versions
os net-snmp..1,2 and 3..


Here i have made my own agent.....which needs to be
started alongwith the snmpd agent in the server
syetem..


The command for snmp is :-
        (Version -1)
        snmpget -v1(version 1)-c(community) public
192.168.48.154 (ipaddress from where to fetch data)
USERS-MIB::numAlwONUser.0
       USERS-MIB::numAlwONUser.0 = INTEGER: 7
        snmpset -v1 -c public 192.168.48.154
USERS-MIB::stopUser.0 i 34
        Then after giving snmpget command we should
get the same value for stopUser i.e 34
                                                      
                         
        (Version -2)
        snmpget -v2c -c private 192.168.48.154
USERS-MIB::numAlONUser.0
                                                      
                         
        (Version -3)
        snmpget -v3 -u admin(username) -l authNoPriv
-a MD5 -A adminpassword(password) -c public
192.168.48.154 USERS-MIB::numOFUSer.0
        snmpset -v3 -u admin(username) -l authNoPriv
-a MD5 -A adminpassword(password) -c public
192.168.48.154 USERS-MIB::stopUser.0 i 33
                                                      
                         
        For each version during configuration of
net-snmp we need to mention which version we
want.whether 1,2 or 3.
        Then in /etc/snmp/snmpd.conf  we need to
change the following for
        i)snmpset:-
 # Finally, grant the group read-only access to the
systemview view.
        #       group    context        sec.model     
 sec.level prefix read write  notif                   
                                                      
      
                access  notConfigGroup  ""     any    
  noauth    exact  all  all    none
          ---- in read and write options we need to
put all .
                                                      
                         
        ii) Version 3(it has got more security options
so configuration needs to be done)
        ########## Configuring SNMPv3 for Net-SNMP
#####################
        createUser admin MD5 adminpassword
        rwuser  admin auth .1.3.6.1
        --- here admin is the username,MD5 is the
protocol, adminpassword is the password..next
read-write facility has been provided ,auth type is
there and visbility is from .1.3.6.1(it can be
restricted to particular mib also,example
system..etc..etc                                      
                                          
                                                      
                         
        snmptranslate -On (or 
-Of)UCD-SNMP-MIB::memCached.0
        .1.3.6.1.4.1.2021.4.15.0    

 
snmpset -v1 -c public 192.168.48.154
USERS-MIB::disableUser.0 = 125343
        BRAS-USERS-MIB::disableUser.0 = INTEGER:
125343

                                                      
                         
        1) Install the net-snmp-5.2.1
                                                      
                         
        2) Next copy the snmpd.conf file to /etc/snmp/
                                                      
                         
        3) In /usr/local/share/snmp/mibs put your MIB
file.
                                                      
                         
                                                      
                                 4)In the system  you
keep your file,give the "make" command. or take the
executable agent file directly.
                                                      
                         
        5) Start the snmp i.e /etc/init.d/snmpd start
                                                      
                         
        6) give the command ./snmpget_subagent
                                                      
                         
         7) If any problem comes check for the
Makefile,snmpget_subagent.c,whether proper header
files of variables is there or not.Also check snmpget
and snmpset command is there in the system or not.
                                                      
                         
        8) Then check for the following development
packages..ntp-4.2.0-7,openssl-devel-0.9.7a-35,tcp_wrappers-7.6-36,rpm-bui
         
ld-4.3.1-0.3,rpm-devel-4.3.1-0.3,net-snmp-devel-5.1.1-2,net-snmp-5.1.1-2,bzip2-1.0.2-12.1.
                                                      
                         
        9) NOTE:-The USERS-MIB file has to be there in
the client system,coz the manager checks the OID from
this file and..ends it in the packet.
                                                      
                         
        10)If still any problem is there check using
"ping command" the server system.
                                                      
                         
        11)Do remember to check the
/etc/snmp/snmpd.conf file for checking whether
read-write permission is there or not for           
the agent.It's required in case of snmpset command.

Thanking u all..........

Romel Dutta





        

        
                
__________________________________________________________
Free antispam, antivirus and 1GB to save all your messages
Only in Yahoo! Mail: http://in.mail.yahoo.com


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to