127
Syntax
snmp-agent
{
inform
|
trap
}
source
interface-type
{
interface-number
|
interface-number
.
subnumber
}
undo
snmp-agent
{
inform
|
trap
}
source
Default
The SNMP agent uses the IP address of the outgoing routed interface as the source IP address of
notifications.
Views
System view
Predefined user roles
network-admin
Parameters
inform
: Specifies informs.
trap
: Specifies traps.
interface-type
{
interface-number
|
interface-number
.
subnumber
}: Specifies a Layer 3 interface by
its type and number. The
interface-number
argument represents the number of the interface. The
subnumber
argument represents the number of the subinterface, in the range of 1 to 4094.
Usage guidelines
The
snmp-agent source
command enables the SNMP agent to use the primary IP address of an
interface or subinterface as the source IP address in all its SNMP informs or traps, regardless of their
outgoing interfaces. An NMS can use this IP address to filter all the informs or traps sent by the
SNMP agent.
Make sure the specified interface has been created and assigned a valid IP address. The
configuration will fail if the interface has not been created and will take effect only after a valid IP
address is assigned to the specified interface.
Examples
# Configure the primary IP address of VLAN-interface 1 as the source address of SNMP traps.
<Sysname> system-view
[Sysname] snmp-agent trap source vlan-interface 1
# Configure the primary IP address of VLAN-interface 1 as the source address of SNMP informs.
<Sysname> system-view
[Sysname] snmp-agent inform source vlan-interface 1
Related commands
•
snmp-agent
target-host
•
snmp-agent
trap
enable
snmp-agent calculate-password
Use
snmp-agent
calculate-password
to calculate a digest for the ciphertext authentication or
privacy key converted from a plaintext key in SNMPv3.
Syntax
In non-FIPS mode:
snmp-agent
calculate-password
plain-password
mode
{
3desmd5
|
3dessha
|
md5
|
sha
}
{
local-engineid
|
specified-engineid
engineid
}