You are on page 1of 15

IT Geek: Monitor Network Devices with SNMP (Simple Network Man...

1 of 15

http://www.howtogeek.com/141135/it-geek-monitor-network-devices-w...

File not found

IT Geek: Monitor Network Devices with SNMP (Simple Network


Management Protocol)

Have you ever needed to know what a remote device thinks the value of a metric is? HTGexplainswhat the Simple
NetworkManagementProtocol (SNMP) is and how can you use it to monitor network devices.
Image byistargazer

Overview
The Simple NetworkManagementprotocol (SNMP)was created to give a common protocol foundation that network
administrators can expect their devices manufacturers will use to exposedierentaspects ofthe product.Informationsuch
as CPU load, routing tables, and network trac statistics, among many others, can all be accessedremotelywith SNMP. One
can also use SNMP to set congurations on devices that support it, but that isbeyondthe scope of this guide.
The read in/out from SNMP is done using a Community string. As the administrator, it is your job to set this string. Some
examples on how to do this follow below.
Once connected to the device, you need to pull it forinformationusing OIDs.DierentOIDs givedierent pieces
ofinformation, and whilein this guide we will be focusing on network trac, you are encouragedto explore this world
further.We will explain how to get the mysteriousOIDs below.

Authorsramblings
Ive started using this nifty way of viewing the routers info, way back in the rst days of my DD-WRT studies.Nowadays, if i
dont have it? I just feelblind. I simply cannot stress howvaluableit is, when a user complainsabout the network speed, to
be able to glance over what the border router says is theutilizationand quickly resolve the issue.

Reading/graphing SNMP information (OIDs)


For instantgratications sake, the how to read the SNMPinformation is placed rst in the article, as
mostpeoplewontneed the conguration part over and over
Alright, so youve congured the device for SNMP (if not, see some example how tos below), but how do you know what
OIDs to read, and for that matter,how do you actually do it?There are numerouscommercialand free programs
toachievethis exact goal. We willfocuson a couple of free ones you can usehasslefree for graphing orbrowsingthe entire
OIDs name space.
Bandwith Monitor fromSolarwinds (Graphing)
One cantreallytalk about network monitoring without running intoSolarwinds, as its one of the majorplayers in
thiseld. We will not go into theplethoraof networkingproductsSolarwinds oers, but rather focus on afreeutilitycalled
FREE Real-Time Bandwidth Monitor.

12/04/2016 22:48

IT Geek: Monitor Network Devices with SNMP (Simple Network Man...

2 of 15

http://www.howtogeek.com/141135/it-geek-monitor-network-devices-w...

Thisutilityhas twodrawbacks:
1. It is aimed to show networkbandwidth, so is not suited forretrievingother SNMPinformation.
2. It doesnt give an option to save/open conguration les.
If the above limitations are an issue, read on to one of the other options.
Download and install using the regular Next -> Next -> Finishprocedure and open the program.
You should be presented with a wizard as shown below.Fill in the target devices IP and community information and click
Next.

The program will pull the device for its interfaces and show them in afriendlyformatted,colorized, and name enumerated
list.

Choose the interfaces you wish to monitor (multiple selection is possible with CTRL) and click Next.

12/04/2016 22:48

IT Geek: Monitor Network Devices with SNMP (Simple Network Man...

3 of 15

http://www.howtogeek.com/141135/it-geek-monitor-network-devices-w...

In the example above, weve selected two interfaces called DSL wan1 & ATM wan2. You can accept thedefaultsettings
and click Launch Monitor.

Graph windows as the above one, should open up and start to show trac information with a 5 second (congurable)
refresh interval.
Note about the refresh interval: The realadvantageof this program is that, of all the programs Ive come across, this was the
only one that tells you if your refresh interval is too short.During the past week, Ive had
thedistinctpleasureofdebugginga problem with SNMP readouts, as it seems some devices cant (or simplywont)
updatetheirstatistics more then X times/sec (7 for Juniper devices). This program was the only one that told me that my
refresh interval was too quick, which explained why I was getting wonky results.
Unless you still need to enable SNMP on the target device (see below), you are DONE.
Rejoice and be on your merryway :)

Flowalyzer from Plixer (Graphing)


This free utility, called Flowalyzer,is very simple to operate. It looks like Plixer took the well known STGutility(explained
below) and wrapped it into something a bit moreuser friendly. Italso features the translate from OIDs to names
listfunctionality. Theadvantageof thisutility incomparisonto the Solarwindsone is that it is possible to extract the OIDs
in their numeric form.
With that said, it has twoseveredrawbacks:
1. Ive found that the program is not suited forprolongedmonitoring periods, as it will inexplicably & randomlycrash.
2. While it has theadvantageof being able to save its conguration into les and then invoke them byassociatingthe
program to the sux, it is also extremelytouchy about where the les are saved. I have found that if the directory tree
holding the saved les contains spaces, when trying to invoke them, the program will error out.
In summation, use this program to obtain the OIDs and feed them to the STG program and/or get the Hell out of Dodge.
When you open the program, youll be greeted with the below window.

12/04/2016 22:48

IT Geek: Monitor Network Devices with SNMP (Simple Network Man...

4 of 15

http://www.howtogeek.com/141135/it-geek-monitor-network-devices-w...

Click on the Select a R/W SNMP Credential dropdown list and click on Create/Edit.

Fill in theinformationrequired for your target devices (mainly thecommunitystring) and save.

Fill the IP of the target device and click on Get.

12/04/2016 22:48

IT Geek: Monitor Network Devices with SNMP (Simple Network Man...

5 of 15

http://www.howtogeek.com/141135/it-geek-monitor-network-devices-w...

Once you do that, the bottom half of the program window should populate withinformationpulled from the device like the
below picture.

Clicking on one of the lines should pop-up a monitor window like the one below.

To obtain the longsoughtafter OID, click on View -> Settings.

In the next window, one can see the OIDs for the incoming/outgoing trac.

12/04/2016 22:48

IT Geek: Monitor Network Devices with SNMP (Simple Network Man...

6 of 15

http://www.howtogeek.com/141135/it-geek-monitor-network-devices-w...

You got the OIDs, yay!!


Simple Trac Monitor (STG) fromLeonid Mikhailov (Graphing)
This freeutility is by far the oldest of the options, but it works awlessly for literallyyears and can keep its conguration in
shareable les. The only drawback is that you need to obtain the OIDs by other means.
Download the programeitherfrom us (toavoid hotlinking)or the author.
Extract the zip le to a location of yourchoosingand run it. You will be presented with a blank window.

Click on View -> Settings.

In the next window, you need to input the OIDs as you got them from some other method (at least two in this guide).

12/04/2016 22:48

IT Geek: Monitor Network Devices with SNMP (Simple Network Man...

7 of 15

http://www.howtogeek.com/141135/it-geek-monitor-network-devices-w...

If all went well, the main window should ll withinformationand look like the below.

GetIF bySNMP4tPC (Browsingthe OIDs tree)


This program is old, and while newer options are available, due to the fact that it is free, it gets the job done, and is the one
that got me started, honordemands I pay homage to it.
Using this program or one like it will enable you to extract moreinformationthan just the devices interfaceinformation.
With that said, we will be using the interfaces example just to make the followthroughmore readable.
Download the programeitherfrom us (to avoid hotlinking)ortheauthor.
Install using the regular Next -> Next -> Finishprocedure and open the program.

Fill in theinformationfor the target device and click Start.

12/04/2016 22:48

IT Geek: Monitor Network Devices with SNMP (Simple Network Man...

8 of 15

http://www.howtogeek.com/141135/it-geek-monitor-network-devices-w...

To walk the OIDs tree, go to the MBrowsertab.

Once you see a segment that you want to read, select it and click on Start.
For example, to obtain the same interfaceinformation we got using the programs above,browseto:iso -> org -> dod ->
internet -> mgmt -> mib-2 -> interfaces -> ifTable -> ifEntry ->ifDescr and click Start

The bottom half of the window now shows the Names given to the interfaces on the target device. To get the trac OIDs,
note the number of the interface (in our example, wan2=interface7) and continue to the ifInOctets &
ifOutOctetssubtrees.
They are located at:iso -> org->dod->internet->mgmt.mib-2->interfaces->ifTable->ifEntry->ifInOctets.

12/04/2016 22:48

IT Geek: Monitor Network Devices with SNMP (Simple Network Man...

9 of 15

http://www.howtogeek.com/141135/it-geek-monitor-network-devices-w...

Click on the Interface you want to monitor trac for and note the OID from the bottom left part of the window.
You are now ready to take the OIDs youve collected to one of the monitoring programs above.

Enabling SNMP on the target device


Almost every self respecting device that can be networked supports exposing itsinformation in this way. With that said, not
every device does, and you may need toconsultyour devices documentation to nd out how to do this. Below are some
examples I have in my close vicinity, but this is by no means an exhaustivelist.
On DD-WRT
In the WebGUI, go to Services and scroll down the page to nd the SNMP radio button.
Select the Enabledradiobutton and save the conguration.

Once enabled, you will be presented with thedetailsthat you may change. It is important that you note what RO
community you are using. The default is public, but you may change this to any other value that you wish. Save and apply
the changes.
On Fortigate (FortiOS)
Assuming a fairly recent version of FortiOS (v4 and above), in the main window expand the Cong pane and select SNMP.

Note: The above screenshot has been taken from a v5 FortiOS.


To create a new SNMP v1/v2ccommunity, click on Create New.

12/04/2016 22:48

IT Geek: Monitor Network Devices with SNMP (Simple Network Man...

10 of 15

http://www.howtogeek.com/141135/it-geek-monitor-network-devices-w...

Fill in theinformationsuch as communityname, the range of IPs that are allowed to access it, and from what interface.
Once done, Click OK at the bottom of the page to save your settings.
You also need to enable theinterfaceyouwantto read the information from, for SNMP trac. To do this, go to Cong ->
Network.

In this example we used port8, so we will edit that interface.

Check the SNMPcheckboxand click OK at the bottom of the page.


Note: The interface you are trying to read SNMP from must be in the managementVdom if VDOMs are enabled on your
device. Changing themanagementVdom is out of the scope of this guide.
On Juniper (JunOS)
In the WebGUI, go to Congure -> Services -> SNMP.

12/04/2016 22:48

IT Geek: Monitor Network Devices with SNMP (Simple Network Man...

11 of 15

http://www.howtogeek.com/141135/it-geek-monitor-network-devices-w...

Click on Add.
Fill in the Community name of your choice and select the Authorizationtype.

Save and Commit your changes for them to take aect.


On NetAPP
Open the NetApp OnCommand System Manager and log into your storage device. Under Conguration -> System
Tools, click on SNMP and then Edit.

12/04/2016 22:48

IT Geek: Monitor Network Devices with SNMP (Simple Network Man...

12 of 15

http://www.howtogeek.com/141135/it-geek-monitor-network-devices-w...

Click Add.

This will enable you to add a new Community string as shown below.

Fill in the desired name and click OK all the way back.

12/04/2016 22:48

IT Geek: Monitor Network Devices with SNMP (Simple Network Man...

13 of 15

http://www.howtogeek.com/141135/it-geek-monitor-network-devices-w...

On Windows
It is possible to activate SNMP on windows, it is justrarelyused or even talked about (looking right at you, MS
certications). You will need to install the service rst.
Install the service by going to Programs and Features.

Go into TurningWindows features on or o.

Scroll to nd the Simple NetworkManagementProtocol(SNMP). Check its checkbox and click OK for it to be installed.

Once installed, congure the community string by opening Services.

12/04/2016 22:48

IT Geek: Monitor Network Devices with SNMP (Simple Network Man...

14 of 15

http://www.howtogeek.com/141135/it-geek-monitor-network-devices-w...

Scroll to nd the service and go into its properties.

Go to the Security tab.

To add a community, click on Add.

12/04/2016 22:48

IT Geek: Monitor Network Devices with SNMP (Simple Network Man...

15 of 15

http://www.howtogeek.com/141135/it-geek-monitor-network-devices-w...

Fill in the desired community name and click Add and OK for the settings to take aect.
Note: You may need to change otherpropertiesto enable remote machines to get the readout, but that isbeyondthe scope
of this guide.
Thats it, you should be all set to graph your networksinformation, and you are encouraged to explore what the SNMP
protocol can oer youbeyondthe scope of this guide, such as: using MIBs and traps. Just remember thesummarizingquote
from below

We are all the sum of our tears. Too little and the ground is not fertile, and nothing can grow there. Too much, the best of
us is washed away. (Babylon 5 gkar)

JOIN THE DISCUSSION

Aviad Raviv, is an agile IT implementer that has reached the level of "Bankai"
and is now working on incorporating the "hollow" side.

Published 05/16/13

12/04/2016 22:48

You might also like