snmp-server view

Creates an SNMP view.
Syntax
snmp-server view view-name mib-subtree { excluded | included }
no snmp-server view view-name mib-subtree { excluded | included }
Command Default

All MIB objects are automatically excluded from any view unless they are explicitly included.

Parameters
view-name
Configures the alphanumeric name to identify the view. The names cannot contain spaces.
mib-subtree
Configures the name of the MIB object or family. You can use a wildcard (*) in the numbers to specify a sub-tree family.
excluded
Configures the MIB family identified to be excluded from the view.
included
Configures the MIB family identified to be included in the view.
Modes

Global configuration mode

Usage Guidelines

The no form of the command removes the configured SNMP view.

SNMP views are named groups of MIB objects that can be associated with user accounts to allow limited access for viewing and modification of SNMP statistics and system configuration. SNMP views can also be used with other commands that take SNMP views as an argument.

MIB objects and MIB sub-trees can be identified by a name or by the numbers called object identifiers (OIDs) that represent the position of the object or sub-tree in the MIB hierarchy.

Note: All MIB objects are automatically excluded from any view unless they are explicitly included; therefore, when creating views using the snmp-server view command, indicate which portion of the MIB you want users to access.
Examples

The following example assigns the view called "admin" a community string or user group. The "admin" view allows access to the MIB objects that begin with the 1.3.6.1.4.1.1991 object identifier.

device(config)# snmp-server view admin 1.3.6.1.4.1.1991 included