< Home

snmp-agent mib-view

Function

The snmp-agent mib-view command creates or updates the information about a view.

The undo snmp-agent mib-view command deletes the current configurations of all nodes included in the MIB view.

Format

snmp-agent mib-view { excluded | included } view-name oid-tree

undo snmp-agent mib-view view-name [ oid-tree ]

undo snmp-agent mib-view { excluded | included } view-name [ oid-tree ]

Parameters

Parameter Description Value
excluded Excludes the MIB sub-tree. -
included Includes the MIB sub-tree. -
view-name Specifies the name of the view. It is a string of 1 to 32 characters, which are case sensitive and cannot be blank spaces.
NOTE:

If the value contains spaces, it must be enclosed using double quotation marks, for example, "my mib view".

oid-tree

Specifies the OID or name of a MIB node.

The value indicates an OID or object name.

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

The MIB objects that the NMS can access are determined by the objects included in a MIB view. You can run the snmp-agent mib-view to create a MIB view and specify the MIB objects that the NMS can access.

Precautions

For SNMPv2c, the default view name is ViewDefault, and the OID is 1.3.6.1. By default, SNMPv3 can read the objects of 1.3.6.1.2.1. The access to other objects requires manual configuration. For example, if a user executes the object snmp-agent mib-view included mib2view 1.3.6.2 command and then the snmp-agent mib-view included mib2view 1.3.6.2 command, the alarms of node 1.3.6.2 cannot be viewed. However, the alarms of node 1.3.6.1 can be viewed in SNMPv2c.

If both the include and exclude parameters are configured for MIB objects that have an inclusion relationship, whether to include or exclude the lowest MIB object will be determined by the parameter configured for the lowest MIB object. For example, the snmpV2, snmpModules, and snmpUsmMIB objects are from top down in the MIB table. If the exclude parameter is configured for snmpUsmMIB objects and include is configured for snmpV2, snmpUsmMIB objects will still be excluded.

Example

# Create the MIB view mib2view and specify the included objects.

<sysname> system-view
[sysname] snmp-agent mib-view included mib2view 1.3.6.1.2.1

# The three objects snmpV2, snmpModules, and snmpUsmMIB have the top-down inclusion relationship. After the following operation is performed, the snmpUsmMIB object will be excluded.

<sysname> system-view
[sysname] snmp-agent mib-view excluded mib2view snmpUsmMIB
[sysname] snmp-agent mib-view included mib2view snmpV2
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >