HPE FlexNetwork 5130 HI Series Network Management And Monitoring Command Reference page 182

Hide thumbs Also See for FlexNetwork 5130 HI Series:
Table of Contents

Advertisement

If you specify an ACL and the ACL has rules, only NMSs permitted by the ACL can access the
SNMP agent.
For more information about ACL, see ACL and QoS Configuration Guide.
You can also create an SNMP community by using the snmp-agent usm-user { v1 | v2c } and
snmp-agent group { v1 | v2c } commands. These two commands create an SNMPv1 or SNMPv2c
user and the group to which the user is assigned. The system automatically creates an SNMP
community by using the SNMPv1 or SNMPv2c username.
Examples
# Create the read-only community with the plaintext form name readaccess so an SNMPv1 or
SNMPv2c NMS can use the community name readaccess to read the MIB objects in the default
view ViewDefault.
<Sysname> system-view
[Sysname] snmp-agent sys-info version v1 v2c
[Sysname] snmp-agent community read simple readaccess
# Create the read and write community with the plaintext form name writeaccess so only the
SNMPv2c NMS at 1.1.1.1 can use the community name writeaccess to read or set the MIB objects
in the default view ViewDefault.
<Sysname> system-view
[Sysname] acl basic 2001
[Sysname-acl-ipv4-basic-2001] rule permit source 1.1.1.1 0.0.0.0
[Sysname-acl-ipv4-basic-2001] rule deny source any
[Sysname-acl-ipv4-basic-2001] quit
[Sysname] snmp-agent sys-info version v2c
[Sysname] snmp-agent community write simple writeaccess acl 2001
# Create the read and write community with the plaintext form name writeaccess so only the
SNMPv2c NMS at 1.1.1.2 can use the community name writeaccess to read or set the MIB objects
in the default view ViewDefault.
<Sysname> system-view
[Sysname] acl basic name testacl
[Sysname-acl-ipv4-basic-testacl] rule permit source 1.1.1.2 0.0.0.0
[Sysname-acl-ipv4-basic-testacl] rule deny source any
[Sysname-acl-ipv4-basic-testacl] quit
[Sysname] snmp-agent sys-info version v2c
[Sysname] snmp-agent community write simple writeaccess acl name testacl
# Create the read and write community with the plaintext form name wr-sys-acc so an SNMPv1 or
SNMPv2c NMS can use the community name wr-sys-acc to read or set the MIB objects in the
system subtree (OID 1.3.6.1.2.1.1).
<Sysname> system-view
[Sysname] snmp-agent sys-info version v1 v2c
[Sysname] undo snmp-agent mib-view ViewDefault
[Sysname] snmp-agent mib-view included test system
[Sysname] snmp-agent community write simple wr-sys-acc mib-view test
Related commands
display snmp-agent community
snmp-agent mib-view
173

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents