Network Appliance(TM)

Manual Pages


Table of Contents

NAME

snmp - set and query SNMP agent variables

SYNOPSIS

snmp

snmp authtrap [ 0 | 1 ]

snmp community [ add | delete ro | rw ]

snmp contact [ contact ]

snmp init [ 1 ]

snmp location [ location ]

snmp traphost [ add | delete hostname | ipaddress ]

DESCRIPTION

The snmp command is used to set and query configuration variables for the SNMP agent daemon (see na_snmpd(8)). If no options are specified, snmp lists the current values of all variables.

OPTIONS

In all the following options, specifying the option name alone prints the current value of that option variable. If the option name is followed by one or more variables then the appropriate action to set or delete that variable will be taken. Any variable with an inclusive space or tab must be enclosed in single quotes "'".

It is recommended that all snmp commands be added to the end of the /etc/rc file. The last snmp command in the /etc/rc file should be:

snmp init 1

This will initialize the SNMP daemon with the values set using the snmp command and it will send out a coldStart trap as described below.

authtrap [ 0 | 1 ]
Enable or disable SNMP agent authentication failure traps. To enable authentication traps specify 1. To disable authentication traps specify 0. Traps are sent to all hosts specified with the traphost option.

community [ add|delete ro|rw community ] Add or delete communities with the specified access control type. Specify ro for a read-only community and rw for a read-write community. For example, to add the read-only community private use the following command:

snmp community add ro private

Currently the SNMP SetRequest PDU is currently not supported, so all read-write communities will default to read-only. The default community for the filer SNMP agent is public and its access mode is ro. Up to a maximum of 8 communities are supported.

contact [ contact ]
Used to set the contact name returned by the SNMP agent as the System.sysContact.0 MIB-II variable.

init [ 1 ]
With an option of 1 this initializes the snmp daemon with values previously set by the snmp command. It also sends a coldStart trap to any hosts previously specified by the traphost option. The command:

snmp init 1

should be the last snmp command in the filer's /etc/rc file.

On a query init will return the value 0 if the SNMP daemon has not yet been initialized. Otherwise it will return the value 1.

location [ location ]
Used to set the location name returned by the SNMP agent as the System.sysLocation.0 MIB-II variable.

traphost
[ add | delete hostname | ipaddress ]

To add or delete SNMP managers who will be the recipient of the filer's Trap PDU's. Specify the word add or delete as appropriate followed by the host name or IP address. If a host name is specified, it must exist in the /etc/hosts file. For example, to add the host alpha use the following command:

snmp traphost add alpha

No traps will be sent unless at least one trap host is specified. Up to a maximum of 8 trap hosts are supported.

On a query the traphost option will return a list of registered trap hosts followed by their IP addresses. If a host name cannot be found in /etc/hosts for a previously registered IP address, its name will default to a string representation of its IP address.

EXAMPLES

A typical set of snmp commands in the /etc/rc file will look like the following:

  snmp contact 'Network Manager'
  snmp location 'Bldg 2. Lab 3a'
  snmp community add ro private
  snmp traphost add snmp-mgr1
  snmp traphost add snmp-mgr2
  snmp init 1

FILES

/etc/rc
startup command script where snmp commands must be added
/etc/hosts
hosts name database

SEE ALSO

na_autosupport(8), na_snmpd(8), na_rc(5)


Table of Contents