Re: Can't find ip addresses of devices on LAN
On Fri, Sep 01, 2017 at 12:28:05PM -0400, Thomas George wrote:
> I have tried ping 192.168.1.225 followed by arp -a
> and I have tried netstat -r
> Neither report ip addresses of attached devices.
> I know there are two devices besides this pc and I know the address of one
> of these devices. I can ping it and it responds.
> How to find the address of the second device other than ping each address
> from 192.168.1.2 to 192.168.1.255?
What sort of network are you on? Are the IP addresses of the devices
assigned via DHCP from a router? Can you query the router to find the
DHCP leases that it has assigned (through a web interface perhaps)?
Otherwise, pinging every address in the subnet is one of the only
surefire ways to do this, depending upon what you want to
accomplish. My rule of thumb is, that if I need to perform some task
more than a couple of times, then write a script/program to do it. I'd
much rather code something up than issue 254 ping commands.
In a little more of a big picture view, if you need to communicate
between devices on your network and you want to have IP addresses
dynamically assigned through DHCP, then your DHCP server (probably a
router) should accept hostname from the device and then incorporate
that into a local DNS service so you can communicate to other devices
via their hostnames and the underlying IP address is somewhat
irrelevant. Or assign fixed IP addresses (which can be a
pain). 'dnsmasq' is a package that does this kind of thing. But it
depends upon your use case and the details of your network (mostly who