• Welcome to the new Mac-Forums. See News and Community Announcements for more details.

Self-Assigned IP Address - The Mystery Deepens

Joined
Mar 11, 2019
Messages
461
Reaction score
4
Points
18
I didn't intend to continue with this topic, but today I went back to the problematic Class Cafe for the first time in several weeks and got a big surprise.

As expected, I got a self-assigned IP address on both my iPad and iPhone.

I didn't bother to use my work-around of entering an IP address, etc., manually.

About half way through reading the Bangkok Post I got an email message on my iPad. What the heck? I checked, and sure enough, it now had a DHCP assigned IP address. I did nothing, so it just sort of happened.

But, no joy with the iPhone. Still had a self-assigned IP.

A half hour later and just before I left I checked the iPhone again. It too had a DHCP assigned IP.

After I got home I checked the keychain entry for for the SSID classkorat. Now usually the keychain will show you the plain text password for whatever SSID you select. For example, it shows "2186amma" as the password for Cafe Ama's wifi.

But, the password for classkorat is now shown as:

"A16581C4562743A664144279A5939C3C51DC2A36BE6B7A07A05B5F598C0F3CC7"

The actual password, which I had to enter today is: "044007277".

I don't know if what's shown is an encrypted version of the actual password or something else. I've never seen this in the keychain. I checked a bunch of other SSIDs and they all show the password in plain text.

I remain baffled.
 
Joined
Jan 1, 2009
Messages
8,034
Reaction score
147
Points
63
Location
Winchester, VA
Your Mac's Specs
MBP 15" Mid 2015, iPhone 11 Pro, an iMac, plus ATVs, AWatch, MacMini
I came here because of your comment about it in the thread about memory. Could it be that the router is/was just slow in assigning an IP, the iPhone/iPad timed out and went self-assigned, but then tried again later and was successful? Do you have "auto-join" for networks turned on? (I think that is the No option on the "Ask to Join Networks" selection.) I am wondering if the router gets "busy" and doesn't assign IPs fast enough, then gets less busy and gets back to the iDevice fast enough. Not much you can do about that that I am aware of, but could be the issue. I can't explain the password change.
 
Joined
Mar 11, 2019
Messages
461
Reaction score
4
Points
18
I was there again day before yesterday (Wednesday here). I decided not to use my "fix" of entering the network data manually. I again just let it sit there with the self-assigned address. It never connected. When I was getting ready to leave, I turned auto-join OFF and tried to join manually. Same result. At that time there were only a few people using the connection. Three of us customers, three employees and two IP TVs.

So, letting it sit there worked once, but not twice.

I have since learned both from my daughter, who works there some days, and from their IT department, that I am the only customer complaining about the WiFi in that shop. As my daughter said: "Only you".

Two quote Shimon Peres:

“If a problem has no solution, it may not be a problem, but a fact - not to be solved, but to be coped with over time.”
 

Slydude

Well-known member
Staff member
Moderator
Joined
Nov 15, 2009
Messages
15,141
Reaction score
317
Points
83
Location
North Louisiana, USA
Your Mac's Specs
2.8 GHz 2008 MacBook Pro 10.11, 8 GB mem, iPhone XS, 2015 iMac 16 GB 10.15.5 beta
I have since learned both from my daughter, who works there some days, and from their IT department, that I am the only customer complaining about the WiFi in that shop.
I know this doesn't help solve your problem but you may not be the only one having a problem. I don't use public wi-fi often but have used it at hotels from time to time. I have found that the support associated with these networks often horrible -- especially when it comes to knowledge of Apple gear. I rarely bother to call tech support or notify anybody.

At one hotel we were in my MacBook Pro did not reliably connect to the hotel's internet. My wife spent a ridiculous amount of time with whatever group was providing what passed for support. It quickly became apparent that they were close to clueless about what the problem might be. IIRC their "solution" basically involved standing in the hallway to use the computer.
.
 

Rod


Joined
Jun 12, 2011
Messages
5,935
Reaction score
178
Points
63
Location
Melbourne, Australia and Ubud, Bali, Indonesia
Your Mac's Specs
2015 MacBook Pro Retina 13" macOSX 10.15.1
I fear this may be just another example of the mysteries of the Asia Pacific region which apply as much to things technical as the do to the esoteric.
 
Joined
Mar 11, 2019
Messages
461
Reaction score
4
Points
18
I may finally have an answer. I referred this to a friend of mine who used to be a network engineer at ATT. He said:

