SnmpStackSecurityInfo.cfg configuration file

The SnmpStackSecurityInfo.cfg configuration file defines the community strings, versioning, and other properties used by any process that needs to interrogate devices using SNMP, for example, the SNMP helper. Community strings can be configured on a per-device or per-subnet basis, to allow the SNMP Helper to retrieve MIB variables from devices.

Database tables used

This configuration file can be used to configure inserts into the following database tables:

  • snmpStack.configuration
  • snmpStack.verSecurityTable
  • snmpStack.accessParameters

Note that there is another configuration file associated with the snmpStack database, the SnmpStackSchema.cfg file, but you should not need to alter this file.

Sample: Configuring SNMP versions

If auto-versioning is turned on, the following configuration adjustment specifies that a community string of ‘public' is used for devices that support SNMP version 1, and specific configuration is used for devices that support SNMP version 3. Since no value has been specified for m_SnmpPort, this value defaults to the standard SNMP 161 port.

insert into snmpStack.verSecurityTable
(
        m_SNMPVersion,
        m_Password,
        m_SNMPVer3Level,
        m_SNMPVer3Details,
        m_SecurityName,
)
values
(
        0,
        'public',
        2,
        {
            m_AuthPswd="authpassword",
            m_PrivPswd="privpassword"
        },
        'authPriv'
);

Sample: Defining community strings

The following inserts define the community strings public and crims0n for use to access SNMP devices.

You can append as many inserts as there are passwords to the SnmpStackSecurityInfo.cfg configuration file. All password and subnet configurations are tried until a match is found.

Note: Only one SNMP community string, the public community string, is set up by default.
insert into snmpStack.verSecurityTable
(
        m_SNMPVersion,
        m_Password,
        m_SNMPVer3Level,
        m_SNMPVer3Details,
        m_SecurityName
)
values
(
        0, 
        'public',
        2,
        {
            m_AuthPswd="authpassword",
            m_PrivPswd="privpassword"
        },
        'authPriv'
);

insert into snmpStack.verSecurityTable
(        m_IpOrSubNetVer, 
        m_NetMaskBitsVer, 
        m_SNMPVersion,
        m_Password,
        m_SNMPVer3Level,
        m_SNMPVer3Details,
        m_SecurityName
)
values
(
        "10.10.2.0",
        24,
        0, 
        'crims0n',
        2,
        {
            m_AuthPswd="authpassword",
            m_PrivPswd="privpassword"
        },
        'authPriv'
);

Sample: Specifying an SNMP port

This example configures the same SNMP settings as in the previous example on all devices within the subnet 192.168.64.0 and specifies the SNMP port as 6161 on all devices within this subnet.

insert into snmpStack.verSecurityTable
(
        m_IpOrSubNetVer,
        m_NetMaskBitsVer,
        m_SNMPVersion,
        m_Password,
        m_SNMPVer3Level,
        m_SNMPVer3Details,
        m_SecurityName,
        m_SnmpPort,
)
values
(
        192.168.64.0,
        24,
        0,
        'public',
        2,
        {
            m_AuthPswd="authpassword",
            m_PrivPswd="privpassword"
        },
        'authPriv'
        6161
);