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
Jeremy’s IT Lab előadásvideó:
Parancsok
Parancslista
SNMP Globális Parancsok
SNMP
Eredeti hivatkozása
- snmp-server contact contact-info
-->Beállítja az SNMP szerver kapcsolattartási (contact) információit- snmp-server location location-info
-->Beállítja az SNMP szerver fizikai helyének (location) információit- snmp-server community password ro
-->Beállítja a community jelszót csak olvasható (read-only) műveletekhez- snmp-server community password rw
-->Beállítja a community jelszót írási-olvasási (read-write) műveletekhez- snmp-server host ip-address version 2c community-string
-->Megadja az NMS-t, a verziót és a community stringet- snmp-server enable traps trap-types
-->Engedélyezi a megadott trap (értesítés) típusokat
SNMP Információk
SNMP Általános Információk
A Simple Network Management Protocol (SNMP) egy iparági szabvány keretrendszer és protokoll, amely hálózati eszközök állapotának monitorozására, konfigurációs módosítások végrehajtására és riasztások kezelésére szolgál.
- Az SNMP agentek (kliensek) a 161-es porton, míg az SNMP managerek (szerverek / NMS) a 162-es porton futnak.
- Az SNMP-ben két fő eszköztípus létezik:
- Menedzselt Eszközök (Managed Devices)
- Azok az eszközök, amelyeket SNMP segítségével felügyelünk és menedzselünk.
- (Pl. hálózati eszközök: routerek, switchek).
- Network Management Station (NMS)
- Az az eszköz / szerver, amely felügyeli és irányítja a menedzselt eszközöket.
- Ez az SNMP 'szerver'.
- Menedzselt Eszközök (Managed Devices)
SNMP Fő Műveletei
Három fő működési alapelv létezik az SNMP-ben:
- A menedzselt eszközök eseményekről értesíthetik az NMS-t.
- Az NMS állapotinformációkat kérhet le a menedzselt eszközöktől.
- Az NMS konfigurációs paraméterek módosítására utasíthatja a menedzselt eszközöket.
SNMP Komponensek
![]() |
|---|
| SNMP Komponensek Ábra |
1. NMS
Az NMS két fő SNMP komponenst tartalmaz:
- SNMP Manager
- Az NMS-en futó SNMP szoftvermodul, amely közvetlenül kommunikál a menedzselt eszközökkel.
- Fogadja az értesítéseket, lekérdezéseket küld, konfigurációs változtatásokat továbbít stb.
- SNMP Application
- Felhasználói felületet (UI/GUI/CLI) biztosít a hálózati rendszergazda számára.
- Megjeleníti a riasztásokat, statisztikákat, diagramokat, grafikonokat stb.
2. Menedzselt Eszközök (Managed Devices)
A menedzselt eszközökön két SNMP elem fut:
- SNMP Agent
- A menedzselt eszközökön futó háttérfolyamat (szoftver), amely kapcsolatot tart az NMS-en lévő SNMP managerrel.
- SNMP Management Information Base (MIB)
- Egy adatbázis-struktúra, amely tartalmazza az SNMP által felügyelt változókat (variables).
- Minden egyes változót egy egyedi Object ID (OID) azonosít.
- Példa változók: interfész állapota, átviteli forgalom, CPU terheltség, hőmérséklet stb.
SNMP Object ID-k (OID-k)
Az SNMP Object ID-k (OID) egy globális hierarchikus faszerkezetben helyezkednek el.
![]() |
|---|
| Példa egy Object ID (OID) felépítésére |
SNMP Verziók
Az évek során több SNMP verzió látott napvilágot. A három legfontosabb verzió:
- SNMPv1
- Az SNMP eredeti, legelső verziója.
- SNMPv2c ^snmp-snmpv2c
- Lehetővé teszi az NMS számára nagy mennyiségű információ lekérését egyetlen kérésben, így sokkal hatékonyabb (GetBulk üzenet).
- A 'c' betű a community string-ekre utal, amelyek egyszerű szöveges jelszóként működnek.
- SNMPv3
- Az SNMP biztonságos változata, amely támogatja a titkosítást (encryption) és a hitelesítést (authentication).
SNMP Üzenetek
SNMP Üzenettípusok Táblázata
| Üzenetosztály | Leírás | Üzenetek |
|---|---|---|
| Read | Az NMS által küldött üzenetek adatok olvasására a menedzselt eszközökről. | Get GetNext GetBulk |
| Write | Az NMS által küldött üzenetek adatok módosítására a menedzselt eszközökön. | Set |
| Notification | A menedzselt eszközök által küldött üzenetek az NMS riasztására adott eseményekről. | Trap Inform |
| Response | Korábbi kérésre/üzenetre küldött válaszüzenetek. | Response |
1. SNMP Read (Olvasási) Üzenetek
- Get
- A manager által az agent-nek küldött kérés egy vagy több változó (OID) értékének lekérésére.
- Az agent egy Response üzenetben küldi vissza az egyes változók aktuális értékét.
- GetNext
- A manager által küldött kérés a Management Information Base-ben (MIB) elérhető következő változók felderítésére.
- GetBulk ^snmp-messages-getbulk
- A GetNext hatékonyabb, kötegelt változata (az SNMPv2-ben vezették be).
2. SNMP Write (Írási) Üzenetek
- Set
- A manager által küldött kérés egy vagy több változó értékének módosítására a menedzselt eszközön.
- Az agent egy Response üzenettel igazolja vissza az új értékek beállítását.
3. SNMP Notification (Értesítési) Üzenetek
- Trap
- Az agent által az manager felé küldött aszinkron riasztás/értesítés.
- A manager nem küld visszaigazoló (Response) üzenetet a Trap fogadásáról, így ezek az üzenetek 'nem megbízhatónak' minősülnek.
- Inform
- Olyan értesítési üzenet, amelyre a manager köteles nyugtázó Response választ visszaküldeni (megbízható kézbesítés).
4. SNMP Response (Válasz) Üzenetek
- Response
- Válaszként küldött üzenet a fent említett különféle kérésekre és megerősítést igénylő üzenetekre.
SNMP Konfiguráció Cisco IOS-en
snmp-server contact CONTACT-INFO- Beállítja az SNMP szerver kapcsolattartási (contact) adatait
snmp-server location LOCATION-INFO- Beállítja az SNMP szerver fizikai helyének (location) adatait
snmp-server community PASSWORD ro- Beállítja a community jelszót csak olvasható (read-only) lekérdezésekhez
snmp-server community PASSWORD rw- Beállítja a community jelszót írási-olvasási (read-write) műveletekhez
snmp-server host IP-ADDRESS version 2c COMMUNITY-STRING- Megadja az NMS IP címét, a verziót és a community stringet
snmp-server enable traps TRAP-TYPES- Engedélyezi a megadott trap (értesítés) típusokat

