Michael Bevilacqua on 6 Apr 2010 07:13:01 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] SNMP Newbie Help


On Sat, Apr 3, 2010 at 5:21 PM, Kevin McAllister <kevin@mcallister.ws> wrote:

On Apr 3, 2010, at 10:34 AM, Casey Bralla wrote:

> I'm trying to understand snmp, and I think my alzheimer's is acting up, and I
> can't make heads-or-tails of this stuff.  Can somebody give me a few examples
> of CLI access to snmp?
>

Here's one simple example:

snmpwalk -v 2c -c COMMUNITYSTRING IPADDRESS .1

The .1 on the end is the starting point for the walk.  .1 is the root of the hierarchy so that should walk everything available.  I explicitly did version 2c, but depending on the implementation you are walking you may need to indicate '-v 1'

There is some way to ask net-snmp not to resolve the OID names for you so you can just get the numbers but I can't remember it off the top of my head.

One thing that can often hang you up is a lot of devices or the firewalls in front of them will block snmp access or UDP port 161.



Additionally, the book "Open Source Network Administration" by James M. Kretchmar has excellent examples of net-SNMP usage in Chapter 2. I find it being a handy reference book. It's worth owning a copy if you don't already.


--
Michael D. Bevilacqua
michael@bevilacqua.us
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug