7.2.9. snmp host

Syntax

snmp host (ip-addr|ipv6-addr|hostname) [traps|informs] [version (1|2c)] community-name [udp-port udp-port] [timeout timeout] [retries retries]

snmp host (ip-addr|ipv6-addr|hostname) [traps|informs] version 3 [(auth|noauth|priv)] community-name [udp-port udp-port] [timeout timeout] [retries retries]

no snmp host (ip-addr|ipv6-addr|hostname) [traps|informs] [version (1|2c|3)]

Parameter

ip-addr

The IP adderss of recipet.

ipv6-addr

The IPv6 adderss of recipet.

hostname

The host name of recipet.

traps

Send SNMP traps to the host. It is the default action.

informs

Send SNMP informs to the host.

version(1|2c|3)

Specify the SNMP version.

noauth

Specify that no packet authentication is performed. It is applicable only to the SNMPv3 security mode.

auth

Specify that no packet authentication without entryption is performed. It is applicable only to the SNMPv3 security mode.

priv

Specify that no packet authentication with entryption isperformed. It is applicable only to the SNMPv3 security mode.

community-name

The SNMP community sent with the notification.

udp-port udp-port

Specify the UDP port number.

timeout timeout

Specify the SNMP informs timeout.

retries retries

Specify the retry counter of the SNMP informs.

Default

No SNMP host is configured. The default SNMP version for the command is SNMPv1.

Mode

Global Configuration

Usage

To configure the hosts to receive SNMP notificatons, use the command snmp host in the Global Configuration mode; and use the no form of the command to delete the configuration.

Example

The following example adds the recipet 192.168.1.11 for the SNMP traps notification.

Switch(config)# snmp host 192.168.1.11 private