LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-14-2012, 04:32 AM   #1
abhinav4
Member
 
Registered: Jun 2010
Location: India
Distribution: Fedora/Cent OS
Posts: 123

Rep: Reputation: 0
Exclamation Get list of machines in the network


I have a fedora machine running on a windows 7 machine over vmware. I am in a pretty small network with around ~50 machines on the network. What i want now is to get the list of machines and the ips on the network.
How can I achieve this?
 
Old 09-14-2012, 04:35 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
what would be on this list? you can certainly scan networks for machines that exist, but outside of their IP and, on your local subnet, their MAC address you aren't going to necessarily know anything else, like their hostname. for ping sweeps, i'd recommend using fping
 
Old 09-14-2012, 04:52 AM   #3
abhinav4
Member
 
Registered: Jun 2010
Location: India
Distribution: Fedora/Cent OS
Posts: 123

Original Poster
Rep: Reputation: 0
Exclamation

Quote:
List should have machine name and IP. All are windows machine
Quote:
fping does not gives any output
[root@fedora8 ~]# fping -a
[root@fedora8 ~]
But i am able to ping the IP's individually

Quote:
[root@fedora8 ~]# ping 172.22.1.143
PING 172.22.1.143 (172.22.1.143) 56(84) bytes of data.
64 bytes from 172.22.1.143: icmp_seq=1 ttl=128 time=0.325 ms
 
Old 09-14-2012, 04:54 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
right, but you've not used it at all correctly. read the manpage for usage.
 
Old 09-14-2012, 04:58 AM   #5
414N
Member
 
Registered: Sep 2011
Location: Italy
Distribution: Slackware
Posts: 635

Rep: Reputation: 186Reputation: 186
How about:
Code:
nmap -sP NETWORK_ADDRESS/NETMASK
For example, on a small home network one would presumably run:
Code:
nmap -sP 192.168.0.0/24
 
Old 09-14-2012, 05:04 AM   #6
abhinav4
Member
 
Registered: Jun 2010
Location: India
Distribution: Fedora/Cent OS
Posts: 123

Original Poster
Rep: Reputation: 0
Exclamation

Checking

Last edited by abhinav4; 09-14-2012 at 05:06 AM.
 
Old 09-14-2012, 05:16 AM   #7
abhinav4
Member
 
Registered: Jun 2010
Location: India
Distribution: Fedora/Cent OS
Posts: 123

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by 414N View Post
How about:
Code:
nmap -sP NETWORK_ADDRESS/NETMASK
For example, on a small home network one would presumably run:
Code:
nmap -sP 192.168.0.0/24
Yes this works for me but it is not showing the machine name (all are windows machine). How can i get the machine name also

Quote:
[root@fedora8 ~]# nmap -sP 172.22.0.0/16

Starting Nmap 4.52 ( http://insecure.org ) at 2012-09-14 14:14 IST
Host 172.22.1.49 appears to be up.
Host 172.22.1.50 appears to be up.
 
Old 09-14-2012, 05:26 AM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
as I already said, you can't get this easily. I presume smbclient could tell you on a per machine basis.
 
Old 09-14-2012, 05:33 AM   #9
414N
Member
 
Registered: Sep 2011
Location: Italy
Distribution: Slackware
Posts: 635

Rep: Reputation: 186Reputation: 186
I guess the machine name you actually want to see is the NetBIOS name.
If you know the IPs of the machines you could issue a nmblookup query (see man nmblookup) or you could still use nmap as follows:
Code:
nmap -F --script=nbstat 172.22.0.0/16
The -F flag is for a fast scan of the ports, while the script nbstat prints out some NetBIOS related info from every scanned host, like its NetBIOS name.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Lost in the network: setting up network on Laptop with virtual guest machines pdaalder Linux - Networking 1 02-16-2010 05:33 AM
LXer: HowTo List Virtual Machines using Python and CIM Part 1 LXer Syndicated Linux News 0 03-24-2009 10:00 PM
Is there a way to get a list of all machines in a local DNS? BrianK Linux - Networking 3 10-08-2008 01:57 PM
list of PC vendors that sell machines with no OS or some Linux distro lothario Linux - Hardware 2 12-01-2006 05:21 PM
How does one network linux only machines ? glenn69 Linux - Networking 4 03-21-2006 10:16 AM


All times are GMT -5. The time now is 04:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration