Explain what SNMP is and what it is for. Little information and almost nothing is clear.

1 answer 1

In a nutshell:

  1. SNMP - a network protocol for managing devices capable of communicating over an IP protocol;
  2. Software implementing this protocol consists of two parts: the client and the manager:
  3. The client works on a controlled piece of hardware;
  4. The manager runs on the sysadmin host;
  5. The manager sends the client requests for reading / writing control variables (the variable corresponds, as a rule, to the control register of the piece of iron);
  6. The client sends the trap to the manager about the events that have happened.

    In principle - everything. BUT !!! The creators of SNMP tried to comprehend the immense:

    • Send / receive any type of data
    • Manage any type of device.

As a result, a whole hierarchy of standards is used to encode the data:

  1. Ber
  2. ASN.1
  3. TLV in SNMP itself

To work with various devices such a monstrous system was invented, which is called the MIB - management database. This is, in fact, a database, not just relational, but hierarchical. And it contains descriptions of all the control registers of all network devices developed by all firms in the world for all times .... F-F-F ... Of course, dragging it entirely is impossible in principle.

Therefore, each agent on all devices consists of two parts:

  • The basic part that works with the MIB part, common to all devices;
  • The specific part, called the subagent , works only with the part of the MIB that is used on this particular piece of hardware.

As a rule, tools for writing agents contain the basic part of the agent in finished form and a library for writing subagents.

It is simpler with managers, since they do not interact with real hardware and are a normal IP / UDP client that forms and sends SNMP packets to port 161 and listens to port 162 (this is more like a UDP server).

Personally, my opinion (with which many would disagree) is this: nothing more monstrous, ridiculous and monstrous for inefficiency in the entire history of programming was created.

The problem is that there is no alternative ...