Configuring an SNMP Host

Configure an SNMP host so that the system can forward SNMP traps to a host for monitoring. You can use SNMPv1, SNMPv2c, or SNMPv3. You configure the target table parameters (security name and model) as part of the host configuration.

Procedure

  1. Enter Global Configuration mode:

    enable

    configure terminal

  2. Configure an SNMPv1 host:

    snmp-server host WORD<1-256> [port <1-65535>] v1 WORD<1-32> [filter WORD<1-32>]

  3. Configure an SNMPv2c host:

    snmp-server host WORD<1-256> [port <1-65535>] v2c WORD<1-32> [inform [timeout <1-2147483647>] [retries <0-255>] [mms <0-2147483647>]] [filter WORD<1-32>]

  4. Configure an SNMPv3 host:

    snmp-server host WORD<1-256> [port <1-65535>] v3 {noAuthNoPriv|authNoPriv|AuthPriv} WORD<1-32> [inform [timeout <1-2147483647>] [retries <0-255>]] [filter WORD<1-32>]

  5. Ensure that the configuration is correct:

    show snmp-server host

Example

Configure the target table entry. Configure an SNMPv3 host.

Switch:1>enable
Switch:1#configure terminal
Switch:1(config)#snmp-server host 192.0.2.207 port 162 v2c ReadView inform timeout 1500 retries 3 mms 484
Switch:1(config)#snmp-server host 192.0.2.207 port 163 v3 authPriv Lab3 inform timeout 1500 retries 3

Variable Definitions

The following table defines parameters for the snmp-server host command.

Variable

Value

inform [timeout <1-2147483647>] [retries <0-255>] [mms <0-2147483647>]

Sends SNMP notifications as inform (rather than trap). To use all three options in one command, you must use them in the following order:
  1. timeout <1-2147483647> specifies the timeout value in seconds with a range of 1–214748364.

  2. retries <0-255> specifies the retry count value with a range of 0–255.

  3. mms <0-2147483647> specifies the maximum message size as an integer with a range of 0–2147483647.

filter WORD<1-32>

Specifies the filter profile to use.

noAuthNoPriv|authNoPriv|AuthPriv

Specifies the security level.

port <1-65535>

Specifies the host server port number.

WORD<1-32>

Specifies the security name, which identifies the principal that generates SNMP messages.

WORD<1-256>

Specifies either an IPv4 or IPv6 address.