Net-SNMP

SNMP (Simple Network Management Protocol) is a protocol for managing network equipment devices on IP networks.

This document describes how to install and to configure SNMP Read Only access to your equipment. The SNMP version used in the configuration below is SNMP v2c.

Installation
Portage knows the global USE flag snmp for enabling support for SNMP in other packages. Enabling this USE flag will pull in automatically:

The USE flags of net-snmp are:

After setting this you want to update your system so the changes take effect:

You want to install net-snmp yourself, if it isn't already pulled in:

Configuration
Edit and add the community and the IP access list.


 * Substitute the SNMP community my-own-SNMP-community with your own SNMP community.
 * Substitute the 10.255.255.0/24 network with your own IP network where SNMP access should be allowed from.
 * Substitute the syslocation and syscontact with your own valid data.

It is suggested to put valid data into the syslocation and syscontact fields, so in a support case when your hardware is monitored by a NMS (Network Management System) the responsible staff has the data right there where it is needed (in the NMS).

In a large networks or enterprises it is hard to describe for the network staff where particular network equipment has been placed. Sometimes there is a high fluctuation of the network staff, and after some time network equipment gets lost because nobody knows anymore where it has been placed, or whom to contact when a network equipment has failed.

Be aware to put valid data in there, your network staff will be thankful if you do so. It helps to resolve network outages quicker.

Starting the daemon
To start the SNMP daemon use following command:

Testing SNMP access
To test SNMP access or rather to poll SNMP data your SNMP client has to be within the allowed IP range of the previously configured access list (here 10.255.255.0/24).
 * Substitute the IP 192.168.10.254 with the target host where SNMP access has been enabled
 * Substitute the SNMP community my-own-SNMP-community with your own SNMP community

Troubleshooting
Verify the SNMP daemon is running on a particular host:


 * SNMP v1 and SNMP v2c uses UDP
 * SNMP v3 uses TCP