Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Possible Duplicate:
How to find unused IP Address on a network?

currently I am using nmap wich scans the range of IPs that my DHCP server assigns to hosts. However this is a) slow and b) sometimes nmaps doesn't discover all hosts. Laptops that are connected wirelessly sometimes aren't counted.

I tried almost all possible nmap scan techniques like:

sP,sS, sT, sW, sM etc... they all miss out the laptops sometimes although I can ping them at any time.

I am looking for an efficient way to accomplish this without missing out some hosts. My Router is a Linksys WRT54GL and I am using the latest Tomato firmware.

share|improve this question

marked as duplicate by Bruno Pereira, jrg, jokerdino, Octavian Damiean, Jacob Johan Edwards Feb 1 '12 at 17:44

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
sudo nmap -sP -PR 192.168.0.* shold return all IP from the 192.168.0.0 network no mather what. Can you check if you are using sudo on the command, you get different results if not. –  Bruno Pereira Dec 8 '11 at 21:24
    
Its not an exact, its the opposite but the solutions are really common. –  Bruno Pereira Dec 8 '11 at 21:31
    
Yes even with sudo the laptop isn't discovered sometimes. –  imbaer Dec 8 '11 at 21:33
1  
How about looking it up from the router itself? If you login to most routers, you can see a list of connected devices pretty quickly. –  Tom Brossman Dec 8 '11 at 21:35
    
But has to be from the command line :) Sorry didn't say that in the question. –  imbaer Dec 8 '11 at 21:49

1 Answer 1

up vote 3 down vote accepted

You can also try arp-scan (install using sudo apt-get install arp-scan on a terminal)

It returns MAC addresses and tries to find the manufacturer of the network adapter.

ie, sudo arp-scan --retry=8 --ignoredups -I eth0 192.168.1.0/24 (--ignoredumps and --retry=8 make the results more accurate) returns

Interface: eth0, datalink type: EN10MB (Ethernet)
Starting arp-scan 1.8.1 with 256 hosts (http://www.nta-monitor.com/tools/arp-scan/)
192.168.1.1 68:7f:74:a5:07:18   Cisco-Linksys, LLC
192.168.1.5 00:11:32:07:71:ac   Synology Incorporated
192.168.1.100   00:21:9b:f8:ec:1c   Dell Inc
192.168.1.117   00:12:fb:1a:88:8a   Samsung Electronics

4 packets received by filter, 0 packets dropped by kernel
Ending arp-scan 1.8.1: 256 hosts scanned in 1.377 seconds (185.91 hosts/sec). 4 responded

Give it a try.

share|improve this answer
    
Looks good so far, I'll evaluate it a little more and check back tomorrow. –  imbaer Dec 8 '11 at 21:36
    
With the --retry option combined with --ignoredups this works like a charm. sudo arp-scan --retry=8 --ignoredups -I eth0 192.168.0.100-192.168.0.150 –  imbaer Dec 9 '11 at 8:13
    
Nice! I will add it to the answer then. –  Bruno Pereira Dec 9 '11 at 8:48

Not the answer you're looking for? Browse other questions tagged or ask your own question.