PurposeCommand or Action
(Optional) Specifies the source interface, which provides the IP
address for the trap message. This command also sets the source IP
address for informs.
snmp-server trap-source interface-id
Example:
Switch(config)# snmp-server trap-source
GigabitEthernet1/0/1
Step 8
(Optional) Establishes the message queue length for each trap host.
The range is 1 to 1000; the default is 10.
snmp-server queue-length length
Example:
Switch(config)# snmp-server queue-length
20
Step 9
(Optional) Defines how often to resend trap messages. The range is
1 to 1000; the default is 30 seconds.
snmp-server trap-timeout seconds
Example:
Switch(config)# snmp-server trap-timeout
60
Step 10
Returns to privileged EXEC mode.end
Example:
Switch(config)# end
Step 11
Verifies your entries.show running-config
Example:
Switch# show running-config
Step 12
(Optional) Saves your entries in the configuration file.copy running-config startup-config
Example:
Switch# copy running-config startup-config
Step 13
What to Do Next
The snmp-server host command specifies which hosts receive the notifications. The snmp-server enable
trap command globally enables the method for the specified notification (for traps and informs). To enable
a host to receive an inform, you must configure an snmp-server host informs command for the host and
globally enable informs by using the snmp-server enable traps command.
To remove the specified host from receiving traps, use the no snmp-server host host global configuration
command. The no snmp-server host command with no keywords disables traps, but not informs, to the host.
To disable informs, use the no snmp-server host informs global configuration command. To disable a specific
trap type, use the no snmp-server enable traps notification-types global configuration command.
Consolidated Platform Configuration Guide, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
463
How to Configure SNMP