You are not logged in.

#1 2010-10-15 00:40:38

duke11235
Member
Registered: 2009-10-09
Posts: 221

Show IP Addresses of Computers on Local Network

Is there a handy terminal command that can show this data for me? Iptraf can show hardward addresses, but I am looking for IPs

Offline

#2 2010-10-15 00:57:20

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: Show IP Addresses of Computers on Local Network

Most ISPs have a web interface for this. I.E, I use "gateway.2wire.net" to manage my firewall settings and such (well, that one anyway).

Unless you need to use the command output. Then I don't know offhand what you can use.

Offline

#3 2010-10-15 01:12:02

diegonc
Member
Registered: 2008-12-13
Posts: 42

Re: Show IP Addresses of Computers on Local Network

$ nmap 192.168.1.0/24

Starting Nmap 5.21 ( http://nmap.org ) at 2010-10-14 22:09 ART
Nmap scan report for 192.168.1.1
Host is up (0.0075s latency).
Not shown: 995 filtered ports
PORT    STATE  SERVICE
20/tcp  closed ftp-data
21/tcp  closed ftp
23/tcp  closed telnet
80/tcp  open   http
113/tcp closed auth

Nmap scan report for 192.168.1.2
Host is up (0.00056s latency).
Not shown: 995 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
80/tcp   open  http
111/tcp  open  rpcbind
2049/tcp open  nfs
3306/tcp open  mysql

Nmap done: 256 IP addresses (2 hosts up) scanned in 11.51 seconds

This is quite handy smile

Offline

#4 2010-10-15 02:07:06

duke11235
Member
Registered: 2009-10-09
Posts: 221

Re: Show IP Addresses of Computers on Local Network

That does look handy. Although my running that command turns up no hosts... Am I doing something wrong?

Offline

#5 2010-10-15 06:13:38

fphillips
Member
From: Austin, TX
Registered: 2009-01-24
Posts: 202

Re: Show IP Addresses of Computers on Local Network

You just need the correct network/netmask.

Try these instead:

ip neigh
arp -a
ping -b 192.168.0.255

You can fill out /etc/hosts to translate hostnames <--> IPs.

Offline

#6 2010-10-15 07:16:49

Nichollan
Member
From: Stavanger, Norway
Registered: 2010-05-18
Posts: 110

Re: Show IP Addresses of Computers on Local Network

This is what I do:

$ ifconfig wlan0|grep inet
inet addr:192.168.0.198  Bcast:192.168.0.255  Mask:255.255.255.0

Where wlan0 is the interface that I am currently using. If you use ethernet it is probably eth0.

Edit: I now see that computers was written in plural. I apologize if this is of no interest.

Last edited by Nichollan (2010-10-15 07:20:36)

Offline

#7 2010-10-15 07:20:12

dermarlo
Member
From: Wuppertal
Registered: 2010-09-19
Posts: 6
Website

Re: Show IP Addresses of Computers on Local Network

nmap -sP -n 192.168.0.0/24|grep ^Host 

Does this job for me

Offline

#8 2010-10-16 01:42:22

duke11235
Member
Registered: 2009-10-09
Posts: 221

Re: Show IP Addresses of Computers on Local Network

Interestingly, no luck yet
arp -a
? (10.0.1.1) at (address) on wlan0
Could all computers share the same ip?
ping -b 192.168.0.255
239 packets transmitted, 0 received 100% packet loss
ip neigh
10.0.1.1 dev wlan0 lladdr ............ STALE
nmap -sP -n 192.168.0.0/24|grep ^Host
Nothing(I wrote this, it was blank)

Last edited by duke11235 (2010-10-16 01:46:18)

Offline

#9 2010-10-16 02:53:03

fphillips
Member
From: Austin, TX
Registered: 2009-01-24
Posts: 202

Re: Show IP Addresses of Computers on Local Network

You need to read and learn about basic networking first.

As I said before, you have to provide the correct network, you can't just cut and paste.
The arp cache is flushed after each reboot. You won't have any entries other than your gateway if the other hosts aren't up or you haven't connected/pinged them during the current session.

Offline

#10 2010-10-16 07:46:17

vacant
Member
From: downstairs
Registered: 2004-11-05
Posts: 816

Re: Show IP Addresses of Computers on Local Network

If your router assigns LAN IPs, then it probably has a list somewhere on its web interface.

Offline

#11 2010-10-16 15:21:48

Thor@Flanders
Member
Registered: 2010-08-27
Posts: 266

Re: Show IP Addresses of Computers on Local Network

Hi,

The routine I always do is:

arp -a

This shows every host that has contacted your PC - if you want to fully know every PC on the LAN, it would help to have documented the thing beforehand... big_smile

But, I do follow fphilips fully, try to get a grip of the thing before you try exotic stuff, read this to get you rolling:
http://www.comptechdoc.org/independent/ … ing/guide/

Wellness

Thor

Offline

Board footer

Powered by FluxBB