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.
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. |
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.
device# configure terminal Entering configuration mode terminal
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
To receive the traps, the management station IP address must be configured on the switch.device(config)# do show running-config snmp-server snmp-server contact "Field Support." snmp-server location "End User Premise." snmp-server sys-descr "Extreme VDX Switch." snmp-server community ConvergedNetwork snmp-server community OrigEquipMfr rw snmp-server community "Secret C0de" rw snmp-server community common snmp-server community private rw snmp-server community public snmp-server host 192.0.2.2 public udp-port 162 severity-level Info
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.
device# configure terminal Entering configuration mode terminal
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
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.
device# show running-config snmp-server snmp-server contact "Field Support." snmp-server location "End User Premise." snmp-server sys-descr "Extreme BR-SLX9850-8 Router" snmp-server community ConvergedNetwork snmp-server community OrigEquipMfr rw snmp-server community "Secret C0de" rw snmp-server community common snmp-server community private rw snmp-server community public snmp-server user snmpadmin1 auth md5 auth-password "5MmR2qGjoryjusN9GL5kUw==\n" priv DES priv-password "2ThfbBNgPsCyI25tLI2yxA==\n" encrypted snmp-server user snmpadmin2 groupname snmpadmin snmp-server user snmpadmin3 groupname snmpadmin snmp-server user snmpuser2 snmp-server user snmpuser3 snmp-server v3host 192.0.2.2 snmpadmin1 udp-port 4425 notifytype informs engineid 80:00:05:23:01:AC:1A:01:79 severity-level Info !