R3204P16-HP Load Balancing Module System Maintenance Command Reference-6PW101

54
Parameters
read: Assigns the specified community the read only access to MIB objects. A read-only community can
only inquire MIB information.
write: Assigns the specified community the read and write access to MIB objects. A read and write
community can configure MIB information.
community-name: Sets a community name, which is a string of 1 to 32 characters.
acl acl-number: Applies a basic ACL to filter NMSs by source IP address. The acl-number argument
represents a basic ACL number in the range of 2,000 to 2,999.
mib-view view-name: Specifies the MIB view available for the community. The view-name argument
represents a MIB view name, which is a string of 1 to 32 characters. A MIB view represents a set of
accessible MIB objects. If no MIB view is specified, the specified community can access the MIB objects
in the default MIB view ViewDefault. To create a MIB view, use the snmp-agent mib-view command.
Description
Use the snmp-agent community command to configure an SNMP community.
Use the undo snmp-agent community command to delete a specified community.
This command is for SNMPv1 and SNMPv2c.
A community comprises NMSs and SNMP agents, and is identified by a community name. When
devices in a community communicate with each other, they use the community name for authentication.
An NMS and an SNMP agent can access each other only when they are configured with the same
community name. Typically, public is used as the read-only community name, and private is used as the
read and write community name. To improve security, assign your SNMP communities a name other than
public and private.
To ensure that the MIB objects are accessible only to a specific NMS, use a basic ACL to identify the
source IP address of the NMS. To set the range of the MIB objects available for the community, use a MIB
view.
Related commands: snmp-agent mib-view.
Examples
# Create a read-only community and name it readaccess.
<Sysname> system-view
[Sysname] snmp-agent sys-info version v1 v2c
[Sysname] snmp-agent community read readaccess
Set the SNMP version on the NMS to SNMPv1 or SNMPv2c
Fill in the read-only community name readaccess
Establish a connection, and the NMS can perform read-only operations to the MIB objects in the
default MIB view (ViewDefault) on the device
# Create a read and write community and name it writeaccess. Enable only the NMS with the IP address
of 1.1.1.1 in this community to update the values of the agent MIB objects.
<Sysname> system-view
[Sysname] acl number 2001
[Sysname-acl-basic-2001] rule permit source 1.1.1.1 0.0.0.0
[Sysname-acl-basic-2001] rule deny source any
[Sysname-acl-basic-2001] quit
[Sysname] snmp-agent sys-info version v2c