Specifications

IP Switching Commands
snmp-server host
ISW-345
Cisco IOS IP Switching Command Reference
May 2008
To enable multiple hosts, you must issue a separate snmp-server host command for each host. You can
specify multiple notification types in the command for each host.
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 will be 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
will replace the first.
The snmp-server host command is used in conjunction with the snmp-server enable command. Use
the snmp-server enable command to specify which SNMP notifications are sent globally. For a host to
receive most notifications, at least one snmp-server enable command and the snmp-server host
command for that host must be enabled.
Some notification types cannot be controlled with the snmp-server enable command. Some notification
types are always enabled, and others are enabled by a different command. For example, the linkUpDown
notifications are controlled by the snmp trap link-status command. These notification types do not
require an snmp-server enable command.
The availability of a notification-type options depends on the router type and the Cisco IOS software
features supported on the router. For example, the envmon notification type is available only if the
environmental monitor is part of the system. To see what notification types are available on your system,
use the command help ? at the end of the snmp-server host command.
The vrf keyword allows you to specify the notifications being sent to a specified IP address over a
specific VRF. The VRF defines a VPN membership of a user so data is stored using the VPN.
Notification-Type Keywords
The notification-type keywords used in the snmp-server host command do not always match the
keywords used in the corresponding snmp-server enable traps command. For example, the notification
keyword applicable to Multiprotocol Label Switching Protocol (MPLS) traffic engineering tunnels is
specified as mpls-traffic-eng (containing two hyphens and no embedded spaces). The corresponding
parameter in the snmp-server enable traps command is specified as mpls traffic-eng (containing an
embedded space and a hyphen).
This syntax difference is necessary to ensure that the command-line interface (CLI) interprets the
notification-type keyword of the snmp-server host command as a unified, single-word construct, which
preserves the capability of the snmp-server host command to accept multiple notification-type
keywords in the command line. The snmp-server enable traps commands, however, often use two-word
constructs to provide hierarchical configuration options and to maintain consistency with the command
syntax of related commands.
Table 57 maps some examples of snmp-server enable traps commands to
the keywords used in the snmp-server host command.
Ta b l e 57 SNMP-server enable traps Commands and Corresponding Notification Keywords
snmp-server enable traps Command snmp-server host Command Keyword
snmp-server enable traps l2tun session l2tun-session
snmp-server enable traps mpls ldp mpls-ldp
snmp-server enable traps mpls traffic-eng
1
1. See the Cisco IOS Multiprotocol Label Switching Command Reference for documentation of this command.
mpls-traffic-eng
snmp-server enable traps mpls vpn mpls-vpn