Configuring an SNMP trap receiver (CLI)
Syntax:
snmp-server host {< ipv4-addr | ipv6-addr >} < community name>
Configures a destination network management station to receive SNMPv1/v2c traps and (optionally) Event Log messages sent as traps from the switch, using the specified community name and destination IPv4 or IPv6 address. You can specify up to ten trap receivers (network management stations). (The default community name is
public
.)
|
(Optional) Configures the security level of the Event Log messages you want to send as traps to a trap receiver (see the following table).
|
|
(Optional) Configures the switch to send SNMPv2 inform requests when certain events occur. For more information, see Enabling SNMPv2c informs (CLI). |
Security Level |
Action |
---|---|
None (default) |
Sends no Event Log messages. |
All |
Sends all Event Log messages. |
Not-Info |
Sends all Event Log messages that are not for information only. |
Critical |
Sends only Event Log messages for critical error conditions. |
Debug |
Sends only Event Log messages needed to troubleshoot network- and switch-level problems. |
Example:
To configure a trap receiver in a community named "red-team" with an IP address of 10.28.227.130 to receive only "critical" event log messages, you can enter the following command:
switch(config)# snmp-server host 10.28.227.130 red-team critical