Where to begin with SNMP agent implementation?

前端 未结 3 1442
别跟我提以往
别跟我提以往 2021-02-11 07:23

before I start I realise there are a few SNMP related questions here already but not many seem to have been answered - that could mean I\'m asking in the wrong place but I don\'

相关标签:
3条回答
  • 2021-02-11 07:52

    I had success using the samples from this page. Both the shell and Perl NetSNMP code was very straightforward to implement and query.

    0 讨论(0)
  • 2021-02-11 07:54

    The communications interface is SNMP. That's the protocol used for transmission (usually on top of UDP). The thing that services information requests is an SNMP Agent. The thing that sends information requests is an SNMP Manager.

    The definition of what information should be made available by the Agent, and requested by the Manager, goes in a MIB. A MIB is the "glue", a directory of what sort of things any particular system can/should offer. It maps numeric codes to names and types that allow us to make sense of the data, much like how a phone directory maps phone numbers to people's names and addresses.

    Generally you would create and ship and use your own MIBs that can describe aspects specific to your own product, but you are supposed to service some standard information requests as well, which are defined in existing MIBs. Yes there are thousands of other pre-existing MIBs and the likelihood that you need more than one or two of these is remote. They are typically published versions of MIBs for existing products.

    The conventional way to "toy around" is to install Net-SNMP (a software suite that includes an agent implementation and allows you to "bolt on" your own logic and your own MIBs fairly easily) then examine the results using a packet capturer like Wireshark.

    For a fuller implementation in production you may stick with Net-SNMP, or write your own Agent software, or do what I did and create a hybrid of the two that's a little more flexible and performant but uses Net-SNMP's backend for handling all the low-level SNMP stuff.

    Your first step, though, is to read a book or some other teaching material that can clear all your misconceptions, because guesswork won't cut it.

    0 讨论(0)
  • 2021-02-11 07:55

    It seems to me that you read all SNMP information piece by piece in an disorganized way. This is highly not recommended and of course lead you to confusion.

    What about forgetting what you have learnt so far and dive into a good book such as Essential SNMP?

    http://shop.oreilly.com/product/9780596008406.do

    Click the Google Preview icon to preview it please.

    You could not depend on a network forum to tell you the ABCs, as that's impractical I find out.

    0 讨论(0)
提交回复
热议问题