Configuring SNMP
Step 3
The following example shows how to configure filtering of SNMP notifications based on a VRF:
switch# configuration terminal
switch(config)# snmp-server host 192.0.2.1 filter-vrf Red
switch(config)# copy running-config startup-config
Configuring a Source Interface for Sending Out All SNMP Notifications
You can configure SNMP to use the IP address of an interface as the source IP address for notifications. When
a notification is generated, its source IP address is based on the IP address of this configured interface.
Configuring the source interface IP address for outgoing trap packets does not guarantee that the device
Note
will use the same interface to send the trap. The source interface IP address defines the source address
inside of the SNMP trap and the connection is opened with the address of the egress interface as source.
Complete the following steps to configure a source interface for sending out all SNMP notifications:
Procedure
Step 1
Step 2
This example shows how to configure a source interface to sending out SNMPv2c traps:
switch# configure terminal
switch(config) # snmp-server source-interface traps ethernet 2/1
OL-31641-01
Command or Action
switch(config)# copy
running-config startup-config
Command or Action
configure terminal
Example:
switch# configure terminal
switch(config)#
switch(config) # snmp-server source-interface
{traps | informs} if-type if-number
Example:
switch(config) # snmp-server
source-interface traps ethernet 2/1
Cisco Nexus 5600 Series NX-OS System Management Configuration Guide, Release 7.x
Configuring a Source Interface for Sending Out All SNMP Notifications
Purpose
This command adds an entry into thc ExtSnmpTargetVrfTable
of the CISCO-SNMP-TARGET-EXT-MB.
(Optional)
Saves the change persistently through reboots and restarts by
copying the running configuration to the startup configuration.
Purpose
Enters global configuration mode.
Configures a source interface for sending
out SNMPv2c traps or informs. Use ? to
determine the supported interface types.
159