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


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


CLI-based Configuration Guide - Network Management and Monitoring

AR100, AR120, AR150, AR160, AR200, AR1200, AR2200, AR3200, and AR3600 V200R009

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).
Configuring Basic SNMPv2c Functions

Configuring Basic SNMPv2c Functions


For the configuration of basic SNMP functions, 1, 4, 5, 6 and 7 are mandatory steps. After the configurations are complete, the NMS and managed device can communicate with each other using SNMP.


  1. Run system-view

    The system view is displayed.

  2. (Optional) Run snmp-agent server-source { -a [ ipv6 ] source-ip-address | -i [ ipv6 ] interface-type interface-number }

    The source IP address used by the SNMP server to send packets is specified.

    By default, the SNMP server uses source IP address to send packets.

    If the default value is not changed, the device selects a source IP address according to routing entries to send packets. When an ACL is configured to filter incoming and outgoing packets on a device, the ACL rules are configured based on interface IP addresses, and packet filtering is affected by interface status. You can select a stable interface as the source interface, for example, the loopback interface. Setting the source or destination address in an ACL rule as a stable interface's address can simplify the configurations of ACL rules and security policies. In addition, packet filtering will not be affected by interface IP addresses and interface status, and device security is improved.

  3. (Optional) Run snmp-agent

    The SNMP agent is enabled.

    By default, the SNMP agent is disabled. Executing the snmp-agent command can enable the SNMP Agent no matter whether a parameter is specified in the command.

  4. Run snmp-agent sys-info version v2c

    The SNMP version is set to SNMPv2c.

    By default, the device supports SNMPv3. If the SNMP version is set to SNMPv2c, the device supports both SNMPv2c and SNMPv3, and can be managed by NMSs running SNMPv2c and SNMPv3.

  5. Run snmp-agent community { read | write } community-name

    The read/write community name is set.

    By default, no read/write community name is configured.

    By default, the complexity check for community names is enabled. The complexity requirements are as follows:
    • The community name contains at least six characters.

    • The community name must be a combination of at least two of the following: uppercase letters, lowercase letters, digits, and special characters (excluding spaces). If the string is enclosed in double quotation marks (" "), the string can contain spaces.

    If the check fails, the community name cannot be configured.

    To change the access right of the NMS, see Restricting Management Rights of the NMS. Ensure that the community name of the NMS is the same as that set on the agent. If the NMS and the agent use different community names, the NMS cannot access the agent.

    The configured community names are stored in cipher text in the configuration file. To save the community name in the configuration file as plain text, run the snmp-agent community simple { read | write } community-name [ mib-view view-name | acl acl-number ]* command.

  6. Run snmp-agent target-host trap-paramsname paramsname v2c securityname securityname [ binding-private-value ] [ private-netmanager ]

    Parameters for sending traps are set.

  7. Run snmp-agent target-host trap-hostname hostname address { ipv4-addr [ udp-port udp-portid ] [ public-net | vpn-instance vpn-instance-name ] | ipv6 ipv6-addr [ udp-port udp-portid ] } trap-paramsname paramsname [ notify-filter-profile profile-name ]

    A host is specified to receive traps and error codes.


    Before configuring a device to send traps, confirm that the information center has been enabled. To enable the information center, run the info-center enable command.

    Note the following points when running the commands:
    • The default destination UDP port number is 162. To ensure secure communication between the NMS and managed devices, change the UDP port number to a non-well-known port number by using the udp-port command.

    • If traps sent from the managed device to the NMS need to be transmitted over a public network, the public-net parameter needs to be configured. If traps sent from the managed device to the NMS need to be transmitted over a private network, the vpn-instance vpn-instance-name parameter needs to be configured to specify a VPN that will take over the transmission task.

  8. (Optional) Run snmp-agent sys-info { contact contact | location location }

    The equipment administrators contact information or location is configured.

    By default, the vendor's contact information is "R&D Shenzhen, Huawei Technologies Co.,Ltd." The default location is "Shenzhen China."

    This step is required for the NMS administrator to view contact information and locations of the equipment administrator when the NMS manages many devices. This helps the NMS administrator to contact the equipment administrators for fault location and rectification.

    To configure both the equipment administrators contact information and location, run the snmp-agent sys-info command twice.

Updated: 2019-05-17

Document ID: EDOC1000174072

Views: 121981

Downloads: 372

Average rating:
This Document Applies to these Products

Related Version

Related Documents

Previous Next