Basically with DHCP a device will request re-assignment of a previous IP address from the same source. As all the shops appear to be the same source IE SSID, but are using different net blocks it can cause an argument.
The shop where DHCP almost always fails uses a cheap ZTE router. When my devices request the IP address they had at the other shop which uses a different IP block but the same SSID, the "argument" never gets resolved and DHCP fails. But, at the shops that use more sophisticated routers, the argument is resolved in favor of an IP address in the IP block that router is using.
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
12,663
Reaction score
304
Points
83
Location
MA
Your Mac's Specs
2018 Mac-Mini macOS Catalina 10.15.5, 32 GB
A device will ask to renew an IP address that it's already been given and when that fails, it will take a new address given by the router. However, if non initial IP address could be had and it was using the self-assigned IP address, it will always have to request a new IP address.

SSID and IP address subnets are not related and devices remember previous SSIDs (and associated passwords) they've connected to, but not the previous IP addresses they've had.

On the OTHER hand, routers will keep a list of MAC addresses and IPs assigned to those addresses and if a request comes from a known MAC address and the IP address which was previously given has been given out, the router will hand back the same IP.

So on home networks, the minimal number of devices will tend to get the same IP addresses even over DHCP (even if the lease time is short).
 
Joined
Mar 11, 2019
Messages
461
Reaction score
4
Points
18
On the one hand you say: "A device will ask to renew an IP address that it's already been given", but then you say "devices remember previous SSIDs (and associated passwords) they've connected to, but not the previous IP addresses they've had".

How does a device ask for an IP address that it has already been given if it doesn't remember the previous IP address they've had?
 
Joined
Jan 1, 2009
Messages
8,034
Reaction score
147
Points
63
Location
Winchester, VA
Your Mac's Specs
MBP 15" Mid 2015, iPhone 11 Pro, an iMac, plus ATVs, AWatch, MacMini
IP numbers come with a "lease" which normally has a time associated with it. After that time limit, the device asks for a renewal of that lease from the router. If, for any reason, the lease has already expired before the device asks for the new lease, that number may have been assigned to another user and the router has to issue a new one in the range it controls. I think that is what Ashwin was talking about. Another way it can happen is the device gets out of range of the router before the lease expires, loses contact, then comes back in range and asks for the lease to be renewed. Again, if it's available, no problem, but if not, a new IP is issued.

So that is how it works. In your case, Ratsima, if you walk into the shop with that SSID set to "fixed IP" as you said you have done, then when the router communicates, the iPhone does NOT ask for an IP and as long as nobody else has that fixed IP, it should work. But if there is another user on that number, both will get an error about duplication. If you then switch to the DHCP mode, the iPhone will ask the router for a suitable number, and it should issue one in the range it controls, if there is one not currently leased.

As for the blocks in different locations, that should not matter. The iPhone doesn't know what the range is that the router controls, and really doesn't care. All it does is request an address and when it has one, uses it. And the fact that store 1 uses range X but store 2 uses range Y doesn't matter to the iPhone at all. All it "knows" is that it asked for an IP and got one. (or not)
 
Joined
Mar 11, 2019
Messages
461
Reaction score
4
Points
18
OK. I understand. With all that expertise out there this should be simple:

How do I fix it so that both my iPhone and iPad get an IP address at this one recalcitrant store?
 
Joined
Jan 1, 2009
Messages
8,034
Reaction score
147
Points
63
Location
Winchester, VA
Your Mac's Specs
MBP 15" Mid 2015, iPhone 11 Pro, an iMac, plus ATVs, AWatch, MacMini
Next time you are in the store, try this. Settings, Wi-Fi, Tap on the SSID and then Forget This Network. Then let it find the SSID again and select the network. It should default to DHCP but you can check that with Settings, Wi-FI, Tap the SSID again and look for "Configure IP" to be Automatic, and below that a valid IP from the router, plus the subnet mask the routers is using and the router IP number itself. It may take some time if the router is cheap and cranky.

There are tools for the Mac that can show you all the available routers your Mac can hear, but I couldn't find the same thing for iOS.
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
12,663
Reaction score
304
Points
83
Location
MA
Your Mac's Specs
2018 Mac-Mini macOS Catalina 10.15.5, 32 GB
OK. I understand. With all that expertise out there this should be simple:

How do I fix it so that both my iPhone and iPad get an IP address at this one recalcitrant store?
We are back to the original issue then, if the router has long lease times, it isn't reclaiming the addresses to hand out to new devices. If the router already has the number of devices it can support connected to it, even though the IP address range can handle more devices, the router itself is limiting the number of devices and thus not handing out new IP addresses.

