snmp-server view

Creates a view entry with MIB object IDs to be included or excluded for user access.

Syntax

snmp-server view view-name mib_tree {included | excluded }
no snmp-server view view-name mib_tree {included | excluded }

Command Default

No SNMP server views are defined.

Parameters

view-name
Specifies the alphanumeric name to identify the view. The name should not contain spaces.
mib_tree
Specifies the MIB object ID called Object Identifiers (OIDs) that represent the position of the object or sub-tree in the MIB hierarchy.
included | excluded
Specifies whether the specified MIB object ID must be included in the view or excluded from the view.

Modes

Global configuration mode

Usage Guidelines

The maximum number of views supported with MIB tree entries is 10. Either a single view name associated with 10 different MIB object IDs or 10 different view names associated with each one of the MIB object IDs is allowed.

Examples

The following example creates an SNMP view entry "view1" with excluded permission for the MIB object ID "1.3.6.1.2.1.1.3."

device(config)# snmp-server view view1 1.3.6.1.2.1.1.3 excluded

The following example creates an SNMP view entry "view2" with included permission for the MIB object ID "1.3.6.1."

device(config)# snmp-server view view2 1.3.6.1 included

The following example removes the SNMP view entry "view1" from the configuration list.

device(config)# no snmp-server view view1 1.3.6.1.2.1.1.3 excluded