• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

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

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
High Plains Drifter
Posts: 7289
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 7289
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic