Net-snmp-utils Debian Download

Leave a comment

Simple Network Management Protocol (SNMP) is an internet standard protocol which can be used to remotely retrieve the operational statistics of the routers and firewalls. Devices that typically support SNMP include routers, switches, servers, workstations and more.

Download net-snmp-utils-5.8-2-omv4000.i686.rpm for Lx 4.0 from OpenMandriva Main Release repository. Download net-snmp-utils-5.8-4-omv4001.armv7hnl.rpm for Cooker from OpenMandriva Main Release repository.

The monitoring tools such as MRTG, cacti uses SNMP to retrieve information from the routers to draw the graphs. In this tutorial, we will go through the installation and simple configuration of SNMP on Linux (CentOS 7, Ubuntu 16.04, Ubuntu 18.04).

Basics concepts

SNMP is a protocol that is implemented on the application layer of the networking stack. It is one of the widely accepted protocols to manage and monitor network elements. The protocol was created as a way of gathering information from very different systems in a consistent manner.

In general, a network being profiled by SNMP will mainly consist of devices containing SNMP agents. An agent is a program that can gather information about a piece of hardware, organize it into predefined entries, and respond to queries using the SNMP protocol. SNMP requires only a couple of basic components to work:

  • Managed device: it is a computer that is configured to poll SNMP agent for information. It can be any machine that can send query requests to SNMP agents with the correct credentials. SNMP Manager’s key functions: queries agents, get responses from agents, sets variables in agents and acknowledges asynchronous events from agents
  • Agent: these are software which runs on managed devices. They are responsible for gathering information about the local system and storing them in a format that can be queried. updating a database called the 'management information base' (MIB).
  • Network management station (NMS): it executes applications that monitor and control managed devices.

MIB is a database that follows a standard that the manager and agents adhere to. Every SNMP agent maintains an information database describing the managed device parameters. The SNMP manager uses this database to request the agent for specific information and further translates the information as needed for the Network Management System (NMS). This commonly shared database between the Agent and the Manager is our MIB.

SNMP version

Currently, there are 3 versions for SNMP.

  • SNMP Version 1: This provides device statistics and error reporting without consuming a lot of system resources. Security is limited to community strings and access controls based on the IP address of the querying server. Data communication isn't encrypted.
  • SNMP Version 2: This is referred to as v2c which expanded the number of supported error codes, increased the size of counters used to track data and has the ability to do bulk queries that more efficiently loaded response packets with data.
  • SNMP Version 3: This version provides greater security and remote configuration capabilities than its predecessors. Access isn't limited to a single community string for read-only and read/write access, as usernames and passwords have been introduced. Support for encrypted SNMP data transfer and transfer error detection is also provided.

1) Installation of snmp on Linux

We will present snmp installation both on ubuntu and centos

  • On ubuntu
  • On centos

2) Configuration of SNMP

The configuration file of SNMP service can be found at /etc/snmp/snmpd.conf. Before modifying the file, make a copy of the file by the command

The following are the basic configuration parameters you can use to configure SNMP.

  • Set community string for SNMP: it is like a user id or password that allows access to a device's statistics. This string will be used by the client machines to retrieve data (to generate monitoring graphs). This is a mandatory configuration parameter. It can be identified where you will see rocommunity. The defaultvalue is public which is not secured because everybody knows it by default.
  • Listening address: We can configure the SNMP agent to listen only to a particular IP address as follows agentAddress udp:ip_address:161. The default port on which SNMP listens is 161. The default behavior of the agent is to listen on standard UDP port on all interfaces.
  • System information: it concerns personal infos, process/disk monitoring,
    • syslocation: This is the [typically physical] location of the system.
    • syscontact: This is the contact information for the administrator.

Our modified information should be like below, notice that there are other default values on the file which don't appear here

  • On Ubuntu
  • on Centos

The SNMP service needs to be restarted for any configuration change (/etc/snmp/snmpd.conf) to take place. This can be accomplished as follows:

Songs

with systemd do

3) Testing SNMP service

You can test whether SNMP can read the system and interface MIB's using the snmpwalk command.

  • on Ubuntu
  • on Centos

Once you have verified that SNMP is working correctly, you can configure SNMP statistics gathering software such as MRTG to create online graphs of your traffic flows.

Conclusions

In this tutorial we learn how to install and configure snmp on linux to monitor network devices. Hope you enjoyed reading and please leave your suggestions in the below comment section.

Read Also:

Today we will look SNMP in Linux operating systems. Simple network management protocol named SNMP is designed for getting info and setting configuration in its entities. These entities may be a switch, router, pc, cabinet, printer, etc. Snmp was very popular in the 2000s. Today it is popular too but used for information gathering.

SNMP is a standard which is mainly created to manage and monitor the network and network-connected devices. But during time the monitoring functionalities became popular and management functionalities are not used. SNMP has an index database named Management Information Base (MIB) used for data classification. Vendors generally publish their MIBs. For example, the Cisco MIB can be found http://www.cisco.com/public/sw-center/netmgmt/cmtk/mibs.shtml . The system that gathers SNMP info generally named Network management station. The systems that provide info or apply settings about yourself named Managed device. An agent is a tool that runs on a Managed Device and responsible for SNMP. SNMP works with UDP, ip, TCP, UNIX, udp6, tcp6

Drummer

Fedora, CentOS, RedHat

In rpm-based distributions like Fedora, CentOS, Red Hat we will install the packages named net-snmp-utils and net-snmp like below.

Install SNMP Packages

Ubuntu, Debian, Mint, Kali

Firstly we install SNMP daemon, library, and tool with this command in fedora. Also, we can install it Debian based distributions like Ubuntu from official repositories.

After installing check the status of SNMP service named snmpd. As shown it is not started so we start it and check again the status

Net snmp tar gz download

We can check the SNMP daemon or service status with the following command.

Check SNMP Service

SNMP daemon configuration file is stored under /etc/snmp with the name snmpd.conf .

echo '

We will change the public community string with ismailbaydan in this line.

After changing the SNMP configuration we have to reload the SNMP service to take effect new configuration. We will restart the snmpd daemon with the following command.

Here we run snmpwalk for system OUID with new password and SNMP community version 2. So we get all value in the system OUID and in its sub-branches.

How To Install and Use SNMP On Linux Tutorial with Examples? Infographic