set snmp interface
12-38 SNMP Configuration
C3(rw)->show snmp interface
loopback 1 192.168.10.1
set snmp interface
Use this command to specify the interface used for the source IP address of the SNMP agent when
generating SNMP traps.
Syntax
set snmp interface {loopback loop-ID | vlan vlan-ID}
Parameters
Defaults
None.
Mode
Switch command, read-write.
Usage
This command allows you to configure the source IP address used by the SNMP agent when
generating SNMP traps. Any of the management interfaces, including VLAN routing interfaces,
can be configured as the source IP address used in packets generated by the SNMP agent.
An interface must have an IP address assigned to it before it can be set by this command.
If no interface is specified, then the IP address of the Host interface will be used.
If a non-loopback interface is configured with this command, application packet egress is
restricted to that interface if the server can be reached from that interface. Otherwise, the packets
are transmitted over the first available route. Packets from the application server are received on
the configured interface.
If a loopback interface is configured, and there are multiple paths to the application server, the
outgoing interface (gateway) is determined based on the best route lookup. Packets from the
application server are then received on the sending interface. If route redundancy is required,
therefore, a loopback interface should be configured.
Example
This example configures an IP address on VLAN interface 100 and then sets that interface as the
SNMP agent source IP address.
C3(rw)->router(Config-if(Vlan 100))#ip address 192.168.10.1 255.255.255.0
C3(rw)->router(Config-if(Vlan 100))#exit
C3(rw)->router(Config)#exit
C3(rw)->router#exit
C3(rw)->router>exit
loopback loop-ID Specifies the loopback interface to be used. The value of loop-ID can
range from 0 to 7.
vlan vlan-ID Specifies the VLAN interface to be used. The value of vlan-ID can range
from 1 to 4093.