Configuration procedure

To control SNMPv1 or SNMPv2c access, configure ACLs and perform the following tasks:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Configure the SNMP access right.

  • (Method 1.) Create an SNMP community and specify ACLs for the community:

    • In VACM mode:snmp-agent community { read | write } [ simple | cipher ] community-name [ mib-view view-name ] [ acl acl-number | acl ipv6 ipv6-acl-number ] *

    • In RBAC mode:snmp-agent community [ simple | cipher ] community-name user-role role-name [ acl acl-number | acl ipv6 ipv6-acl-number ] *

  • (Method 2.) Create an SNMPv1/v2c group and add a user to the group, specifying ACLs for the group and user:

    1. snmp-agent group { v1 | v2c } group-name [ read-view view-name ] [ write-view view-name ] [ notify-view view-name ] [ acl acl-number | acl ipv6 ipv6-acl-number ] *

    2. snmp-agent usm-user { v1 | v2c } user-name group-name [ acl acl-number | acl ipv6 ipv6-acl-number ] *

For more information about SNMP, see Network Management and Monitoring Configuration Guide.

To control SNMPv3 access, configure ACLs and perform the following tasks:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Create an SNMPv3 group, specifying ACLs for the group.

snmp-agent group v3 group-name [ authentication | privacy ] [ read-view view-name ] [ write-view view-name ] [ notify-view view-name ] [ acl acl-number | acl ipv6 ipv6-acl-number ] *

N/A

3. Create an SNMPv3 user, specifying ACLs for the user.

  • In VACM mode:snmp-agent usm-user v3 user-name group-name [ remote { ip-address | ipv6 ipv6-address } [ vpn-instance vpn-instance-name ] ] [ { cipher | simple } authentication-mode { md5 | sha } auth-password [ privacy-mode { aes128 | 3des | des56 } priv-password ] ] [ acl acl-number | acl ipv6 ipv6-acl-number ] *

  • In RBAC mode:snmp-agent usm-user v3 user-name user-role role-name [ remote { ip-address | ipv6 ipv6-address } [ vpn-instance vpn-instance-name ] ] [ { cipher | simple } authentication-mode { md5 | sha } auth-password [ privacy-mode { aes128 | 3des | des56 } priv-password ] ] [ acl acl-number | acl ipv6 ipv6-acl-number ] *

For more information about SNMP, see Network Management and Monitoring Configuration Guide.