Jeremy’s IT Lab lecture video:
Commands
Commands List
SNMP Global Commands
SNMP
Link to original
- snmp-server contact contact-info
-->
Sets the SNMP server contact information- snmp-server location location-info
-->
Sets the SNMP server location information- snmp-server community password ro
-->
Sets the community password for read-only operations- snmp-server community password rw
-->
Sets the community password for read-write operations- snmp-server host ip-address version 2c community-string
-->
Specifies the NMS, version and community string- snmp-server enable traps trap-types
-->
Enables specific trap (notification) types
SNMP Info
SNMP General Information
Simple Network Management Protocol (SNMP) is an industry-standard framework and protocol that can be used to monitor the status of devices, make configuration changes and etc.
- SNMP agents (clients) run on port 161 while SNMP managers (servers) run on port 162.
- There are two main types of devices in SNMP
- Managed Devices
- These are the devices being managed using SNMP.
- (Ex. network devices like routers and switches).
- Network Management Station (NMS)
- The device/devices managing the managed devices.
- This is the SNMP ‘server’.
- Managed Devices
SNMP Main Operations
There are three main operations used in SNMP
- Managed devices can notify the NMS of events.
- The NMS can ask the managed devices for information about their current status.
- The NMS can tell the managed devices to change aspects of their configuration.
SNMP Components
![]() |
---|
SNMP Components Image |
1. NMS
The NMS has two SNMP components, being:
- SNMP Manager
- It is the SNMP software on the NMS that interacts with the managed devices.
- It receives notifications, sends requests for information, sends configuration changes, and etc.
- SNMP Application
- Provides an interface for the network admin to interact with.
- Displays alerts, statistics, charts and etc.
2. Managed Devices
The Managed devices run two SNMP components, being:
- SNMP Agent
- It is the SNMP software running on the managed devices that interacts with the SNMP manager on the NMS.
- SNMP Management Information Base (MIB)
- It is the structure that contains the variables that are managed by SNMP
- Each variable is identified with an Object ID (OID)
- Example variables: Interface status, traffic throughout, CPU usage, temperature, and etc.
SNMP Object IDs (OIDs)
SNMP Object IDs (OID) are organized in a hierarchical structure
![]() |
---|
Example of an Object ID (OID) |
SNMP Versions
A lot of SNMP versions have been developed. The most used three versions are:
- SNMPv1
- The original version of SNMP
- SNMPv2c ^snmp-snmpv2c
- Allows the NMS to retrieve large amounts of information in a single request, so it is more efficient (GetBulk message)
- The ‘c’ in the name refers to community strings which are used as passwords
- SNMPv3
- Secure version of SNMP that supports encryption and authentication.
SNMP Messages
SNMP Message Types Table
Message Class | Description | Messages |
---|---|---|
Read | Messages sent by the NMS to read information from the managed devices. | Get GetNext GetBulk |
Write | Messages sent by the NMS to change information on the managed devices. | Set |
Notification | Messages sent by the managed devices to alert the NMS of a particular event. | Trap Inform |
Response | Messages sent in response to a previous message/request. | Response |
1. SNMP Read Messages
- Get
- A request sent from the manager to the agent to retrieve the value of a variable (OID), or multiple variables.
- The agent will send a Response message with the current value of each variable
- GetNext
- A request sent from the manager to the agent to discover the available variables in the Management Information Base (MIB)
- GetBulk ^snmp-messages-getbulk
- A more efficient version of the GetNext message. (Introduced in SNMPv2)
2. SNMP Write Messages
- Set
- A request sent from the manager to the agent to change the value of one or more variables.
- The agent will send a Response message with the new updated values.
3. SNMP Notification Messages
- Trap
- A notification sent from the agent to the manager.
- The manager does not send a Response message to acknowledge that it has received the Trap, so these messages are considered ‘unreliable’.
- Inform
- A notification message that is acknowledged with a Response message
4. SNMP Response Messages
- Response
- Sent as a response to a variety of messages, like the ones previously mentioned.
SNMP Configuration on Cisco IOS
snmp-server contact CONTACT-INFO
- Sets the SNMP server contact information
snmp-server location LOCATION-INFO
- Sets the SNMP server location information
snmp-server community PASSWORD ro
- Sets the community password for read-only operations
snmp-server community PASSWORD rw
- Sets the community password for read-write operations
snmp-server host IP-ADDRESS version 2c COMMUNITY-STRING
- Specifies the NMS, version and community string
snmp-server enable traps TRAP-TYPES
- Enables specific trap (notification) types