An OID in SNMP is an "Object Identifier". It's an address used to identify devices and their statuses. Want to know the temperature reading coming from a sensor at your mountaintop remote facility? There's an OID for that.
If you're a professional responsible for managing your organization's large-scale network, read on. Here we will break down the concept of OIDs so you can take that knowledge with you onto the job and keep your enterprise's operations running smoothly.
How do you read an OID?
The format of an OID can be confusing at first. It's a huge string of numbers like this:
Then we look at the the first few numbers, which rarely change:
The first part of the OID will be the same for every piece of equipment you'll ever use:
We're partway through this OID. What do we know so far?
So far, we know that a private enterprise will be declared as the manufacturer of this SNMP device. This will be true for virtually every device you work with. That makes "126.96.36.199.4.1..." an almost-universal prefix to OIDs. Let's continue:
Now we know we're working with an RTU from DPS
Notice how long the "device manufacturer" number is ("2682"). There are a lot of manufacturers out there, and they all must have a unique integer value. This section of the OID also told us that we're working with an RTU, which collects alarms from non-SNMP equipment. Native SNMP gear would have a different OID value here. Let's finish reading this OID now:
OIDs are defined in the SNMP MIB file, a kind of "codebook" for SNMP. The manufacturer (DPS Telecom in this example) spells out the second half of the OID for their own devices by supplying a MIB file to their users. The first half is established by a standard referenced "RFC" MIB used worldwide.
Let's Consider the OID From a Slightly Different Angle Now...
The Management Information Database (MIB)
To monitor network alarms, you must know your alarm points. Your apartment or house address indicates a specific location by country, state, city, zip code, street, and house number. SNMP has Object Identifiers (OIDs) that define each thing for the manager and agents.
SNMP Object Identifiers (OIDs) point to network objects stored in a database called the Management Information Base, often referred to as the "MIB". A MIB holds the structure of the network alarms being monitored (like a map of the "city"), and it uses the OIDs to keep track of the individual components (like the address to a house or other location). In this example, an SNMP OID is like the address the fire truck would drive to if the fire alarm sounded. What if a fire broke out at your house, and you called the fire department with GPS coordinates (representing the Object ID or OID)? The fire department would have to look that up in its MIB to determine the correct street address.
In telecom, SNMP OIDs describe specific locations in the network. The OID allows the MIB to translate the location of the event into a status description for your network technicians.
A quick, 12-page SNMP Introduction by Marshall DenHartog where you'll learn about traps, message formats, the MIB, and other fundamental SNMP concepts.
Dot Format notation
While it may look daunting, the OID follows a simple structure, with each "dot" segment identifying part of a network element. Going back to the home address example, the beginning of the Object Identifier tells us the hemisphere of the world, the country, state, city, zipcode, street address and eventually leads us to our driveway. In the above OID, the specific "driveway" is 102. With this structure, very specific elements can be identified and located even in very complex networks. An SNMP Manager (ex. T/Mon LNX) translates these SNMP OIDs into a value that is then assigned readable labels in the Management Information Base (MIB). This allows the SNMP manager to produce messages that can be read by people.
MIB and the SNMP Manager
When the SNMP Manager, a T/Mon in this case, requests the value ("state") of any object it is monitoring, it sends a message with that object's OID to its Management Information Base. The MIB will decode the address and attach a text description to it. This allows the SNMP Manager to present the value of the alarm condition with the identifying description of the labeled alarm.
So for example, let's say the SNMP Manager wants to know if there is a car in the driveway of your house (a "yes or no" question, often referred to as a discrete alarm in the alarm monitoring world). The SNMP Manager would look up the corresponding reference in the MIB in order to "poll" (ask) if there is a car in the driveway at 123 Main St. The MIB references 123 Main St. and translates it into the OID of your driveway. In our example OID above, it would be 123 Main St = 188.8.131.52.4.1.26184.108.40.206. The driveway (or alarm point we want to monitor) would be represented by the "102" portion of the address. The "value" reported is the current state of the driveway 102 : occupied by a car or not.
The sensor at the driveway reports back: Nope. Nobody's in the driveway.
This message is captured by the SNMP Manager which again uses the Management Information Base to tie the OID sensor message that was reported by the "driveway sensor" (a simple "No" response) back into the human readable 123 Main St. which is displayed.
If an object does not have an OID listed within an MIB, the SNMP Manager cannot identify it. Even if that object has a sensor and can transmit data, the SNMP Manager is blind without the MIB. For a condition or device to be monitored, it must have a corresponding MIB definition.
Vendors and Their Unique MIBs
Finally, remember that the first several pieces of each OID are almost always the same. These upper location levels are defined by a series of standard reference within the MIB. These series are called RFCs, or Requests for Comments. The RFCs that define SNMP OIDs are part of a larger group of RFC documents that define the Internet as a whole. Individual vendors create their own MIBs that only include the OIDs for their device.
Real World Scenarios
Here at DPS, we will occasionally have clients that require specific MIBs for their applications. One client, James, needed to be able to identify all of the printers on his LAN via SNMP by asking every device for its OID at user-defined time intervals. He needed to email any reporting events to the SNMP monitor, and he had to do that without busting his budget.
Another client had a need to send certain SET commands to remote units at some microwave sites. The units were not capable of sending those commands. Our solution had custom OIDs that were configured with variable bindings to accept SNMP Traps. This allowed monitoring and control of the remote microwave sites with the ability to toggle up to 40 discrete relays in the system. This solution saved them money and down time and increased the use of existing equipment for the customer.