Kitz Forum

Computers & Hardware => Apple Related => Topic started by: Weaver on March 27, 2017, 05:03:33 PM

Title: Static IP config in iOS 10
Post by: Weaver on March 27, 2017, 05:03:33 PM
I am trying to set a static IPv4 address etc in the config on my iPad but it just seems to go ape if there is no DHCP server present. Am I going mad? It comes up with an orange warning about no internet connection and then won't save the static ip info that I have entered. When I go back into settings it has just thrown away my entries under Static IP and it merely shows a 169.254 address.
Title: Re: Static IP config in iOS 10
Post by: d2d4j on March 27, 2017, 05:26:34 PM
Hi weaver

I hope you don't shout, but did you set the gateway and dns servers

Also, as an aside, I usually static assign from router using MAC address

Many thanks

John
Title: Re: Static IP config in iOS 10
Post by: andyfitter on March 27, 2017, 05:26:46 PM
No DHCP server present? Are you sure you aren't confusing DHCP with DNS? If its static, you need to hard code the DNS server too, as well as the IP/Mask/Gateway
Title: Re: Static IP config in iOS 10
Post by: Weaver on March 27, 2017, 05:34:30 PM
I never used to set these other settings. Won't be using DNS, and don't need a default gateway as I am not accessing the internet

It's just while I am talking to a router temporarily to set it up. I've done this umpteen times in the past and never bothered to fill in all the fields before. I'm wondering if this is a change in ios10.

But as a workaround, I did put in values for the default gateway and dns server once, but that didn't help. The only thing that worked was to frig the router in question temporarily to be a dhcp server.
Title: Re: Static IP config in iOS 10
Post by: d2d4j on March 27, 2017, 06:00:33 PM
Hi weaver

I tested in my mobile with iOS10.2, and can both manual set (no gateway and dns set) and also set IPv6

I would restart iPad

I appreciate iPhone is not iPad, so sorry if I'm wrong

Many thanks

John
Title: Re: Static IP config in iOS 10
Post by: burakkucat on March 27, 2017, 06:36:02 PM
I do not posses any iDevice so what follows may be irrelevant . . .

When testing a device, to which I intend to connect via a static address, I set the interface of the computer in a very ritualistic manner which is best shown by example.

Assume the device in question is a Huawei SmartAX MT882 which has been configured to respond via the 192.168.1.254 IPv4 address. I intend to connect it to a computer via the Ethernet port. The computer's interface will be set as follows --
The above list may well be "overkill" but it will never fail.
Title: Re: Static IP config in iOS 10
Post by: Weaver on March 27, 2017, 06:51:09 PM
The stupid iPad simply would not store the parameters I put in and when you went back into settings it was back on the page for DHCP instead of showing the static IP page, and switching to static IP it just showed 169.254.x.x. But I have done this procedure literally a hundred times using the iPad and other boxes without any problems, and in particular I know that the iPad did not (in ios9 anyway) formerly require you to enter non-essential fields such as default gateway and dns server which are only needed if you are going to use the internet and dns respectively.

I did as suggested and rebooted the machine. Still no joy. This is with a DHCP server currently present on the LAN, the Firebrick. I must be going mad.
Title: Re: Static IP config in iOS 10
Post by: burakkucat on March 27, 2017, 07:04:13 PM
I did as suggested and rebooted the machine. Still no joy. This is with a DHCP server currently present on the LAN, the Firebrick.
Quite crazy.  :crazy:

Quote
I must be going mad.

But not you.  :no:
Title: Re: Static IP config in iOS 10
Post by: sevenlayermuddle on March 27, 2017, 08:03:09 PM
I don't have access right now to an iPad running iOS 10.

But a suggestion on one forum thread suggests that if you simply change the config from DHCP to static, it will revert to DHCP at first opportunity.

However, if you tap 'forget this network' first, and then enter all the details afresh including static IP, it may behave as you and I expect, and remember the static IP.

As said, I can't try it.   Currently using an iPad 2 which stops at iOS 9.   But it might work?
Title: Re: Static IP config in iOS 10
Post by: Weaver on March 27, 2017, 08:52:43 PM
> But a suggestion on one forum thread suggests that if you simply change the config from DHCP to static, it will revert to DHCP at first opportunity.

Sounds just like what I am seeing.

And I did not hit 'forget' either, because it's a wireless LAN of course with a password from hell about a thousand miles long and I didn't want to be re-entering it all again.

Perhaps I have never done this under iOS 10 before.

