I am using snmp and trying to get with
snmpwalk -v 2c -c public x.x.x.x ipadd
where x.x.x.x is the ip of the pc with ubuntu 12.04 i get this answer :
IP-MIB::ipAddrTable = No Such Object available on this agent at this OID
so how can I get the ip addres from a ubuntu 12.04 LT pc , there is maybe another comand that I can use?
Thanks for the answer .
After installing SNMP and its daemon(
sudo apt-get install snmp snmpd
), you will need to edit the file/etc/snmp/snmp.conf
and comment out the line containing "mibs:"Within this file, change the line:
to
Next, assuming you haven't done this already, you will need to obtain the full set of IETF MIBs. These files do not ship, by default, on Debian/Ubuntu systems due to licensing issues.
From the terminal(Ctrl-Alt-t), enter the following commands:
sudo apt-get install snmp-mibs-downloader
sudo download-mibs
Then, you will need to modify
/etc/snmp/snmpd.conf
.To allow SNMP the system to receive queries on interfaces other than its loopback address. The lines for this should look like this:
Note that this will allow ANY system to query your machine. You will need to adjust this to limit SNMP access to your device.
You will now want to change your Read-only SNMP string from
public
to a custom string of your choosing, as below:Note: Removing
-V systemonly
from the line will allow access to the entire MIB tree and not restrict it to the system part of the tree.Restart the SNMP daemon
Finally, your SNMP query should now respond properly.
e.g.:
The same query can be run using a GUI based MIB browser, as well. Personally, I prefer using SNMPb for my graphical queries. Once you have SNMPb installed, open SNMPb and navigate to the desired OID in the MIB tree. In your specific case, it would be
1.3.6.1.2.1.4.20
oriso-> org-> internet-> mgmt-> mib-2 -> ip -> ipAddrTable
and perform a Get Bulk to receive the same data.I had the same problem, and I had already done the above, but then I realised that all I needed to do was add the following line to /etc/snmp/snmpd.conf
and then restart the snmpd:
then I get:
HTH