113Examples# Configure the IP address of Vlan-interface1 as the source address of SNMP notifications. system-view[Sysname] snmp-agent trap source Vlan-interface1Related commands• display snmp-agent community• snmp-agent target-host• snmp-agent trap enablesnmp-agent usm-user { v1 | v2c }Use the snmp-agent usm-user { v1 | v2c } command to add a user to an SNMPv1 or SNMPv2c group.Use the undo snmp-agent usm-user { v1 | v2c } command to delete a user from an SNMPv1 orSNMPv2c group.Syntaxsnmp-agent usm-user { v1 | v2c } user-name group-name [ acl acl-number ]undo snmp-agent usm-user { v1 | v2c } user-name group-nameDefaultNo SNMP users have been configured.ViewsSystem viewPredefined user rolesnetwork-adminParametersv1: Specifies SNMPv1.v2c: Specifies SNMPv2c.user-name: Specifies an SNMP username, a case-sensitive string of 1 to 32 characters.group-name: Specifies an SNMPv1 or SNMPv2c group name, a case-sensitive string of 1 to 32characters. The group can be one that has been created or not. If the group has not been created, theuser takes effect after you create the group.acl acl-number: Specifies a basic ACL to filter NMSs by source IP address. The acl-number argumentrepresents a basic ACL number in the range of 2000 to 2999. Only the NMSs with the IP addressespermitted in the ACL can use the specified username (community name) to access the SNMP agent.Usage guidelinesWhen you create an SNMPv1 or SNMPv2c user, the system automatically creates a community that hasthe same name as the SNMPv1 or SNMPv2c username. This community has the same access right as theSNMPv1 or SNMPv2c group. To display the SNMPv1 and SNMPv2c communities created in this way,use the display snmp-agent community command.To change the access right of the SNMPv1 or SNMPv2c user, use the snmp-agent community commandor the snmp-agent group { v1 | v2c } command. If the snmp-agent community command is used, theSNMPv1 or SNMPv2c is removed from the SNMP group.