How to broad cast ping address.......

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Mon Feb 11 12:28:24 EST 2008


En Mon, 11 Feb 2008 13:31:56 -0200, Manikandan R <mani.agape at gmail.com>  
escribi�:

>     I am working in Python scripting. I an need to find out all the  
> device
> connected in the network. Just I planned to broad cast the ping address  
> and
> use the ARP table to get the IP address of the system in the network.  
> As, I
> am working in Win XP i am not able to use ping -b command to broad cast.

The simplest approach is to enumerate and ping each and every address in  
your subnet and wait for the response, but consider that some hosts may  
have been configured to not answer (and assuming you don't have a /8  
network...)
There is an ICMP library in the Python cookbook  
http://aspn.activestate.com/ASPN/Python/Cookbook and you can search the  
Package Index too: http://pypi.python.org

>      I have one more doubt, Is it is possible to see the router table  
> from
> the client system (My system), since router table will have the
> Mac / IP address of all the system in the network. If there is any
> possibilities please mention me.

Do you mean, you have a router device, and you want to ask it for its  
routing tables? This has other problems too: depending on the network  
topology, the router may not even know about some hosts, or they may have  
disconnected and the router didn't notice...

>      Another option I like to try is to see the DNS table but its not
> possible from client system (My sytem), I think so.

If you have a running DNS, surely you can query it. But this doesn't tell  
you about "connected" hosts as you said earlier.

>       I am trying this for more that 2 week, no result from any one.  
> Please
> reply me. Thank's in advance.

More than a Python question, this is a network management question. There  
are a lot of applications that can help; try something based on SNMP  
http://www.snmplink.org

-- 
Gabriel Genellina




More information about the Python-list mailing list