Ubuntu – Settings up SNMP between a Cisco Router and Linux Box

ciscosnmpUbuntu

My end goal is just to see some sort of data out from a Cisco Router 3662. Data like total connections and bandwidth used. I am attempting to use SNMP. I think I have snmp running correctly but I have no idea where the snmp data goes. I am having zero luck on the web. I saw a server-fault post on using perl get objects, but I have no idea if what I have even works.

So I've setup a SNMP demon on my ubuntu box.
Code:

rocommunity public
agentaddress localhost:161

And then on the router (xxx.xx.xx.xx == ip address to my ubuntu box)
Code:

snmp-server community public RO
snmp-server enable traps bgp
snmp-server host xxx.xx.xx.xx public

So I get some stats from my router:
Code:

800 SNMP packets input
    0 Bad SNMP version errors
    0 Unknown community name
    0 Illegal operation for community name supplied
    0 Encoding errors
    800 Number of requested variables
    0 Number of altered variables
    0 Get-request PDUs
    800 Get-next PDUs
    0 Set-request PDUs
    0 Input queue packet drops (Maximum queue size 1000)
901 SNMP packets output
    0 Too big errors (Maximum packet size 1500)
    0 No such name errors
    0 Bad values errors
    0 General errors
    800 Response PDUs
    101 Trap PDUs

SNMP logging: enabled
    Logging to xxx.xx.xx.xx.161, 0/10, 101 sent, 0 dropped.

So it must be sending it, just where on my ubuntu box is it?

Best Answer

If you want to retrieve SNMP data from the cisco router from your Linux box, you don't need the SNMP daemon, what you need is a tool that will get the SNMP data and graph it. SNMP data needs to be pulled by something.

Popular tools include MRTG, Cacti, RRDTool, and then all of the heavier network managment systems like Nagios, OpenNMS, and ZenOSS.

If you have the snmp package installed then you can use a command like this snmpwalk -${SnmpVer} -c${SnmpCommunity} ${systemIp} system to test and see if you can make an SNMP connection. For your example you probably want replace the variables like this. snmpwalk -2 -cpublic 10.1.1.1 system.

Related Topic