To do… Use the command… Remarks
Enter system view system-view —
Enable the SNMP agent snmp-agent
Optional
Disabled by default
You can enable the SNMP
agent with this command or any
command that begins with
snmp-agent.
Configure system information for the
SNMP agent
snmp-agent sys-info { contact
sys-contact | location
sys-location | version { { v1 |
v2c | v3 }* | all } }
Required
By default, the contact
information is Hewlett-Packard
Development Company, L.P, the
location information is null, and
the protocol version is SNMPv1
SNMPv2c SNMPv3.
Configure the local engine ID
snmp-agent local-engineid
engineid
Optional
Company ID and device ID by
default.
Create or update a MIB view
snmp-agent mib-view
{ excluded | included }
view-name oid-tree [ mask
mask-value ]
Optional
The MIB view name is
ViewDefault and OID is 1 by
default.
Configure SNMP NMS access right
Approach 1: Create an SNMP
community
snmp-agent community { read |
write } community-name [ acl
acl-number | mib-view
view-name ]*
Approach 2: Create an SNMP
group, and add a user to the
SNMP group
1. snmp-agent group { v1 |
v2c } group-name
[ read-view read-view ]
[ write-view write-view ]
[ notify-view notify-view ]
[ acl acl-number ]
2. snmp-agent usm-user { v1 |
v2c } user-name group-name
[ acl acl-number ]
Required
Use either approach.
By default, no SNMP group
exists.
In approach 2, the username is
equivalent to the community
name in approach 1, and must
be the same as the community
name configured on the NMS.
Configure the maximum size (in bytes) of
SNMP packets for the SNMP agent
snmp-agent packet max-size
byte-count
Optional
1,500 bytes by default.
NOTE:
Each
view-name oid-tree
pair represents a view record. If you specify the same record with different MIB
subtree masks multiple times, the last configuration takes effect. Except the four subtrees in the default MIB
view, you can create up to 16 unique MIB view records.
85