The SNMP 

The Simple Network Management Protocol (SNMP) is an application layer protocol that facilitates the exchange of management information between network devices. This protocol is part of the set of TCP/IP protocols and allows administrators to manage performance, find and solve problems, and plan the future growth of the network.

SNMP is used to monitor and control the status of devices connected to the internet, especially routers, although it can be used in any type of host that allows the snmpd process to be executed. SNMP operates at the application level using the TCP/IP transport protocol, so it ignores the specific aspects of the hardware on which it operates. The management is carried out at the IP level, so you can control devices that are connected in any network that's accessible from the internet, and not only those located in the local network itself.

For the SNMP protocol, the network is a set of basic elements. The fundamental elements of a network that employs SNMP are as follows:

  • Managed devices: In each one, an agent is executed
  • Administrator (manager): The device from which the network is administered
  • Management Information Base, MIB: A namespace organized hierarchically in the form of a tree, containing the information that can be read and/or written

Here are the five types of SNMP messages that are exchanged between Agents and Administrators:

  • Get Request: A request from the Administrator to the Agent to send the values contained in the MIB (database)
  • Get Next Request: A request from the Administrator to the Agent to send the values contained in the MIB, referring to the object
  • Get Response: The Agent's response to the information request that's launched by the Administrator
  • Set Request: A request from the Administrator to the Agent to change the value contained in the MIB, referring to a specific object
  • Trap: A spontaneous message sent by the Agent to the Administrator, upon detecting a predetermined condition, such as the connection/disconnection of a station or an alarm

The SNMP protocol is composed of two elements: the agent and the manager. It is a client-server architecture, in which the agent plays the role of the server and the manager acts as the client.

The agent is a program that must be executed in each network node that you want to manage or monitor. It offers an interface of all the elements that can be configured. These elements are stored in data structures called Management Information Base (MIB). It represents part of the server, insofar as it has the information that you want to manage and expects commands from the client.

The manager is the software that runs in the station responsible for monitoring the network; its task is to consult the different agents that are in the nodes of the network and data they have been obtaining.

In essence, SNMP is a very simple protocol since all operations are performed under the load-and-store paradigm, which allows for a reduced set of commands. A manager can perform only two types of operations on an agent: read or write the value of a variable in the agent's MIB. These two operations are known as a read request (get request) and a write request (set-request). There is a command to respond to a read request, called read-response, which is used only by the agent.

The possibility of extending the protocol is directly related to the ability of the MIB to store new elements. If a manufacturer wants to add a new command to a device, such as a router, they simply add the corresponding variables to its database (MIB).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset