10-14
The community name configured with this command is only valid for the SNMP v1 and v2c agent.
A community is composed of NMSs and SNMP agents, and is identified by the community name,
which functions as a password. In a community, when devices communicate with each other, they use
community name for authentication. The NMS and the 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. For security purposes,
you are recommended to configure a community name other than
public
and
private
.
z
The keyword
acl
specifies that only the NMS with a qualified IP address can access the agent.
z
The argument
community
-
name
specifies the community name used by the NMS when it
accesses the agent.
z
The keyword
mib-view
specifies the MIB objects which the NMS can access.
z
The keywords
read
and
write
specify the access type.
Related commands:
snmp-agent mib-view
.
Examples
# Create a community with the name of
readaccess
, allowing read-only access right using this
community name.
<Sysname> system-view
[Sysname] snmp-agent sys-info version v1 v2c
[Sysname] snmp-agent community read readaccess
z
Set the SNMP version on the NMS to SNMPv1 or SNMPv2c
z
Fill in the read-only community name
readaccess
z
Establish a connection, and the NMS can perform read-only operations to the MIB objects in the
ViewDefault view on the device
# Create a community with the name of
writeaccess
, allowing only the NMS with the IP address of
1.1.1.1 to configure the values of the agent MIB objects by using this community name; other NMSs
are not allowed to perform the write operations by using this community name.
<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
z
Set the IP address of the NMS to 1.1.1.1
z
Set the SNMP version on the NMS to SNMPv2c
z
Fill in the write community name
writeaccess
; namely, the NMS can perform read-only
operations to the MIB objects in the ViewDefault view on the device
# Create a community with the name of
wr-sys-acc
. The NMS can perform the read and write
operations to the MIB objects of the system subtree (with the OID of 1.3.6.1.2.1.1).
<Sysname> system-view
[Sysname] snmp-agent sys-info version v1 v2c
[Sysname] snmp-agent mib-view included test system
[Sysname] snmp-agent community write wr-sys-acc mib-view system
z
Set the SNMP version on the NMS to SNMPv1 or SNMPv2c
z
Fill in the write community name
wr-sys-acc
Summary of Contents for E4510-48G
Page 109: ...2 18 Sysname interface bridge aggregation 1 Sysname Bridge Aggregation1 shutdown ...
Page 309: ...6 4 Sysname interface vlan interface 1 Sysname Vlan interface1 ip address dhcp alloc ...
Page 324: ...8 3 Sysname interface vlan interface 1 Sysname Vlan interface1 ip address bootp alloc ...
Page 530: ...2 5 Sysname mvlan 100 subvlan 10 to 15 ...
Page 739: ...8 15 Sysname system view Sysname port security trap addresslearned ...
Page 819: ...13 11 Sysname system view Sysname public key peer key2 import sshkey key pub ...
Page 914: ...5 17 Sysname reset oam ...
Page 1064: ...5 30 Slot 2 Set next configuration file successfully ...
Page 1325: ...21 13 Examples Redirect to member 2 Sysname irf switch to 2 Sysname Slave 2 ...