Vous êtes sur la page 1sur 10

Introduction to SNMP:

practical examples of
the protocol in action

www.serverspace.co.uk

INTRODUCTION TO SNMP: PRACTICAL EXAMPLES OF THE PROTOCOL IN ACTION

SERVERSPACE

SNMP is the most widely accepted communications protocol


for network management, meaning its vital that administrators
understand the technology so they can better control and
oversee their networks.

What is SNMP?
SNMP stands for Simple Network Monitoring Protocol. The word
simple is a bit misleading - as the technology is simple, but its setup
can be complex.

SNMP: a protocol used to


manage and monitor supported
devices on a complex network

SNMP allows you to communicate with supported devices over a


network, so you can receive useful information for managing and
monitoring a large network. Some devices have the ability to take
commands so they can be configured via SNMP as well. These
devices could be routers, switches, servers, workstations, printers or
something else.
In its simplest form, SNMP running on a network device can alert a
monitoring program or system of an issue. For instance, on a network
switch, SNMP can alert the monitoring system when a switch port
goes down, letting you know that there has been some sort of failure.
With this basic alert, your engineers can then investigate and rectify
the issue. By evaluating this information with many more alerts, you
can begin to build a bigger picture of the situation.

SNMP monitoring system:


software that runs on the machine
of a network administrator that
enables you to control network
devices with SNMP

PAGE 2

INTRODUCTION TO SNMP: PRACTICAL EXAMPLES OF THE PROTOCOL IN ACTION

SERVERSPACE

How can SNMP be used to manage a network?


To best demonstrate how SNMP can be used for network management,
lets build a scenario.

Monitoring several ports on a switch


You have a network switch that is SNMP capable. Attached to that switch
you have several computers or servers or access points, most likely a
combination of all three, plus many other types of devices.
Using SNMP, you can monitor the entire switch: you can see the status
of all 24 or 48 ports on your switch. So in the example above, if you were
monitoring, say, 10 ports that have 4 devices plugged in,and everything
was working as it should, you would have 10 green lights on your
monitoring system.
All of a sudden you get an alert in your system, via SNMP, to tell you
that port 3, which has a phone plugged in, has gone from up to down.
Immediately you know something is wrong. However, there are still 9
other lights that are green, so you know your switch is still working and
responding. This information enables your engineers to locate the fault
more quickly, as they know the issue has to be between the switch and
the phone on port 3.

PAGE 3

INTRODUCTION TO SNMP: PRACTICAL EXAMPLES OF THE PROTOCOL IN ACTION

SERVERSPACE

Monitoring the hardware with thresholds


This demonstrates the value of SNMP, but we can take it another step
further. Its often possible to monitor the environment of a switch too. In
our example, we are only using 4 ports, so we have 6 additional alerts on
the unused ports. Most monitoring systems allow you to acknowledge
these unused alerts, so they dont bother you with errors or issues that
dont exist.
On top of monitoring the ports, you have the ability to monitor the
hardware of the switch for such things as CPU, memory and temperature.
With SNMP, you can set thresholds on your monitoring systems and
get alerts when these thresholds, which represent normal operating
conditions, are breached.
In this case, your switch is monitoring temperature. 34 degrees seems to
be the normal temperature for this switch to operate. As you can see from
the image from the monitoring system below, we have set a minimum
temperature of 27 degrees and a maximum temperature of 43 degrees.
If the switchs temperature moves outside those boundaries, your
monitoring system will alert you.

PAGE 4

INTRODUCTION TO SNMP: PRACTICAL EXAMPLES OF THE PROTOCOL IN ACTION

SERVERSPACE

Combining the information


Going back to the example, the alert for port 3 doesnt tell us much
about the failure, but couple it with information from the temperature
of the switch, for instance, and you can start to build a bigger picture of
the situation. The phone may have failed due to a sharp increase in the
temperature in the room of the switch, which itself would indicate a larger
problem.
If we scale this example up into a full working system, you could monitor
several devices with SNMP and a monitoring system, watching, for
instance, the temperature rise on servers and computers as well as
the switch itself. With all this information at hand, you can diagnose a
problem and rectify it more quickly.

Using historical data


So far weve looked at using SNMP for fault detection, but this is only one
application of the protocol. On many switches that support SNMP, you can
monitor the bandwidth and error counts of each port. Another benefit of
SNMP for network management is that most monitoring systems allow
you to see historical data in any form you chose. This enables you to plot

PAGE 5

INTRODUCTION TO SNMP: PRACTICAL EXAMPLES OF THE PROTOCOL IN ACTION

SERVERSPACE

graphs of the bandwidth usage on a port or the temperature of a switch,


for instance. With this output, you can use data to decide if you have
bottlenecks on your switch or if there are parts of the day when the server
room or cabinet is getting too hot.

Example of the graphing you could see for a 10 port switch