There is very little you, as the end device, can do to force the router to give you an IP. I would suggest that Jake's idea of forgetting the SSID and re-joining as a new device might be worth a shot to see if that resolves any glitches. Short of that, it's just what it is.
 
Joined
Mar 11, 2019
Messages
461
Reaction score
4
Points
18
My daughter happens to be working at that branch today. I asked her to send me a screenshot of her IP address to make sure she's using the same network and to see if she really does get an IP address. She is on the same network and she does have an IP address. I'll put the screenshot at the end of this post.

I also got clarification on the customer complaint issue. She said that people do complain about the throughput ("speed"), but no one complains about not being able to connect. I should note that this coffee shop is at the edge of town on the main highway to Bangkok. Many of the customers are business travelers who buy a cup of coffee, sit at a table with their laptop and work for a few hours. I don't think many of this sort of customer would put up with not having an Internet connection.

To repeat, here's what I've tried in the past:


  • [*lForget This Network - Dozens of times
  • Manual Network Configuration - Dozens of times
  • Reset Network Settings - Half a dozen times
  • Factory Reset iPhone - Once

(I've done Forget This Network so many times that I have the password in a Note so I can quickly copy and paste it when I select their SSID.)

@MacInWin - Are you suggesting that I try something different?

@Raz0rEdge - It's really hard for me to believe that a short least time would affect only me and my two devices. Is it just some sort of amazing coincidence that every time I've walked into this shop over the past four years every single IP address has an unexpired lease? And also some sort of coincidence that the people who walked in before me managed to get an IP address and that everyone who walks in just after me also gets an IP address? Am I really that unlucky? Remember, their IT department declined to take my suggestion of shortening the lease time because they said they don't have any customer complaints.


class.jpg
 
Joined
Jan 1, 2009
Messages
8,034
Reaction score
147
Points
63
Location
Winchester, VA
Your Mac's Specs
MBP 15" Mid 2015, iPhone 11 Pro, an iMac, plus ATVs, AWatch, MacMini
That screenshot looks correct. I just suggested you forget the network because you have, in the past, turned off Automatic and manually assigned an IP, which is playing Russian roulette, network-style. And I think you had the Subnet Mask different from the one displayed in the image, but that post was pretty far back and I may not be remembering correctly. In any event, my thought was to forget the network and start over as if you just showed up for the first time, letting the iDevices and the Router negotiate the connection just like everybody else does. If you have tried that and it doesn't work, then you may well have to just live with it. The cafe is not willing to change, you can't force that, and your iDevices seem to work at other cafes. About all I can think of is to go somewhere else for coffee that works for you.
 
Joined
Mar 11, 2019
Messages
461
Reaction score
4
Points
18
I have leaned to live with it. I either use my phone's cellular data or enter a manual configuration. I’m very happy to just sit there and drink my coffee while I read the Bangkok Post.

But, I have an insatiable curiosity about this. I want to know what’s going on.

If I give up I will have leaned nothing.
 
Joined
May 21, 2012
Messages
7,826
Reaction score
139
Points
63
Location
13th state, U.S.A.
Your Mac's Specs
iPhone 11 iOS 13, 12.9" iPad Pro 1 iPadOS 13, Late 2014 Mac Mini macOS 10.15
I bet, most (if not all) of their customers don't frequent other locations.
 
Joined
Mar 11, 2019
Messages
461
Reaction score
4
Points
18
I bet, most (if not all) of their customers don't frequent other locations.
You're probably right. And, I think that has something to do with it as well.

But, my daughter works at both of the locations that I visit most frequently and she's never had a problem connecting.

Can you please explain how visiting more than one location would affect my devices' ability to get an IP address via DHCP?
 
Joined
Jan 1, 2009
Messages
8,034
Reaction score
147
Points
63
Location
Winchester, VA
Your Mac's Specs
MBP 15" Mid 2015, iPhone 11 Pro, an iMac, plus ATVs, AWatch, MacMini
Can you please explain how visiting more than one location would affect my devices' ability to get an IP address via DHCP?
It should not.
 
Joined
Jan 1, 2009
Messages
8,034
Reaction score
147
Points
63
Location
Winchester, VA
Your Mac's Specs
MBP 15" Mid 2015, iPhone 11 Pro, an iMac, plus ATVs, AWatch, MacMini
That particular coffee shop doesn't want you to visit. That's about all I can think of. They purposely block you, and only you. I would take it personally, if I were you. ;D
 
Top