26

Sometimes, when I am in a public Wi-Fi an exclamation mark appears in the greyed out Wi-Fi icon.

I can connect to the Wi-Fi (I get assigned an IP address), but I cannot establish an internet connection - while other Mac users can. Every network where this has happened, I have been connected to before.

enter image description here

I've tried tried the following without success:

  • run the troubleshoot assistant
  • disconnect and reconnect from Wi-Fi
  • disable and reenable Wi-Fi
  • remove the network from the list of known networks
  • restart the computer

Because none of my attempts to solve this problem yielded any positive results, I always end up not using the internet at all.

Now my sister has been calling me two times already, telling me that the same problem occurred to her. As I could not provide a fix, I need your help :)

My sister is running 10.7.3 on a Macbook 4.1. I am running 10.7.3 on a MBP 8.2.

5
  • 2
    I suppose there could be a variety of reasons, but this usually happens when you were unable to obtain an IP address from the DHCP server. I don't believe the fix necessarily lies (usually doesn't) on the client's side.
    – Gerry
    Apr 19, 2012 at 7:32
  • What OS are your (and your sister) running? And do you enter a password?
    – Michiel
    Apr 19, 2012 at 7:41
  • @Michiel Both of us are running 10.7.3. Also: I can't remember having encountered this in Snow Leopard.
    – gentmatt
    Apr 19, 2012 at 16:29
  • @Michiel The public networks I use don't require a password.
    – gentmatt
    Apr 19, 2012 at 16:35
  • 1
    From the number of times I had this problem on public hotspot and the number of blind investigations I had to run on this network problem I arrived to the conclusion that the @Old Pro answer is the complete and correct one. It’s what I name a DHCP pool exhaustion. It’s clear symptom is an APIPA address ( see: en.wikipedia.org/wiki/Apipa ).
    – dan
    Aug 3, 2021 at 15:10

9 Answers 9

10

You need to get more information, so please do some troubleshooting and report back.

Troubleshooting steps:

  • Hold down the Option key while clicking on the Wi-Fi icon in the menu bar and let us know what you see. Lion: New Wi-Fi Diagnostics tool
  • When you first see the exclamation point appear, open System Preferences > Network. If you get a window like this one

Failing DHCP server

with the Self-Assigned IP beside a yellow button, then you were not able to get a local address from the Wi-Fi router's DHCP server. This can happen because the base station is using MAC address restrictions rather than real passwords. This can also happen because the base station has exhausted its available set of local IP address leases.

When you connect to a network using DHCP, a network router (e.g. the Wi-Fi access point) gives you an IP address to use and promises you can use it for some period of time, which is called a "lease". (This is so there is no confusion about when someone else can start using the IP address that you are using. You either renew the lease or know you have to stop using that address and get a new one.) Once the server leases you the IP address, it cannot give it to anyone else until your lease expires. A typical home router might be set up with only 250 addresses to give out and a lease period of 24 hours. That's fine at home, but in a heavily trafficked coffee shop, they might get more than 250 Wi-Fi using customers in a day, at which point they would be out of addresses. Worse, lease times can be much longer (I've seen 14 days on some routers) and DHCP servers can have arbitrarily small numbers of addresses to hand out. So this really happens sometimes, and it is probably what is happening to you.

In any case, it's probably a configuration error on the router that the router owner has to fix.

3
  • I'd really like to provide more information, but I have not been affected by this anymore. Hopefully somebody else will report when he/she is experiencing the same.
    – gentmatt
    May 12, 2012 at 16:23
  • Quite normal. When you are a customer of a DHCP server you can't manage, it is difficut to experiment with its tuning, most notably when you already have trouble to obtain the network access :).
    – dan
    May 12, 2012 at 22:02
  • → Old Pro: Excellent explanation and problem analysis. It is typical of a DHCP server pool exhaustion. No need to shoot any plist at random ☹. Your answer deserve more + !
    – dan
    Jul 6, 2013 at 14:33
6

If you have admin privileges on your Mac you can use the following:

In the Terminal.app (/Applications/Utilites/Terminal.app) type...

sudo ifconfig en1 down
sudo ifconfig en1 up

Which is surprising, because I thought that this is just the same as turning the Airport off and back on - which I've tried before, but did not succeed.

However, maybe that's not entirely true. According to the manpage, the down command will attempt to reset the interface (whatever that means in detail...).

From the manpage of ifconfig:

 down    Mark an interface ``down''.  When an interface is marked
         ``down'', the system will not attempt to transmit messages
         through that interface.  If possible, the interface will be reset
         to disable reception as well.
3
  • 1
    Are you seeing a self assigned IP address in any of the cases? Before you try toggling the network status (on/off or leaving the interface up and forcing the IP address and routing tables to be marked down), you could also force this release and renew of your DHCP status by going to Airport -> TCP/IP and selecting renew DHCP.
    – bmike
    Jun 3, 2012 at 15:48
  • @bmike I haven't tried renewing the DHCP this time, but I've done so before and it did not help back then. This happens quite frequenlty at any Starbucks in Cologne - I assume. So I will try to replicate this again tomorrow and update any information if necessary.
    – gentmatt
    Jun 3, 2012 at 15:55
  • Is this similar to the ipconfig release, renew commands on windows? I've been looking for this solution for years. thanks! Jun 26, 2014 at 22:30
