Overview
Start by reading the snmp_config
manual page that describes how the
Net-SNMP configuration files operate and
how they all work together. Note: When using Windows, all
configuration files should be placed in the (install
folder)\etc\snmp folder.
Note: The Net-SNMP configuration
files generally contain sensitive
information such as passphrases and community strings so permissions
should be set to restrict who can read the files.
A Perl script called snmpconf is included which can be used to
create configuration files. Full documentation on using snmpconf
is available in the 'Applications' section.
To run snmpconf, use the following command line:
snmpconf -i
The following environment variables are defined during installation:
- SNMPCONFPATH=(install folder)/etc/snmp;(install folder)/snmp/persist
- SNMPSHAREPATH=(install folder)/share/snmp
If Net-SNMP is installed in a folder other than the default c:\usr, the above environment
variables must match, and the snmp.conf
file must contain a definition for mibdirs,
persistentDir and tempFilePattern. For example,
if Net-SNMP was installed in c:\net-snmp:
mibdirs
c:/net-snmp/share/snmp/mibs
persistentDir c:/net-snmp/snmp/persist
tempFilePattern c:/net-snmp/temp/snmpdXXXXXX
Due to a limitation in the Windows Service Control Manager (SCM), if any system
environment variables are changed, the system will need to be rebooted
to allow the services to access the changed environment variables (see
Microsoft knowledge base article 821761). Therefore, when running
snmpd or snmptrapd as a service, if SNMPCONFPATH or SNMPSHAREPATH
is changed, a reboot will be required after setting the environment
variables, otherwise the services may fail to.
Note: All paths contained in
configuration files must use forward
slashes (Unix convention), NOT back
slashes.