Cisco Catalyst 2960-X Catalyst 2960-X Switch Command Reference
Below you will find brief information for Catalyst 2960-X Switch Catalyst 2960-X. The Catalyst 2960-X Switch Catalyst 2960-X provides network management commands for monitoring and controlling network traffic within the switch. It allows you to set up SPAN and RSPAN sessions, to filter traffic based on VLANs or IP access lists, and to enable SNMP traps for various events. You can use these commands to troubleshoot network issues, analyze traffic patterns, and enhance network security.
advertisement
Assistant Bot
Need help? Our chatbot has already read the manual and is ready to assist you. Feel free to ask any questions about the device, but providing details will make the conversation more productive.
Network Management Commands
•
•
monitor session destination, page 5
•
monitor session filter, page 9
•
monitor session source, page 11
•
•
snmp-server enable traps, page 16
•
snmp-server enable traps bridge, page 19
•
snmp-server enable traps call-home, page 20
•
snmp-server enable traps cpu, page 21
•
snmp-server enable traps dot1x, page 22
•
snmp-server enable traps energywise, page 24
•
snmp-server enable traps envmon, page 25
•
snmp-server enable traps errdisable, page 26
•
snmp-server enable traps flash, page 27
•
snmp-server enable traps license, page 28
•
snmp-server enable traps mac-notification, page 29
•
snmp-server enable traps port-security, page 30
•
snmp-server enable traps power-ethernet, page 31
•
snmp-server enable traps snmp, page 32
•
snmp-server enable traps stackwise, page 33
•
snmp-server enable traps storm-control, page 35
•
snmp-server enable traps stpx, page 36
•
snmp-server enable traps transceiver, page 37
•
snmp-server enable traps vstack, page 38
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
1
•
•
Network Management Commands
2
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
Network Management Commands monitor session
monitor session
To create a new Ethernet Switched Port Analyzer (SPAN) or a Remote Switched Port Analyzer (RSPAN) session configuration for analyzing traffic between ports or add to an existing session configuration, use the
monitor session global configuration command. To clear SPAN or RSPAN sessions, use the no form of this command.
monitor session session-number {destination | filter | source}
no monitor session {session-number [destination | filter | source] | all | local | range session-range | remote}
Syntax Description
session-number
all local
range session-range
remote
The session number identified with the SPAN or RSPAN session. The range is 1 to 68. However if this switch is stacked with Catalyst 2960-S switches, the range is 1 to 66.
Clears all monitor sessions.
Clears all local monitor sessions.
Clears monitor sessions in the specified range.
Clears all remote monitor sessions.
Command Default
No monitor sessions are configured.
Command Modes
Global configuration
Command History
Release
Cisco IOS 15.0(2)EX
Modification
This command was introduced.
Usage Guidelines
You can set a combined maximum of four local SPAN sessions and RSPAN source sessions. You can have a total of 68 SPAN and RSPAN sessions on a switch or switch stack. However if this switch is stacked with
Catalyst 2960-S switches, you are limited to a combined maximum of two local SPAN sessions and RSPAN source sessions, and the range is 1 to 66.
A private-VLAN port cannot be configured as a SPAN destination port.
You can verify your settings by entering the show monitor privileged EXEC command. You can display
SPAN, RSPAN, FSPAN, and FRSPAN configuration on the switch by entering the show running-config privileged EXEC command. SPAN information appears near the end of the output.
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
3
Network Management Commands monitor session
Examples
This example shows how to create a local SPAN session 1 to monitor traffic on Po13 (an EtherChannel port) and limit SPAN traffic in the session only to VLAN 1281. Egress traffic replicates the source; ingress forwarding is not enabled.
Switch(config)#
monitor session 1 source interface Po13
Switch(config)#
monitor session 1 filter vlan 1281
Switch(config)#
monitor session 1 destination interface GigabitEthernet2/0/36 encapsulation replicate
Switch(config)#
monitor session 1 destination interface GigabitEthernet3/0/36 encapsulation replicate
The following is the output of a show monitor session all command after completing these setup instructions:
Switch#
show monitor session all
Session 1
---------
Type
Source Ports
Both
Destination Ports
Encapsulation
Ingress
Filter VLANs
...
: Local Session
:
: Po13
: Gi2/0/36,Gi3/0/36
: Replicate
: Disabled
: 1281
4
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
Network Management Commands monitor session destination
monitor session destination
To start a new Switched Port Analyzer (SPAN) session or Remote SPAN (RSPAN) destination session, to enable ingress traffic on the destination port for a network security device (such as a Cisco IDS Sensor
Appliance), and to add or delete interfaces or VLANs to or from an existing SPAN or RSPAN session, use the monitor session destination global configuration command. To remove the SPAN or RSPAN session or to remove destination interfaces from the SPAN or RSPAN session, use the no form of this command.
monitor session session-number destination {interface interface-id [, | -] [encapsulation {replicate | dot1q}
] {ingress [dot1q | untagged] } | {remote} vlan vlan-id
no monitor session session-number destination {interface interface-id [, | -] [encapsulation {replicate |
dot1q} ] {ingress [dot1q | untagged] } | {remote} vlan vlan-id
Syntax Description
session-number
-
,
interface interface-id
encapsulation replicate encapsulation dot1q
The session number identified with the SPAN or RSPAN session. The range is 1 to 68. However if this switch is stacked with Catalyst 2960-S switches, the range is 1 to 66.
Specifies the destination or source interface for a SPAN or
RSPAN session. Valid interfaces are physical ports (including type, stack member, module, and port number). For source interface, port channel is also a valid interface type, and the valid range is 1 to 128.
(Optional) Specifies a series of interfaces or VLANs, or separates a range of interfaces or VLANs from a previous range. Enter a space before and after the comma.
(Optional) Specifies a range of interfaces or VLANs. Enter a space before and after the hyphen.
(Optional) Specifies that the destination interface replicates the source interface encapsulation method. If not selected, the default is to send packets in native form (untagged).
These keywords are valid only for local SPAN. For RSPAN, the RSPAN VLAN ID overwrites the original VLAN ID; therefore, packets are always sent untagged. The
encapsulation options are ignored with the no form of the command.
(Optional) Specifies that the destination interface accepts the source interface incoming packets with IEEE 802.1Q
encapsulation.
These keywords are valid only for local SPAN. For RSPAN, the RSPAN VLAN ID overwrites the original VLAN ID; therefore, packets are always sent untagged. The
encapsulation options are ignored with the no form of the command.
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
5
Network Management Commands monitor session destination ingress dot1q untagged isl remote
vlan vlan-id
Enables ingress traffic forwarding.
(Optional) Accepts incoming packets with IEEE 802.1Q
encapsulation with the specified VLAN as the default VLAN.
(Optional) Accepts incoming packets with untagged encapsulation with the specified VLAN as the default VLAN.
Specifies ingress forwarding using ISL encapsulation.
Specifies the remote VLAN for an RSPAN source or destination session. The range is 2 to 1001 and 1006 to 4094.
The RSPAN VLAN cannot be VLAN 1 (the default VLAN) or VLAN IDs 1002 to 1005 (reserved for Token Ring and
FDDI VLANs).
Sets the default VLAN for ingress traffic when used with only the ingress keyword.
Command Default
No monitor sessions are configured.
If encapsulation replicate is not specified on a local SPAN destination port, packets are sent in native form with no encapsulation tag.
Ingress forwarding is disabled on destination ports.
You can specify all, local, range session-range, or remote with the no monitor session command to clear all SPAN and RSPAN, all local SPAN, a range, or all RSPAN sessions.
Command Modes
Global configuration
Command History
Release
Cisco IOS 15.0(2)EX
Modification
This command was introduced.
Usage Guidelines
You can set a combined maximum of four local SPAN sessions and RSPAN source sessions. You can have a total of 68 SPAN and RSPAN sessions on a switch or switch stack. However if this switch is stacked with
Catalyst 2960-S switches, you are limited to a combined maximum of two local SPAN sessions and RSPAN source sessions, and the range is 1 to 66.
A SPAN or RSPAN destination must be a physical port.
You can have a maximum of 64 destination ports on a switch or a switch stack.
Each session can include multiple ingress or egress source ports or VLANs, but you cannot combine source ports and source VLANs in a single session. Each session can include multiple destination ports.
6
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
Network Management Commands
Examples monitor session destination
When you use VLAN-based SPAN (VSPAN) to analyze network traffic in a VLAN or set of VLANs, all active ports in the source VLANs become source ports for the SPAN or RSPAN session. Trunk ports are included as source ports for VSPAN, and only packets with the monitored VLAN ID are sent to the destination port.
You can monitor traffic on a single port or VLAN or on a series or range of ports or VLANs. You select a series or range of interfaces or VLANs by using the [, | -] options.
If you specify a series of VLANs or interfaces, you must enter a space before and after the comma. If you specify a range of VLANs or interfaces, you must enter a space before and after the hyphen (-).
EtherChannel ports cannot be configured as SPAN or RSPAN destination ports. A physical port that is a member of an EtherChannel group can be used as a destination port, but it cannot participate in the EtherChannel group while it is as a SPAN destination.
A private-VLAN port cannot be configured as a SPAN destination port.
A port used as a destination port cannot be a SPAN or RSPAN source, nor can a port be a destination port for more than one session at a time.
You can enable IEEE 802.1x authentication on a port that is a SPAN or RSPAN destination port; however,
IEEE 802.1x authentication is disabled until the port is removed as a SPAN destination. If IEEE 802.1x
authentication is not available on the port, the switch returns an error message. You can enable IEEE 802.1x
authentication on a SPAN or RSPAN source port.
If ingress traffic forwarding is enabled for a network security device, the destination port forwards traffic at
Layer 2.
Destination ports can be configured to function in these ways:
• When you enter monitor session session_number destination interface interface-id with no other keywords, egress encapsulation is untagged, and ingress forwarding is not enabled.
• When you enter monitor session session_number destination interface interface-id ingress, egress encapsulation is untagged; ingress encapsulation depends on the keywords that follow—dot1q or
untagged.
• When you enter monitor session session_number destination interface interface-id encapsulation
replicate with no other keywords, egress encapsulation replicates the source interface encapsulation; ingress forwarding is not enabled. (This applies to local SPAN only; RSPAN does not support encapsulation replication.)
• When you enter monitor session session_number destination interface interface-id encapsulation
replicate ingress, egress encapsulation replicates the source interface encapsulation; ingress encapsulation depends on the keywords that follow—dot1q or untagged. (This applies to local SPAN only; RSPAN does not support encapsulation replication.)
You can verify your settings by entering the show monitor privileged EXEC command. You can display
SPAN, RSPAN, FSPAN, and FRSPAN configuration on the switch by entering the show running-config privileged EXEC command. SPAN information appears near the end of the output.
This example shows how to create a local SPAN session 1 to monitor both sent and received traffic on source port 1 on stack member 1 to destination port 2 on stack member 2:
Switch(config)#
monitor session 1 source interface gigabitethernet1/0/1 both
Switch(config)#
monitor session 1 destination interface gigabitethernet1/0/2
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
7
Network Management Commands monitor session destination
This example shows how to delete a destination port from an existing local SPAN session:
Switch(config)#
no monitor session 2 destination interface gigabitethernet1/0/2
This example shows how to configure RSPAN source session 1 to monitor a source interface and to configure the destination RSPAN VLAN 900:
Switch(config)#
monitor session 1 source interface gigabitethernet1/0/1
Switch(config)#
monitor session 1 destination remote vlan 900
Switch(config)#
end
This example shows how to configure an RSPAN destination session 10 in the switch receiving the monitored traffic:
Switch(config)#
monitor session 10 source remote vlan 900
Switch(config)#
monitor session 10 destination interface gigabitethernet1/0/2
This example shows how to configure the destination port for ingress traffic on VLAN 5 by using a security device that supports IEEE 802.1Q encapsulation. Egress traffic replicates the source; ingress traffic uses IEEE
802.1Q encapsulation.
Switch(config)#
monitor session 2 destination interface gigabitethernet1/0/2 encapsulation dot1q ingress dot1q vlan 5
This example shows how to configure the destination port for ingress traffic on VLAN 5 by using a security device that does not support encapsulation. Egress traffic and ingress traffic are untagged.
Switch(config)#
monitor session 2 destination interface gigabitethernet1/0/2 ingress untagged vlan 5
8
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
Network Management Commands monitor session filter
monitor session filter
To start a new flow-based SPAN (FSPAN) session or flow-based RSPAN (FRSPAN) source or destination session, or to limit (filter) SPAN source traffic to specific VLANs, use the monitor session filter global configuration command. To remove filters from the SPAN or RSPAN session, use the no form of this command.
monitor session session-number filter {vlan vlan-id [, | -] }
no monitor session session-number filter {vlan vlan-id [, | -] }
Syntax Description
session-number
-
,
vlan vlan-id
The session number identified with the SPAN or RSPAN session.
The range is 1 to 68. However if this switch is stacked with Catalyst
2960-S switches, the range is 1 to 66.
Specifies a list of VLANs as filters on trunk source ports to limit
SPAN source traffic to specific VLANs. The vlan-id range is 1 to
4094.
(Optional) Specifies a series of VLANs, or separates a range of
VLANs from a previous range. Enter a space before and after the comma.
(Optional) Specifies a range of VLANs. Enter a space before and after the hyphen.
Command Default
No monitor sessions are configured.
Command Modes
Global configuration
Command History
Release
Cisco IOS 15.0(2)EX
Modification
This command was introduced.
Usage Guidelines
You can set a combined maximum of four local SPAN sessions and RSPAN source sessions. You can have a total of 68 SPAN and RSPAN sessions on a switch or switch stack. However if this switch is stacked with
Catalyst 2960-S switches, you are limited to a combined maximum of two local SPAN sessions and RSPAN source sessions, and the range is 1 to 66.
You can monitor traffic on a single VLAN or on a series or range of ports or VLANs. You select a series or range of VLANs by using the [, | -] options.
If you specify a series of VLANs, you must enter a space before and after the comma. If you specify a range of VLANs, you must enter a space before and after the hyphen (-).
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
9
Network Management Commands monitor session filter
Examples
VLAN filtering refers to analyzing network traffic on a selected set of VLANs on trunk source ports. By default, all VLANs are monitored on trunk source ports. You can use the monitor session session_number
filter vlan vlan-id command to limit SPAN traffic on trunk source ports to only the specified VLANs.
VLAN monitoring and VLAN filtering are mutually exclusive. If a VLAN is a source, VLAN filtering cannot be enabled. If VLAN filtering is configured, a VLAN cannot become a source.
You can verify your settings by entering the show monitor privileged EXEC command. You can display
SPAN, RSPAN, FSPAN, and FRSPAN configuration on the switch by entering the show running-config privileged EXEC command. SPAN information appears near the end of the output.
This example shows how to limit SPAN traffic in an existing session only to specific VLANs:
Switch(config)#
monitor session 1 filter vlan 100 - 110
This example shows how to create a local SPAN session 1 to monitor both sent and received traffic on source port 1 on stack member 1 to destination port 2 on stack member 2 and to filter IPv4 traffic using access list number 122 in an FSPAN session:
Switch(config)#
monitor session 1 source interface gigabitethernet1/0/1 both
Switch(config)#
monitor session 1 destination interface gigabitethernet1/0/2
Switch(config)#
monitor session 1 filter ip access-group 122
10
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
Network Management Commands monitor session source
monitor session source
To start a new Switched Port Analyzer (SPAN) session or Remote SPAN (RSPAN) source session, or to add or delete interfaces or VLANs to or from an existing SPAN or RSPAN session, use the monitor session
source global configuration command. To remove the SPAN or RSPAN session or to remove source interfaces from the SPAN or RSPAN session, use the no form of this command.
monitor session session_number source {interface interface-id [, | -] [both | rx | tx] | [remote] vlan vlan-id
[, | -] [both | rx | tx]}
no monitor session session_number source {interface interface-id [, | -] [both | rx | tx] | [remote] vlan
vlan-id [, | -] [both | rx | tx]}
Syntax Description
session_number
-
,
interface interface-id
both | rx | tx
remote
vlan vlan-id
The session number identified with the SPAN or RSPAN session. The range is 1 to 68. However if this switch is stacked with Catalyst 2960-S switches, the range is 1 to 66.
Specifies the source interface for a SPAN or RSPAN session. Valid interfaces are physical ports (including type, stack member, module, and port number). For source interface, port channel is also a valid interface type, and the valid range is 1 to 48.
(Optional) Specifies a series of interfaces or VLANs, or separates a range of interfaces or VLANs from a previous range. Enter a space before and after the comma.
(Optional) Specifies a range of interfaces or VLANs. Enter a space before and after the hyphen.
(Optional) Specifies the traffic direction to monitor. If you do not specify a traffic direction, the source interface sends both transmitted and received traffic.
(Optional) Specifies the remote VLAN for an RSPAN source or destination session. The range is 2 to 1001 and 1006 to 4094.
The RSPAN VLAN cannot be VLAN 1 (the default VLAN) or VLAN IDs
1002 to 1005 (reserved for Token Ring and FDDI VLANs).
When used with only the ingress keyword, sets default VLAN for ingress traffic.
Command Default
No monitor sessions are configured.
On a source interface, the default is to monitor both received and transmitted traffic.
On a trunk interface used as a source port, all VLANs are monitored.
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
11
Network Management Commands monitor session source
Command Modes
Global configuration
Command History
Release Modification
Cisco IOS 15.0(2)EX This command was introduced.
Usage Guidelines
Traffic that enters or leaves source ports or source VLANs can be monitored by using SPAN or RSPAN.
Traffic routed to source ports or source VLANs cannot be monitored.
You can set a combined maximum of four local SPAN sessions and RSPAN source sessions. You can have a total of 68 SPAN and RSPAN sessions on a switch or switch stack. However if this switch is stacked with
Catalyst 2960-S switches, you are limited to a combined maximum of two local SPAN sessions and RSPAN source sessions, and the range is 1 to 66.
A source can be a physical port, a port channel, or a VLAN.
Each session can include multiple ingress or egress source ports or VLANs, but you cannot combine source ports and source VLANs in a single session. Each session can include multiple destination ports.
When you use VLAN-based SPAN (VSPAN) to analyze network traffic in a VLAN or set of VLANs, all active ports in the source VLANs become source ports for the SPAN or RSPAN session. Trunk ports are included as source ports for VSPAN, and only packets with the monitored VLAN ID are sent to the destination port.
You can monitor traffic on a single port or VLAN or on a series or range of ports or VLANs. You select a series or range of interfaces or VLANs by using the [, | -] options.
If you specify a series of VLANs or interfaces, you must enter a space before and after the comma. If you specify a range of VLANs or interfaces, you must enter a space before and after the hyphen (-).
You can monitor individual ports while they participate in an EtherChannel, or you can monitor the entire
EtherChannel bundle by specifying the port-channel number as the RSPAN source interface.
A port used as a destination port cannot be a SPAN or RSPAN source, nor can a port be a destination port for more than one session at a time.
You can enable IEEE 802.1x authentication on a SPAN or RSPAN source port.
You can verify your settings by entering the show monitor privileged EXEC command. You can display
SPAN, RSPAN, FSPAN, and FRSPAN configuration on the switch by entering the show running-config privileged EXEC command. SPAN information appears near the end of the output.
Examples
This example shows how to create a local SPAN session 1 to monitor both sent and received traffic on source port 1 on stack member 1 to destination port 2 on stack member 2:
Switch(config)#
monitor session 1 source interface gigabitethernet1/0/1 both
Switch(config)#
monitor session 1 destination interface gigabitethernet1/0/2
This example shows how to configure RSPAN source session 1 to monitor multiple source interfaces and to configure the destination RSPAN VLAN 900.
Switch(config)#
monitor session 1 source interface gigabitethernet1/0/1
12
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
Network Management Commands
Switch(config)#
monitor session 1 source interface port-channel 2 tx
Switch(config)#
monitor session 1 destination remote vlan 900
Switch(config)#
end monitor session source
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
13
Network Management Commands show monitor
show monitor
To display information about all Switched Port Analyzer (SPAN) and Remote SPAN (RSPAN) sessions, use the show monitor command in EXEC mode.
show monitor [session {session_number | all | local | range list | remote} [detail]]
Syntax Description session
session_number
all local
range list
remote detail
(Optional) Displays information about specified SPAN sessions.
The session number identified with the SPAN or RSPAN session. The range is 1 to 68. However if this switch is stacked with Catalyst 2960-S switches, you are limited to a combined maximum of two local SPAN sessions and RSPAN source sessions, and the range is 1 to 66.
(Optional) Displays all SPAN sessions.
(Optional) Displays only local SPAN sessions.
(Optional) Displays a range of SPAN sessions, where list is the range of valid sessions. The range is either a single session or a range of sessions described by two numbers, the lower one first, separated by a hyphen. Do not enter any spaces between comma-separated parameters or in hyphen-specified ranges.
Note
This keyword is available only in privileged EXEC mode.
(Optional) Displays only remote SPAN sessions.
(Optional) Displays detailed information about the specified sessions.
Command Modes
User EXEC
Privileged EXEC
Command History
Release
Cisco IOS 15.0(2)EX
Modification
This command was introduced.
Usage Guidelines
The output is the same for the show monitor command and the show monitor session all command.
14
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
Network Management Commands
Examples show monitor
Maximum number of SPAN source sessions: 4 (applies to source and local sessions) However if this switch is stacked with Catalyst 2960-S switches, you are limited to a combined maximum of two local SPAN sessions and RSPAN source sessions.
This is an example of output for the show monitor user EXEC command:
Switch#
show monitor
Session 1
---------
Type : Local Session
Source Ports :
RX Only : Gi4/0/1
Both : Gi4/0/2-3,Gi4/0/5-6
Destination Ports : Gi4/0/20
Encapsulation : Replicate
Ingress : Disabled
Session 2
---------
Type : Remote Source Session
Source VLANs :
TX Only : 10
Both : 1-9
Dest RSPAN VLAN : 105
This is an example of output for the show monitor user EXEC command for local SPAN source session 1:
Switch#
show monitor session 1
Session 1
---------
Type : Local Session
Source Ports :
RX Only : Gi4/0/1
Both : Gi4/0/2-3,Gi4/0/5-6
Destination Ports : Gi4/0/20
Encapsulation : Replicate
Ingress : Disabled
This is an example of output for the show monitor session all user EXEC command when ingress traffic forwarding is enabled:
Switch#
show monitor session all
Session 1
---------
Type : Local Session
Source Ports :
Both : Gi4/0/2
Destination Ports : Gi4/0/3
Encapsulation : Native
Ingress : Enabled, default VLAN = 5
Ingress encap : DOT1Q
Session 2
---------
Type : Local Session
Source Ports :
Both : Gi4/0/8
Destination Ports : Gi4/012
Encapsulation : Replicate
Ingress : Enabled, default VLAN = 4
Ingress encap : Untagged
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
15
Network Management Commands snmp-server enable traps
snmp-server enable traps
To enable the switch to send Simple Network Management Protocol (SNMP) notifications for various traps or inform requests to the network management system (NMS), use the snmp-server enable traps command in global configuration mode. Use the no form of this command to return to the default setting.
snmp-server enable traps [auth-framework [sec-violation] | bridge | call-home | cluster | config |
config-copy | config-ctid | copy-config | cpu | dot1x | energywise | entity | envmon | errdisable |
event-manager | flash | fru-ctrl | license | mac-notification | port-security | power-ethernet | rep | snmp
| stackwise | storm-control | stpx | syslog | transceiver | tty | vlan-membership | vlancreate | vlandelete |
vstack | vtp ]
no snmp-server enable traps [auth-framework [sec-violation] | bridge | call-home | cluster | config |
config-copy | config-ctid | copy-config | cpu | dot1x | energywise | entity | envmon | errdisable |
event-manager | flash | fru-ctrl | license | mac-notification | port-security | power-ethernet | rep | snmp
| stackwise | storm-control | stpx | syslog | transceiver | tty | vlan-membership | vlancreate | vlandelete |
vstack | vtp ]
Syntax Description auth-framework sec-violation bridge call-home cluster config config-copy config-ctid copy-config cpu dot1x energywise entity envmon errdisable
(Optional) Enables SNMP CISCO-AUTH-FRAMEWORK-MIB traps.
(Optional) Enables SNMP camSecurityViolationNotif notifications.
(Optional) Enables SNMP STP Bridge MIB traps.*
(Optional) Enables SNMP CISCO-CALLHOME-MIB traps.*
(Optional) Enables SNMP cluster traps.
(Optional) Enables SNMP configuration traps.
(Optional) Enables SNMP configuration copy traps.
(Optional) Enables SNMP configuration CTID traps.
(Optional) Enables SNMP copy-configuration traps.
(Optional) Enables CPU notification traps.*
(Optional) Enables SNMP dot1x traps.*
(Optional) Enables SNMP energywise traps.*
(Optional) Enables SNMP entity traps.
(Optional) Enables SNMP environmental monitor traps.*
(Optional) Enables SNMP errdisable notification traps.*
16
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
Network Management Commands snmp-server enable traps event-manager flash fru-ctrl license mac-notification port-security power-ethernet rep snmp stackwise storm-control stpx syslog transceiver tty vlan-membership vlancreate vlandelete vstack vtp
Command Default
The sending of SNMP traps is disabled.
Command Modes
Global configuration
(Optional) Enables SNMP Embedded Event Manager traps.
(Optional) Enables SNMP FLASH notification traps.*
(Optional) Generates entity field-replaceable unit (FRU) control traps. In a switch stack, this trap refers to the insertion or removal of a switch in the stack.
(Optional) Enables license traps.*
(Optional) Enables SNMP MAC Notification traps.*
(Optional) Enables SNMP port security traps.*
(Optional) Enables SNMP power Ethernet traps.*
(Optional) Enables SNMP Resilient Ethernet Protocol traps.
(Optional) Enables SNMP traps.*
(Optional) Enables SNMP stackwise traps.*
(Optional) Enables SNMP storm-control trap parameters.*
(Optional) Enables SNMP STPX MIB traps.*
(Optional) Enables SNMP syslog traps.
(Optional) Enables SNMP transceiver traps.*
(Optional) Sends TCP connection traps. This is enabled by default.
(Optional) Enables SNMP VLAN membership traps.
(Optional) Enables SNMP VLAN-created traps.
(Optional) Enables SNMP VLAN-deleted traps.
(Optional) Enables SNMP Smart Install traps.*
(Optional) Enables VLAN Trunking Protocol (VTP) traps.
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
17
Network Management Commands snmp-server enable traps
Command History
Release
Cisco IOS 15.0(2)EX
Modification
This command was introduced.
Usage Guidelines
The command options marked with an asterisk in the table above have subcommands. For more information on these subcommands, see the Related Commands section below.
Specify the host (NMS) that receives the traps by using the snmp-server host global configuration command.
If no trap types are specified, all trap types are sent.
When supported, use the snmp-server enable traps command to enable sending of traps or informs.
Note
Though visible in the command-line help strings, the fru-ctrl, insertion, and removal keywords are not supported on the switch. The snmp-server enable informs global configuration command is not supported.
To enable the sending of SNMP inform notifications, use the snmp-server enable traps global configuration command combined with the snmp-server host host-addr informs global configuration command.
Examples
Note
Informs are not supported in SNMPv1.
To enable more than one type of trap, you must enter a separate snmp-server enable traps command for each trap type.
This example shows how to enable more than one type of SNMP trap:
Switch(config)#
snmp-server enable traps cluster
Switch(config)#
snmp-server enable traps config
Switch(config)#
snmp-server enable traps vtp
18
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
Network Management Commands snmp-server enable traps bridge
snmp-server enable traps bridge
To generate STP bridge MIB traps, use the snmp-server enable traps bridge command in global configuration mode. Use the no form of this command to return to the default setting.
snmp-server enable traps bridge [newroot] [topologychange]
no snmp-server enable traps bridge [newroot] [topologychange]
Syntax Description newroot topologychange
(Optional) Enables SNMP STP bridge MIB new root traps.
(Optional) Enables SNMP STP bridge MIB topology change traps.
Command Default
The sending of bridge SNMP traps is disabled.
Command Modes
Global configuration
Command History
Release
Cisco IOS 15.0(2)EX
Modification
This command was introduced.
Usage Guidelines
Specify the host (NMS) that receives the traps by using the snmp-server host global configuration command.
If no trap types are specified, all trap types are sent.
Examples
Note
Informs are not supported in SNMPv1.
To enable more than one type of trap, you must enter a separate snmp-server enable traps command for each trap type.
This example shows how to send bridge new root traps to the NMS:
Switch(config)#
snmp-server enable traps bridge newroot
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
19
Network Management Commands snmp-server enable traps call-home
snmp-server enable traps call-home
To enable SNMP CISCO-CALLHOME-MIB traps, use the snmp-server enable traps call-home command in global configuration mode. Use the no form of this command to return to the default setting.
snmp-server enable traps call-home [message-send-fail | server-fail]
no snmp-server enable traps call-home [message-send-fail | server-fail]
Syntax Description message-send-fail server-fail
(Optional) Enables SNMP message-send-fail traps.
(Optional) Enables SNMP server-fail traps.
Command Default
The sending of SNMP CISCO-CALLHOME-MIB traps is disabled.
Command Modes
Global configuration
Command History
Release
Cisco IOS 15.0(2)EX
Modification
This command was introduced.
Usage Guidelines
Specify the host (NMS) that receives the traps by using the snmp-server host global configuration command.
If no trap types are specified, all trap types are sent.
Examples
Note
Informs are not supported in SNMPv1.
To enable more than one type of trap, you must enter a separate snmp-server enable traps command for each trap type.
This example shows how to generate SNMP message-send-fail traps:
Switch(config)#
snmp-server enable traps call-home message-send-fail
20
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
Network Management Commands snmp-server enable traps cpu
snmp-server enable traps cpu
To enable CPU notifications, use the snmp-server enable traps cpu command in global configuration mode.
Use the no form of this command to return to the default setting.
snmp-server enable traps cpu [threshold]
no snmp-server enable traps cpu [threshold]
Syntax Description threshold
(Optional) Enables CPU threshold notification.
Command Default
The sending of CPU notifications is disabled.
Command Modes
Global configuration
Command History
Release
Cisco IOS 15.0(2)EX
Modification
This command was introduced.
Usage Guidelines
Specify the host (NMS) that receives the traps by using the snmp-server host global configuration command.
If no trap types are specified, all trap types are sent.
Examples
Note
Informs are not supported in SNMPv1.
To enable more than one type of trap, you must enter a separate snmp-server enable traps command for each trap type.
This example shows how to generate CPU threshold notifications:
Switch(config)#
snmp-server enable traps cpu threshold
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
21
Network Management Commands snmp-server enable traps dot1x
snmp-server enable traps dot1x
To enable IEEE 802.1x traps, use the snmp-server enable traps dot1x command in global configuration mode. Use the no form of this command to return to the default setting.
snmp-server enable traps dot1x [auth-fail-vlan][guest-vlan][no-auth-fail-vlan][no-guest-vlan]
no snmp-server enable traps dot1x [auth-fail-vlan][guest-vlan][no-auth-fail-vlan][no-guest-vlan]
Syntax Description auth-fail-vlan guest-vlan no-auth-fail-vlan no-guest-vlan
(Optional) Generates a trap when the port moves to the configured restricted
VLAN.
(Optional) Generates a trap when the port moves to the configured guest
VLAN.
(Optional) Generates a trap when a port tries to enter the restricted VLAN, but cannot because the restricted VLAN is not configured.
(Optional) Generates a trap when a port tries to enter the guest VLAN, but cannot because the guest VLAN is not configured.
Command Default
The sending of IEEE 802.1x SNMP traps is disabled.
Command Modes
Global configuration
Command History
Release
Cisco IOS 15.0(2)EX
Modification
This command was introduced.
Usage Guidelines
When the snmp-server enable traps dot1x command is entered (without any other keywords specified), all the IEEE 802.1x traps are enabled.
Specify the host (NMS) that receives the traps by using the snmp-server host global configuration command.
If no trap types are specified, all trap types are sent.
Note
Informs are not supported in SNMPv1.
To enable more than one type of trap, you must enter a separate snmp-server enable traps command for each trap type.
22
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
Network Management Commands snmp-server enable traps dot1x
Examples
This example shows how to generate a trap when the port moves to the configured restricted VLAN:
Switch(config)#
snmp-server enable traps dot1x auth-fail-vlan
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
23
Network Management Commands snmp-server enable traps energywise
snmp-server enable traps energywise
To enable SNMP Energywise traps, use the snmp-server enable traps energywise command in global configuration mode. Use the no form of this command to return to the default setting.
snmp-server enable traps energywise [event-occured][level-change][neighbor-added][neighbor-deleted]
no snmp-server enable traps energywise [event-occured][level-change][neighbor-added][neighbor-deleted]
Syntax Description event-occured level-change neighbor-added neighbor-deleted
(Optional) Enables Energywise event occurred traps.
(Optional) Enables Energywise entity level change traps.
(Optional) Enables Energywise entity neighbor added traps.
(Optional) Enables Energywise entity neighbor deleted traps.
Command Default
The sending of SNMP Energywise traps is disabled.
Command Modes
Global configuration
Command History
Release
Cisco IOS 15.0(2)EX
Modification
This command was introduced.
Usage Guidelines
When the snmp-server enable traps energywise command is entered (without any other keywords specified), all the SNMP Energywise traps are enabled.
Specify the host (NMS) that receives the traps by using the snmp-server host global configuration command.
If no trap types are specified, all trap types are sent.
Examples
Note
Informs are not supported in SNMPv1.
To enable more than one type of trap, you must enter a separate snmp-server enable traps command for each trap type.
This example shows how to generate a trap when an Energywise event occurs:
Switch(config)#
snmp-server enable traps energywise event-occured
24
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
Network Management Commands snmp-server enable traps envmon
snmp-server enable traps envmon
To enable SNMP environmental traps, use the snmp-server enable traps envmon command in global configuration mode. Use the no form of this command to return to the default setting.
snmp-server enable traps envmon [fan][shutdown][status] [supply][temperature]
no snmp-server enable traps envmon [fan][shutdown][status] [supply][temperature]
Syntax Description fan shutdown status supply temperature
(Optional) Enables fan traps.
(Optional) Enables environmental monitor shutdown traps.
(Optional) Enables SNMP environmental status-change traps.
(Optional) Enables environmental monitor power-supply traps.
(Optional) Enables environmental monitor temperature traps.
Command Default
The sending of environmental SNMP traps is disabled.
Command Modes
Global configuration
Command History
Release
Cisco IOS 15.0(2)EX
Modification
This command was introduced.
Usage Guidelines
Specify the host (NMS) that receives the traps by using the snmp-server host global configuration command.
If no trap types are specified, all trap types are sent.
Examples
Note
Informs are not supported in SNMPv1.
To enable more than one type of trap, you must enter a separate snmp-server enable traps command for each trap type.
This example shows how to generate fan traps:
Switch(config)#
snmp-server enable traps envmon fan
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
25
Network Management Commands snmp-server enable traps errdisable
snmp-server enable traps errdisable
To enable SNMP notifications of error-disabling, use the snmp-server enable traps errdisable command in global configuration mode. Use the no form of this command to return to the default setting.
snmp-server enable traps errdisable [notification-rate number-of-notifications]
no snmp-server enable traps errdisable [notification-rate number-of-notifications]
Syntax Description notification-rate
number-of-notifications
(Optional) Specifies number of notifications per minute as the notification rate. Accepted values are from 0 to 10000.
Command Default
The sending of SNMP notifications of error-disabling is disabled.
Command Modes
Global configuration
Command History
Release
Cisco IOS 15.0(2)EX
Modification
This command was introduced.
Usage Guidelines
Specify the host (NMS) that receives the traps by using the snmp-server host global configuration command.
If no trap types are specified, all trap types are sent.
Examples
Note
Informs are not supported in SNMPv1.
To enable more than one type of trap, you must enter a separate snmp-server enable traps command for each trap type.
This example shows how to set the number SNMP notifications of error-disabling to 2:
Switch(config)#
snmp-server enable traps errdisable notification-rate 2
26
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
Network Management Commands snmp-server enable traps flash
snmp-server enable traps flash
To enable SNMP flash notifications, use the snmp-server enable traps flash command in global configuration mode. Use the no form of this command to return to the default setting.
snmp-server enable traps flash [insertion][removal]
no snmp-server enable traps flash [insertion][removal]
Syntax Description insertion removal
(Optional) Enables SNMP flash insertion notifications.
(Optional) Enables SNMP flash removal notifications.
Command Default
The sending of SNMP flash notifications is disabled.
Command Modes
Global configuration
Command History
Release
Cisco IOS 15.0(2)EX
Modification
This command was introduced.
Usage Guidelines
Specify the host (NMS) that receives the traps by using the snmp-server host global configuration command.
If no trap types are specified, all trap types are sent.
Examples
Note
Informs are not supported in SNMPv1.
To enable more than one type of trap, you must enter a separate snmp-server enable traps command for each trap type.
This example shows how to generate SNMP flash insertion notifications:
Switch(config)#
snmp-server enable traps flash insertion
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
27
Network Management Commands snmp-server enable traps license
snmp-server enable traps license
To enable license traps, use the snmp-server enable traps license command in global configuration mode.
Use the no form of this command to return to the default setting.
snmp-server enable traps license [deploy][error][usage]
no snmp-server enable traps license [deploy][error][usage]
Syntax Description deploy error usage
(Optional) Enables license deployment traps.
(Optional) Enables license error traps.
(Optional) Enables license usage traps.
Command Default
The sending of license traps is disabled.
Command Modes
Global configuration
Command History
Release
Cisco IOS 15.0(2)EX
Modification
This command was introduced.
Usage Guidelines
Specify the host (NMS) that receives the traps by using the snmp-server host global configuration command.
If no trap types are specified, all trap types are sent.
Examples
Note
Informs are not supported in SNMPv1.
To enable more than one type of trap, you must enter a separate snmp-server enable traps command for each trap type.
This example shows how to generate license deployment traps:
Switch(config)#
snmp-server enable traps license deploy
28
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
Network Management Commands snmp-server enable traps mac-notification
snmp-server enable traps mac-notification
To enable SNMP MAC notification traps, use the snmp-server enable traps mac-notification command in global configuration mode. Use the no form of this command to return to the default setting.
snmp-server enable traps mac-notification [change][move][threshold]
no snmp-server enable traps mac-notification [change][move][threshold]
Syntax Description change move threshold
(Optional) Enables SNMP MAC change traps.
(Optional) Enables SNMP MAC move traps.
(Optional) Enables SNMP MAC threshold traps.
Command Default
The sending of SNMP MAC notification traps is disabled.
Command Modes
Global configuration
Command History
Release
Cisco IOS 15.0(2)EX
Modification
This command was introduced.
Usage Guidelines
Specify the host (NMS) that receives the traps by using the snmp-server host global configuration command.
If no trap types are specified, all trap types are sent.
Examples
Note
Informs are not supported in SNMPv1.
To enable more than one type of trap, you must enter a separate snmp-server enable traps command for each trap type.
This example shows how to generate SNMP MAC notification change traps:
Switch(config)#
snmp-server enable traps mac-notification change
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
29
Network Management Commands snmp-server enable traps port-security
snmp-server enable traps port-security
To enable SNMP port security traps, use the snmp-server enable traps port-security command in global configuration mode. Use the no form of this command to return to the default setting.
snmp-server enable traps port-security [trap-rate value]
no snmp-server enable traps port-security [trap-rate value]
Syntax Description
trap-rate value
(Optional) Sets the maximum number of port-security traps sent per second. The range is from 0 to 1000; the default is 0 (no limit imposed; a trap is sent at every occurrence).
Command Default
The sending of port security SNMP traps is disabled.
Command Modes
Global configuration
Command History
Release
Cisco IOS 15.0(2)EX
Modification
This command was introduced.
Usage Guidelines
Specify the host (NMS) that receives the traps by using the snmp-server host global configuration command.
If no trap types are specified, all trap types are sent.
Examples
Note
Informs are not supported in SNMPv1.
To enable more than one type of trap, you must enter a separate snmp-server enable traps command for each trap type.
This example shows how to enable port-security traps at a rate of 200 per second:
Switch(config)#
snmp-server enable traps port-security trap-rate 200
30
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
Network Management Commands snmp-server enable traps power-ethernet
snmp-server enable traps power-ethernet
To enable SNMP power-over-Ethernet (PoE) traps, use the snmp-server enable traps power-ethernet command in global configuration mode. Use the no form of this command to return to the default setting.
snmp-server enable traps power-ethernet {group number | police}
no snmp-server enable traps power-ethernet {group number | police}
Syntax Description
group number
police
Enables inline power group-based traps for the specified group number.
Accepted values are from 1 to 9.
Enables inline power policing traps.
Command Default
The sending of power-over-Ethernet SNMP traps is disabled.
Command Modes
Global configuration
Command History
Release
Cisco IOS 15.0(2)EX
Modification
This command was introduced.
Usage Guidelines
Specify the host (NMS) that receives the traps by using the snmp-server host global configuration command.
If no trap types are specified, all trap types are sent.
Examples
Note
Informs are not supported in SNMPv1.
To enable more than one type of trap, you must enter a separate snmp-server enable traps command for each trap type.
This example shows how to enable power-over-Ethernet traps for group 1:
Switch(config)#
snmp-server enable traps poower-over-ethernet group 1
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
31
Network Management Commands snmp-server enable traps snmp
snmp-server enable traps snmp
To enable SNMP traps, use the snmp-server enable traps snmp command in global configuration mode.
Use the no form of this command to return to the default setting.
snmp-server enable traps snmp [authentication ][coldstart ][linkdown ] [linkup ][warmstart]
no snmp-server enable traps snmp [authentication ][coldstart ][linkdown ] [linkup ][warmstart]
Syntax Description authentication coldstart linkdown linkup warmstart
(Optional) Enables authentication traps.
(Optional) Enables cold start traps.
(Optional) Enables linkdown traps.
(Optional) Enables linkup traps.
(Optional) Enables warmstart traps.
Command Default
The sending of SNMP traps is disabled.
Command Modes
Global configuration
Command History
Release
Cisco IOS 15.0(2)EX
Modification
This command was introduced.
Usage Guidelines
Specify the host (NMS) that receives the traps by using the snmp-server host global configuration command.
If no trap types are specified, all trap types are sent.
Examples
Note
Informs are not supported in SNMPv1.
To enable more than one type of trap, you must enter a separate snmp-server enable traps command for each trap type.
This example shows how to enable a warmstart SNMP trap:
Switch(config)#
snmp-server enable traps snmp warmstart
32
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
Network Management Commands snmp-server enable traps stackwise
snmp-server enable traps stackwise
To enable SNMP StackWise traps, use the snmp-server enable traps stackwise command in global configuration mode. Use the no form of this command to return to the default setting.
snmp-server enable traps stackwise [GLS][ILS][SRLS] [insufficient-power][invalid-input-current]
[invalid-output-current][member-removed][member-upgrade-notification] [new-master][new-member]
[port-change][power-budget-warning][power-invalid-topology]
[power-link-status-changed][power-oper-status-changed]
[power-priority-conflict][power-version-mismatch][ring-redundant]
[stack-mismatch][unbalanced-power-supplies][under-budget][under-voltage]
no snmp-server enable traps stackwise [GLS][ILS][SRLS] [insufficient-power][invalid-input-current]
[invalid-output-current][member-removed][member-upgrade-notification] [new-master][new-member]
[port-change][power-budget-warning][power-invalid-topology]
[power-link-status-changed][power-oper-status-changed]
[power-priority-conflict][power-version-mismatch][ring-redundant]
[stack-mismatch][unbalanced-power-supplies][under-budget][under-voltage]
Syntax Description
GLS
ILS
SRLS insufficient-power invalid-input-current invalid-output-current member-removed member-upgrade-notification new-master new-member port-change power-budget-warning power-invalid-topology power-link-status-changed
(Optional) Enables StackWise stack power GLS trap.
(Optional) Enables StackWise stack power ILS trap.
(Optional) Enables StackWise stack power SRLS trap.
(Optional) Enables StackWise stack power unbalanced power supplies trap.
(Optional) Enables StackWise stack power invalid input current trap.
(Optional) Enables StackWise stack power invalid output current trap.
(Optional) Enables StackWise stack member removed trap.
(Optional) Enables StackWise member to be reloaded for upgrade trap.
(Optional) Enables StackWise new master trap.
(Optional) Enables StackWise stack new member trap.
(Optional) Enables StackWise stack port change trap.
(Optional) Enables StackWise stack power budget warning trap.
(Optional) Enables StackWise stack power invalid topology trap.
(Optional) Enables StackWise stack power link status changed trap.
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
33
Network Management Commands snmp-server enable traps stackwise power-oper-status-changed power-priority-conflict power-version-mismatch ring-redundant stack-mismatch unbalanced-power-supplies under-budget under-voltage
(Optional) Enables StackWise stack power port oper status changed trap.
(Optional) Enables StackWise stack power priority conflict trap.
(Optional) Enables StackWise stack power version mismatch discovered trap.
(Optional) Enables StackWise stack ring redundant trap.
(Optional) Enables StackWise stack mismatch trap.
(Optional) Enables StackWise stack power unbalanced power supplies trap.
(Optional) Enables StackWise stack power under budget trap.
(Optional) Enables StackWise stack power under voltage trap.
Command Default
The sending of SNMP StackWise traps is disabled.
Command Modes
Global configuration
Command History
Release
Cisco IOS 15.0(2)EX
Modification
This command was introduced.
Usage Guidelines
Specify the host (NMS) that receives the traps by using the snmp-server host global configuration command.
If no trap types are specified, all trap types are sent.
Examples
Note
Informs are not supported in SNMPv1.
To enable more than one type of trap, you must enter a separate snmp-server enable traps command for each trap type.
This example shows how to generate StackWise stack power GLS traps:
Switch(config)#
snmp-server enable traps stackwise GLS
34
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
Network Management Commands snmp-server enable traps storm-control
snmp-server enable traps storm-control
To enable SNMP storm-control trap parameters, use the snmp-server enable traps storm-control command in global configuration mode. Use the no form of this command to return to the default setting.
snmp-server enable traps storm-control {trap-rate number-of-minutes}
no snmp-server enable traps storm-control {trap-rate}
Syntax Description
trap-rate number-of-minutes
(Optional) Specifies the SNMP storm-control trap rate in minutes.
Accepted values are from 0 to 1000.
Command Default
The sending of SNMP storm-control trap parameters is disabled.
Command Modes
Global configuration
Command History
Release
Cisco IOS 15.0(2)EX
Modification
This command was introduced.
Usage Guidelines
Specify the host (NMS) that receives the traps by using the snmp-server host global configuration command.
If no trap types are specified, all trap types are sent.
Examples
Note
Informs are not supported in SNMPv1.
To enable more than one type of trap, you must enter a separate snmp-server enable traps command for each trap type.
This example shows how to set the SNMP storm-control trap rate to 10 traps per minute:
Switch(config)#
snmp-server enable traps storm-control trap-rate 10
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
35
Network Management Commands snmp-server enable traps stpx
snmp-server enable traps stpx
To enable SNMP STPX MIB traps, use the snmp-server enable traps stpx command in global configuration mode. Use the no form of this command to return to the default setting.
snmp-server enable traps stpx [inconsistency][loop-inconsistency][root-inconsistency]
no snmp-server enable traps stpx [inconsistency][loop-inconsistency][root-inconsistency]
Syntax Description inconsistency loop-inconsistency root-inconsistency
(Optional) Enables SNMP STPX MIB inconsistency update traps.
(Optional) Enables SNMP STPX MIB loop inconsistency update traps.
(Optional) Enables SNMP STPX MIB root inconsistency update traps.
Command Default
The sending of SNMP STPX MIB traps is disabled.
Command Modes
Global configuration
Command History
Release
Cisco IOS 15.0(2)EX
Modification
This command was introduced.
Usage Guidelines
Specify the host (NMS) that receives the traps by using the snmp-server host global configuration command.
If no trap types are specified, all trap types are sent.
Examples
Note
Informs are not supported in SNMPv1.
To enable more than one type of trap, you must enter a separate snmp-server enable traps command for each trap type.
This example shows how to generate SNMP STPX MIB inconsistency update traps:
Switch(config)#
snmp-server enable traps stpx inconsistency
36
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
Network Management Commands snmp-server enable traps transceiver
snmp-server enable traps transceiver
To enable SNMP transceiver traps, use the snmp-server enable traps transceiver command in global configuration mode. Use the no form of this command to return to the default setting.
snmp-server enable traps transceiver {all}
no snmp-server enable traps transceiver {all}
Syntax Description all
(Optional) Enables all SNMP transceiver traps.
Command Default
The sending of SNMP transceiver traps is disabled.
Command Modes
Global configuration
Command History
Release
Cisco IOS 15.0(2)EX
Modification
This command was introduced.
Usage Guidelines
Specify the host (NMS) that receives the traps by using the snmp-server host global configuration command.
If no trap types are specified, all trap types are sent.
Examples
Note
Informs are not supported in SNMPv1.
To enable more than one type of trap, you must enter a separate snmp-server enable traps command for each trap type.
This example shows how to set all SNMP transceiver traps:
Switch(config)#
snmp-server enable traps transceiver all
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
37
Network Management Commands snmp-server enable traps vstack
snmp-server enable traps vstack
To enable SNMP smart install traps, use the snmp-server enable traps vstack command in global configuration mode. Use the no form of this command to return to the default setting.
snmp-server enable traps vstack [addition][failure][lost][operation]
no snmp-server enable traps vstack [addition][failure][lost][operation]
Syntax Description addition failure lost operation
(Optional) Enables client added traps.
(Optional) Enables file upload and download failure traps.
(Optional) Enables client lost trap.
(Optional) Enables operation mode change traps.
Command Default
The sending of SNMP smart install traps is disabled.
Command Modes
Global configuration
Command History
Release
Cisco IOS 15.0(2)EX
Modification
This command was introduced.
Usage Guidelines
Specify the host (NMS) that receives the traps by using the snmp-server host global configuration command.
If no trap types are specified, all trap types are sent.
Examples
Note
Informs are not supported in SNMPv1.
To enable more than one type of trap, you must enter a separate snmp-server enable traps command for each trap type.
This example shows how to generate SNMP Smart Install client-added traps:
Switch(config)#
snmp-server enable traps vstack addition
38
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
Network Management Commands snmp-server engineID
snmp-server engineID
To configure a name for either the local or remote copy of SNMP, use the snmp-server engineID command in global configuration mode.
snmp-server engineID {local engineid-string | remote ip-address [udp-port port-number] engineid-string}
Syntax Description
local engineid-string
remote ip-address
udp-port port-number
Specifies a 24-character ID string with the name of the copy of SNMP. You need not specify the entire 24-character engine ID if it has trailing zeros.
Specify only the portion of the engine ID up to the point where only zeros remain in the value.
Specifies the remote SNMP copy. Specify the ip-address of the device that contains the remote copy of SNMP.
(Optional) Specifies the User Datagram Protocol (UDP) port on the remote device. The default is 162.
Command Default
None
Command Modes
Global configuration
Command History
Release
Cisco IOS 15.0(2)EX
Modification
This command was introduced.
Usage Guidelines
None
Examples
The following example configures a local engine ID of 123400000000000000000000:
Switch(config)#
snmp-server engineID local 1234
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
39
Network Management Commands snmp-server host
snmp-server host
To specify the recipient (host) of a Simple Network Management Protocol (SNMP) notification operation, use the snmp-server host global configuration command on the switch. Use the no form of this command to remove the specified host.
snmp-server host {host-addr } [vrf vrf-instance ] [informs | traps] [version {1 | 2c | 3 {auth | noauth |
priv} } ] {community-string [notification-type] }
no snmp-server host {host-addr } [vrf vrf-instance ] [informs | traps] [version {1 | 2c | 3 {auth | noauth
| priv} } ] {community-string [notification-type] }
Syntax Description
host-addr
Name or Internet address of the host (the targeted recipient).
vrf vrf-instance
(Optional) Specifies the virtual private network (VPN) routing instance and name for this host.
informs | traps
(Optional) Sends SNMP traps or informs to this host.
version 1 | 2c |
3
(Optional) Specifies the version of the SNMP used to send the traps.
1—SNMPv1. This option is not available with informs.
2c—SNMPv2C.
3—SNMPv3. One of the authorization keywords (see next table row) must follow the
Version 3 keyword.
auth | noauth |
priv
auth (Optional)—Enables Message Digest 5 (MD5) and Secure Hash Algorithm (SHA) packet authentication.
noauth (Default)—The noAuthNoPriv security level. This is the default if the auth |
noauth | priv keyword choice is not specified.
priv (Optional)—Enables Data Encryption Standard (DES) packet encryption (also called privacy).
community-string
Password-like community string sent with the notification operation. Though you can set this string by using the snmp-server host command, we recommend that you define this string by using the snmp-server community global configuration command before using the snmp-server host command.
Note
The @ symbol is used for delimiting the context information. Avoid using the @ symbol as part of the SNMP community string when configuring this command.
40
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
Network Management Commands snmp-server host
notification-type
(Optional) Type of notification to be sent to the host. If no type is specified, all notifications are sent. The notification type can be one or more of the these keywords:
• auth-framework—Sends SNMP CISCO-AUTH-FRAMEWORK-MIB traps.
• bridge—Sends SNMP Spanning Tree Protocol (STP) bridge MIB traps.
• bulkstat—Sends Data-Collection-MIB Collection notification traps.
• call-home—Sends SNMP CISCO-CALLHOME-MIB traps.
• cef—Sends SNMP CEF traps.
• config—Sends SNMP configuration traps.
• config-copy—Sends SNMP config-copy traps.
• config-ctid—Sends SNMP config-ctid traps.
• copy-config—Sends SNMP copy configuration traps.
• cpu—Sends CPU notification traps.
• cpu threshold—Sends CPU threshold notification traps.
• entity—Sends SNMP entity traps.
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
41
Network Management Commands snmp-server host
• envmon—Sends environmental monitor traps.
• errdisable—Sends SNMP errdisable notification traps.
• event-manager—Sends SNMP Embedded Event Manager traps.
• flash—Sends SNMP FLASH notifications.
• flowmon—Sends SNMP flowmon notification traps.
• ipmulticast—Sends SNMP IP multicast routing traps.
• ipsla—Sends SNMP IP SLA traps.
• license—Sends license traps.
• local-auth—Sends SNMP local auth traps.
• mac-notification—Sends SNMP MAC notification traps.
• pim—Sends SNMP Protocol-Independent Multicast (PIM) traps.
• power-ethernet—Sends SNMP power Ethernet traps.
• snmp—Sends SNMP-type traps.
• storm-control—Sends SNMP storm-control traps.
• stpx—Sends SNMP STP extended MIB traps.
• syslog—Sends SNMP syslog traps.
• transceiver—Sends SNMP transceiver traps.
• tty—Sends TCP connection traps.
• vlan-membership— Sends SNMP VLAN membership traps.
• vlancreate—Sends SNMP VLAN-created traps.
• vlandelete—Sends SNMP VLAN-deleted traps.
• vrfmib—Sends SNMP vrfmib traps.
• vtp—Sends SNMP VLAN Trunking Protocol (VTP) traps.
• wireless—Sends wireless traps.
Command Default
This command is disabled by default. No notifications are sent.
If you enter this command with no keywords, the default is to send all trap types to the host. No informs are sent to this host.
If no version keyword is present, the default is Version 1.
If Version 3 is selected and no authentication keyword is entered, the default is the noauth (noAuthNoPriv) security level.
42
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
Network Management Commands snmp-server host
Note
Though visible in the command-line help strings, the fru-ctrl keyword is not supported.
Command Modes
Global configuration
Command History
Release
Cisco IOS 15.0(2)EX
Modification
This command was introduced.
Usage Guidelines
SNMP notifications can be sent as traps or inform requests. Traps are unreliable because the receiver does not send acknowledgments when it receives traps. The sender cannot determine if the traps were received.
However, an SNMP entity that receives an inform request acknowledges the message with an SNMP response
PDU. If the sender never receives the response, the inform request can be sent again, so that informs are more likely to reach their intended destinations.
However, informs consume more resources in the agent and in the network. Unlike a trap, which is discarded as soon as it is sent, an inform request must be held in memory until a response is received or the request times out. Traps are also sent only once, but an inform might be retried several times. The retries increase traffic and contribute to a higher overhead on the network.
If you do not enter an snmp-server host command, no notifications are sent. To configure the switch to send
SNMP notifications, you must enter at least one snmp-server host command. If you enter the command with no keywords, all trap types are enabled for the host. To enable multiple hosts, you must enter a separate
snmp-server host command for each host. You can specify multiple notification types in the command for each host.
If a local user is not associated with a remote host, the switch does not send informs for the auth (authNoPriv) and the priv (authPriv) authentication levels.
When multiple snmp-server host commands are given for the same host and kind of notification (trap or inform), each succeeding command overwrites the previous command. Only the last snmp-server host command is in effect. For example, if you enter an snmp-server host inform command for a host and then enter another snmp-server host inform command for the same host, the second command replaces the first.
The snmp-server host command is used with the snmp-server enable traps global configuration command.
Use the snmp-server enable traps command to specify which SNMP notifications are sent globally. For a host to receive most notifications, at least one snmp-server enable traps command and the snmp-server
host command for that host must be enabled. Some notification types cannot be controlled with the snmp-server
enable traps command. For example, some notification types are always enabled. Other notification types are enabled by a different 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 command.
Examples
This example shows how to configure a unique SNMP community string named comaccess for traps and prevent SNMP polling access with this string through access-list 10:
Switch(config)#
snmp-server community comaccess ro 10
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
43
Network Management Commands snmp-server host
Switch(config)#
snmp-server host 172.20.2.160 comaccess
Switch(config)#
access-list 10 deny any
This example shows how to send the SNMP traps to the host specified by the name myhost.cisco.com. The community string is defined as comaccess:
Switch(config)#
snmp-server enable traps
Switch(config)#
snmp-server host myhost.cisco.com comaccess snmp
This example shows how to enable the switch to send all traps to the host myhost.cisco.com by using the community string public:
Switch(config)#
snmp-server enable traps
Switch(config)#
snmp-server host myhost.cisco.com public
You can verify your settings by entering the show running-config privileged EXEC command.
44
Consolidated Platform Command Reference, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
advertisement
Key Features
- SPAN and RSPAN session setup
- VLAN and IP access list filtering
- SNMP trap configuration
- Network traffic monitoring
- Network security enhancements
- Troubleshooting network issues