[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Computer Name and IP Address

On Friday 28 January 2005 16:07, Ron Johnson wrote:
> On Fri, 2005-01-28 at 08:33 -0500, disciple@exis.net wrote:
> > Hey everybody.  Is there a program, or a script that I could write
> > that will do the following:
> >
> > I want it to retrieve the Computer Name,IP addresses and MAC
> > address of all of the machines on my network.  I have mostly
> > Windows machines, but would like to use my debian box to perform
> > this task.
> nmap and arp and *maybe* samba (for the Windows Computer Name part).

More specifically:

nmap -sP

to scan that subnet (gives all IPs and MACs) and then for each IP found 

nmblookup -A $IP | grep "<20>" | awk '{print $1}'

Scriptable, of course.


Reply to: