snmp-server host

Last Updated : Jul 21, 2020 |

Identifies an SNMP management server, and specify the kind of messages it receives. Use no snmp-server host to remove the specified server, or to disable a particular set of notification types.

Note:

If you use the no snmp-server host command without a notification type list, all notification types are disabled.

Syntax

snmp-server host {host_address | <ipv6–addr[%zoneid]} {traps | informs} {{{v1 | v2c} community-name} | {v3 level username}} [udp-port port] [notification-list]

no snmp-server host {host_address | <ipv6–addr[%zoneid]} [{traps|informs} notification-list]

Parameters

Parameter

Description

Possible Values

Default Value

host_address

The IPv4 address of the SNMP host

ipv6–addr

The IPv6 address of the SNMP host

%zoneid

VLAN number

1 — 4,090

traps

Keyword specifying to send traps to this host (messages not requiring acknowledgement). This is the default.

informs

Keyword specifying to send informs to this host (messages requiring acknowledgement)

v1

Keyword specifying to use SNMP v1 functionality with this host

v2c

Keyword specifying to use SNMP v2c functionality with this host

community-name

The community string to use to connect to the specified host (for v1 or v2c)

v3

Keyword specifying to use SNMP v3 functionality with this host

level

The level of authentication to apply to messages to this host

auth – authenticate messages to this host

noauth – do not authenticate messages to this host

priv – authenticate and encrypt messages to this host

noauth

username

The username to use for authentication on the specified host

port

Which port of the target host to use

162

notification- list

List of notification types that are enabled for this host

all: All traps

generic: Generic traps

hardware: Hardware faults

rmon: RMON rising/falling alarm

dhcp-server: DHCP server error

dhcp-clients: DHCP client error

rtp-stat-faults: RTP statistics: QoS fault/clear traps

rtp-stat-qos: RTP statistics: end-of-call QoS traps

wan: WAN router traps

media-gateway: Media gateway traps

security: Security traps

config: Configuration change notifications

eth-port-faults: Notifications of Ethernet port faults

sw-redundancy: Software redundancy notifications

l3-events: Notifications about L3 faults (duplicate IP, VLAN violations)

policy: Notifications about changes in policy (for L3 devices)

link-faults: Link-down notifications

tftp-server: TFTP server error

udp-port: UDP port error

ipsec: IPSec notifications

filesys: File system notifications

all

User level

admin

Context

general

Example

To identify an SNMP management server with host 10.1.2.4, connecting through udp-port 789, sending informs to its host using v3 SNMP functionality, authenticating messages with the username John, and having generic traps and configuration change notifications enabled:

Gxxx-001(super)# snmp-server host 10.1.2.4 informs v3 auth John udp-port 789 
config generic

Gxxx-001(super)# snmp-server host fe80::210:c6ff:fede:28e%Vlan1 traps v3 priv John security generic link-faults