In the basic weathermap above, you can see some devices on a network
and you can see historical graphs of the data transfer over the past 4
hours. A quick glance at a map like this can highlight bandwidth usage
climbing or spiking. Furthermore, it can help you identify not only which
devices are seeing the spike, but where that is on your network and
whether the symptoms you are seeing are actually occurring where you
think or being caused further down the line.
To expand our example further, we could add in a firewall or router that
connects your systems to the Internet. These can be monitored over
SNMP too. In this scenario, youre getting complaints from employees
that the Internet is too slow every day at 16:00 for about 20 minutes. o
stop this periodic slow-down, theres pressure to upgrade the companys
Internet connection, which, of course, will incur a cost.

PAGE 6

INTRODUCTION TO SNMP: PRACTICAL EXAMPLES OF THE PROTOCOL IN ACTION

SERVERSPACE

However, by using the data that SNMP provides from the firewall or router,
and the switch, youre able to see that actually, network bandwidth usage
goes down at 16:00 each day for the duration of the 20 minute period.
Your Internet connection is not the issue, but the problem still exists.
Looking at the graphs from your monitoring system, you can see that port
5 and port 6 on the switch jump to maximum usage at 16:00 every day.
Your monitoring system records that port 6 is the main company server
where all your files and data are stored, and port 5 is where your backups
are housed. Your engineers can also see that backups have recently been
set to run at 16:00 each day, rather than the usual 04:00 execution. This
clarifies the problem: the Internet is slow at this particular time because
the switch has to handle a massive volume of data, so it limits access to
the router or firewall and subsequently the Internet.
This is a really basic example, but it demonstrates the practical value in
the data that SNMP produces and how it goes beyond simply telling you
when something has stopped working.

What do SNMP management solutions offer?


Cost
The cost of implementing SNMP on your infrastructure depends entirely
on the volume of hardware you want to monitor and what sort of
management system you want to build. There are free SNMP monitoring
software packages available that can be installed on a normal PC, which
gather and intuitively display data on screen. SNMP is free to use on most
devices that support it and you generally only pay for the monitoring
solutions. Some of the paid-for solutions are priced based on the number
of sensors you want to monitor (think of the alert for each port on your
switch as a sensor), plus the advanced alerting features that are on offer.

Monitoring options
Many of these solutions allow you to set up a monitoring system on a
machine that can be locked away and remotely viewed in a web browser.
Some even include apps for your smartphone that allow you to monitor
your infrastructure on the move. They can also hook up to your email or
SMS systems, so you can get email or text alerts when something goes
wrong or moves outside of its defined threshold.

PAGE 7

INTRODUCTION TO SNMP: PRACTICAL EXAMPLES OF THE PROTOCOL IN ACTION

SERVERSPACE

You can also typically relay SNMP messages through intermediate


systems. Security is the main reason why you might want to do this. Its
possible to expose the SNMP ports on each of your machines to the
Internet, so you can monitor them from anywhere, but in practice, this is a
bad idea.
Many monitoring systems enable you to have a probe or remote inside
a closed network, which can monitor all of the local devices and relay
the information back to your main monitoring system. This can be
achieved simply by locking down your firewall rules or by using a VPN.
The beauty of this is that you can keep your critical machines isolated
from the Internet or even isolated from other devices on the same office
or corporate network. You still gain data without breaking strict security
rules and setups.

Notable SNMP monitoring solutions


Two prime examples of the monitoring software that is available are
Nagios and PRTG.
Nagios: As a monitoring system, Nagios has a practically limitless
range. You can script and manage more or less any kind of device you
want. Nagios also plays well with other systems, so you can gather
information from your security systems, such as your door access and
burglar alarm.

PRTG: A Windows-based monitoring solution, PRTG supports many


of the functions you would expect from SNMP, plus it adds all of the
WMS capabilities for monitoring Windows machines, as well as Linux
and other appliances.

PAGE 8

INTRODUCTION TO SNMP: PRACTICAL EXAMPLES OF THE PROTOCOL IN ACTION

SERVERSPACE

Conclusion
By implementing SNMP on supporting network devices
and using a software solution to display its output, you have access to
information that allows you to monitor and diagnose problems on
your network, so you can keep your organisations applications running as
they should.

PAGE 9

About ServerSpace
ServerSpace, part of the iomart group, is the UK cloud hosting company dedicated
to creating tailor-made application hosting solutions for software companies.
Since our foundation in 2006, weve made it our aim to meet the complex needs
of software businesses with bespoke solutions that reflect the fact that no two
customers are the same.
We can offer any combination of hosting technologies, geo-diverse redundancy
strategies and a wide range of connectivity options, all with our unmatched
commitment to personal and effective customer service. Our people are experts in
monitoring and managing complex, multi-platform and multi-site infrastructures.
All of which means that you can sleep at night. Most importantly, our people care
about our clients solutions and are dedicated to ensuring they experience the
uptime our online world demands.
To find out more about how we can help you build your ideal application hosting
solution, get in touch.

Call us to discuss your cloud hosting challenges:

0207 129 7005

Unit 23, Angel Gate, City Road, London EC1V 2PT


Tel: 0207 129 7005 Fax: 0870 1992 688
www.serverspace.co.uk