11

I want to find all the snmp enabled devices in my network, I got something like how it works in a agent and manager architecture.

I got net-snmp library to create a simple application to get the snmp data from a remote device.I have to write a program to do this ,I want the mac address of the device and some more info.

I got program to get a data from the remote node,But I have one doubt how to get the mac address of the system and what is the oid to get the mac of the device ,

Is there any generic oids which will not vendor specific.I have to get data for all the devices.

Some updates:

Now using snmp tools snmpwalk I am getting may information but among which I want some system info,mac ,os name if avilable , but I how to program using net-snmp to get these info as I do not know the generic oid by which system name will come.I want to write a program and I have to get some required info so I need the oid ,I have to give this oid to the net-Snmp's function so that it will give me the coresponding result .

I have to use the string name like sysName to get the system name ,If so then in case of mac address there written "ifPhysAddress.2" and then the mac is mentioned (in the result of snmpwalk).so what is the oid to get the mac as it is different for all the device.

when I am using snmpwalk I am getting one line as follow

SNMPv2-SMI::mib-2.25.3.2.1.3.1 = STRING: "HP LaserJet Professional P1606dn"

This is the name of the printer .means this oid is for getting the name of the printer (mib-2.25.3.2.1.3.1). Is this true for all the device means if i query to this oid I will get the device name of the corresponding IP what ever be the device may be.Is this correct or not.

Kindly,give some idea.

Thanks

3 Answers 3

9

You can use Nmap's snmp-brute something like

nmap -sU -p161 --script snmp-brute --script-args snmplist=community.lst 192.168.1.0/24
0
2

Many monitoring applications will include a network discovery tool which can query snmp on all devices it discovers. Some will even allow you to enter multiple SNMP community strings and it will try each of them.

2

Here's a script that I use with OpenNMS that will generate an XML file containing snmp-enabled devices and their respective communities.

It accepts IP addresses and multiple community names as input files.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .