So now we're going to move on and configure SNMP
version 2 and version 3 on Linux, and yes,
I know there are several different Linux variations and
I'm not about to get into that holy war,
but I'm using the defacto standard for Linux,
which is the SNMP D package for both Ubuntu and Debian,
which happens to be the distribution I'm running here.
Here, distribution of choice may vary,
but the steps here will still be close enough that you can
probably figure it out with a good Google or two.
So here we are in our console on our Globomantics Linux Server.
Now many Linux distributions do not include the SNMP software by
default if you just do an express configuration.
Since that's the case,
we're going to go through the steps of installing the necessary package.
So we'll do sudo apt-get install snmp snmpd,
and once I enter the correct password, it tells me,
hey I'm going to download all of these modules and
everything and do you wish to continue.
So we'll say yes to continue,
give it a few minutes to actually download and unpack the modules,
and like so, it's installed.
And once it's complete, we can edit the configuration file.
So we will do sudo nano, which is the built-in editor for Debian,
etc/snmp/ snmpd.conf.
Now there is a lot you can configure in this file.
Most of the defaults will work perfectly well,
but there are some things that you need to change in
order to make it accessible externally.
First, if you'll look here at the agent address section,
you'll notice that it's configured to only allow access from
the localhost and not from the network.
In this case,
we're going to comment this out and we'll uncomment this line so that it will
listen on all addresses on UDP 161 and all IPv6 addresses,
even though we're not running IPv6 on our lab.
And honestly, there's really not that much more to configure.
We can look at some of the options in here.
Here are the options for SNMP v3 authentication which it even tells
you in this file that it should be copied to a different
configuration file and changing the passwords.
Further down,
you have access control for SNMP v3 and this is also the part of the file where
you would configure SNMP v3 MIB views and this is where you can basically mask
off certain parts of the MIB so that specific SNMP 3 users can only see the
parts of the MIB that you allow them to.
For example, if you work for a service provider,
you may put a managed router at a client site and you may
allow them SNMP access to view say the CPU and the memory
utilization of the router,
you may allow them to look at the interface
configuration and the interface statistics,
but you may not necessarily want them downloading the entire running
configuration or dumping the route table out of your router because it
could contain proprietary information.
SNMP v3 is really the only way to accomplish that because SNMP v2,
again,
just allows access to anything in the MIB if you have the correct password.
It's been my experience that MIB views make a little more sense
when they're implemented on a Cisco router,
and so, that's when we'll get more into that particular aspect of it.
But for the rest of this configuration file,
we can scroll down through it and we can see that we can
limit the IP address range that can talk to this particular
agent just like we could on Windows.
And further down, we get to the system information,
including the sys location and the sys contact.
We'll see these values again when we implement the network
management system later on in the course.
You'd obviously want to customize these,
but I'm going to leave them like they are because I think the
location is kind of cute sitting on the dock of the bay.
And then further down, you get into process monitoring,
which honestly,
is Linux specific and not SNMP specific so we'll leave that alone.
All of the defaults generally work pretty well.
Once this is done, we'll save the file,
and then to reload the configuration file,
we'll do sudo etc/ init.d /snmpd restart and it restarts
and loads our new configuration in place.
So that ties up the process of installing SNMP and configuring it on a Linux distribution.