[snmp] Auto-discovery

Andrew Chandler andy at riftware.com
Wed Oct 4 14:23:34 BST 2006


Mind you I wouldn't recommend doing that on subnets larger than say a class
C as the traffic you get back may cause issues temporarily to other network
processes if you broadcast to larger subnets if they are dense in
population.   Also be aware that some snmp stacks or configurations will not
send snmp responses when queried via the broadcast address.  Most will but
some will not - it depends how thorough you need to be.
 

-----Original Message-----
From: snmp-bounces at snmp.westhawk.co.uk
[mailto:snmp-bounces at snmp.westhawk.co.uk] On Behalf Of Josh Bers
Sent: Wednesday, October 04, 2006 8:51 AM
To: 'List for discussion of the Westhawk SNMP stack'
Subject: RE: [snmp] Auto-discovery

Yes, there is a way to do this for subnet mask (2)

There is a special PDU that can be used just for this kind of application.
It is called a multi-response PDU. It expects that many different hosts will
respond to a single request and it accumulates the responses along with the
source ip addresses. An observer will get updated each time that a response
comes in and the timeout controls how long it waits for responses. The trick
is to send it to a broadcast address, e.g., the network broadcast. So create
a context with the network broadcast as the target IP address and then send
a MultiResponsePdu on it. (needs latest stack 5.1).

Josh

Josh Bers
Mobile Networking Systems
BBN Technologies
jbers at bbn.com
ph. 617.873.4262
fax. 617.873.4523
www.bbn.com


> -----Original Message-----
> From: snmp-bounces at snmp.westhawk.co.uk 
> [mailto:snmp-bounces at snmp.westhawk.co.uk] On Behalf Of tausif
> Sent: Wednesday, October 04, 2006 5:23 AM
> To: List for discussion of the Westhawk SNMP stack
> Subject: [snmp] Auto-discovery
> 
> 
> 
> I am trying to make application which automatically should discover 
> all the devices in the LAN. I need to discover the devices based on
> 
> 1. range of IPs
> 2. Subnet Mask
> 3 Default gateway.
> 
> is there any way of doing the auto-discovery using westhak APIs? is 
> there any sample example for the same? if not, is there any way of 
> doing it? Actually i m kind of avoid doing PING first and then send 
> SNMP request. There must be some other way right?
> 
> Can I make use of DatagramPacket / DatagramSocket? if any one having 
> sample code will be a great help
> 
> thanks
> _______________________________________________
> snmp mailing list
> snmp at snmp.westhawk.co.uk
> http://snmp.westhawk.co.uk/mailman/listinfo/snmp
> 



_______________________________________________
snmp mailing list
snmp at snmp.westhawk.co.uk
http://snmp.westhawk.co.uk/mailman/listinfo/snmp




More information about the snmp mailing list