Re: SNMPGET specifying the community name

Dave Shield <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
2010/1/7 Irvs <[email protected]>:
> I can't seem to make it work, executing this command [snmpget -v2c -c
> "sample community" 10.10.10.9 enterprises] does not give me the right return
> value.

Well, no - it won't.
'enterprises' is the *root* of a tree of information,
but there's nothing associated with this object itself.
Plus you'd need to specify the instance subidentifier anyway.

   snmpget ....  enterprises

will *always* fail - whether you use "public" or any other community string.


> Do you guys have an idea where in the source code can I find the part
> where it reads the community name value for evaluation?

Believe me - you do *not* want to start looking through the access
control code.   It's not straightforward in the slightest.

Just set you agent up with the following configuration

    rocommunity   public
    rocommunity   someothercommunity
    rocommunity  "yet another community"

and restart the agent.
Then you can experiment with running the same request,
using different community names, with and without spaces.

They should all give the same results.
If they don't, it might be useful to know which version
of the agent you are working with.

Dave

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.