Find the answer to your Linux question:
Results 1 to 9 of 9
hi, i am trying to install MRTG on VPS. all the installation steps went fine.. but when i started configuring MRTG... there is a command called cfgmake which creates the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2004
    Posts
    21

    SNMP Configuration Problem


    hi,
    i am trying to install MRTG on VPS.
    all the installation steps went fine..
    but when i started configuring MRTG...
    there is a command called cfgmake which creates the MRTG config file..
    this command is not running..

    then i realised that SNMP Daemon is not installed on VPS ..
    so i download the tar file of net-SNMP-5.2.1 and extracted it contents in in root directory...

    But i am not able to configure it properly....
    Could u pls guide that how can i configure SNMP Daemon and how do i start the SNMP service...??????????????? so that i can further continue with the MRTG configurations.

    Thanks..
    Regards
    KeenLearner

  2. #2
    Just Joined!
    Join Date
    Jan 2005
    Location
    Toronto, ON, Canada
    Posts
    79
    you can start it by typing 'snmpd' in the shell. Check if it is working with 'snmpwalk'. If does not work if you are using net-snmp probably the configuration is set up to support encryption(V2). If that is the case you can either set up SSH or configure snmpd.conf to run without encryption(V1) and reinit snmd with '-HUP'.


    afrolinux

  3. #3
    Just Joined!
    Join Date
    Sep 2004
    Posts
    21
    This is basically i am asking that what changes i require to do in snmpd.conf..and how can i check that whether it is working with snmpwalk or not??

    I am using Net-SNMP 5.2.1 ...tell me this also how can i set up SSH to run snmpd????

    i extracted it's tar file in root directory and also run ./configure, make and make install commands. but configuration part is still left and dont knw hw to do that...also tell me please that i am not able to find the snmp startup script in /etc/rc.d/init.d neither it is in /etc/init.d...

    i am confused...HOW TO CONFIGURE SNMP and FROM WHERE TO START THE SERVICE...

    Please Guide
    Thanx

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Sep 2004
    Posts
    21
    This is basically i am asking that what changes i require to do in snmpd.conf..and how can i check that whether it is working with snmpwalk or not??

    I am using Net-SNMP 5.2.1 ...tell me this also how can i set up SSH to run snmpd????

    i extracted it's tar file in root directory and also run ./configure, make and make install commands. but configuration part is still left and dont knw hw to do that...also tell me please that i am not able to find the snmp startup script in /etc/rc.d/init.d neither it is in /etc/init.d...

    i am confused...HOW TO CONFIGURE SNMP and FROM WHERE TO START THE SERVICE...

    Please Guide
    Thanx

  6. #5
    Just Joined!
    Join Date
    Jan 2005
    Location
    Toronto, ON, Canada
    Posts
    79
    You can start snmpd by launching directily the daemon.
    Do as a root :
    $updatedb
    $locate snmpd
    Once located snmpd launch it, e.g.
    $/usr/bin/snmpd

    If you want to launch it in boot time you should work around in the organization of your filesystem :

    /etc/rc.d/init.d/functions and add /etc/rc.d/init.d/snmpd file simmilar to e.g.
    /etc/rc.d/init.d/httpd. If you do not want to work around with those scripts you can put /usr/bin/snmpd (or where ever is snmpd) in the first lines of /etc/rc.d/init.d/functions.

    rocommunity COMMUNITY [SOURCE [OID]]
    rwcommunity COMMUNITY [SOURCE [OID]]

    These create read-only and read-write communities that can be used to access the agent. They are a quick wrapper around the more complex and powerful com2sec, group, access, and view directive lines. They are not as efficient either, as groups aren't created so the tables are possibly larger. In other words: don't use these if you have complex situations to set up. If your setup is simple or you don't mind a small performance hit, use these directives.
    The format of the SOURCE is token is described in the com2sec directive section below. The OID token restricts access for that community to everything below that given OID.

    com2sec NAME SOURCE COMMUNITY
    This directive specifies the mapping from a source/community pair to a security name. SOURCE can be a hostname, a subnet, or the word "default". A subnet can be specified as IP/MASK or IP/BITS. For example, given a directive "com2sec myLocal 10.10.10.0/24 public" then this would match requests from IP addresses 10.10.10.0 through to 10.10.10.255, but not one from 10.10.11.1 or similar. The first source/community combination that matches the incoming packet is selected.

    group NAME MODEL SECURITY
    This directive defines the mapping from securitymodel/securityname to group. MODEL is one of v1, v2c, or usm.

    access NAME CONTEXT MODEL LEVEL PREFX READ WRITE NOTIFY
    The access directive maps from group/security model/security level to a view. MODEL is one of any, v1, v2c, or usm. LEVEL is one of noauth, auth, or priv. PREFX specifies how CONTEXT should be matched against the context of the incoming pdu, either exact or prefix. READ, WRITE and NOTIFY specifies the view to be used for the corresponding access. For v1 or v2c access, LEVEL will be noauth, and CONTEXT will be empty.

    view NAME TYPE SUBTREE [MASK]
    This defines the named view. TYPE is either included or excluded. MASK is a list of hex octets, separated by '.' or ':'. The MASK defaults to "ff" if not specified.
    The reason for the mask is, that it allows you to control access to one row in a table, in a relatively simple way. As an example, as an ISP you might consider giving each customer access to his or her own interface:

    view cust1 included interfaces.ifTable.ifEntry.ifIndex.1 ff.a0
    view cust2 included interfaces.ifTable.ifEntry.ifIndex.2 ff.a0

    (interfaces.ifTable.ifEntry.ifIndex.1 == .1.3.6.1.2.1.2.2.1.1.1, ff.a0 == 11111111.10100000. which nicely covers up and including the row index, but lets the user vary the field of the row)
    [/b]

    EXAMPLE :
    VACM Examples:
    # sec.name source community
    com2sec local localhost private
    com2sec mynet 10.10.10.0/24 public
    com2sec public default public

    # sec.model sec.name
    group mygroup v1 mynet
    group mygroup v2c mynet
    group mygroup usm mynet
    group local v1 local
    group local v2c local
    group local usm local
    group public v1 public
    group public v2c public
    group public usm public

    # incl/excl subtree mask
    view all included .1 80
    view system included system fe
    view mib2 included .iso.org.dod.internet.mgmt.mib-2 fc

    # context sec.model sec.level prefix read write notify
    access mygroup "" any noauth exact mib2 none none
    access public "" any noauth exact system none none
    access local "" any noauth exact all all all

    Default VACM model
    The default configuration of the agent, as shipped, is functionally
    equivalent to the following entries:
    com2sec public default public
    group public v1 public
    group public v2c public
    group public usm public
    view all included .1
    access public "" any noauth exact all none none


    So with default one you should be able to work unless the SNMP manager you are using have to be told explicitly where the SNMP agent is.

    afrolinux

  7. #6
    Just Joined!
    Join Date
    Sep 2004
    Posts
    21
    Thank You Afrolinux..

    i will try this and then get back to u ...

    Thank You Very Much

  8. #7
    Just Joined!
    Join Date
    Sep 2004
    Posts
    21
    Hi,

    Sorry get bk after a long time..
    but SNMP problem is still there..

    actually, what happend is..

    I downloaded the tar file of SNMP in /root and extract there only..
    so ,
    now the confusion is that where should be the snmp.conf reside..
    i the EXAMPLE.conf file, it is written that the snmp.conf should be in /usr/local/etc/share/snmp/snmpd.conf..

    but in the /usr/loacl/etc/ there is no share folder and then offcourse no snmp folder..

    and one thing more..
    i am able to see that the snmpd startup script is in..
    /usr/local/sbin/snmpd

    But when i say..
    /usr/local/sbin/snmpd start
    then there is no status of OK is there..
    it simply returns to the shell prompt..
    so how can i start it???

    please guide..
    where should all the files be placed and how can i start SNMPD.

    Thanx
    Regards
    KeenLearner

  9. #8
    Just Joined!
    Join Date
    Jan 2005
    Location
    Toronto, ON, Canada
    Posts
    79
    After untaring you should install it. Use "./confugure" if you have downloaded the binaries or "make install" if you have downloaded the source. Always first read the INSTALL file.

    afrolinux

  10. #9
    Just Joined!
    Join Date
    Jan 2005
    Location
    Toronto, ON, Canada
    Posts
    79
    usr/local/sbin/snmpd probably is the SNMP agent which come with your system. You can also use that one (Not recomemded). After you launch usr/local/sbin/snmpd I think it not need "start" you can check if is running with ps or pstree. Try

    $snmpd -t -d

    for more info do

    $man 8 snmpd.

    or

    $info snmpd

    afrolinux

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •