Re: [SLUG] Unknown command

From: Paul M Foster (paulf@quillandmouse.com)
Date: Mon Nov 07 2005 - 02:58:58 EST


On Sun, Nov 06, 2005 at 10:29:55PM -0500, Ian C. Blenke wrote:

> Paul M Foster wrote:
> >Anyone know of a command that will cause other machines on a subnet to
> >echo back their IPs and names? Obviously, this wouldn't work if you had
> >to know the names of the machines first. So it would have to be like a
> >broadcast command that used ICMP or something to cause others to answer.
> >Anyone know of such a beast? Seems like I should know this, but I don't.
> >
> The best command for this is really nmap:
>
> # nmap -sP 192.168.1.1-254
>

This works fine. Thanks.

> If you don't use "-n", the DNS for the IPs will be resolved back into
> their names (if the IPs have in-addr.arpa entries on your nameserver).
>
> On any box, you should be able to see the recently cached ARP entries:
>
> arp -a
>

Hmm. This appears to attempt random IPs, through all the subnet. It
works if done as:

arp -a | grep -v incomplete

Then it gives only the ones actually up and working.

> Again, if you don't include "-n", the DNS for the IPs will be resolved
> back into their names (if the IPs have in-addr.arpa entries on your
> nameserver).
>
> Finding the "names" of the machines on the segment requires something
> beyond ARP or any kind of ICMP or UDP echo query.
>
> On a "pure" IP segment, you can find machine names using:
> - SMB over IP Netbios naming requests (see below)
> - an authorative in-addr.arpa DNS nameserver for your network segment
> (via dynamic or static assignment)
> - sniffing DHCP leases.
> - a naming service like rwhod (not really used by anyone anymore)
> - watching SLP announcements and other zero-conf broadcasts (ala
> "bonjour", previously "rendezvous")
>

Most boxes on the LAN don't use SMB. I only use it when absolutely
necessary for Windows boxen. As it happens, all the machines on this
network are logged in /etc/hosts on each box. So this whole exercise is
sort of moot. But I've recently thought of changing this to have a DNS
server running. And it occurred to me to wonder what I'd do if I wanted
to know the name/IP of boxes on a LAN I wasn't familiar with, or which
weren't mapped in /etc/hosts.

Thanks.

Paul
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 19:51:27 EDT