How do I troubleshoot my Wi-Fi connection when an exclamation mark appears?

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.


Solution 1:

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.

Solution 2:

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.

Solution 3:

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'