Simple Network Management Protocol (SNMP) is a network management protocol for IP networks which helps to record, store, and share information about the devices in the network. It is an application-layer protocol composed of an SNMP Manager, an SNMP Agent, and a Management Information Base (MIB) .
SNMP has three significant versions.
This document aims to show you how to configure the host with IP address 192.168.100.139 as the SNMP notification recipient of SNMPv2c traps using the Command Line Interface (CLI) of a switch.
This article assumes that you have already installed and configured the SNMP manager. It also assumes that you have already added the switch to the SNMP manager for monitoring.
SNMP community strings act as embedded passwords authenticating access to MIB objects. It is only defined in SNMPv1 and SNMPv2 since SNMPv3 works with users instead of communities. The users belong to groups that have access rights assigned to them. Use the community string as a password or group name when adding the switch to the SNMP Manager. A community string has to be configured when setting up SNMP so that the SNMP host and the SNMP manager would be able to connect.
A community string can have one of these properties:
To configure an SNMP community string, follow these steps:
Step 1. Log in to the switch.
Step 2. Switch to global configuration mode.
Step 3. In global configuration mode, configure the community string by entering the following command.
Note: In this example, SNMPCommunity will act as the password. This will be used when adding the switch to the SNMP Manager.
Step 4. Switch to the Privileged EXEC mode by entering exit command.
Step 5. Verify the configuration by running the command:
Step 6. (Optional) Save the settings in the configuration file.
Step 7. Press Y to proceed.
SNMP allows the switch to send notifications to SNMP managers when events occur. SNMP notifications can be traps or inform requests. A Trap is an SNMP message meant to notify the SNMP manager about the event that occurred. Traps are unreliable because the receiver does not send an acknowledgment when a Trap is received. An SNMP Inform operates on the same principle as a Trap. The main difference between a Trap and an Inform is that the remote application acknowledges the receipt of the Inform. Also, a Trap is discarded as soon as it is sent, while an Inform request is held in memory until a request is received, else it times out. SNMP Inform is not supported by SNMPv1.
This section, although optional, will guide you in setting up SNMP Notification Recipients through the CLI of the Switch.
Step 1. Log in to the switch.
Step 2. Switch to the global configuration mode.
Step 3. On global configuration mode, specify the notification recipient by running the following command:
Note: In this example, SNMPCommunity is entered.
Step 4. Switch to the Privileged EXEC mode by entering the exit command.
Step 5. (Optional) Save the settings in the configuration file.
Step 6. Press Y to confirm the action.
You should now have added an SNMP notification recipient.
Revision | Publish Date | Comments |
---|---|---|
1.0 |
13-Dec-2018
|
Initial Release |