Configuring the SNMP server hosts

SLX-OS supports SNMP version 1, version 2c, and version 3. Use the commands listed in the following table to configure the SNMPv1, SNMPv2c, and SNMPv3 hosts and their configurations.

Table 1. Commands for configuring SNMP server hosts
Command Description

[no] snmp-server host {ipv4-host | ipv6-host | dns-host} community-string [severity-level [none | debug | info | warning | error | critical] [udp-port port_number] [version [1 | 2c]

This command sets the destination IP addresses, version, community string (for version 1 and version 2c), and destination port for the traps.

The severity-level option is used to filter the traps based on severity.

The no form of the command changes the SNMP server host configurations to the default value.

[no] snmp-server v3host {ipv4-host | ipv6-host | dns-host} username [notifytype {traps | informs}] engineid engine-id severity-level [none | debug | info | warning | error | critical] udp-port port_number

This command specifies the recipient of the SNMP version 3 notification option.

The severity-level option is used to filter the traps or informs based on severity.

Use the no form of the command to remove a specific host.

Configuring the SNMP (version 1 or version 2c) server host

To set the trap destination IP addresses, version (1 or 2c), community string for SNMP version 1 and version 2c, and the destination port for the SNMP traps, perform the following steps.

  1. Enter the configure terminal command to access the global configuration level of the CLI.

    device# configure terminal
    Entering configuration mode terminal
  2. Enter the following command to set the trap recipient with IP address 192.0.2.2, which receives all traps with the severity levels of Critical, Error, Info, and Warning.

    device(config)# snmp-server host 192.0.2.2 public severity-level Info udp-port
    162 version 1
    Note

    Note

    To receive the traps, the management station IP address must be configured on the switch.
  3. Enter the do show running-config snmp-server command to verify the configuration.
    device(config)# do show running-config snmp-server
    snmp-server sys-descr "Extreme SLX9740-80C Switch/Router"
    snmp-server engineID local 80:0:6:34:b2:7e:88:0:10:a:14:d3:25
    snmp-server community $9$5NQFNEVN67kKklzWw+b/rg== groupname group2
    snmp-server community $9$dlGJTAP4O2fz40uz+6p24g== groupname group1
    snmp-server community $9$ZqrZyV4ln8u5MqJeUGHblg== groupname group3
    snmp-server host 10.20.192.72 $9$5NQFNEVN67kKklzWw+b/rg==
     version 2c
     severity-level Info
    !
    snmp-server host 10.20.192.72 $9$dlGJTAP4O2fz40uz+6p24g==
     severity-level Info
    !
    snmp-server user snmpteam1 groupname group3 auth sha auth-password nHW0ev6kLY priv AES128 priv-password nHW0ev6kLY encrypted
    snmp-server user snmpteam3 groupname group3 auth md5 auth-password XoooIwNn47 priv AES128 priv-password XoooIwNn47 encrypted
    snmp-server user snmpteam4 groupname grpauth_nopriv auth sha auth-password nHW0ev6kLY encrypted
    snmp-server user user groupname group3 auth md5 auth-password XoooIwNn47 priv AES128 priv-password XoooIwNn47 encrypted
    snmp-server v3host 10.20.192.72 snmpteam1
     severity-level Info
    !
    snmp-server view all 1 included
    snmp-server view All 1 included
    snmp-server group group1 v1 read all write all notify all
    snmp-server group group2 v2c read all write all notify all
    snmp-server group group3 v3 priv read all write all notify all
    snmp-server group grpauth_nopriv v3 auth read All write All notify All
    dutA(config)# do show running-config snmp-server
    snmp-server sys-descr "Extreme SLX9740-80C Switch/Router"
    snmp-server engineID local 80:0:6:34:b2:7e:88:0:10:a:14:d3:25
    snmp-server community $9$5NQFNEVN67kKklzWw+b== groupname group2
    snmp-server community $9$dlGJTAP4O2fz40uz+6p== groupname group1
    snmp-server community $9$ZqrZyV4ln8u5MqJeUGH== groupname group3
    snmp-server host 10.20.192.72 $9$5NQFNEVN67kKklzWw+b==
     version 2c
     severity-level Info
    !
    snmp-server host 10.20.192.72 $9$dlGJTAP4O2fz40uz+6p==
     severity-level Info
    !
    snmp-server user snmpteam1 groupname group3 auth sha auth-password nHW0ev6kLY priv AES128 priv-password nHW0ev6kLY encrypted
    snmp-server user snmpteam3 groupname group3 auth md5 auth-password XoooIwNn47 priv AES128 priv-password XoooIwNn47 encrypted
    snmp-server user snmpteam4 groupname grpauth_nopriv auth sha auth-password nHW0ev6kLY encrypted
    snmp-server user user groupname group3 auth md5 auth-password XoooIwNn47 priv AES128 priv-password XoooIwNn47 encrypted
    snmp-server v3host 10.20.192.72 snmpteam1
     severity-level Info
    !
    snmp-server view all 1 included
    snmp-server view All 1 included
    snmp-server group group1 v1 read all write all notify all
    snmp-server group group2 v2c read all write all notify all
    snmp-server group group3 v3 priv read all write all notify all
    snmp-server group grpauth_nopriv v3 auth read All write All notify All
    device(config)#

Configuring the SNMPv3 server

Use the snmp-server v3-host command to specify the recipient of SNMP version 3 notifications: traps or informs. The following example describes the procedure for configuring the recipient of the SNMPv3 informs.

To configure the SNMPv3 host to receive the inform, perform the following steps.
  1. Enter the configure terminal command to access the global configuration level of the CLI.
    device# configure terminal
    Entering configuration mode terminal
  2. Enter the following command to set the inform recipient with IP address 192.0.2.2, which receives all traps with the severity levels of Critical, Error, Info, and Warning.

    device(config)# snmp-server v3host 192.0.2.2 snmpadmin1 notifytype informs
    engineid 80:00:05:23:01:AC:1A:01:79 severity-level Info udp-port 4425
    Note

    Note

    To receive the SNMP informs, the username, authentication protocol, privacy protocol, UDP port number, and engine ID must match between the switch and management station.

  3. Enter the show running-config snmp-server command to verify the configuration.
    device(config)# do show running-config snmp-server
    snmp-server sys-descr "Extreme SLX9740-80C Switch/Router"
    snmp-server engineID local 80:0:6:34:b2:7e:88:0:10:a:14:d3:25
    snmp-server community $9$5NQFNEVN67kKklzWw+b/rg== groupname group2
    snmp-server community $9$dlGJTAP4O2fz40uz+6p24g== groupname group1
    snmp-server community $9$ZqrZyV4ln8u5MqJeUGHblg== groupname group3
    snmp-server host 10.20.192.72 $9$5NQFNEVN67kKklzWw+b/rg==
     version 2c
     severity-level Info
    !
    snmp-server host 10.20.192.72 $9$dlGJTAP4O2fz40uz+6p24g==
     severity-level Info
    !
    snmp-server user snmpteam1 groupname group3 auth sha auth-password nHW0ev6kLY priv AES128 priv-password nHW0ev6kLY encrypted
    snmp-server user snmpteam3 groupname group3 auth md5 auth-password XoooIwNn47 priv AES128 priv-password XoooIwNn47 encrypted
    snmp-server user snmpteam4 groupname grpauth_nopriv auth sha auth-password nHW0ev6kLY encrypted
    snmp-server user user groupname group3 auth md5 auth-password XoooIwNn47 priv AES128 priv-password XoooIwNn47 encrypted
    snmp-server v3host 10.20.192.72 snmpteam1
     severity-level Info
    !
    snmp-server view all 1 included
    snmp-server view All 1 included
    snmp-server group group1 v1 read all write all notify all
    snmp-server group group2 v2c read all write all notify all
    snmp-server group group3 v3 priv read all write all notify all
    snmp-server group grpauth_nopriv v3 auth read All write All notify All
    dutA(config)# do show running-config snmp-server
    snmp-server sys-descr "Extreme SLX9740-80C Switch/Router"
    snmp-server engineID local 80:0:6:34:b2:7e:88:0:10:a:14:d3:25
    snmp-server community $9$5NQFNEVN67kKklzWw+b== groupname group2
    snmp-server community $9$dlGJTAP4O2fz40uz+6p== groupname group1
    snmp-server community $9$ZqrZyV4ln8u5MqJeUGH== groupname group3
    snmp-server host 10.20.192.72 $9$5NQFNEVN67kKklzWw+b==
     version 2c
     severity-level Info
    !
    snmp-server host 10.20.192.72 $9$dlGJTAP4O2fz40uz+6p==
     severity-level Info
    !
    snmp-server user snmpteam1 groupname group3 auth sha auth-password nHW0ev6kLY priv AES128 priv-password nHW0ev6kLY encrypted
    snmp-server user snmpteam3 groupname group3 auth md5 auth-password XoooIwNn47 priv AES128 priv-password XoooIwNn47 encrypted
    snmp-server user snmpteam4 groupname grpauth_nopriv auth sha auth-password nHW0ev6kLY encrypted
    snmp-server user user groupname group3 auth md5 auth-password XoooIwNn47 priv AES128 priv-password XoooIwNn47 encrypted
    snmp-server v3host 10.20.192.72 snmpteam1
     severity-level Info
    !
    snmp-server view all 1 included
    snmp-server view All 1 included
    snmp-server group group1 v1 read all write all notify all
    snmp-server group group2 v2c read all write all notify all
    snmp-server group group3 v3 priv read all write all notify all
    snmp-server group grpauth_nopriv v3 auth read All write All notify All
    device(config)#