View Full Version : [ubuntu] List used IP numbers in the LAN
MockY
February 24th, 2009, 06:16 PM
How can I list used IP number in my LAN via terminal?
chili555
February 24th, 2009, 07:35 PM
Try this:
fping -g 192.168.1.100 192.168.1.150Substitute your IP range as needed. The command:
ifconfigwill tell you whether your range is 192.168.0.x or 192.168.1.x. You will get something like this:
chili@LAPTOP40:~$ fping -g 192.168.1.100 192.168.1.150
192.168.1.100 is alive
192.168.1.101 is alive
192.168.1.105 is alive
192.168.1.108 is alive
192.168.1.116 is alive
192.168.1.118 is alive
192.168.1.121 is alive
cariboo
February 24th, 2009, 07:44 PM
I created a script with this line it it to to check which computers were up on the network:
sudo nmap -PR -sP 192.168.1.0/24j
Jim
MockY
February 26th, 2009, 01:23 AM
Thanks for your responses.
fping creates an infinite loop. Once all ip numbers in that subnet is checked, it is checked again. It would be nice if it could stop after one round, and only output the active addresses.
nmap does what I wanted it to, as in only outputting used addresses. However, only a fraction of used addresses are detected (running it as root as suggested fixes this, though I don't understand why). Furthermore, what I wish it could do is listing the hostname. Right now, only a few computers are listed with their host name. However, the NIC vendor is listed, which is pretty neat.
kriom
April 16th, 2013, 07:49 AM
I think fping is a good solution :
install :
sudo apt-get install fping
then use it :
fping -a -g 192.168.1.0/24 2> /dev/null
192.168.1.10
192.168.1.20
source :
http://kriom.blogspot.fr/2013/01/howto-find-hosts-on-lan-if-they-respond.html
Iowan
April 17th, 2013, 01:23 AM
Closed - old thread.
Powered by vBulletin® Version 4.2.2 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.