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.

In my work there is a lot of computer and I want make a joke. I can close computer over the network but finding IP addresses is hard to me.

How can I easily find all online IP adresses from 192.168.1.aa to 192.168.1.zz?

share|improve this question
    
try angry ip scanner –  Web-E Dec 2 '12 at 11:37
    
possible duplicate of How to find unused IP Address on a network? –  Lekensteyn Dec 2 '12 at 11:50
add comment

2 Answers

up vote 6 down vote accepted

Generally, nmap is useful to quickly scan networks.

To install nmap, entersudo apt-get install nmap.

Once it is installed, enter nmap -sP 192.168.1.0/24.

This will show you which hosts responded to ping requests on the network between 192.168.1.0 and 192.168.1.255.

share|improve this answer
1  
Not all hosts respond to pings. ARP is the way to go, at least in IPv4. –  Marcin Kaminski Dec 2 '12 at 15:28
    
thats enough for me and it works on internet –  user84277 Dec 2 '12 at 19:35
    
is it just my computer, or does this command take forever to run? –  JohnMerlino Apr 14 at 0:18
add comment

If all the computers in your network are Ubuntu or any other distribution that makes use of avahi-daemon (DNS-SD), you can get a detailed list of them (with hostname and IP address) by doing:

avahi-browse -rt _workstation._tcp

If you want to know all the IP addresses used in your network, you can use arp-scan:

sudo arp-scan 192.168.1.0/24

As it is not installed by default, you'll have to install it with sudo apt-get install arp-scan. arp-scan send ARP packets to the local network and displays the responses received, so it shows even firewalled hosts (that block traffic based on IP packets).

share|improve this answer
    
This command is definitely better than the one above. Running nmap took ages, but this one replied instantly with the nodes in the specified network. –  JohnMerlino Apr 14 at 0:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.