3com S7906E Guide De Référence

Page de 2327
 
1-14 
Description 
Use the snmp-agent community command to create a new SNMP community. Parameters to be 
configured include access right, community name, ACL, and accessible MIB views. 
Use the undo snmp-agent community command to delete a specified community. 
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
The keyword acl specifies that only the NMS with a qualified IP address can access the agent. 
The argument community-name specifies the community name used by the NMS when it accesses 
the agent. 
The keyword mib-view specifies the MIB objects which the NMS can access. 
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 
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 
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 
Set the IP address of the NMS to 1.1.1.1 
Set the SNMP version on the NMS to SNMPv2c 
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