Article ID: 5610
Products
DFE
SecureStack C3
SecureStack C2
SecureStack B3
SecureStack B2
SecureStack A2
Protocols/Features
SNMP
Commands
'set snmp view'
Goals
Sample configuration
Cause
This solution provides clarifications for SNMP View configuration, to augment what is described in the respective
Configuration Guide for each product. SNMP View configuration is a sub-component of SNMP configuration (
5245).
Solution
The command format is:
set snmp view viewname subtree [mask ]
[included | excluded] [volatile | nonvolatile]
By default, an "All" (case-sensitive) view is provided which permits associated Community Names to be used to access MIB branches 1 (iso) and, depending upon the product, 0.0.
DFE(rw)->show snmp view
View Name = All
Subtree OID = 1
Subtree mask =
View Type = included
Storage type = nonVolatile
Row status = active
View Name = All
Subtree OID = 0.0
Subtree mask =
View Type = included
Storage type = nonVolatile
Row status = active
DFE(rw)->
It is possible to include certain OIDs and exclude certain other OIDS within one view, by stacking different 'set snmp view' includes and excludes which specify a single viewname. Logically, what the user will ultimately be able to view will consist of all of the 'included' OID strings for that viewname, minus all of the 'excluded' OID strings for that viewname. If no such parameter is specified, 'included' is assumed.
Though it is certainly possible to create and use multiple viewnames as desired, for demonstration purposes it is simplest to modify the default view, since it is already being referenced by the remainder of the SNMP command set.
The following command sequence removes the default view specifications, and inserts one which permits access to branch 'mib-2=1.3.6.1.2.1',
with the exception of branch 'interfaces=1.3.6.1.2.1.2'.
DFE(rw)->clear snmp view All 1
DFE(rw)->clear snmp view All 0.0
DFE(rw)->set snmp view viewname All subtree 1.3.6.1.2.1
DFE(rw)->set snmp view viewname All subtree 1.3.6.1.2.1.2 excluded
DFE(rw)->show snmp view
View Name = All
Subtree OID = 1.3.6.1.2.1
Subtree mask =
View Type = included
Storage type = nonVolatile
Row status = active
View Name = All
Subtree OID = 1.3.6.1.2.1.2
Subtree mask =
View Type = excluded
Storage type = nonVolatile
Row status = active
DFE(rw)->
A simple test using any MIB browser, directed to the IP of the unit in question and using the Community Name (default="public") associated with view "All", will demonstrate that only the described sections of the MIBs are visible.
If the 'volatile' parameter is included on any 'set snmp view' command line, that line will not survive a system reboot. If unspecified, 'nonvolatile' is assumed.
For a discussion of the 'mask' parameter, please refer to
5618.
The following command sequence restores the default view to its original functionality.
DFE(rw)->clear snmp view All 1.3.6.1.2.1.2
DFE(rw)->clear snmp view All 1.3.6.1.2.1
DFE(rw)->set snmp view viewname All subtree 1
DFE(rw)->set snmp view viewname All subtree 0.0
DFE(rw)->show snmp view
View Name = All
Subtree OID = 1
Subtree mask =
View Type = included
Storage type = nonVolatile
Row status = active
View Name = All
Subtree OID = 0.0
Subtree mask =
View Type = included
Storage type = nonVolatile
Row status = active
DFE(rw)->
See also:
5898.