Configuration file (snmpd.conf)
- Organization of this page
Format
contact: system-contact location: system-location get-community-name: get-community-name options set-community-name: set-community-name options trap-dest: IPv4-trap-destination
Overview
This file defines the following settings:
-
System contact and system location
-
Community names
-
IPv4 trap destination
Location
HP-UX (IPF), Solaris, AIX, and Linux: /etc/SnmpAgent.d/snmpd.conf
Detailed description
- contact: system-contact
-
Describe the system contact using an ASCII character string after the contact: label.
The maximum length is 255 characters.
- location: system-location
-
Describe the system location using an ASCII character string after the location: label.
The maximum length is 255 characters.
- get-community-name: get-community-name options
-
Describe the get community name of SNMP Agent using an ASCII character string.
Match this get community name to the get community name of the SNMP manager.
You can specify multiple get community names by adding lines.
-
get-community-name
This is the password for GetRequest.
-
options
You can specify IP: or VIEW: as an option.
If you omit both options, the community name permits access requests from any IP address. In addition, you can access any MIB supported by SNMP Agent.
IP:
The community name specified in the SNMP request restricts the IP addresses that can access MIBs. When you specify IP addresses that can access MIBs, separate each address with a space. No host name is allowed. Place at least one space between the community name and IP:, and at least one space between IP: and the IP address.
VIEW:
The specified community name restricts accessible MIBs. Specify object IDs representing accessible subtrees (1.3.6.1.2.1 for mib-2, for example), separated by a space. If you add a hyphen (-) before an object ID, the subtree represented by the object ID will be inaccessible. Place at least one space between the community name and VIEW:, and at least one space between VIEW: and the object ID. Also, place one space before a hyphen (-).
-
- set-community-name: set-community-name options
-
Describe the set community name of SNMP Agent using an ASCII character string.
Match this set community name to the set community name of the SNMP manager.
You can specify multiple set community names by adding lines.
-
set-community-name
This is the password for both GetRequest and SetRequest.
-
options
See options for get-community-name:.
-
- trap-dest:
-
-
IPv4 trap destination
To send a trap to NNMi or a desired manager, specify a trap destination. Enter the host name or IP address of the manager to which you want SNMP Agent to send IPv4 traps.
-
Notes
-
Specifying community names
To specify the same name for the get community name and set community name, specify the name only in the set-community-name: label. To specify different names for the get community name and set community name, specify those community names separately in the get-community-name: label and set-community-name: label.
Definition examples
-
This example registers a system contact and a system location:
contact: Bob Jones (Phone 555-2000) location: 1st Floor near Mens Room
-
This example registers get community names:
get-community-name: public get-community-name: private
-
This example registers set community names:
set-community-name: private set-community-name: point
-
The example below registers a get community name with the IP: option specified.
If the community name specified in an SNMP request is public, SNMP Agent responds to the SNMP request as long as the request comes from 172.16.45.17 or 172.16.45.18.
get-community-name: public IP: 172.16.45.17 172.16.45.18
-
The example below registers a get community name with the VIEW: option specified.
If the community name specified in an SNMP request is public, SNMP Agent permits access to MIBs under 1.3.6.1.2.1 with the exception of 1.3.6.1.2.1.1.
get-community-name: public VIEW: 1.3.6.1.2.1 -1.3.6.1.2.1.1
-
This example specifies an IPv4 trap destination (for NNMi or a desired manager):
trap-dest: 15.2.113.223