How to Check Snmp Service in Linux

SNMP is a network protocol that is designed for users in particular a network administrator to monitor computer network activity and control a computer or server systematically from a distance. SNMP works by collecting the data information of network elements with certain parameters and variable and store it in a database.

SNMP is composed of three elements as follows:
1. Manager, that served as a network management data collecting information from the network elements that want to dimonitoring or controlled. The shape of the manager is a software designed in such a way at once has a good interface for its users in this network, the network administrator. This manager software can be installed on the server at the same time as the database server for SNMP information data, but also can be installed on a desktop or laptop even mobile device with the terms of its database server separate.

2. MIB (Management Information Base), i.e. databases of information collected by the data manager of the agent that is stored in the database server. The structure of the data in the MIB is hierarchy and have a rule such that each variable information can be managed or specified with ease.

3. Agent, which is a network element that dimonitoring or controlled by the manager. In General, most network devices such as routers and servers are functioned as an agent in the network management system. This is due to the traffic data traffic with large numbers through or boils down to both of these network devices. Each agent has a local database with specific variables, which means that by default the information stored in the local disk and used by the operating system internals. The SNMP protocol is enabled on an agent will make such agents information activities data traffic, and the State of the internal systems and processes in the system capacity can be sent to the manager to the managed further.

SNMP uses a transport protocol UDP (User Datagram Protocol) port 161 for sending requests from the manager to the agent and receives the reply from the agent to the manager. The structure of the communication between SNMP element can be seen in Figure 1, that is, an agent that has a MIB data will provide the necessary information but not all by manager uses UDP transport oriented on speed of delivery.

This lab course is divided into two stages, namely the installation and configuration of SNMP and SNMP agent then the trip is continued with the installation and configuration of MRTG as interfaces for web-based users in the form of graphs.

Phase 1 Installation and configuration of SNMP and SNMP Agent
1. first to make sure no SNMP application and or SNMP Agent on a PC manager, perform uninstalls the application. Application uninstall command as follows:
#apt-get remove –purge snmp snmpd

2. next do the installation process with the following command
#apt-get install snmp snmpd

3. after the installation process is finished, SNMP SNMP configuration file will create a folder "/etc/snmp/snmpd.conf". The next step is to edit the file with a text editor such as vim or nano
#nano /etc/snmp/snmpd.conf

And then make the change on the following lines:
syslocation Unknown
syscontact Root

syslocation "name area network"
syscontact "name contact person"

4. Further testing snmp is already running or not with the following command
#snmpwalk –v 2c –c public localhost

Localhost on the command above can be replaced with another PC or server address and of course also the ip gateway or router. It should be a message appears below and shows the process of installation and configuration of SNMP and SNMPD is correct.

SNMPv2­MIB::sysDescr .0 = STRING: Linux highway 2.6. 1 4­2­686­smp #1 SMP Sat Agt 2
1 3:37 :07 UTC 2005 i686
SNMPv2­MIB::sysObjectID.0 = OID: NET ­SNMP ­MIB::netSnmpAgentOIDs. 10
SNMPv2­MIB::sysUpTime.0 = Timeticks: (369 1) 0:00:36.9 1
SNMPv2­MIB::sysContact.0 = STRING: Admin <>
SNMPv2­MIB::sysName.0 = STRING: highway
SNMPv2­MIB::sysLocation.0 = STRING: labjartel2
SNMPv2­MIB::sysORLastChange.0 = Timeticks: (2) 0:00:00.02..

Then restart the SNMP service once again with the command
#/etc/init.d/snmpd restart

SNMP is a protocol that is designed to give users the ability to monitor and manage its computer network systematically from a distance or in a single control centre only.

Click here for Comments