1

In system preferences make sure your Network preferences are set to the Apple default (should be 'Automatic') and for the WiFi device confirm under the 'Advanced...' settings that under 'TCP/IP' your 'Configure IPv4' is 'Using DHCP'

2
  • Thanks, I had applied those settings. This was not the problem.
    – gentmatt
    Apr 20, 2012 at 5:14
  • I would be interested in knowing if refreshing DHCP several times helps. You'll want to have the network utility up and look at the routing table before and after refresh. Pay attention to the IP address and netmask and default route.
    – bmike
    Jun 3, 2012 at 15:49
1

I got it fixed today from www.leshdigital.com The thing is: Sometimes your Mac is a self-assigned IP address that is different from your local IP address(Mine is 192.168.1.1 and the self-assigned IP address is different from that) So what we should do is:

We go to network preferences and ADVANCED-->TCP/IP-->configure IPv4(manually) IPv4 Address: 192.168.1.19(My local IP is 192.168.1.1 so I changed 1 to 19) Subnet Mask is a default value: 255.255.0.0 and this is important:ROUTER->your local IP, mine is: 192.168.1.1 Hit Ok and then you're done. Enjoy your wifi which is successfully set up.

1

In my case, the problem is solved by changing the mac address. As Change MAC address in OS X Yosemite just run three commands

sudo /System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport --disassociate
sudo ifconfig en0 ether $(openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/./0/2; s/.$//')
networksetup -detectnewhardware
0

Though I doubt this will help many, I was experiencing these symptoms after entering my password incorrectly. Somehow I was not notified that the password was incorrect, so I was able to connect to the router, but it wouldn't issue and IP address.

1
  • Well, in my case this was a public starbucks Wi-Fi which did not require a password.
    – gentmatt
    Oct 13, 2012 at 15:59
0

I just successfully solved the problem by connecting to another Wi-Fi (mobile hotspot) which worked as expected and then re-connecting to the Wi-Fi that caused trouble.

3
  • A Renew DHCP, as suggested many years ago by @Old Pro would have been faster to get around the DHCP problem of your 1st Wi-Fi router.
    – dan
    Aug 3, 2021 at 14:59
  • 1
    The only time I see the words "renew DHCP" on this page is by @bmike (apple.stackexchange.com/questions/49082/…). Is this what you meant? I guess it would be worth posting it as an answer instead of a comment then.
    – Daniel
    Aug 4, 2021 at 3:35
  • Actually, "Renew DHCP Lease" does not work while connecting to another WiFi did. It is still puzzling to me why though.
    – Daniel
    Nov 23, 2021 at 19:46
0

When you are in such a situation, open

System Preferences... > Network

and select on the left table the Wi-Fi or AirPort interface.

If you see you get a "Self-Assigned IP" like here: enter image description herethen this means that didn't received a valid IP address from your router and in place your Mac decided to use a default IP address which is called an APIPA ( automatic private IP addressing ). In this screen capture, 169.254.169.243 is such an APIPA. This address doesn't permit to access your router, and of course not the Internet which is beyond your router.

In such a case, the only thing to do is to open the Advanced… down-right sub-menu, select the TCP/IP options, and there ask to renew your DHCP obtained address: TCP/IP > Renew DHCP

A few seconds later ( typically 6 s ), you will get either a new DHCP valid IP address ( in this case 10.0.2.29 ) from your router and everything will be OK from there, or again an APIPA ( starting with 169.254 ).

In this last failure case, you will know for sure that your router failed to attribute you a valid IP address. It is up to the administrator of this router to tune correctly the DHCP parameters. You can't do anything here to improve the situation from your Mac side. No need to change anything or reboot your Mac, this will be a total waste of time.

The Apple Wireless Diagnostics… can't diagnose this correctly since it can't access the router DHCP configuration.

1
  • This answer is deeply inspired from @Old Pro answer and bmike comment. Thank you.
    – dan
    Nov 25, 2021 at 11:25
-1

I guess it's a corrupt plist. I cannot reproduce the error, so I'm not sure it will help you out.

Try to delete /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist and restart your computer. Deleting this file and restarting is supposed to allow your system to "re-install" the correct drivers for your hardware.

Also, I can recommend you to reinstall the combo update.

5
  • 1
    I will try this the next time that this problem occurs. So, I can't give you feedback on the answer now. It may take a while till this problem affects me again. But anybody else that is affected should report if your answer helps as well.
    – gentmatt
    Apr 20, 2012 at 8:18
  • @gentmatt, Ok, great! You've made me curious :)
    – Michiel
    Apr 20, 2012 at 8:26
  • I guess this is just a guess. I wouldn't advise to touch any System plist before any analysis of the real problem. To reproduce this basic problem, just start a Fi-Fi router with a reduced set of 2 IP addresses distributed through DHCP. Guess what will happen when you try to connect the 3rd one.
    – dan
    May 12, 2012 at 8:24
  • If the drivers were corrupt, wouldn't he lost the connection to the base station and not be connected. The ! indicates that he has an IP address, just that the default route to the internet isn't resolving several test addresses. This is a network routing issue at the core.
    – bmike
    Jun 3, 2012 at 15:46
  • sudo touch /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist worked for me, could just have been incidentally though
    – kev
    Jan 20, 2020 at 3:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .