Reference
Simulator Configuration
The simulator configuration specifies trap sink and SNMPv3 properties.
SNMPv3 properties Section
The properties node defines agent properties.
version | SNMP version of this agent: 1 for SNMPv1, 2 for SNMPv2c, or 3 for SNMPv3. |
engineID | SNMPv3 engineID of this agent. If empty, the first IP address resolved for the host name is used. |
engineBoots | Number of agent restarts. For an SNMPv3 agent, this value is updated on each restart. |
A version 3 agent rejects SNMPv1 and SNMPv2c requests for security reasons. A version 2 agent can also handle SNMPv1 requests.
TrapSink Section
This section defines trap receiver properties. The agent sends traps to all configured receivers.
SNMPv1 and SNMPv2 TrapSink
hostname | Host name or IP address of the trap receiver. |
port | Port number of the trap receiver. |
community | Community name of the trap receiver. |
version | SNMP version of the trap receiver. |
isInform | Set to “yes” to send an SNMP INFORM request instead of a trap. INFORM requests are more reliable because the receiver acknowledges them. |
snmpV3TrapSink
hostname | Host name or IP address of the trap receiver. |
port | Port number of the trap receiver. |
isInform | Set to “yes” to send an SNMP INFORM request instead of a trap. |
userName | One of the user names in the trap receiver’s user list. |
auth | Authentication algorithm: “MD5,” “SHA,” “SHA224,” “SHA256,” “SHA384,” or “SHA512.” |
authPassword | Authentication password. |
priv | Privacy algorithm: “DES,” “AES,” “AES192,” or “AES256.” The default is “DES.” |
privPassword | Privacy password. |
In the snmpV3TrapSink section, authPassword and privPassword determine the security level. If both are empty, the level is noAuthNoPriv. If only privPassword is empty, the level is authNoPriv. If both are nonempty, the level is authPriv.
For example, define three trap sinks: one each for SNMPv1, SNMPv2, and SNMPv3. If the agent sends an SNMPv2 trap, it goes to all three sinks and is converted to SNMPv1 for the SNMPv1 sink. An SNMPv1 trap is converted to SNMPv2 before it is sent to the SNMPv2 and SNMPv3 sinks.
User Section
This section defines the properties of authorized users.
name | User name. Each user must have a unique name. |
auth | Authentication algorithm: “MD5,” “SHA,”“SHA224,” “SHA256,” “SHA384,” or “SHA512.” |
authPassword | Authentication password. |
priv | Privacy algorithm: “DES,” “AES,” “AES192,” or “AES256.”The default is “DES.” |
privPassword | Privacy password. |
group | Group associated with this user. |
A user’s security level is determined by its group, not by its authPassword and privPassword values. This differs from the snmpV3TrapSink node. If the security level is authNoPriv, privPassword is ignored.
Group Section
This section defines SNMPv3 group properties.
name | Group name. Each group must have a unique name. |
securityLevel | Security level: noAuthNoPriv, authNoPriv, or authPriv. |
match | Context match: “prefix” or “exact.” |
contextPrefix | If match is “prefix,” the context must begin with contextPrefix. If match is “exact,” the context must match exactly and contextPrefix is ignored. |
readView | View associated with this group for read operations, such as GET, GETNEXT, and GETBULK. |
writeView | View associated with this group for write operations, such as SET. |
notifyView | View associated with this group for notification operations. |
The security levels are noAuthNoPriv, authNoPriv, and authPriv. noAuthNoPriv uses neither authentication nor encryption; authNoPriv uses authentication only; and authPriv uses both. All users in a group have the same security level.
View Section
This section defines SNMPv3 VACM view properties.
name | View name. Multiple views can share a name. |
type | View type: “included” or “excluded.” Each subtree in a MIB view is included or excluded along with all object instances it contains. |
subTree | Subtree OID: a node in the MIB naming hierarchy and all of its subordinate elements. |
mask | A sequence of 0s and 1s separated by periods or colons. The mask supports fine-grained access control: each bit determines whether the corresponding OID subidentifier must match. A 1 requires an exact match; a 0 is a wildcard that matches any value. |
For example:
<view name = "view1"
type = "included"
subTree = ".1.3 "
mask = ".1.1"
/>
This defines view1, which includes all tree nodes whose OIDs begin with “.1.3.”
<view name = "view1"
type = "included"
subTree = ".1.3.6.1.2.1"
mask = ".1.1.1.1.1.0"
/>
This defines view1, which includes all tree nodes whose OIDs begin with “.1.3.6.1.2.” The final 0 in the mask means that the corresponding subtree subidentifier can have any value.
<view name = "view1"
type = "included"
subTree = ".1.3.6.1.2.1.7"
mask = ".1.1.1.1.1.0.1"
/>
This view includes all OIDs in .1.3.6.1.2.[1, 2, ...].7.*.
<view name = "view1"
type = "included"
subTree = ".1.3.6.1.2.1"
mask = ".1.1.1.0.1.0"
/>
This view includes OIDs such as “.1.3.6.1.2.1.*,” “.1.3.6.2.2.1.*,” and “.1.3.6.3.2.2.*.”
Simulator Configuration Example
Here is an example agent configuration file:
<?xml version="1.0" encoding="UTF-8"?>
<SnmpAgent>
<properties
version = "3"
engineID = "12345"
engineBoots = "0"
/>
<trapSink
hostname = "localhost"
port = "162"
community = "public"
version = "2"
isInform = "yes"
/>
<user
name = "newUser"
auth = "MD5"
authPassword = "abc12345"
privPassword = "abc12345"
group = "aGroup"
/>
<group name = "aGroup"
securityLevel = "authPriv"
contextPrefix = ""
match = "exact"
readView = "view1"
writeView = "view1"
notifyView = "view1"
/>
<view name = "view1"
type = "included"
subTree = ".1.3"
mask = ".1.1"
/>
</SnmpAgent>
The properties section specifies an SNMPv3 agent. It defines a user named “newUser” in the aGroup group. The group maps to view1, which allows access to the “.1.3” subtree and all OIDs beneath it. Because group members require authPriv, “newUser” needs both authentication and privacy passwords. The authentication password is “abc12345,” and the authentication algorithm is MD5. The privacy password is also “abc12345,” and the default encryption algorithm is DES.