New experiences in network management application development

Source: Internet
Author: User
Tags rfc snmp

 Experiences in network management application development  
 

I work as a network administrator in Windows network and use VC ++ for development. After several months of work,
Finally, I found the door.

Suggestions
First, the theoretical knowledge of network management must be available, and RFC.
Second, let's take a look at the essence area. There is also a friendly connection, especially the snmplink website, where you will find a lot of things.
Third, you must have programming skills for engineering purposes (this is something I lack and it costs a lot)

Clarify the implementation of two concepts: MIB and MIB. To put it bluntly, MIB is a text to show people something,
The implementation process of MIB is the process of compiling the agent. At first, I understood MIB as a database,
Maybe it can be defined as a database, but there is not necessarily a real database in implementation.

Agent Development
The first step is the MIB design (if you want to implement the existing MiB, this step will not be used)
To write a MIB document, you need to know SMI. The following RFC needs to be understood:
Smiv1
• RFC 1155-structure of management information
• RFC 1212-Concise MIB Definitions
Smiv2
• RFC 2578-structure of management information
• RFC 2579-textual conventions
• RFC 2580-Conformance statements
Take the mib ii (rfc1213) as an example to define a general structure of the MIB,

When starting your MIB design, first make sure that you want to include the Managed Objects in the management information library.
The structure is well arranged. The specific definition of each object is the use of macros:
SMI V1
Objects-type rfc1155
Trap-type rfc1215
SMI v2
Object-identity object-type module-identity notification-type rfc2578
Textual-Convention rfc2579
Object-group notification-Group Module-compliance AGENT-COMPABILITIES rfc2580

It is worth mentioning that these macros in rfc2580 mainly define MIB consistency, indicating that
Required management object, which must be completed in smiv2.
In addition, V1 and V2 cannot be mixed in one MIB and can only be defined in one of them.

The final result is that you write the ASN.1 document.

You can use a notepad in this step. Of course, there are also visualized MIB designer, such as nudesign tools,
MG-SOFT Brower are available. But if you do not register, the former design MiB can contain up to 20 nodes, and the latter
The document of ASN.1 cannot be displayed. You can also find some design tools in snmplink.

Step 2: select the development kit,
C ++ Development Kits for Windows:

M $ itself provides a set of Apis called winsnmp (which can be found using this keyword in msdn), and M $ provides
Development of the SNMP extension agent based on the agent service.

My Development Kit is free of charge SNMP ++ agent ++ (http://www.agentpp.com/), is actually two class libraries,
It's easy to get started, but there are too few help documents.
Net-snmp (http://net-snmp.sourceforge.net/access needs a foreign proxy)

If you have any silver, you can certainly use some cool stuff. I have been using SNMP Research's emanate tool kit.
And HP OpenView.

When your development kit is set, your MIB compilation tool is set. For Agent ++, It is agentgen.
The compilation tool is used to compile the MIB file of ASN.1 you wrote into your program language,
And it is for your development kit.
I used agentgen (standard, agentpro for silver) and finally generated the. cpp and. H files.
The usage of agentgen is very simple. The manual is enough.

The third step is how you program it. Simply put, let the agent respond to the get set operation and send traps.
The theoretical knowledge used at this time should be: PDU format, SNMP primitive and primitive operation process.
SNMP V1 (rfc1157) SNMP v2 (rfc1905)

There are articles about SNMP ++ agent ++ In the essence area,
Help echrisma's hp snmp ++ strategy, snmptxy's agent ++ compilation under VC
Looking at its help and example, especially the latter, it is not very difficult to get started.
Then let's analyze the specific problem. Post.

If you are in a newsgroup, you can set Comp. Protocols. SNMP. Frank Fock is the write.
The guy from Agent ++ is in this group.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.