Defining SNMP Views

All MIB objects are automatically excluded from any view unless they are explicitly included.
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. SNMP views reference MIB objects using object names, numbers, wildcards, or a combination of the three. The numbers represent the hierarchical location of the object in the MIB tree. You can reference individual objects in the MIB tree or a subset of objects from the MIB tree.
  1. Enter the global configuration mode.
    device# configure terminal
  2. Specify the maximum number of SNMPv2 and v3 views that can be configured on a device.
    device(config)# system-max view 15
    The number of views can be from 10 through 65536. The default is 10 views.
  3. Add an SNMP view and configure the access level using the included or excluded keywords.
    device(config)# snmp-server view Maynes system included
    device(config)# snmp-server view Maynes system.2 excluded
    device(config)# write memory
    In the example, "Maynes system" is included in the SNMP view and "Maynes system.2" is excluded from the SNMP view. You can also exclude views that are within the scope of inclusion.

The following example shows how to configure an SNMP view.

device# configure terminal
device(config)# system-max view 15
device(config)# snmp-server view Maynes system included
device(config)# snmp-server view Maynes system.2 excluded
device(config)# write memory