In Visual Studio 2015, VB, in Windows 10, I have a small program where I use the arp -a command
to pick up the mac and I/P addresses of connected devices on my lan. From everything I've read (and tried), the answer
somehow comes back to DNS.getHostEntry which throws a No Such Host when fed a cell's I/P and
I understand that, a cell phone is not a host. Does anyone know of the appropriate DNS or other type
command that, fed an I/P or MAC will return the device's name?

Thank you.

Recommended Answers

  1. Your top post asked for "device's name".
  2. Later reply muses about dns.gethostentry failures. (not presented as "why does this fail now?")
  3. Later you may be asking but didn't something else.
  4. Finally you tell about the old MAC addresse to vendor lookup which as you can guess with some billion …
Jump to Post

All 7 Replies

  1. MAC address: Read https://www.quora.com/What-info-can-you-get-from-mac-address
    So no, you can't get the device name.
  2. IP address: https://www.quora.com/What-information-can-be-gleaned-purely-from-an-IP-address
    Again no device name.
  3. https://en.wikipedia.org/wiki/Domain_controller covers a bit but is not in play here.
    Now if the machine information is surrendered say to some domain controller, then you ask there.

When I log into my router and have it show me connections, I'm presented with a list that includes: Mac, I/P and device name.
If the router has access to the device name,

MacList.jpg

Two more points, then I'll stop asking.
The dns.gethostentry(ip of cell on LAN) worked in 2018 when I first developed my app. Since, it retruns No Such Host.
Second, there are about 6 online apps that use mac to look up vendor, NONE can find the vendor of my Galaxy iphone but the router did.
Someone has the answer........

  1. Your top post asked for "device's name".
  2. Later reply muses about dns.gethostentry failures. (not presented as "why does this fail now?")
  3. Later you may be asking but didn't something else.
  4. Finally you tell about the old MAC addresse to vendor lookup which as you can guess with some billion devices out now can less than 100% a sure thing.

I don't mind discussing something but please make it clear what we are going to discuss. What is the question.

The first post asked, "Does anyone know of the appropriate DNS or other type
command that, fed an I/P or MAC will return the device's name?" Your reply said that neither
piece (MAC or I/P) contains the device's name. Well, somehow, the router only has those
two pieces and spits back the devive name when I ask what's connected. If I cannot get a
device's name in Visual Studio 2015, in VB code, please just say so and I'll close this darm thread.
Don't make it more complicated that you have.

Again no to getting this with the IP or MAC address. But in the interest of answering how a router gets that information:
Read https://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol#Options and pay attention to Field 12.

Since your app can (eventually) get some IP and MAC address you might be able to get vendor information but for the name, it appears you have to ask the router. And that is going to change from router to router as there is no known API for that.

What you may want to research is the OpenWRT source code to see how they did this in that router code. I'm leaving such research up to you.

Thank you for your assistance, I DO appreciate it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.