Home

MIB Smithy

  1. Up to Table of Contents

Configuration Aliases

Configuration aliases allow associating a name with a set of name+value pairs that can be used for configuring session parameters or specifying such parameters to SNMP request functions. Aliases are defined using the session alias command.

Syntax:

  • % snmpcmd alias
  • % snmpcmd alias name ?option value ...?
  • % snmpcmd alias name list

Where:

snmpcmd
is the name of any session;
name
is the name of the alias;
option value
are zero or more pairs of configuration option and associated value; and
list
is a list of option+value pairs provided in a single argument

Option/value pairs can either be specified in a single list argument or as separate arguments. Specying an empty list deletes the alias.

Returns:

  • Given no arguments, returns a list of defined aliases and the associated list of option+value pairs.
  • Given only an alias name, returns the list of option+value pairs associated with that alias.
  • Otherwise, assigns the specified options to the named alias and returns the alias name.

Example

% set alias [snmplib alias myhost -remoteaddress 192.168.0.2 -community mycommunity]
myhost
% $session configure -alias $alias
% $session next -alias $alias 0.0
  1. Up to Table of Contents