I contacted Apple support, I'm hoping they will get back to me. I asked them to email me with the answer but apparently they don't know how to use email or something, they have live chat since I was in it and they like telephones a lot, which I don't as I'm too fuzzy to cope with them most of the time, unless Janet is on hand to help me. So I think I probably got precisely nowhere with that.
Title: Re: Static IP config in iOS 10
Post by: sevenlayermuddle on March 27, 2017, 09:06:32 PM
I contacted Apple support, I'm hoping they will get back to me

My own experience of Apple Support is same as any other tech company.  They will
1) treat it as an rtfm. 
If that fails,
2) they will fail to understand the question.

They are wrong to do that this but, like every other tech company dealing with a 'consumer', it is likely.  Personally I prefer to simply avoid 'tech support', when possible.

As regards 'forget this network' and reconfiguring, a way to mitigate the 1000 mile password might be, prior to the change, if the firebrick allows it, navigate to the router config page and tick 'show password'.   You can then select and copy the 1000 miles, ready to paste into the new WiFi config?

If apple support prove me wrong, by solving the problem, I will be delighted.
Title: Re: Static IP config in iOS 10
Post by: Weaver on March 27, 2017, 09:47:45 PM
Apple support is at least extremely polite and they all sound like they actually want to sort you out (as long as it doesn't involve advanced things like emailification). I think they have all been on some course. Support is costing me a small fortune anyway and I am determined to get my money's worth. Apple's hideous cryptic and terse UI is like a puzzle that this primate is not doing too wel solving, so I have lots of 'how on earth do I' and 'where's the x' questions. I long for Microsoft's properly designed look-and-feel and actual help in the software products too. We seem to have gone backwards a long way since the Mac came out. Most hilarious of all was when a I contacted them to ask them how to fire up a chat session in the Apple Support App, instead of starting a phone call. They couldn't tell me how to do it, the function to do it was actually there all the time but so buried in the UI that I couldn't see it and they couldn't tell me how to locate it, so they just misdiagnosed it as a bug to do with me being in the wrong country and told me it must be broken.
Title: Re: Static IP config in iOS 10
Post by: sevenlayermuddle on March 27, 2017, 09:54:58 PM
And with all that, you'd still not rather just try 'forget this network', especially with the suggestion I have given to simplify password reentry?
Title: Re: Static IP config in iOS 10
Post by: Weaver on March 27, 2017, 10:14:42 PM
I will certainly take up your suggestion - misunderstanding. I am just wondering though how I used to be able to get away without this grief - is it really a backwards step in iOS 10 thing. For all the fuss about ios10 I can't think of anything in particular that is good about it.
Title: Re: Static IP config in iOS 10
Post by: sevenlayermuddle on March 27, 2017, 10:30:54 PM
If my suggestion fixes it, I would regard it as simply a bug, regardless whether that bug was introduced in iOS 10 or some other version.

Re iOS 10 though feature set though, I think you are right.   It does nothing exciting.   My iPad Mini that runs iOS 10 is really no different to my old iPad 2 on iOS 9.  The old iPad does crash a lot, but that is due to it being old (limited RAM) rather than software instability.

Biggest visible change with iOS 10 was double tap to unlock, rather than swipe.  To this day, that infuriates me, mainly as I have both ios 9 and 10 devices in use, two iPods and two iPhones.   Utterly pointless change, and hardly merits a 'new' version of iOS. >:(
Title: Re: Static IP config in iOS 10
Post by: Weaver on March 29, 2017, 10:04:39 AM
Can't reproduce this on Mrs Weaver's iPad 6, ios 10.2.1 either, and hers is a 64-bit box the same as mine, only difference is that this is an iPad Pro. And there is now a dhcp server present on the Lan, which was not the case the other day. But that is insane.
Title: Re: Static IP config in iOS 10
Post by: Weaver on March 29, 2017, 11:04:45 AM
Upgraded this box to iOS 10.3 to see if that would help. Same problem even after upgrade and of course a cold boot, so even a reboot did not clear it.

But now I have fixed it. I managed to work around the bug. I did a 'forget network' and then the problem was cured, for how long I don't know. I suggested to Apple that I think it would be a good idea to report this as a bug. It is definitely state-dependent, and we know it can be cured by deleting a data structure.

It could be some corruption of the database of wireless Lan settings, or else some related data structure. The machine can not possibly be running low on RAM as no other processes were running on one occasion. Unfortunately I have no idea how to get it into this state, but once it is broken it remains so forever so it seems. It failed in this way dozens of times over several days. Also since I had just cold-booted the o/s, it is not due to corruption long-term, and it has to be something messed up that can survive in _persistent_ storage and continue to cause trouble even after a reboot.

It is going to be a nightmare for Apple to reproduce. The question for developers is, what could cause the machine to reject settings or throw an error so they are not retained when you enter them in the static ip page. The exact values entered seem to be irrelevant, I tried various different values on two different machines. An example that is known to fail (amongst many others) is IPv4 = 192.168.1.22 netmask = 255.255.0.0 and no other values entered. It still fails if other values are given as well e.g. Default gateway and dns server. It fails if different netmasks are used and also fails with 10.0.0.0 netmask 0.0.0.0 for example.

There are three entries showing in the list of wireless lans, only one of them has a saved password and other settings associated with it. I did not try repeating the test with a different wireless Lan, and in any case it wouldn't have been an ideal test as it would have meant entering a password and presumably creating data structures from scratch anyway.
Title: Re: Static IP config in iOS 10
Post by: sevenlayermuddle on March 29, 2017, 01:17:07 PM
Glad to hear the work-around did the trick.

Just guessing, but I wonder if the pattern of behaviour depends upon whether a DHCP lease timer is running when the change from DHCP to static is made?
Title: Re: Static IP config in iOS 10
Post by: Weaver on March 29, 2017, 02:08:09 PM
I'm not sure I understand the implication of the question.

Yes there is a DHCP lease running on that interface. It's so weird that I could not reproduce this on another iPad with the exact same o/s, same processor and same wlan. There has to be some way of getting it into this screwed up state. And once it's in it then you've had it until you delete something that has become screwy.
Title: Re: Static IP config in iOS 10
Post by: sevenlayermuddle on March 29, 2017, 02:37:42 PM
I'm not sure I understand the implication of the question.

No particular implication, just trying to speculate about why it happens sometimes and not others.
Title: Re: Static IP config in iOS 10
Post by: Weaver on March 29, 2017, 08:17:23 PM
No, I wasn't thinking straight because as it happens. There would have been a DHCP lease timer in progress in every case, even in the case where it worked on another machine. I never thought t9 bring the interface down first and then turn off the dhcp server before trying the UI test, for the sake of science purely.

It has to be a completely mad bug on their behalf does it not? I am actually wondering if it does something like throwing an expection when it exits and scans or commits the contents of the static ip settings dialog box (or whatever the correct Term is in the iOS GUI). That would explain in part why it is as if you never made any settings changes at all. I'm also wondering if it could develop a dislike for blank fields under certain mad buggy circumstances although I did also try unnecessarily filling in default gateway and dns server fields with plausible junk just to see if that would pacify it.
Title: Re: Static IP config in iOS 10
Post by: sevenlayermuddle on March 29, 2017, 11:24:18 PM
Just speculating, but...

Typically, an iOS App would save config data to a local memory object.   In response to various events, such as when something changes, or the App enters background, that object is written to filestore.   When the App next launches, or just when the App thinks fit, the object would be restored from file, replacing the object in memory.

When a setting 'vanishes', it suggests to me that there is a loophole in the App, such that the object containing the data is not written to file when it should be.   The App logic failed to realise it needed writing, or maybe restored it from file without having ever saved it.

Simply an ordinary software bug, the likes of which kept me in a job when I worked for a living, and provided for my pension. :)
Title: Re: Static IP config in iOS 10
Post by: Weaver on March 29, 2017, 11:53:16 PM
Good point. I've seen the analog of bugs like that, although I haven't done too much application code, usually lower-level components. I have asked them politely to report it and they now have a couple of emails with very detailed bug reports establishing some of the boundaries, not that I can help too much.

Anyone else with an iOS device could just give it a quick try if they want to contribute, decent test values are ip = 10.0.0.0 netmask 0.0.0.0 and nothing else filled in, or else 192.168.1.22 netmask 255.255.0.0 as it failed on those and many others
Title: Re: Static IP config in iOS 10
Post by: sevenlayermuddle on March 30, 2017, 12:08:25 AM
It seems to be quite a commonly recognised issue, mentioned on various forums when I searched.  That (these forum threads) are what inspired me to suggest 'forget this network'.

Don't hold your breath waiting for Apple to fix it, or even to seriously investigate.   I hold Apple in high esteem as regards general software quality, but obviously all sofware has bugs and unless it is a security-critical issue, Apple are no better than any other at admitting to the bugs and fixing them.

The most common answer I found to your issue on Apple forums was to configure a fIxed IP on the router, rather than a static IP on the device.  You and I know that is ridiculous and irrelevant, but it is accepted by most morons.
Title: Re: Static IP config in iO
Post by: Weaver on March 30, 2017, 02:26:43 AM
I didn't realise that this was a known thing. Doesn't say much for Apple tech support who acted as if they had never heard if it, or genuinely never had.
Title: Re: Static IP config in iOS 10
Post by: d2d4j on March 30, 2017, 08:34:21 AM
Hi weaver and 7lm

I just manually set my iPhone 5, iOS10.2 to weavers suggested 10.0.0.2 and 255.255.255.0 only, which it accepted and saved (stopped/turned on  wifi after change to make sure it had saved setting)

No internet connection was available to the mobile, and the mobile did not revert to 4g, as it believed it was connected to wifi

Setting it back to dhcp, stopping wifi and restarting wifi again brought my correct settings back as the router set, including 3 IPv6 addresses

Many thanks

John
Title: Re: Static IP config in iOS 10
Post by: Weaver on March 30, 2017, 10:04:47 AM
I have no idea how to get it into this bad state, as I may have said before. But I have noticed, as 7lm pointed out, that there have been a few reports of other people having seen this.
Title: Re: Static IP config in iOS 10
Post by: d2d4j on March 30, 2017, 11:03:09 AM
Hi weaver

It may be unique to iPad which I do not have latest iPad, only iPad we have is on ios9

Many thanks

John
Title: Re: Static IP config in iOS 10
Post by: sevenlayermuddle on March 30, 2017, 11:55:52 AM
I have tried on a couple of iOS 9 iPads, couldn't reproduce it.

Btw.. In fairness to Apple, the fact a few folks have moaned about it on a few forums doesn't mean they've actually reported it to Apple as a bug.   Weaver has done the right thing by reporting it, but have the others?

And if people don't tell Apple, Apple are unlikely to prioritise a fix.
Title: Re: Static IP config in iOS 10
Post by: d2d4j on March 30, 2017, 12:06:12 PM
Hi 7lm

Your correct

Also, I would think the vast majority just use dhcp, which we do, but we have our dhcp assign as we need and static assign using MAC address, so it uses correct vlans for the devices

Also, I seem to remember Apple had an issue on iOS5 or 6 I think, where a lot could not connect to wifi, due to Apple adhering to tightly in the network protocols where as most routers etc were more relaxed and the iphone would not connect unless it matched the same standard

Please accept my apologies if I have not remembered correctly and Apple very quickly fixed it

Many thanks

John
Title: Re: Static IP config in iOS 10
Post by: Weaver on January 23, 2018, 10:06:27 AM
A long time has passed. This iPad is on ios11 now, and I can't reproduce the bug. Not that that means much. So it may or may not have been fixed.
Title: Re: Static IP config in iOS 10
Post by: Weaver on January 29, 2018, 08:12:04 AM
I ‘reproduced’ the bug, possibly. Possibly it never was quite what I thought it was.

I got hit by it again - couldn't save the contents of the form to set an ipv4 static ip and the save option was grayed out. Why ? Bug !

Well.

I realised that the netmask box has a fake ‘value’ showing in it which is actually possibly non-existent. There is some text 255.255.0.0 showing which, might be in lighter gray, I can't be sure about the color. But it seems that actually the field is ‘invalid’ in reality unless the user types some text into it. The text 255.255.0.0 is actually not a useful initial value! (It's just useless decoration to remind the user.)

This is silly. It should be empty initially and if so then needs to be clearly visibly so. What is really silly is that this is all the more confusing because in my case 255.250.0.0 happened to be a plausible default value as it is the correct size for 192.168.0.x which is what I happened to have entered.

So problem solved. Whether or not that was the story in the old case, I do not know. Perhaps I always got misled by this shockingly weak UI design.
Title: Re: Static IP config in iOS 10
Post by: Westie on January 29, 2018, 10:18:30 AM
Quote
misled by this shockingly weak UI design
I agree with you, and it's not unique to Apple.

Sometimes field entry boxes have "solid" default values which need to be deleted first; sometimes they have "greyed" apparent values which disappear as soon as you select the field; sometimes they have "greyed" apparent values which remain when you select the field, but disappear as soon as you start typing. Even the degree of "greyness" varies.

It would be so much easier if everyone spoke the same language  :-X