Reputation: 71
I'm trying to program an SNMP manager. The first step that an SNMP manager should do is to discover the devices that it can manage in the network, right? What would be the best/easiest way to do this?
From my reading, one way is to ping every IP address in a range and then send a basic SNMP query to those IP addresses that respond to the ping. How do we determine the range of IP addresses to ping?
This is another one: "the snmp discover process uses an investigation method only based on the SNMP MIBII information provided by the devices connected to the Inter Network. The process makes request to all devices that recognize the MIBII requests, and collects the IPADDTABLE, IPROUTETABLE and ARPTABLE host tables. From that, it builds the IP topology."
Please advise on the steps to discover snmp devices. Thanks.
Upvotes: 3
Views: 1246
Reputation: 3131
Use Nmap with the following command:
nmap 192.168.1.0/24 -A -sU -p U:161
That will return all devices with an SNMP service running on the 192.168.1.0/24 network. Ofcourse you will need to replace 192.168.1.0/24 with your actual network address. Nmap also features a -oX
parameter that writes the console output to an XML file.
Upvotes: 2