If you issue a
host <ip-address> and you get nothing found then it means the DNS service for your local network does not have a DNS entry for the devices IP address. I have a well formed network and it is easy for me to do this and I now understand this is not always the case.
@Albin Kiland: Yes, it does seem that there is another way to approach this. I always rely on the DNS service to publish. With what @Dave S: is describing there has to be another way to get this information. Dave apologies for not reading into what the piece was you are after.
I am also looking to find out how applications such as the one you mentioned and PingPlotter can grab that info.
A bit more looking and I realize if I do a broadcast ping
ping 192.168.1.255 then not all devices will respond. New routing rules in Microsoft and Apple prevent them from responding as well as each manufacturer can put in such rules in their devices. So I modified this approach to ping of an entire subnet
ping -c 1 192.168.1.x where x is a variable in a For loop starting at 1 and ending at 254. You can get the subnet size from the NIC of your device provided you received that info via DHCP and default router etc. This all gives clues to the network that must be used going forward.
This approach fills up the arp table nicely. Still looking into this however as it seems there is another network protocol I am over looking. When I use PingPlotter it finds more than I can using
ping and arp and is fairly fast. This is puzzling as the ping and arp are network tools that should expose devices unless rules inside each device prevents this but PingPlotter finds the device. So there is clearly something I am missing.
as am I, hence the creation of this topic to begin with.
Trust me when I say I am not a programming novice by any stretch of the word… And while not a Network expert, I have spent literally days on Google, and have experimented with dozens of command sequences
My guess, looking at the output ( like Apple device/Computer being very generic ), he is using a combination of utilities. Does smbutil give you anything ( might help with any devices accessible via smb )?
[Not having a real Mac I can’t really test]
[quote=272170:@Peter Job]My guess, looking at the output ( like Apple device/Computer being very generic ), he is using a combination of utilities. Does smbutil give you anything ( might help with any devices accessible via smb )?
[Not having a real Mac I can’t really test]
this command has already been discussed above
Sorry - missed it. Just trying to help.
I know Thanks
I installed arp-scan and ( on the emulated network, 10.0.2.*, and my “Macbook” is not a real Macbook, understand ) I got something that looks a bit like host names, but is not really returning the real (Win) name for 10.0.2.2 . The QEMU looks like a possible host name.
For the heck of it… I too installed arp-scan
and I cannot get it to work… it says
iMac-2:~ daveS$ arp-scan --interface=en0 --localnet
ERROR: Could not find interface: en0
ERROR: Check that the interface exists and is up
yet arp-a DOES indicate en0
iMac-2:~ daveS$ arp -a
router.belkin (192.168.2.1) at 8:86:3b:44:6:a0 on en0 ifscope [ethernet]
? (192.168.2.3) at e4:7c:f9:d7:d9:20 on en0 ifscope [ethernet]
? (192.168.2.4) at e0:b9:ba:49:76:d2 on en0 ifscope [ethernet]
I found the info at:
which refers to eth0 - which did not work for me, ( got same error as you ) but I found the ethernet adapter en0 in the About This Mac thingy. ( System Report… Network ).
EDIT PS - running under VirtualBox which I assume is returning the QEMU name.
OH… you MUST use SUDO with ARP-SCAN!!!
AND THEN IT DOES give the device name!!!
NOW… can this be done without downloading a 3rd party tool…
or “What is it that ARP-SCAN does, and how can it be duplicated?”
This would be quite beyond my abilities - but is that not open source, or part of Linux? Maybe there is something that could be accessed via a declare.
actually… its NOT the device name… its the MANUFACTURER… which can be “looked up” by using the 1st 1/2 of the Mac Address, so we really have NOT gotten to where I wish to go
I tried Angry IP scanner ( Java app ugh! ) which gave me no host names but might on a real network. Source is available which might have some clues - says it also uses netbios to find host names.
Dave, I think I’ve found what you need …
nmap tool gives the name and infos of the ip you ask for
nmap is here : https://nmap.org/book/man.html
open source you have to dig inside to learn how to do it …
[code]macbookpro-jyp:~ jeanyves$ sudo nmap -A 192.168.2.25
Starting Nmap 7.12 ( https://nmap.org ) at 2016-06-15 20:08 CEST
Nmap scan report for 192.168.2.25
Host is up (0.0022s latency).
Not shown: 998 closed ports
PORT STATE SERVICE VERSION
80/tcp open http GoAhead WebServer
| http-title: NOXON Web-Interface
|_Requested resource was http://192.168.2.25/index.asp
6666/tcp open tcpwrapped
|_irc-info: Unable to open connection
MAC Address: 00:1A:2B:83:FB:EE (Ayecom Technology)
Device type: media device
Running: Denon embedded, Philips embedded, Terratec embedded
OS CPE: cpe:/h:denon:avr-3808ci
OS details: Denon AVR-3808CI audio/video receiver, Philips SLA5500 or SLA5520 Wireless Music Adapter or WAK3300 wireless alarm clock, or Terratec NOXON audio system
Network Distance: 1 hop
HOP RTT ADDRESS
1 2.25 ms 192.168.2.25
OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 32.51 seconds
Dave, did you test it ?
nmap is not an installed app for OSX… and therefore not duplicating what is already being done (somehow)…
I realize this is a super old thread, but has there been any resolution Dave?