2

I have learned SNMP recently. Basically, I understood it by making a comparison with a normal database system. So let me just run you through an overview of my understanding.

So, we have a central database (the big tree), which consists of all the information about the system, network, interfaces and other resources in a structured manner as described by MIB files. Each piece of information is identified by an OID (object identifier). Using various commands like snmpget, snmpwalk, snmpbulkwalk etc, the SNMP MASTER can fetch each piece of information or many at a time from the agent. These commands are actually querying the central database for information and sending it to the MASTER.

MASTER can update this central database by using a snmpset command.

snmptrap or snmpinform are the commands that agent uses to tell the MASTER about the occurrence of an event. So, if I do the following:

snmptrap -v 2c -c public localhost "" NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatNotification netSnmpExampleHeartbeatRate i 9323

The agent will the MASTER that his netSnmpExampleHeartbeatRate is 9323. So, is this information stored in the central database under the OID - .1.3.6.1.4.1.8072.2.3.2.1?

$snmptranslate NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatRate -On
.1.3.6.1.4.1.8072.2.3.2.1

I tried a snmpget to confirm it.

$snmpget -v2c -c public localhost NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatRate
NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatRate = No Such Object available on this agent at this OID

See, it tells no object available. What I understand is that it is not stored anywhere. snmptrap sends the information, and that is it. Now I have understood that I can log the trap information. But does it store it anywhere in a place which can be queried? Did I miss anything?

0

A device sends a trap because of an event. The sending device may, or may not, log the event somewhere, but it doesn't keep it in a database. The trap is just a signal.

For instance, a switch could send an SNMP trap or inform when a switch port goes down (e.g. a user has disconnected or shut down his PC). The switch may, or may not, be configured to log such event in its log (which is only so big and eventually gets overwritten), or to a more permanent logging server. You can send an SNMP get to see the status of the switch ports, but not to ask for a copy of the event. The event happened, maybe got logged somewhere, and you were informed about the event.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.