snmp-server response-source

Syntax

 snmp-server response-source [dst-ip-of-request <ipv4–addr|ipv6–addr> loopback <0–7>]
no snmp-server response-source [dst-ip-of-request <ipv4–addr|ipv6–addr> loopback <0–7>]

Description

Specifies the source IP address of the SNMP response PDU. The default SNMP response PDU uses the IP address of the active interface from which the SNMP response was sent as the source IP address. Defaults to Interface IP address. The no form of the command resets the switch to the default behavior (compliant with rfc-1517.)

Parameters

dst-ip-of-request

Destination IP address of the SNMP request PDU that is used as the source IP address in an SNMP response PDU.

ipv4–addr|ipv6–addr

User-defined interface IP address that is used as the source IP address in an SNMP response PDU. Both IPv4 and IPv6 addresses are supported.

loopback 0-7

IP address configured for the specified loopback interface that is used as the source IP address in an SNMP response PDU. If multiple loopback IP addresses are configured, the lowest alphanumeric address is used.

Destination interface IP as source IP

To use the IP address of the destination interface on which an SNMP request was received as the source IP address in the IP header of SNMP traps and replies, enter the following command:

switch# snmp-server response-source dst-ip-of-request