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

66
community-name: Sets a community name. If you specify the cipher keyword, the community name is a
string of 1 to 73 characters. If you do not specify the cipher keyword, the community name is a string of
1 to 32 characters.
mib-view view-name: Specifies the MIB view available for the community. The view-name argument
represents a MIB view name, 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.
acl acl-number: Specifies a basic ACL to filter NMSs by source IP address. The acl-number argument
represents a basic ACL number in the range of 2000 to 2999. In the specified community, only the NMSs
with the IP addresses permitted in the ACL can access the SNMP agent.
acl ipv6 ipv6-acl-number: Specifies a basic ACL to filter NMSs by source IPv6 address. The
ipv6-acl-number argument represents a basic ACL number in the range of 2000 to 2999. In the specified
community, only the NMSs with the IPv6 addresses permitted in the ACL can access the SNMP agent.
Usage guidelines
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 make sure 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.
Examples
# Create the read-only community readaccess so an NMS can use the protocol SNMPv1 or SNMPv2c
and 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 readaccess
# Create the read and write community writeaccess so only the host at 1.1.1.1 can use the protocol
SNMPv2c and community name writeaccess to read and set the MIB objects in the default view
ViewDefault.
<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
[Sysname] snmp-agent community write writeaccess acl 2001
# Create the read and write community wr-sys-acc so an NMS can use the protocol SNMPv1 or
SNMPv2c, community name wr-sys-acc to read and 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