how to get a list of all the hosts on the intranet around my workstation?

Dan Stromberg drsalists at gmail.com
Sat Jul 16 21:13:03 CEST 2011


Some options:

1) Broadcast ping
2) nmap the subnet, optionally with -P0
3) Check the arp cache (optionally after options 1, 2 or 4)
4) Unicast ping everything on the subnet in parallel - very effective, very
fast, might want to do it with threads rather than subprocesses to avoid a
load spike

On Sat, Jul 16, 2011 at 9:31 AM, Phlip <phlip2005 at gmail.com> wrote:

> Yes, pythonistas, sometimes I even amaze myself with the quality of
> question that a computer scientist with a 25 year resume can ask
> around here...
>
> In my defense, a Google search containing "intranet host" will fan out
> all over the place, not narrow on what I actually need.
>
> The Use Case is a user wants to ping a nearby host, and I provide a
> list of nearby hosts for the user to pick from. Nothing else. Hosts on
> the outernet need not apply.
>
> pydhcplib? Shell to a DHCP utility? Ping every server in a range
> around my own?
>
> --
>  Phlip
>  http://bit.ly/ZeekLand
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110716/3811cb0d/attachment.html>


More information about the Python-list mailing list