94Examples# Set the maximum number of traps that can be stored in the trap sending queue to 200. system-view[Sysname] snmp-agent trap queue-size 200snmp-agent trap sourceSyntaxsnmp-agent trap source interface-type interface-numberundo snmp-agent trap sourceViewSystem viewDefault level3: Manage levelParametersinterface-type interface-number: Specifies the interface type and interface number.DescriptionUse the snmp-agent trap source command to specify the source IP address contained in the traps.Use the undo snmp-agent trap source command to restore the default.By default, SNMP chooses the IP address of an interface to be the source IP address of the traps.Upon the execution of this command, the system uses the primary IP address of the specified interface asthe source IP address of the traps, and the NMS uses this IP address to uniquely identify the agent. Evenif the agent sends out traps through different interfaces, the NMS uses this IP address to filter all traps sentfrom the agent.Before you can configure the IP address of a particular interface as the source IP address of the trap,make sure that the interface already exists and that it has a legal IP address. Otherwise, if the configuredinterface does not exist, the configuration fails. If the specified IP address is illegal, the configurationbecomes invalid. When a legal IP address is configured for the interface, the configuration automaticallybecomes valid.Related commands: snmp-agent target-host and snmp-agent trap enable.Examples# Configure the IP address for the port Vlan-interface1 as the source address for traps. system-view[Sysname] snmp-agent trap source Vlan-interface1snmp-agent usm-user { v1 | v2c }Syntaxsnmp-agent usm-user { v1 | v2c } user-name group-name [ acl acl-number ]undo snmp-agent usm-user { v1 | v2c } user-name group-nameViewSystem view