snmpget returns "Cannot find module" in net-snmp

How can I get snmpget working ? This is from a Windows XP box

Currently it returns all this :

C:\SNMP\net-snmp\bin>snmpget -v2c -c public 192.168.1.1 system.sysDescr.0
Cannot find module (IP-MIB): At line 0 in (none)
Cannot find module (IF-MIB): At line 0 in (none)
Cannot find module (TCP-MIB): At line 0 in (none)
Cannot find module (UDP-MIB): At line 0 in (none)
Cannot find module (SNMPv2-MIB): At line 0 in (none)
Cannot find module (SNMPv2-SMI): At line 0 in (none)
Cannot find module (UCD-SNMP-MIB): At line 0 in (none)
Cannot find module (UCD-DEMO-MIB): At line 0 in (none)
Cannot find module (SNMP-TARGET-MIB): At line 0 in (none)
Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none)
Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none)
Cannot find module (UCD-DLMOD-MIB): At line 0 in (none)
Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none)
Cannot find module (SNMP-MPD-MIB): At line 0 in (none)
Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none)
Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in (none)
Cannot find module (SNMPv2-TM): At line 0 in (none)
system.sysDescr.0:  (Sub-id not found: (top) -> system)


- I've copied net-snmp.dll into c:\windows\system32
- I've set snmp.conf (in the same dir as the EXEs) to

mibdirs c:\snmp\net-snmp\share\snmp\mibs
persistentDir c:\snmp\net-snmp\snmp\persist
tempFilePattern c:\snmp\net-snmp\temp\snmpdXXXXXX

Any ideas ? I get a feeling I need to "install the mibs" but if so how do I do that ?


When I add -m ALL

snmpget v2c -m ALL -c public 192.168.1.1 system.sysDescr.0

I get the error (Sub-id not found).


thanks

LVL 8
plqAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

grg99Commented:
What language is this?  I dion't recognize the error mesasges from the module loader.

0
plqAuthor Commented:
snmpget is downloadable from net-snmp on sourceforge. Its compiled from C.

I think the error messages are raised by net-snmp.dll because it can't find the mibs that its supposed to load as default (i.e. when you leave out -m)

So I'm sure its just a case of putting the mib files in the right directory or setting the right config file snmp.conf but I can't get it working so far ..
0
jkrCommented:
Run the DependencyWalker (www.dependencywalker.com) in 'Profile' mode to see what DLLs the app is trying to load.
0
plqAuthor Commented:
Found it at last

C:\SNMP\net-snmp\bin>set MIBDIRS=C:\SNMP\net-snmp\share\snmp\mibs

C:\SNMP\net-snmp\bin>snmpget -v1 -c public 192.168.1.1 system.sysDescr.0
SNMPv2-MIB::sysDescr.0 = STRING: Cisco PIX Firewall Version 6.3(3)

I had to do that set statement. The snmp documentation is sooooo bad for windows, I've been stuck on this all day !!!

thanks
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
plqAuthor Commented:
Yes please. thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Networking

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.