< Home

snmp-agent trap source

Function

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.

Format

snmp-agent trap source interface-type interface-number

undo snmp-agent trap source

Parameters

Parameter Description Value
interface-type interface-number Specifies the type and number of the source interface that sends traps. -

Views

System view

Default Level

3: Management level

Usage Guidelines

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.

Example

# Specify the IP address of VLANIF100 as the source address of traps.

<HUAWEI> system-view
[HUAWEI] snmp-agent trap source vlanif 100
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >