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

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

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.

What Is SNMP?

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

Install SNMP Packages

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

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.

Start SNMP Service

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

LEARN MORE  How To Get Mac Addresses Of Hosts With Nmap?

Check SNMP Service

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

Check SNMP Service 

Check SNMP Service

SNMP Configuration File

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

SNMP Configuration File

SNMP Configuration File

Change Public Community String

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

Restart SNMP Service and Reload Configuration

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.

Get and Display SNMP Attributes/Values with snmpwalk

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

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

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

 

Leave a Reply

Your email address will not be published. Required fields are marked *

Enjoy this blog? Please spread the word :)