Configure Supported Cisco IOS SNMP Traps

The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.

Contents

Introduction

This document describes how to configure supported Cisco IOS® SNMP Traps.

Prerequisites

Requirements

Cisco recommends that you have knowledge of these topics:

You do not want a Cisco device to send all of the SNMP traps that the device knows how to send. For instance, if you enable all traps in a Remote Access Server with 64 dial-in lines, you get a trap whenever a user dials in and whenever a user terminates the connection. This creates too many traps. Cisco IOS Software defines groups of traps that you can enable or disable. There are two global configuration commands that you use to configure SNMP traps into a Cisco IOS Software device:

snmp-server host host-addr [traps | informs] [version ] 
community-string [udp-port port] [notification-type]
snmp-server enable traps [notification-type] [notification-option]

The types of traps can be specified in both commands. You must issue the snmp-server host command in order to define the Network Management Systems where traps are to be sent. You must specify the trap types if you do not want all traps to be sent. Issue multiple snmp-server enable traps commands, one for each of the trap types that you used in the snmp host command.

Note: Not all [notification-type] options are supported on both of these commands. For example, [notification-type] x25 and teletype (tty) are not used for snmp-server enable trap x25, and tty traps are enabled by default.

For example, issue these commands to make a Cisco IOS Software device report only configuration, Border Gateway Protocol (BGP), and tty traps to Network Management System 10.10.10.10:

snmp-server host 10.10.10.10 public config bgp tty snmp-server enable traps config snmp-server enable traps bgp 

Components Used

This document is not restricted to specific software and hardware versions.

The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, ensure that you understand the potential impact of any command.

Conventions

Refer to the Cisco Technical Tips Conventions for more information on document conventions.

Background Information

Note: Cisco IOS Software Release 12.1(3)T was used to prepare this document. When you use an earlier Cisco IOS Software Release, not all options are supported. When you use a Cisco IOS Software release later than 12.1(3)T, additional [notification-type] options can be supported. You can find a current list of all supported Cisco IOS Software Simple Network Management Protocol (SNMP) trap Object Identifiers (OIDs) in this document.

Cisco devices that run the standard Cisco IOS Software (routers, Asynchronous Transfer Mode (ATM) switches and Remote Access Servers) can generate many SNMP traps.

Commands

The snmp-server host Command

Issue the snmp-server host global configuration command to specify the recipient of an SNMP notification operation. Issue the no form of this command to remove the specified host.

snmp-server host host-addr [traps | informs] [version ] community-string [udp-port port] [notification-type] no snmp-server host host [traps | informs] 

Syntax Description