Configure SNMP settings

Configure Simple Network Management Protocol (SNMP) to define or modify the SNMP settings, and specify the security level for SNMP communications.

Procedure

  1. Enter Global Configuration mode:

    enable

    configure terminal

  2. Enable the generation of authentication traps:

    snmp-server authentication-trap enable

  3. Configure the contact information for the system:

    snmp-server contact WORD<0-255>

  4. Configure the SNMP and IP sender flag to the same value:
    Note

    Note

    This step only applies to VSP 8600 Series.

    snmp-server force-iphdr-sender enable

  5. Send the configured source address (sender IP) as the sender network in the notification message:
    Note

    Note

    This step only applies to VSP 8600 Series.

    snmp-server force-trap-sender enable

  6. Create an SNMPv1 server host:

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

  7. Create an SNMPv2 server 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>]

  8. Create an SNMPv3 server 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>]

  9. Configure the system location:

    snmp-server location WORD<0-255>

  10. Enable login-success traps:

    snmp-server login-success-trap enable

  11. Configure the system name:

    snmp-server name WORD<0-255>

  12. Create a new entry in the notify filter table:

    snmp-server notify-filter WORD<1-32> WORD<1-32>

  13. Configure the SNMP trap receiver and source IP addresses:
    Note

    Note

    This step only applies to VSP 8600 Series.

    snmp-server sender-ip {A.B.C.D} {A.B.C.D}

Example

Enable the generation of SNMP traps. Configure the contact information for the system. Configure the SNMP and IP sender flag to the same value. Configure hosts to receive SNMP notifications:

Note

Note

Exception: configuring the SNMP and IP sender flag to the same value only applies to VSP 8600 Series.

Switch:1>enable
Switch:1#configure terminal
Switch:1(config)#snmp-server authentication-trap enable
Switch:1(config)#snmp-server contact xxxx@company.com
Switch:1(config)#snmp-server force-iphdr-sender enable
Switch:1(config)#snmp-server host 192.0.2.16 port 1 v1 SNMPv1 filter SNMPfilterv1

Variable Definitions

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

Table 1. Variable definitions

Variable

Value

authentication-trap {enable}

Enables generation of SNMP server authentication traps.

contact WORD<0-255>

Changes the sysContact information for the switch. WORD<0-255> is an ASCII string from 0–255 characters (for example, a phone extension or email address).

host WORD<1-256> [port <1-65535>] {v1 WORD<1-32>|v2c WORD<1-32> [inform] [timeout <1-2147483647>][retries <0-255>][mms <0-2147483647>]]|v3 {noAuthPriv|authNoPriv|authPriv} WORD<1-32> [inform [timeout <1-2147483647>][retries <0-255>]]} [filter WORD<1-32>]

Configures hosts to receive SNMP notifications.
  • host WORD<1-256> specifies the IPv4 or IPv6 host address

  • port <1-65535> specifies the port number

  • v1 WORD<1-32> specifies the SNMPv1 security name

  • v2c WORD<1-32> specifies the SNMPv2 security name

  • inform specifies the notify type

  • timeout <1-2147483647> specifies the timeout value

  • retries <0-255> specifies the number of retries

  • mms < 1-2147483647> specifies the maximum message size

  • v3 specifies SNMPv3

  • noAuthPriv|authNoPriv|authPriv specifies the security level

  • WORD<1-32> specifies the user name

  • filter specifies a filter profile name

location WORD<0-255>

Configures the sysLocation information for the system. <WORD 0-255> is an ASCII string from 0–255 characters.

login-success-trap {enable}

Enables generation of SNMP server login-success traps.

name WORD<0-255>

Configures the sysName information for the system. <WORD 0-255> is an ASCII string from 0–255 characters.

notify-filter WORD<1-32> WORD<1-32>

Creates a new entry in the notify filter table. The first WORD<1-32> specifies the filter profile name, and the second WORD<1-32> specifies the subtree object identifier (OID).

sender-ip {A.B.C.D} {A.B.C.D}
Note:

Exception: only supported on VSP 8600 Series.

The first {A.B.C.D} configures the SNMP trap receiver and source IP addresses. Specify the IP address of the destination SNMP server that receives the SNMP trap notification in the first IP address.

The second {A.B.C.D} specifies the source IP address of the SNMP trap notification packet that is transmitted in the second IP address. If you set this to 0.0.0.0, the system uses the IP address of the local interface that is closest (from an IP routing table perspective) to the destination SNMP server.