Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Is there any method to get address of all machines in network

 
Bikhu Matre
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any method to get address of all machines in network (LAN).
Actually, I want to search for server object in LAN, if not found then would like to start Server application.
Thanks.
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In this realm you have to be careful what you ask for -- you just might get it.
Asking for all the addressable machines in a network is an elastic proposition. You don't know, in a generic situation, how machine addresses you might be talking about. Imagine, for example, running a ping application against the broadcast address of a class A subnet. You could end up with a very long list of machines, and performing an exhaustive search of them to find a server could be both time-consuming and a waste of network bandwidth.
What you seem to be suggesting -- a brute-force approach to discovering a server process -- can also be interpreted by a network monitoring agent as a prelude to a spam attack, so if you're thinking of doing this in a shared subnet, large LAN envirnoment, or on an ISP's network, be careful.
That said, pinging a subnet on its broadcast address will cause all member stations to respond by adding a MAC entry to your ARP table. You can then read that table to convert MAC address to IP addresses, and start blasting away looking for a server process.
 
Bikhu Matre
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What you seem to be suggesting -- a brute-force approach to discovering a server process -- can also be interpreted by a network monitoring agent as a prelude to a spam attack, so if you're thinking of doing this in a shared subnet, large LAN envirnoment, or on an ISP's network, be careful.


perhaps, you are right.
But my intention is to develop a communicator (messenger). And instead of starting server application on a particular machine, I want to run at machine, which starts application first (in case server object is not available in n/w (LAN)).
At first instance using CORBA came to my mind, as application can search server object in n/w automatically.
And second thought was using RMI. And I want to use RMI.
Sorry, if still I am irritating you because of poor programming technique/skills.
All Suggestions are welcomed.
Thanks.
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah. So what you really need is a way to locate a service. CORBA has a facility for that certainly. Within RMI, the registtry performs a similar function but doesn't provide the features you'll need for lookup and dynamic discovery. For that, take a look at Jini.
 
Bikhu Matre
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.
 
The government thinks you are too stupid to make your own lightbulb choices. But this tiny ad thinks you are smart:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!