Can you provide the full command?  If it's a syntax problem, we can't 
really point out what's wrong without seeing exactly what you are typing.

I think the problem that you're running into here is that you're jumping 
straight into writing agent code without understanding how it gets 
queried.  The v1/v2c model is based on community strings with no 
passwords.  v3 is based on security names (think usernames) and passwords.

The models that are available, as well as the community strings and 
security names that you can use, are all defined in your snmpd.conf 
file.  I won't go into the scope of how to configure snmpd.conf because 
that's a completely separate discussion.  My advice is that you pretend 
v3 doesn't exist until you've got a handle on making queries with 
community strings.

Querying a v1/v2 host uses a command like this:
snmpwalk -v 2c -c public hostname OID

"public" is the community that you're requesting.  "hostname" is the 
host or IP address that you're querying.  OID is optional and specifies 
which part of the OID tree that you're interested in walking.  You can 
add "-On" if you're interested in seeing the numerical representations 
of the MIB tree without MIB names attached to them.

Change "2c" to "1" if you want to use v1 instead of 2c.  2c is generally 
preferable because it adds some nifty features like being able to use 
"snmpbulkwalk" instead of "snmpwalk", which is more efficient on the 
network.


-Davin


John Clark wrote:
> I've recently been required to set up a SNMP agent for our embedded 
> system. I have avoided SNMP for years
> because I don't think it is particularlly 'simple'.
> 
> I was following the tutorial for the MFD ifTable example. However, there 
> seems to be some number of differences
> between the example, for v 5.2 and the current release v 5.4.1. Ithen 
> installed the 5.2.4 version, and got to the point
> where the tutorial code compiles and runs.
> 
> However, because of my not knowing how to set things up correctly, the 
> function 'snmpwalk' does not give
> any reasonable results. When the '-v 1' option is selected, all that is 
> produced is the help info. When '-v 3' is
> select, I receive an error indicating I've not indicated a 'securityName'.
> 
> Are there any more recent examples to follow?
> 
> Thanks
> John Clark.
> 
> 
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> _______________________________________________
> 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


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
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

Reply via email to