0

How is it possible to get OID or MIB from agent, started like shown in snmpd sample?


I'm just starting to learn snmp. At first, the learning plan is to create any agent simulator and a simple client to query some information from agent.

After downloading and slightly exploring snmpd sample, I, probably, succeded with using SharpSnmpLib.Engine to create a "hello world" agent. It seems to be listening for incoming requests.

But, now I struggle with how to create a client, which would get any info from this agent. To be more specific, how could I get OID or MIB from the newly made agent, so that it's possible to send requests to it?


snmpd uses SharpSnmpLib.Engine. My code is same as here:

sharpsnmplib-samples/Samples/CSharpCore/snmpd/Program.cs

Thanks!

Andrey K.
  • 665
  • 8
  • 29
  • 1
    For that sample project, you know the OIDs from the source code, https://github.com/lextudio/sharpsnmplib-samples/blob/master/Samples/CSharpCore/snmpd/Program.cs#L30 For a real world SNMP agent, you need to refer to documentation of its vendor, and the agent capabilities, https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.halu101/cap.htm – Lex Li Jun 26 '19 at 21:20
  • @LexLi, Thanks a lot! Here is one of the constructors of objects put into the ObjectStore: `public SysDescr() : base(new ObjectIdentifier("1.3.6.1.2.1.1.1.0")) {...` – Andrey K. Jun 26 '19 at 22:51

0 Answers0