The snmp-agent trap source command sets the source interface from which traps are sent.
The undo snmp-agent trap source command removes the set source interface configuration.
By default, source interface is not set.
Parameter | Description | Value |
---|---|---|
interface-type interface-number | Specifies the type and number of the source interface that sends traps. | - |
Usage Scenario
You can run the snmp-agent trap source command to specify the type and number of the interface on the device from which traps are sent. The system specifies the IP address of this interface as the source IP address of traps. In this way, the trap source can be identified on the NMS.
Precautions
The source interface that sends traps must have an IP address; otherwise, the commands will fail to take effect. To ensure device security, it is recommended that you set the source IP address to the local loopback address.
The source interface in traps on the device must be the same as the source interface specified on the NM station. Otherwise, the NM station cannot receive traps.