snmp-server trap-source

Configures an interface as the source for all traps.
Syntax
snmp-server trap-source { ethernet stack-id/slot/port | loopback number | ve number }
no snmp-server trap-source { ethernet stack-id/slot/port | loopback number | ve number }
Command Default

An SNMP trap generator is not configured.

Parameters
ethernet stack-id/slot/port
Specifies an Ethernet interface address to be used as the source for all traps.
loopback number
Specifies a loopback interface address to be used as the source for all traps.
ve number
Specifies a Virtual Ethernet interface address to be used as the source for all traps.
Modes

Global configuration mode

Usage Guidelines

Regardless of the port that the device uses to send traps to the receiver, the traps always arrive from the same source IP address.

The no form of the command removes the configured interface as the SNMP trap generator.

Examples

The following example configures an Ethernet interface as the SNMP trap generator source.

device(config)# snmp-server trap-source ethernet 1/1/1

The following example configures a loopback interface as the SNMP trap generator source.

device(config)# snmp-server trap-source loopback 10.0.1.1