in reply to How can get all the terminal names/IP addresses connected to network

If the machines are really all on your network (i.e. no routers need to be traversed between the scanning machine and the others) you can use Net::ARP to find out whether they are up. Do a Net::ARP::arp_lookup on each IP address, the host is up if its MAC address is returned. This will work even if the hosts have a firewall which disallows incoming connections.

  • Comment on Re: How can get all the terminal names/IP addresses connected to network
  • Download Code

Replies are listed 'Best First'.
Re^2: How can get all the terminal names/IP addresses connected to network
by davies (Monsignor) on Jan 08, 2006 at 20:18 UTC
    I have an application where I want to get MAC addresses from a network. However, everything is Losedows. AS Perl's PPM can't find Net::ARP (or even anything just called Net). CPAN's POD for Net::ARP gives examples with eth0, which I've only ever seen on Linux. Am I right in thinking that this module is not available for Losedows?

    Regards,

    John Davies

      I don't have Windows so can't tell for sure (you could just download and try to install the package from CPAN). There does seem to be a dearth of arp-related modules for Windows, you may be better off using arping.


      There are ten types of people: those that understand binary and those that don't.