SNMP configuration
This chapter describes what you need to do to enable SNMP. You can monitor alarms
via your preferred MIB browser, and also view counters/gauges.
You need to:
Have root privilege.
Set the ports used for SNMP.
Disable other SNMP agents.
Configure the SNMP Master Agent.
Configure SNMP Master Agent’s IP address.
Configure trap format for alarms.
Several components in DP can act as SNMP subagents. In a standard configured
system, all components that support SNMP are configured to act as subagents. You
find more information about this in SNMP subagents.
Set the ports used for SNMP
Check the /etc/services file. If you do not find these two rows, then add them. You
can use any text editor.
snmp 161/udp
snmp-trap 162/udp
Disable other SNMP agents
The Sun™ Solstice Enterprise Agents, that also provides SNMP functionality, must be
disabled. You can do this by renaming these files in the /etc/rc3.d directory (from
upper case letter S to lower case letter s).
File name New file name
S76snmpdx s76snmpdx
S77dmi s77dmi
Configure the SNMP Master Agent
The configuration file $OTA_SC_SOFTWARE_ROOT/config/snmpd.cnf specifies the setting for
the Master Agent. The configuration file consists of a number of parameters with the
same structure. Each parameter consists of:
One or several comment lines, indicated with the # symbol, that declares the
fields in the parameter.
One line of configuration data.
There are many configurable parameters in the file, but only a few parameters need to
be customized. They consider:
Community string i.e. the relationship between an agent and a set of SNMP
managers that defines security characteristics.
Target address(s) for the notifications i.e. the address(s) that you want the
Traps to be sent to.
Note!
You find several examples in the following. Please notice that each field starts with the
# symbol and may continue over several rows. This is only because we lack space in
the manual. In the configuration file $OTA_SC_SOFTWARE_ROOT/config/snmpd.cnf row
spacing is normally not applied.
Note! The Master Agent must be restarted if you edit the
$OTA_SC_SOFTWARE_ROOT/config/snmpd.cnf file, please refer to “DP Operator Manual –
Start and Stop”. Check the log file /tmp/snmpd.log after the restart, that will contain
any errors occurring during the start-up
The Master Agent reads the $OTA_SC_SOFTWARE_ROOT/config/snmpd.cnf file when it is
(re)started. If any error occurs, the incorrect part is removed from snmpd.cnf and
reported to the $OTA_SC_SOFTWARE_ROOT/config/snmpd.jnk file.
Configure the community string
The srCommunityEntry parameter contains the community string that you may like to
change. To change the community string edit the srCommunityName field, e.g., replace
public with private. We have indicate this field and its value with bold in the example
below.
Parameter fields #Entry type: srCommunityEntry
#Format: srCommunityAuthSnmpID (octetString)
# srCommunityName (text)
# srCommunityGroupName (text)
# srCommunityContextSnmpID (octetString)
# srCommunityContextName (text)
# srCommunityTransportLabel (text)
# srCommunityMemoryType (nonVolatile, permanent,
readOnly)
Configuration CommunityEntry localSnmpID public Anyone localSnmpID
default – nonvolatile
data
Note! The Master Agent must be restarted if you edit the
$OTA_SC_SOFTWARE_ROOT/config/snmpd.cnf file, please refer to [DPSTST].
Configure the notification address
To set the notification address requires three steps:
1. Define a notification.
2. Define a set of network addresses to which a notification should be sent.
3. Define parameters to use when sending notifications to each of the target
identified in step 2.
Step 1
The snmpNotifyEntry parameter is used to define notifications. The snmpNotifyName is
the name of this notification and snmpNotifyTag is used to select a set of entries in the
snmpTargetAddrEntry table, see Step 2. We have indicate these field and their values
with bold in the example below.
Parameter fields #Entry type: snmpNotifyEntry
#Format: snmpNotifyName (text)
# snmpNotifyTag (text)
# snmpNotifyType (trap(1), inform(2))
# snmpNotifyStorageType (nonVolatile, permanent,
readOnly)
Configuration SnmpNotifyEntry 31 nms1 trap nonVolatile
data
Note! The snmpNotifyType must have the value trap.
Step 2
The snmpTargetAddrEntry parameter is used to define target addresses. You must
define one snmpTargetAddrEntry) for each target address and target parameter receiver
of notifications and for each target parameter. This means that if you want to send
SNMPv1 and SNMPv2c traps to a specific IP address you must define two rows. If there
is another receiver (with another IP address) two more rows must be added.
In this example we have indicated the important fields and their values with bold.
Parameter fields #Entry type: snmpTargetAddrEntry
#Format: snmpTargetAddrName (text)
# snmpTargetAddrTDomain (snmpUDPDomain, snmpIPXDomain,
etc.)
# snmpTargetAddrTAddress (transport address,i.e.
192.147.142.254:0)
# snmpTargetAddrTimeout (integer)
# snmpTargetAddrRetryCount (integer)
# snmpTargetAddrTagList (text)
# snmpTargetAddrParams (text)
# snmpTargetAddrStorageType (nonVolatile, permanent,
readOnly)
# tgtAddressMask (transport mask, i.e.
255.255.255.255:0)
Configuration snmpTargetAddrEntry 31 snmpUDPDomain 172.16.5.38:0 100 3
nms1 v1ExampleParams nonVolatile 255.255.255.255:0
data
snmpTargetAddrEntry 32 snmpUDPDomain 172.16.5.38:0 100 3
nms1 v2cExampleParams nonVolatile 255.255.255.255:0
Description snmpTargetAddrName is the name of the target.
snmpTargetAddrTDomain indicates the network type and should have the value
snmpUDPDomain.
snmpTargetAddrTAddress is used as the destination address for outgoing notifications.
Note that the IP address is ended with “:0”.
The value of the snmpTargetAddrTagList corresponds to the value of the snmpNotifyTag
in the snmpNotifyEntry, see Step 1 .
snmpTargetAddrParams is a string used to select a set of entries in the
snmpTargetParamsEntry defined in Step 3.
The value of the tgtAddressMask must be 255.255.255.255:0
Step 3
The snmpTargetParamsEntry is used to define the target parameters. In this example we
have indicated the important fields and their values with bold.
Parameter fields #Entry type: snmpTargetParamsEntry
#Format: snmpTargetParamsName (text)
# snmpTargetParamsMPModel (integer)
# snmpTargetParamsSecurityModel (snmpv1, snmpv2c,
snmpv2s, usm)
# snmpTargetParamsSecurityName (text)
# snmpTargetParamsSecurityLevel
(noAuthNoPriv,authNoPriv,authPriv)
# snmpTargetParamsStorageType (nonVolatile, permanent,
readOnly)
Configuration snmpTargetParamsEntry v1ExampleParams 0 snmpv1 public
noAuthNoPriv nonVolatile
data
snmpTargetParamsEntry v2cExampleParams 1 snmpv2c public
noAuthNoPriv nonVolatile
Description snmpTargetParamsName is the name of this parameter
snmpTargetParamsMPModel shall have one of the values 0 (zero) or (one) depending on
which SNMP version that is applied:
0 for SNMPv1
1 for SNMPv2c
snmpTargetParamsSecurityModel shall have one of the values “snmpv1” or “snmpv2c”,
depending on which SNMP version that is applied:
“snmpv1” for SNMPv1
“snmpv2c”for SNMPv2c
snmpTargetParamsSecurityName is the community string e.g. “public”
snmpTargetParamsSecurityLevel identifies the security level of the notification. The only
valid value is currently “noAuthnoPriv”.
Note! The Master Agent must be restarted if you edit the
$OTA_SC_SOFTWARE_ROOT/config/snmpd.cnf file, please refer to “DP Operator Manual –
Start and Stop”. Check the log file /tmp/snmpd.log after the restart, that will contain
any errors occurring during the start-up
The Master Agent reads the $OTA_SC_SOFTWARE_ROOT/config/snmpd.cnf file when it is
(re)started. If any error occurs, the incorrect part is removed from snmpd.cnf and
reported to the $OTA_SC_SOFTWARE_ROOT/config/snmpd.jnk file.
Configure SNMP Master Agent’s IP address
The Master Agent’s IP address is defined in a configuration parameter common to all
program instances. In a standard configured system no address is defined. To enable
the SNMP support, you must set the IP address. No program instance in DP can start
its SNMP subagent if the Master Agent’s IP address is undefined.
How to configure SNMP Master Agent’s IP address
With Configuration Manager, set the common configuration parameter for the Master
Agent’s IP address to either the IP address. For instance:
System/
Snmp/
Common/
MasterIpAddr=111.222.333.444
Configure trap format for alarms
A&C Server can generate alarm traps in two formats:
version 1
version 2c
How to configure trap format
With Configuration Manager, set the SNMP trap format
configuration parameter to one of the following values:
Value Description
SNMPv1 SNMP trap format version 1
SNMPv2c SNMP trap format version 2c
For instance:
AaCServer/
AaCServer/
Snmp/
Common/
SnmpTrapFormat=SNMP1v