snmp-server view

Use this command to create or update a view entry

Use the no from of this command to remove a view entry.

OIDs to be excluded or included need to be specifically mentioned while configuring the SNMP view. Only when the OIDs are included will they be displayed in SNMP-Walk. When an OID is excluded, other OIDs must be explicitly included for the system to function.

Command Syntax

Copy
snmp-server view VIEW-NAME OID-TREE (included | excluded) (vrf (NAME|management)|)
no snmp-server view VIEW-NAME (vrf (NAME|management)|)

Parameters

VIEW-NAME

Name of the snmp view (Maximum 32 alphanumeric characters)

OID-TREE

Object identifier of a subtree to include or exclude from the view; specify a text string consisting of numbers and periods, such as 1.3.6.2.4

included

Include OID-TREE in the SNMP view

excluded

Exclude OID-TREE from the SNMP view

vrf management

Defines the management VRFClosed Virtual Routing and Forwarding instance.

vrf NAME

Specify the user-defined VRF instance name.

Default

Disabled

Command Mode

Configure mode

Applicability

This command was introduced before OcNOS version 1.3. Added VRF NAME parameter in OcNOS version 6.5.3.

Examples

The following example creates a view named myView3 that excludes the snmpCommunityMIB object (1.3.6.1.6.3.18).

Copy
#configure terminal
(config)#snmp-server view myView3 1.3.6.1.6.3.18 excluded vrf management