Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Getting iPad name from dynamic IP

Hi,


I am using an iPad in a wifi network with a dynamic IP (static not allowed). Is there any way to get the machine name of the iPad from the dynamic IP using a tool like ping?


I can ping the iPad's dynamic IP but can't get information like hostname out using -a flag.


Thasnks,


Gorkem

iPad, iOS 4.2

Posted on Aug 19, 2011 7:53 AM

Reply
12 replies

Aug 19, 2011 9:26 PM in response to gorkem86

Hehe... Good question. Never though about that. OS X Server doesn't set the DNS name to match up with an IP Address. Windows server does. Your every day router sending an IP Address out to your mobile device will not.

So if you're getting your address from a random wireless router, then your hostname will be "whatever-you-called-your-device.local" or "whatever-you-called-your-device.server.com." You can find the name of it when you connect your device to iTunes. The name of the device shows up in the list there.

Aug 20, 2011 11:19 PM in response to gorkem86

You can do this on OSX, however not with the included Apple DNS / DHCP server combo. It's easy to get a version of bind compiled on OSX (quite easy infact). There are a number of walk throughs on setting this combo up to do exactly what you are looking for.


Only downside : you can't use OSX Server Admin Tools to edit your zone files anymore. All by hand. Which isn't a bad thing (you'll understand quickly what is important), nor is it all that hard.


I do wish Apple would enable this to be set up with their tools, make it so much more convenient.

Aug 24, 2011 5:52 AM in response to gorkem86

Let me provide more detail about my situation:


  • I am on a Windows-based network with AD.
  • Let's assume my ipad name is gorkemipad.
  • Let's assume my company adds ".win.ad.company.com" extension to each hostname.
  • I want to be able to get the name (or dhcp client id) of my ipad from a Windows or Linux machine (not OSX).


I can successfully ping my ipad using the dynamic ip from Windows and Linux (ubuntu).


When I give ping -a flag, I do not get ipad name or dhcp client id back.


If I try to ping gorkemipad, gorkemipad.local, or gorkemipad.win.ad.company.com, hostname does not resolve.


I have also tried giving my network connection a dhcp client id. I have gorkemsipad (note the "s"), just to be different from the ipad name. Same trial of ping operations do not resolve.


Any thoughts?

Aug 24, 2011 7:44 AM in response to gorkem86

When you connect your iPad to iTunes is its name Gorkem's iPad, or gorkemsipad?

The reason I ask is that often a dns server attached to a dhcp server will update the hostname to reflect not spaces but dashes. In other words you might just be typing the hostname wrong.

Try gorkems-ipad.server.com

Replace the spaces with dashes and eliminate any punctuation.


It's an intersting and a puzzling question. One of those things everyone's trying to solve but no one can solve yet. ...and puzzling cause your a guy with no access to the server and you're trying to connect to your iPad using admin techniques!


I call shenanigans on you!!! LOL

Just kidding! Let us know if you figure it out!

-Graham

Aug 24, 2011 7:59 AM in response to gracoat

I have tried scanning iPads with high end network scanners (Fluke, LanGuard) and the name does not resolve, even really simple ones likes abcipad. What you could do is get a DHCP list exported into excel and sorted by name and then by mac address and compare it to a spreadsheet with ipad names and mac addresses. I do the spreadsheet because our wireless security is by mac address. It seems like an IT person would have access to the DHCP information unless this was unauthorized activity.

Oct 3, 2015 12:18 PM in response to gorkem86

I realize this thread is ~ 4 years old, but I am having the exact same problem. (I am NOT a developer.)

I am a network Admin for a small non-profit school that instructs kids with Autism. We have a Windows Network; we use Active Directory. Our school has a 1:1 student to teacher ratio. 35 "Learners" (Students) and 35 teachers. We have about 80 iPads. I have been using "ping -a" to ping ALL of them and NONE of them will return their HOSTNAME, which is what the "-a" flag is supposed to do. So, I figure that "by now" apple *must* have realized the importance of being able to ping an Apple device and have said device return its HOSTNAME.


(BTW - "HOSTNAME" is historically the "only" important name a computer should have with regard to networked computers. Networking - in the computer sense - is supposed to be brand-agnostic AND OS-agnostic. Which is why I'm so perplexed as to why Apple does NOT seem to "play nice". I totally get that Apple has always been trying to deliver maximum profits to their stockholders by, um, doing things a *little* differently. But, how the heck does Apple expect to sell more product when you can't use simple network tools - like "ping -a" - ???? I am new to Apple as I have never been able to afford their products, so I apologize to anybody who may take offense to my being so frustrated with Apple Inc.)


Any help, would be appreciated !! Oh - 1 more thing. Because these autistic kids are so ornery and because I'm not supposed to touch the iPads or bother the teachers, I need a way to get the HOSTNAME from 80 iPads THROUGH THE NETWORK. 1 iPad is for the teacher (35) & one iPad is for the student (35), so I have to do this for at least 70 iPads


I don't HAVE to use "ping -a", but I would like to know what command to use. I could probably get access to 1 iPad, to open a terminal window and run an "Apple version of 'ping -a' ", but I have never used an Apple terminal window before. I used to know some Linux commands, so I might recognize some of the nomenclature.


HELP!!! LOL!

Oct 3, 2015 2:18 PM in response to mikebtek

I guess the glaring question is, why do you need to get the hostname?

I'm thinking to myself, in terms of Apple having their own sandbox to play in - and not allowing others to play in it, they probably excluded this feature as it's unnecessary. I've been working both in Apple only environments, and mixed environments. It's nice to know what the hostnames are, but in terms of usefulness, with iPads, I can't think why you'd ever need to know what the hostname of the iPad is. There are ABSOLUTELY no command line tools you can use to access the iPads for configuration purposes unless you're developing apps. Even then it's only in the simulation environment.

If you're looking to configure the iPads you'll either need to use Apple Configurator or another MDM solution or work on each one manually. If you need to isolate one of the iPads on your network cause it's doing something it shouldn't, and you're not sure which iPad it is, the logs on your server or whatever you're using to that's tell you it's acting up, will tell you what the IP address of the iPad is. In either case, it's entirely likely that your user will know about the problem before you will and they'll come find you to tell you there's a problem


So I ask again. What's the usefulness of knowing what the hostname of any given iPad is?


Additionally, with the phasing in of IPv6 that usefulness will be further obsolete.

-Graham

Oct 3, 2015 3:37 PM in response to gracoat

Hi Graham,


The simple answer to your question is, "I don't know the usefullness. I was told to make a list of ALL devices on our network, by 1)HOSTNAME, 2)IP address, 3)mac address, 4)type(PC, ipad, smart-phone, etc ...), and 5)os" (Am I being "tested"? ... Am I just being given "busy work"? ... I don't know or care; I simply want to comply asap.)


This is a new job for me and I not only want to shine - I want to do as I'm told. (ie I want to go from temp to permanent!! LOL)


The GLARING question to me is,"Why on earth does Apple LET their devices respect the "ping command" by responding, but disrespect the ping command by NOT giving back their HOSTNAME?"


Whether or not the HOSTNAME is becoming obsolete, there is no good reason as to why Apple devices can't be civil with their Windows, Linux, Unix, and whatever-else counterparts.


I can only guess that part of the usefullness of finding the HOSTNAMEs has to do with the fact that we have over 120 Apple devices on our network, but only ~80 belong to our school. In general our DHCP scope is .30-.229 (200 available addresses). We do NOT want to expand our scope. We WANT to "kick" unwanted guests off the network. We do NOT want to give our WiFi a new/different password, but somehow the password "leaked" and now everyone seems to be connecting their own Apple devices without authorization. Our servers are slow/old, so we do NOT want to expand our scope.


I suppose that part of the problem is a conflict between the Principal, and the third-party contracted Network Administrator. It would be easier for me if I had access, physically, to each iPad, but I don't. If we were using Windows Tablets, I wouldn't have this problem.

Getting iPad name from dynamic IP

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.