[Music] Hey everybody! Welcome to this SNMP explainer. In just a couple of minutes I'm gonna teach you enough about SNMP to be able to start monitoring devices, While SNMP is a little complex there's a lot you don't need to know just to start monitoring so we're gonna focus on the absolute basics here and I promise I won't get you lost in unnecessary details.
How are we gonna do that? Well we're gonna talk about some basic background information we're gonna talk about two key terms you need to know we're gonna talk about why switches and routers are simple to monitor we're gonna talk about how SNMP works on a practical level and we're gonna talk about the different versions of SNMP. Are you ready?
Let's get started. SNMP stands for Simple Network Management Protocol. It's been around since 1988 so it's pretty well used.
SNMP was developed to allow administrators to both monitor networking equipments current state and also remotely modify settings and configurations on the equipment. While SNMP was initially developed for switchers and routers it has since been extended to a wide array of other devices such as Windows and Linux machines printers and uninterruptible power supplies among many many other things. There are two key terms you need to know OID and MIB.
OID is short for Object Identifier. Think of it like this anything and everything on a device that can't be monitored with SNMP has an OID. For example say I want to monitor the temperature on a network attached storage device we have here at Nagios.
The OID for the temperature sensor on the device is a bunch of numbers separated by dots. That number might look confusing but all you really have to know is each thing we can monitor like device temperature has an OID. You might think of an OID as something similar to an IP address for a value.
We use an application like Nagios XI to ask the device what the value of any particular OID happens to be. MIB is short for Management Information Base. That sounds a lot more complicated than it actually is.
An MIB is a text file that allows us to translate numerical OIDs into word-based OIDs so instead of using the numerical OID for the temperature sensor in our example we can use this word-based OID which makes it a lot easier to understand what we're monitoring. Now technically you don't have to use MIBs at all. You could always use only numerical OIDs but MIBs can make your life a lot easier.
There are a number of standard OIDs and MIBs that are incorporated into most SNMP implementations by default. For example on almost any system out there you should be able to ask the uptime of a device with the OID sysuptime. 0.
This is great because when you go to do basic switch or router monitoring in Nagios XI you don't need to know a single OID or find any MIBs because those are already built in. You really only need to figure out OIDs and MIBs when you have a non-standard OID to monitor like the temperature sensor on a network attached storage device like we just talked about a minute ago. How do you find out what the OIDs are and where do you find MIBs?
The best place to start on both of those questions will be the product manuals from the manufacturer of the device. Many times these documents are available online and a simple search will get you the information you need. So here is how SNMP gets used in day-to-day practice.
You have a network monitoring system like Nagios this is what monitors the things you want to monitor and then you have the things you want to monitor like switches and routers and servers and uninterruptible power supplies. There are two ways to use SNMP. The first way is called polling.
With polling the network monitoring system connects to the monitored device on port 161 and tells the device which OID it wants information on the device then responds with the information to the network monitoring system's port 161. In the second way we do what's called notifying. With notifying the device simply sends a message about an OID to the network monitoring systems port 162.
These messages are variously called either traps notifications or informs. There are three versions of the SNMP protocol version 1 version 2c and version 3. The biggest difference for our purposes is that version 3 is more secure than versions 1 and 2c in two ways.
First for versions 1 and 2c you don't even have to supply a username. All you need is a special password called the community string. version 3 gets rid of the community string and makes admins specify a username and a password.
Second versions 1 and 2c don't offer encryption but version 3 does keep in mind that SNMP can be used to change device settings so if an attacker were able to intercept and read your unencrypted v1 or v2c SNMP packets the attacker could take control of the device. You might find out there that SNMP version 2c is still pretty commonly used. Why wouldn't everyone always use version 3?
Well quite simply for a number of reasons. Not all devices and operating systems support version 3. It is best practice however to use version 3 whenever possible.
You now know enough to be dangerous. You know about OIDs and MIBs. You know about the two ways to use SNMP to monitor that would be polling and traps.
You know switches and routers are easy to monitor and you know about SNMP versions. You know enough to get out there and start monitoring with SNMP. Thanks for watching.
Download Nagios XI from the link in the description below and you'll be monitoring in no time!