* [gentoo-user] [OT] network discovery tools
@ 2011-05-25 19:45 Harry Putnam
2011-05-25 19:54 ` Stéphane Guedon
` (4 more replies)
0 siblings, 5 replies; 11+ messages in thread
From: Harry Putnam @ 2011-05-25 19:45 UTC (permalink / raw
To: gentoo-user
There must be a number of people who post here that have had to do
this problem.
Discover the addresses of computers on a home network that have
connected by way of DHCP. For example: Several wireless connections.
I've used static IPS for around 10 yrs, always seemed handier for
things like ssh between home lan computers.
But recently started using DHCP for wireless connections. It must be
such a popular method for some reason.
But when you do it that way, and say want to VNC or ssh or the like to
something connected by a dhcp serving WAP then how do you find the
address?
That is, besides something like accessing the WAP and checking the IPs
connected to it.
Is there some quick and sure way to discover any IPs on the home lan?
Some kind of mapper tool?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] [OT] network discovery tools
2011-05-25 19:45 [gentoo-user] [OT] network discovery tools Harry Putnam
@ 2011-05-25 19:54 ` Stéphane Guedon
2011-05-25 20:26 ` Vincent-Xavier JUMEL
2011-05-25 19:59 ` [gentoo-user] " Grant Edwards
` (3 subsequent siblings)
4 siblings, 1 reply; 11+ messages in thread
From: Stéphane Guedon @ 2011-05-25 19:54 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 1430 bytes --]
On Wednesday 25 May 2011 21:45:07 Harry Putnam wrote:
> There must be a number of people who post here that have had to do
> this problem.
>
> Discover the addresses of computers on a home network that have
> connected by way of DHCP. For example: Several wireless connections.
>
> I've used static IPS for around 10 yrs, always seemed handier for
> things like ssh between home lan computers.
>
> But recently started using DHCP for wireless connections. It must be
> such a popular method for some reason.
>
> But when you do it that way, and say want to VNC or ssh or the like to
> something connected by a dhcp serving WAP then how do you find the
> address?
>
> That is, besides something like accessing the WAP and checking the IPs
> connected to it.
>
> Is there some quick and sure way to discover any IPs on the home lan?
>
> Some kind of mapper tool?
dhcp can assign static adresses ! Thus, it's easier to manage (only the dhcp
server to admin !)
I am not english, thus, don't know website with such doc (in english) but you
can easily find it on internet !
You have also dnsmasq that makes both dns (for lan) + dhcp (whereas commonly,
this functions are split)
--
Stéphane Guedon
page web : http://www.22decembre.eu/
carte de visite : http://www.22decembre.eu/downloads/Stephane-Guedon.vcf
clé publique gpg : http://www.22decembre.eu/downloads/Stephane-Guedon.asc
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 316 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* [gentoo-user] Re: [OT] network discovery tools
2011-05-25 19:45 [gentoo-user] [OT] network discovery tools Harry Putnam
2011-05-25 19:54 ` Stéphane Guedon
@ 2011-05-25 19:59 ` Grant Edwards
2011-05-25 20:28 ` Harry Putnam
2011-05-25 21:55 ` [gentoo-user] " Neil Bothwick
` (2 subsequent siblings)
4 siblings, 1 reply; 11+ messages in thread
From: Grant Edwards @ 2011-05-25 19:59 UTC (permalink / raw
To: gentoo-user
On 2011-05-25, Harry Putnam <reader@newsguy.com> wrote:
> There must be a number of people who post here that have had to do
> this problem.
>
> Discover the addresses of computers on a home network that have
> connected by way of DHCP. For example: Several wireless connections.
>
> I've used static IPs for around 10 yrs, always seemed handier for
> things like ssh between home lan computers.
>
> But recently started using DHCP for wireless connections. It must be
> such a popular method for some reason.
>
> But when you do it that way, and say want to VNC or ssh or the like to
> something connected by a dhcp serving WAP then how do you find the
> address?
The best thing to do is to use a DHCP server and DNS server that are
"connected" somehow. Then hostnames "just work". Or you can
statically assign IP addresses in the DHCP server so that DHCP clients
always get hard-wired IP addresses that match up with the /etc/hosts
file on the DNS server.
I use OpenWRT for WAP, DNS, and DHCP, and it all pretty much "just
works". When a DHCP client is assigned an IP address, the DNS server
knows about it and you can access it by it's hostname just the way you
would with a static setup.
For various reasons, I assign static IP addresses to a number of
devices, but I do it via the DHCP server's configuration, not by
configuring each individual device.
--
Grant Edwards grant.b.edwards Yow! Did an Italian CRANE
at OPERATOR just experience
gmail.com uninhibited sensations in
a MALIBU HOT TUB?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] [OT] network discovery tools
2011-05-25 19:54 ` Stéphane Guedon
@ 2011-05-25 20:26 ` Vincent-Xavier JUMEL
0 siblings, 0 replies; 11+ messages in thread
From: Vincent-Xavier JUMEL @ 2011-05-25 20:26 UTC (permalink / raw
To: gentoo-user
Le 25 mai à 21:54 Stéphane Guedon a écrit
> On Wednesday 25 May 2011 21:45:07 Harry Putnam wrote:
> > There must be a number of people who post here that have had to do
> > this problem.
> >
> > Discover the addresses of computers on a home network that have
> > connected by way of DHCP. For example: Several wireless connections.
> >
« ip a s » to get your IP with your mask and then « nmap
ip.in.v4.format/mask »
> > I've used static IPS for around 10 yrs, always seemed handier for
> > things like ssh between home lan computers.
> >
> > But recently started using DHCP for wireless connections. It must
> > be such a popular method for some reason.
> >
> > But when you do it that way, and say want to VNC or ssh or the like
> > to something connected by a dhcp serving WAP then how do you find
> > the address?
> >
avahi and zeroconf could be an help. With avahi-daemon running every
where and avahi-dnsconfd I just type « ssh -l login myhostname.local »
or « ssh -l login myhostname.lan » depending on your configuration.
> > That is, besides something like accessing the WAP and checking the IPs
> > connected to it.
> >
> > Is there some quick and sure way to discover any IPs on the home lan?
> >
> > Some kind of mapper tool?
You've got lanmap to, though it doesn't seem maintained IMHO and it
depends on nmap.
>
> dhcp can assign static adresses ! Thus, it's easier to manage (only the dhcp
> server to admin !)
>
> I am not english, thus, don't know website with such doc (in english) but you
> can easily find it on internet !
>
Configuration sample are even given in isc-dhcp-server default conf
file, richly commented out.
> You have also dnsmasq that makes both dns (for lan) + dhcp (whereas commonly,
> this functions are split)
--
Vincent-Xavier JUMEL GPG Id: 0x2E14CE70 http://thetys-retz.net
Rejoignez les 5398 adhérents de l'April http://www.april.org/adherer
Parinux, logiciel libre à Paris : http://www.parinux.org
^ permalink raw reply [flat|nested] 11+ messages in thread
* [gentoo-user] Re: [OT] network discovery tools
2011-05-25 19:59 ` [gentoo-user] " Grant Edwards
@ 2011-05-25 20:28 ` Harry Putnam
2011-05-26 18:22 ` Neil Bothwick
0 siblings, 1 reply; 11+ messages in thread
From: Harry Putnam @ 2011-05-25 20:28 UTC (permalink / raw
To: gentoo-user
Grant Edwards <grant.b.edwards@gmail.com> writes:
[...]
>> But when you do it that way, and say want to VNC or ssh or the like to
>> something connected by a dhcp serving WAP then how do you find the
>> address?
>
> The best thing to do is to use a DHCP server and DNS server that are
> "connected" somehow. Then hostnames "just work". Or you can
> statically assign IP addresses in the DHCP server so that DHCP clients
> always get hard-wired IP addresses that match up with the /etc/hosts
> file on the DNS server.
>
> I use OpenWRT for WAP, DNS, and DHCP, and it all pretty much "just
> works". When a DHCP client is assigned an IP address, the DNS server
> knows about it and you can access it by it's hostname just the way you
> would with a static setup.
>
> For various reasons, I assign static IP addresses to a number of
> devices, but I do it via the DHCP server's configuration, not by
> configuring each individual device.
That sounds like a good plan... and worth some thought. However I was
only asking to find IPs on the home lan after the fact. Not the
general question of how to setup the lan (though I welcome the ideas
you present).
I seem to have latched onto a tool by a bit more googling, and getting
lucky, called netdiscover that is in portage now.
Just one simple command found all machines active on the home lan
including those with DHCP served addresses:
netdiscover -i eth0 <ENTER>
Oddly a similar command but aimed at a range misses a few:
netdiscover -i eth0 -r 192.168.0.0/24 <ENTER>
I guess the tool may use some heuristics if you give it less info.
And for one reason or another a plain `arp' command misses several of
those discovered with `netdiscover -i eth0'
So I found what I needed... thanks.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] [OT] network discovery tools
2011-05-25 19:45 [gentoo-user] [OT] network discovery tools Harry Putnam
2011-05-25 19:54 ` Stéphane Guedon
2011-05-25 19:59 ` [gentoo-user] " Grant Edwards
@ 2011-05-25 21:55 ` Neil Bothwick
2011-05-26 16:24 ` Florian Philipp
2011-05-28 1:11 ` [gentoo-user] " James
4 siblings, 0 replies; 11+ messages in thread
From: Neil Bothwick @ 2011-05-25 21:55 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 636 bytes --]
On Wed, 25 May 2011 14:45:07 -0500, Harry Putnam wrote:
> Is there some quick and sure way to discover any IPs on the home lan?
>
> Some kind of mapper tool?
Do you know the MAC address of the device? That's usually written on the
box somewhere, so you can usually examine the output of arp -n to findthe
associated IP address.
If it's not in the arp table, and it's your network, a QAD method is
sudo nmap -sP 192.168.0.1-254 | grep -B 3 MACaddress
Substituting the address range of your network if it's not 192.168.0.
--
Neil Bothwick
WinErr 007: System price error - Inadequate money spent on hardware
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] [OT] network discovery tools
2011-05-25 19:45 [gentoo-user] [OT] network discovery tools Harry Putnam
` (2 preceding siblings ...)
2011-05-25 21:55 ` [gentoo-user] " Neil Bothwick
@ 2011-05-26 16:24 ` Florian Philipp
2011-05-26 19:04 ` Mick
2011-05-28 1:11 ` [gentoo-user] " James
4 siblings, 1 reply; 11+ messages in thread
From: Florian Philipp @ 2011-05-26 16:24 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1460 bytes --]
Am 25.05.2011 21:45, schrieb Harry Putnam:
> There must be a number of people who post here that have had to do
> this problem.
>
> Discover the addresses of computers on a home network that have
> connected by way of DHCP. For example: Several wireless connections.
>
> I've used static IPS for around 10 yrs, always seemed handier for
> things like ssh between home lan computers.
>
> But recently started using DHCP for wireless connections. It must be
> such a popular method for some reason.
>
> But when you do it that way, and say want to VNC or ssh or the like to
> something connected by a dhcp serving WAP then how do you find the
> address?
>
> That is, besides something like accessing the WAP and checking the IPs
> connected to it.
>
> Is there some quick and sure way to discover any IPs on the home lan?
>
> Some kind of mapper tool?
>
>
While I personally prefer a combined DHCP+DNS server like dnsmasq, you
can also take a look at the whole Zeroconf/MDNS/Avahi/Bonjour stack.
I'm not really sure if you can configure common devices and Linux PCs to
use the DNS server for internet addresses and MDNS for local ones. In
theory, it should be possible since you can distinguish them (local
addresses should not be fully qualified _or_ have the domain .local).
net-misc/mDNSResponder, sys-auth/nss-mdns and net-dns/avahi are probably
good starting points.
Hope this helps,
Florian Philipp
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Re: [OT] network discovery tools
2011-05-25 20:28 ` Harry Putnam
@ 2011-05-26 18:22 ` Neil Bothwick
0 siblings, 0 replies; 11+ messages in thread
From: Neil Bothwick @ 2011-05-26 18:22 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 372 bytes --]
On Wed, 25 May 2011 15:28:04 -0500, Harry Putnam wrote:
> Just one simple command found all machines active on the home lan
> including those with DHCP served addresses:
>
> netdiscover -i eth0 <ENTER>
Thanks, I wasn't aware of netdiscover and it's a perfect fit for
something I needed this week.
--
Neil Bothwick
Set phasers to extreme itching!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] [OT] network discovery tools
2011-05-26 16:24 ` Florian Philipp
@ 2011-05-26 19:04 ` Mick
0 siblings, 0 replies; 11+ messages in thread
From: Mick @ 2011-05-26 19:04 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 4367 bytes --]
On Thursday 26 May 2011 17:24:05 Florian Philipp wrote:
> Am 25.05.2011 21:45, schrieb Harry Putnam:
> > There must be a number of people who post here that have had to do
> > this problem.
> >
> > Discover the addresses of computers on a home network that have
> > connected by way of DHCP. For example: Several wireless connections.
> >
> > I've used static IPS for around 10 yrs, always seemed handier for
> > things like ssh between home lan computers.
> >
> > But recently started using DHCP for wireless connections. It must be
> > such a popular method for some reason.
> >
> > But when you do it that way, and say want to VNC or ssh or the like to
> > something connected by a dhcp serving WAP then how do you find the
> > address?
> >
> > That is, besides something like accessing the WAP and checking the IPs
> > connected to it.
> >
> > Is there some quick and sure way to discover any IPs on the home lan?
> >
> > Some kind of mapper tool?
>
> While I personally prefer a combined DHCP+DNS server like dnsmasq, you
> can also take a look at the whole Zeroconf/MDNS/Avahi/Bonjour stack.
>
> I'm not really sure if you can configure common devices and Linux PCs to
> use the DNS server for internet addresses and MDNS for local ones. In
> theory, it should be possible since you can distinguish them (local
> addresses should not be fully qualified _or_ have the domain .local).
>
> net-misc/mDNSResponder, sys-auth/nss-mdns and net-dns/avahi are probably
> good starting points.
netdiscover seems to do exactly what the OP asked for, although I have used
arping and a couple of scripts I found on the net and modified them.
The first looks like this:
=============================
#!/usr/bin/env bash
quit_on_found=0
packet_count=2
subnet=""
verbose="-q"
usage()
{
cat << EOF
find_ip 1.0 Robin Wood (dninja@gmail.com) (www.digininja.org)
Find used and unused IPs on a network you don't haven an IP address on
usage: $0 options
OPTIONS:
-h Show this message
-c <packet count> The number of ping packets to send, default 2
-s <subnet> First 3 parts of the subnet to test, default
192.168.0
-q Quit when found first free address, default keep
going
-v Verbose
EOF
}
have_arping=`which arping`
if [[ "$have_arping" == "" ]]
then
cat << EOF
usage: $0 options
You must have arping installed and in the current path for this scanner to
work
EOF
exit 1
fi
while getopts ":hvs:qc:" flag
do
case $flag in
h)
usage
exit 1
;;
c)
packet_count=$OPTARG
;;
q)
quit_on_found=1
;;
s)
subnet=$OPTARG
;;
v)
verbose=""
;;
?)
usage
exit 1
;;
esac
done
if [[ "$subnet" == "" ]]
then
cat << EOF
usage: $0 options
You must provide a subnet
EOF
exit 1
fi
if [[ "$verbose" == "" ]]
then
if [[ $quit_on_found == 1 ]]
then
echo "Quiting when found a free address"
fi
echo "Testing subnet $subnet.0/24"
echo "Sending $packet_count packets per IP"
fi
for i in {1..254}
do
IP=$subnet.$i
arping $verbose -c $packet_count $IP
result=$?
if [[ $result == 0 ]]
then
echo "$IP Used"
else
echo "$IP Free"
if [[ $quit_on_found == 1 ]]
then
exit
fi
fi
done
=============================
Google for "find_ip.sh"
The other which I can't find at the moment prints out the MAC address of each
IP address that is in use. Alternatively, run the above script with the -v
option and then scroll back to look at the MAC addresses.
Of course, I was using this before I knew that netdiscover existed - thanks
for sharing!
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* [gentoo-user] Re: [OT] network discovery tools
2011-05-25 19:45 [gentoo-user] [OT] network discovery tools Harry Putnam
` (3 preceding siblings ...)
2011-05-26 16:24 ` Florian Philipp
@ 2011-05-28 1:11 ` James
2011-05-29 22:33 ` Harry Putnam
4 siblings, 1 reply; 11+ messages in thread
From: James @ 2011-05-28 1:11 UTC (permalink / raw
To: gentoo-user
Harry Putnam <reader <at> newsguy.com> writes:
> Is there some quick and sure way to discover any IPs on the home lan?
emerge fping
<man fping>
fping -g 192.168.222.0/24
searches quite fast and accurate...
hth,
James
^ permalink raw reply [flat|nested] 11+ messages in thread
* [gentoo-user] Re: [OT] network discovery tools
2011-05-28 1:11 ` [gentoo-user] " James
@ 2011-05-29 22:33 ` Harry Putnam
0 siblings, 0 replies; 11+ messages in thread
From: Harry Putnam @ 2011-05-29 22:33 UTC (permalink / raw
To: gentoo-user
James <wireless@tampabay.rr.com> writes:
> Harry Putnam <reader <at> newsguy.com> writes:
>
>
>> Is there some quick and sure way to discover any IPs on the home lan?
>
> emerge fping
> <man fping>
>
> fping -g 192.168.222.0/24
>
>
> searches quite fast and accurate...
Yup, that's quick and easy... thanks
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2011-05-29 22:35 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-25 19:45 [gentoo-user] [OT] network discovery tools Harry Putnam
2011-05-25 19:54 ` Stéphane Guedon
2011-05-25 20:26 ` Vincent-Xavier JUMEL
2011-05-25 19:59 ` [gentoo-user] " Grant Edwards
2011-05-25 20:28 ` Harry Putnam
2011-05-26 18:22 ` Neil Bothwick
2011-05-25 21:55 ` [gentoo-user] " Neil Bothwick
2011-05-26 16:24 ` Florian Philipp
2011-05-26 19:04 ` Mick
2011-05-28 1:11 ` [gentoo-user] " James
2011-05-29 22:33 ` Harry Putnam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox