No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Fat AP and Cloud AP V200R010C00 Command Reference

Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
snmp-agent community

snmp-agent community

Function

The snmp-agent community command configures the SNMPv1 or SNMPv2c read-write community name and specifies the MIB view and ACL.

The undo snmp-agent community command is used to delete the configuration of the community name.

By default, the community name is not configured.

Format

snmp-agent community { read | write } community-name [ mib-view view-name | acl acl-number ] *

undo snmp-agent community community-name

Parameters

Parameter Description Value
read Indicates that the community with a specified name has the read-only rights in the specified view. -
write Indicates that the community with a specified name has the read-write rights in the specified view. -
community-name

Specifies the community name in plain text or in cipher text.

The value is a string of 6 to 32, 88 case-sensitive characters without spaces.
  • When the community name is a string of 6 to 32 characters, the string is processed as plain text by default and will be encrypted.
  • When the community name is a string of 88 characters, the string is processed as cipher text by default, and the system will determine whether the string can be parsed.
NOTE:

If the complexity check of a community name is disabled by using the snmp-agent community complexity-check disable command, the length of community-name is 88 or ranges from 1 to 32.

mib-view view-name
Specifies a MIB view that the community name can access.
  • If no MIB view that the community name can access is specified, the community name can access only the default MIB view, that is, ViewDefault.
  • If a MIB view that the community name can access is specified, the community name can access the specified MIB view.
It is a string of 1 to 32 case-sensitive characters without spaces.
acl acl-number

Specifies the ACL corresponding to the community name.

The value is an integer that ranges from 2000 to 3999.

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

When running the snmp-agent community command, you can select parameters based on the networking requirements.
  • To grant the NMS read-only permission in the specified view, configure read.

  • To grant the NMS read-write permission in the specified view, configure write.

  • To allow specified NMSs using this community name have the rights of ViewDefault, omit mib-view view-name.

  • To allow all NMSs using this community name to manage specified objects on a managed device, omit acl acl-number.

  • To allow specified NMSs using this community name to manage specified objects on a managed device, configure mib-view and acl.

When a device receives an SNMP packet whose community name is blank, the device discards the packet and generates a log indicating the incorrect community name. The ACL matching is performed only when the community name is not blank.

You can run the display snmp-agent community command to view the current community name.

Precautions

  • The community name configured in plain text is saved to the configuration file in cipher text.
  • When the community name is configured in cipher text, starts and ends with valid cipher texts that can be decrypted by the local device, such as %@%@......%@%@, the configured community name is displayed on the device. Do not configure the community name in this mode.

If you specify the parameter mib-view or acl when running the snmp-agent community command, configure the MIB view and ACL rule. If the default MIB view is deleted, the NMS using this community name cannot communicate with managed devices. To continue to use this community name, specify an existing MIB view.

Example

# Set the name of a community to comaccess1 and configure the read-only rights for the community.

<Huawei> system-view
[Huawei] snmp-agent community read comaccess1

# Set the name of a community to comaccess2 and configure the read-write rights for the community.

<Huawei> system-view
[Huawei] snmp-agent community write comaccess2
Translation
Download
Updated: 2019-11-21

Document ID: EDOC1100064352

Views: 208188

Downloads: 122

Average rating:
This Document Applies to these Products
Related Version
Related Documents
Share
Previous Next