H3C s3100 series Command Manual page 737

Hide thumbs Also See for s3100 series:
Table of Contents

Advertisement

mask mask-value: Mask of a MIB subtree, an even number of hexadecimal characters, in the range 2 to
32. An odd number of characters are invalid.
Description
Use snmp-agent mib-view command to create or update the information about a MIB view to limit the
MIB objects the NMS can access.
Use the undo snmp-agent mib-view command to cancel the current setting.
Management Information Base (MIB) is a collection of all the managed objects. MIB view is a sub-set of
MIB. You can bind a community name/username with a MIB view when configuring an agent, thus to
control the MIB objects that NMS can access. You can configure the objects in the MIB view as
excluded or included; excluded indicates that all the nodes on the subtree are excluded in the current
MIB view, and included indicates that the current MIB includes all the nodes on the subtree.
By default, the view name is ViewDefault, which includes all the MIB objects under the ISO MIB subtree
except snmpUsmMIB, snmpVacmMIB and snmpModules.18.
If you specify a mask value in hexadecimal number when creating a MIB view, each bit number of the
mask value corresponds with each sub-OID of the MIB subtree OID, from left to right. In a binary mask
value, 1 indicates exact matching, meaning the OID of the node to be accessed must be the same as
the sub-OID at the corresponding position of the MIB subtree OID; 0 indicates fuzzy matching, meaning
the OID of the node to be accessed is not necessarily the same as the sub-OID at the corresponding
position of the MIB subtree OID.
Note the following when defining a MIB view with a mask:
If the bit number of a mask value is more than the number of sub-OIDs of the MIB subtree OID, the
bit number remains unchanged.
If the bit number of a mask value is less than the number of sub-OIDs of the OID of a MIB subtree,
the bit number is filled by 1(s) in a binary number by default.
If no mask value is specified when you create a MIB view, the OID of the node to be accessed must
be the same as the sub-OID at the corresponding position of the MIB subtree OID. The mask value
is displayed as null when the system reads it.
You need to define the MIB view access right of the community name or group in the configuration of an
SNMP community name or group name. For the configurations, refer to the snmp-agent community
and snmp-agent group commands.
Examples
# Create an SNMP MIB view with the name of icmp, and MIB subtree of 1.3.6.1.2.1.5 to configure MIB
view for the NMS to display or configure icmp.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] snmp-agent mib-view included icmp 1.3.6.1.2.1.5
# Create a read community name with the name of icmpread, and a write community name with the
name of icmpwrite. Specify the MIB view as the configured icmp MIB view, and the NMS using this
community name to access the device can only display or configure icmp related configurations.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname]snmp-agent community read icmpread mib-view icmp
[Sysname]snmp-agent community write icmpwrite mib-view icmp
1-18

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents