| < Prev | Back to Table of Contents | Next > |
The new subcommand is used to create new SNMP
Sessions. Each session, including the master database, can be used to
create new sessions, initialized with default configuration values or
with specified values. Each session is generally associated with the
combination of a single SNMP agent and access parameters.
% snmpcmd new
% snmpcmd new option value ...
% snmpcmd new list
..where snmpcmd is the name of any session
(such as snmplib for the master session) and a series of
option/value pairs,
same as those supported by the config and
cget commands, may be present to configure the session
at creation time.
In the alternate form, the list parameter
is a single argument containing a list of option/value pairs,
allowing many properties to be configured from a list variable or
from the output of configure with no arguments. This
makes it easy to clone
sessions.
Name of the created session, which can be later used to send SNMP requests to the configured agent or to close the session.
The following defaults are assigned to newly created sessions where no value is specified at creation time:
| Parameter | Value |
|---|---|
| SMI Database | smilib |
| SNMP Version | SNMPv1 |
| Remote IP Address | 127.0.0.1 |
| Remote Port | 161 |
| Local Port | 162 |
| Request Timeout | 5000 (milliseconds) |
| Retries | 3 (Total of 4 transmits/20 seconds before
timeout) |
| Read Community | public |
| Write Community | private |
| SNMPv3 User Name | (not set/zero-length) |
| SNMPv3 Auth Protocol | HMAC-MD5-96 |
| SNMPv3 Auth Password | (not set - authentication disabled) |
| SNMPv3 Priv Protocol | CBC-DES |
| SNMPv3 Priv Protocol | (not set - privacy disabled) |
% set sess [snmplib new] snmplib1
% set sess [snmplib new -version SNMPv3 -username "test user" \
-authpass "auth password" -privpass "priv password"]
snmplib2
% set sess_copy [$sess new [$sess configure]] snmplib3
| < Prev | Back to Table of Contents | Next > |