LinuxQuestions.org
Review your favorite Linux distribution.
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 03-04-2018, 11:51 PM   #1
nejnej25
Member
 
Registered: Dec 2017
Location: Asia
Distribution: Slackware 14.2,CentOS 7
Posts: 112

Rep: Reputation: Disabled
Get details of connected device on network


I want to know the devices connected on my home network. I want to automate it by doing it on script. Now I cant find a way to get it from my router GUI. I used other packages like nmap,arp-scan but its not consistent when giving me output. Anyone know how can I get it from the router GUI or other work around? Thanks!
 
Old 03-05-2018, 01:16 AM   #2
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,513

Rep: Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004
It depends what information you need. You say 'devices'. Do you want the hardware names of the network adapter cards? Or do you want IP addresses? Perhaps a routing table? Nmap is probably what I would use.
 
Old 03-05-2018, 01:19 AM   #3
nejnej25
Member
 
Registered: Dec 2017
Location: Asia
Distribution: Slackware 14.2,CentOS 7
Posts: 112

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by AwesomeMachine View Post
It depends what information you need. You say 'devices'. Do you want the hardware names of the network adapter cards? Or do you want IP addresses? Perhaps a routing table? Nmap is probably what I would use.
Just want the ip address and the mac address. I tried nmap but it gives me inconsistent output.
 
Old 03-05-2018, 01:43 AM   #4
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,513

Rep: Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004
Nmap gives the same output unless something changes. I don't know what you mean by inconsistent. I've always found it completely consistent.
 
Old 03-05-2018, 01:50 AM   #5
nejnej25
Member
 
Registered: Dec 2017
Location: Asia
Distribution: Slackware 14.2,CentOS 7
Posts: 112

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by AwesomeMachine View Post
Nmap gives the same output unless something changes. I don't know what you mean by inconsistent. I've always found it completely consistent.
Im executing it 3 times. And the nodes appeared is not same count as I hit 3 times. On router gui there is 6 connected device but in nmap it gives me sometimes 3 sometimes 4 sometimes 5.
 
Old 03-05-2018, 11:23 AM   #6
tshikose
Member
 
Registered: Apr 2010
Location: Kinshasa, Democratic Republic of Congo
Distribution: RHEL, Fedora, CentOS
Posts: 471

Rep: Reputation: 89
Hi,

At your DHCP server (assuming it runs a modern Linux OS), periodically execute the command below.

Code:
ip neigh show
 
Old 03-05-2018, 11:50 AM   #7
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.6
Posts: 3,649

Rep: Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213
Quote:
Originally Posted by nejnej25 View Post
Im executing it 3 times. And the nodes appeared is not same count as I hit 3 times. On router gui there is 6 connected device but in nmap it gives me sometimes 3 sometimes 4 sometimes 5.
Please post the exact nmap command you are running. Thank you.
 
  


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
How to ping to all the device connected to a network ? pradiptart Linux - Networking 2 08-03-2012 03:34 PM
How to get the details of a android phone connected to wifi ? pradiptart Linux - Wireless Networking 9 07-27-2012 09:32 PM
How to get the devices details that are connected to my router ? pradiptart Linux - Wireless Networking 6 07-25-2012 07:04 AM
Find details of connected monitor arizonagroovejet Linux - General 4 02-08-2009 10:10 AM
Detect if a network device is connected in a bash script jordanwb Linux - General 11 12-29-2008 11:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:47 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