Explain what SNMP is and what it is for. Little information and almost nothing is clear.
- 2laes.ru/list/pve/SNMP/tcp25.html - nörbörnën
1 answer
In a nutshell:
- SNMP - a network protocol for managing devices capable of communicating over an IP protocol;
- Software implementing this protocol consists of two parts: the client and the manager:
- The client works on a controlled piece of hardware;
- The manager runs on the sysadmin host;
- 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);
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:
- Ber
- ASN.1
- 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 ...