4 Configuring SNMP with the CLI

You use the CLI to configure SNMP on SL3000 and SL8500 libraries. To configure SNMP on the SL150 library, see the SL150 User's Guide. To configure SNMP for STA, see the STA Installation and Configuration Guide.

Configuration Process

Use the following process for general library SNMP configuration.

  1. Obtain the IP address of the host that will receive traps.

  2. Enable library ports to use SNMP (see "Managing Ports").

  3. Obtain or create an SNMP user name (see "Managing SNMP Users").

  4. Configure trap recipients (see "Managing Trap Recipients").

  5. Configure service information (see "Configuring Service Information").

Variable Definitions

Listed CLI commands use the following variables. Enclose some variables in single quotes, as indicated in the command syntax and examples.

Variable Definition
trapLevelString Specified trap levels. Can be single digit or several digits separated by commas.
hostAddr IP address of the host. Cannot be the DNS name.
userName

trapUserName

Name assigned to the SNMP user. All libraries monitored by a single server must have the same v3 user name. Oracle recommends that you create a new, unique user for this purpose.
auth_protocol MD5 (Message Digest 5) or SHA (Secure Hash Algorithm) authentication protocol for users and hosts receiving traps.
authPassPhrase Authorization password. Must be at least eight characters in length and cannot contain commas, semicolons, or equal signs.
privacy_protocol DES or AES. Privacy protocol type, Data Encryption Standard (DES) or Advanced Encryption Standard (AES).
privPassPhrase Encryption password that is the private key for encryption. Must be at least eight characters in length, and cannot contain commas, semicolons, or equal signs.
engineIdString A string of hexadecimal characters (31 maximum), preceded with 0x. The authoritative engine ID is from the SNMP agent that sends the traps (such as the library). Required on SNMPv3 traps.
communityString Agent community string. Can contain a maximum of 31 alphanumeric characters (a-z, A-Z, 0-9). Special characters are not allowed. For SNMPv3 there are no community strings.

Use of the names public or private for the communityString is strongly discouraged for security reasons. These names are commonly used and easily guessed by a potential attacker.

index Index number of either the SNMP user name or trap recipient, depending on the command.
portID port2A or port2B. These are the public interface ports.
contactString Name of contact for service
streetAddrString Street address
cityString City
stateString State
countryString Country
zipString ZIP
descriptionString Any description you want to enter
phoneString Phone number for service

Managing Ports

By default, the SNMP agent is disabled. You enable or disable SNMP for a specified library port (2B = standard, public port and 2A = optional, redundant port).

CLI Commands to Manage Ports Description
snmp ports print Shows the SNMP port status.
snmp enable portID Enables SNMP on a port.

Example: > snmp enable port2B

snmp disable portID Disables SNMP on a port.

Example: > snmp disable port2A


Managing SNMP Users

You can specify a maximum of 20 SNMP users.

Note:

You should not remove an existing SNMP v2c public user without consulting Oracle support. In some cases, an SNMP v2c public user is required for Oracle Service Delivery Platform (SDP).
CLI Commands to Manage SNMP Users Description
snmp listUsers Lists SNMP users.
snmp addUser version v3 name 'userName' auth auth_protocol authPass 'authPassPhrase' priv privacy_protocol privPass 'privPassPhrase' For SNMP v3. Adds an SNMP user.

Example: > snmp addUser version v3 name 'TESTsnmp' auth SHA authPass 'authpwd1' priv DES privPass 'privpwd1'

snmp addUser version v2c community communityString For SNMP v2c. Adds an SNMP user.

Example: > snmp addUser version v2c community public

Use of the names public or private for the communityString is strongly discouraged for security reasons. These names are commonly used and easily guessed by a potential attacker.

snmp deleteUser id index Deletes a user by index number. Use snmp listUsers to obtain the index number.

Example: > snmp deleteUser id 4

snmp deleteUser version v3 name 'userName' For SNMP v3. Deletes a user by user name.

Example: > snmp deleteUser version v3 name 'TESTsnmp'

snmp deleteUser version v2c community communityString For SNMP v2c. Deletes a user by community name.

Managing Trap Recipients

You can specify up to 20 trap recipients with no duplicate entries. Specified recipients will receive trap notifications from the library.

CLI Commands to Manage Trap Recipients Description
snmp engineId print Shows the library engine ID.
snmp listTrapRecipients Lists trap recipients.
snmp addTrapRecipient trapLevel trapLevelString host hostAddr version v3 name 'trapUserName' auth auth_protocol authPass 'authPassPhrase' priv privacy_protocol privPass 'privPassPhrase' engineId engineIdString For SNMP v3. Adds a trap recipient.

Example: > snmp addTrapRecipient trapLevel 1,2,3,4,11,13,14,21,25,27,41,45,61,63,65,81,85,100 host 192.0.2.20 version v3 name 'TESTsnmp' auth SHA authPass 'authpwd1' priv DES privPass 'privpwd1' engineId 0x80001f880430000000000000000000

snmp addTrapRecipient trapLevel trapLevelString host hostAddr version v2c community communityString For SNMP v2c. Adds a trap recipient.

Example: > snmp addTrapRecipient trapLevel 1,2,3,4,11,13,14,21,25,27,41,45,61,63,65,81,85,100 host 192.0.2.20 version v2c community public

Use of the names public or private for the communityString is strongly discouraged for security reasons. These names are commonly used and easily guessed by a potential attacker.

snmp deleteTrapRecipient id index Deletes a trap recipient by index number. Use snmp listTrapRecipients to obtain the index number.

Example: > snmp deleteTrapRecipient id 3

snmp deleteTrapRecipient host hostAddr version v3 name 'trapUserName' For SNMP v3. Deletes a trap recipient by host.

Example: > snmp deleteTrapRecipient host 192.0.2.20 version v3 name 'TESTsnmp'

snmp deleteTrapRecipient host hostAddr version v2c community communityString For SNMP v2c. Deletes a trap recipient by host.

Configuring Service Information

Enter up to 80 characters for any or all of the variables. Enclose all variables in single quotes, as indicated in the command syntax and examples.

CLI Commands to Configure Service Information Description
config serviceInfo print View service information.
config serviceInfo set contact 'contactString' streetAddr 'streetAddrString' city 'cityString' state 'stateString' country 'countryString' zip 'zipString' description 'descriptionString' phone 'phoneString' Modify service information.

Example: > config serviceInfo set contact 'Justin Case' streetAddr '1600 Pennsylvania Ave' city 'Washington' state 'DC' country 'USA' zip '20500' description 'None' phone '(123) 456-7890'