A possible solution: The Wi-Fi router you're connecting to may have run out of IP addresses.
The coworking space I work out of has been having issues with people sporadically being unable to connect, while the rest of us would be online just fine. After months of this issue popping up every couple of weeks, we finally realized that we were bumping into the dynamic IP (DHCP) address limit on our router. It was configured to serve up to 50 addresses and on a busy day it would fill up it's client address table and be unable to serve any more, resulting in laptops, phones, and other devices having to "self-assign" an IP address. I.e. not work
To fix this, you need to configure the wifi router to have a larger # of DHCP addresses (we bumped ours to 200). You may also want to reduce your router's DHCP expiration time. Our expiration time was set to 24 hours, meaning that this problem only appeared when 50+ devices needed IP addresses w/in a 24-hour period.
Anyhow, it was a huge relief to finally figure this out. I can't tell you how many times I've seen the "self-assigned address" issue over the years and tried to figure out what the heck was going on.
After trying everything I could find, nothing worked for me. My situation was a bit different in that:
- I was on a public Wi-Fi and had no router control
- It was unsecured
I noticed after 24 hours of losing my IP, it suddenly came back and it dawned on me that it might have to do with the DHCP lease time. I went in a spoof'd my MAC address on my MBA and Viola! it instantly connected again. I tricked the router into thinking I was a brand new computer and it gave out a new IP. Seriously, if you are stuck, try it.
This is what I faced and found to be a good solution.
At work the network went down fora couple of days, when they brought it back up everything connected fine except for my two macbook pros and anyones IPhone. One has Lion and one has Mountain Lion and IPhones where running 6.0 firmware.
1) Master reset your router and set it up all over again. ( Somewhat of a pain but will get you going and connecting automatically)
2) I have noticed on all the PC's connected to the network and running the internet is that they are running certain DNS servers. Grab these numbers from any device connected to the network and is running he internet properly.
So I went to Settings>Network Settings>Advanced Settings>TCP/IP select Manual from the drop down menu.
Fill in the IP address with any address that would work and is not taken on you network ex 192.168.2.200
fill out your subnet mask with the usual 255.255.255.0 and your router address with the IP address of your router. it is usually 192.168.2.1 or 22.214.171.124
Now go to the DNS tab and add the DNS addresses you got form the other computers running normally on the network. You will find those either in network setting on a mac they will be in the details (for a connected MAC) or in the network settings information on a PC.
After you plug the DNS numbers in and the manual IP Subnet and Gateway hit ok and then apply. you should be set.
If this wasn't clear please ask and I will help as much as I can.
Both MacBooks connect, and all iPhones are working properly. GOOD LUCK
I just tried Triqtaq' s two suggestions and it almost worked, for a short time.
They router settings on my PC were the same as my Mac but I entered them manually anyway.
And I did the router reset (push the indented button). I'd also previously rebooted the router by unplugging it.
Then I cleared my Firefox cache.
I was able to surf Facebook for a while, especially as my self, but once I switch to one of my Pages, the screen goes blank.
When I ping Facebook, I see connection and data transferred.
This is happening on all my browser's, Safari, Chrome, Firefox, but on my PC on the same router Facebook works fine.
And when I'm using a different internet connection my MacBook Pro loads all of Facebook fine.
I used this to get DHCP working from the command line (Terminal) window:-
sudo ipconfig set en0 DHCP
Worked for me. I was previously having problems with the password not being recognised and/or being connected but with no IP address (self-assigned).
There's something wrong with the UI in the Network panel I think. Thankfully there is this workaround!
After updating to Mountain lion, this nasty prob. occurred on iMac. Thanks anyway to all kind ppl who posted their solutions. But nothing worked on this iMac.
My solution is brutally simple -- just set everything manually in DHCP
Ip, mask, gateway & remember to set DNS as well
For those who don't like to dig into the MacOS software bugs, this is fastest. edit: I have 5 other wifi devices(include 3 iOS), which have never had any issue with my wireless router.
Thanks to everyone for sharing their knowledge - I attempted every proposed solution in this forum and spent hours on the issue - but nothing worked in my case.
In the end, I learnt that many WIFI routers can only assign a limited number of IP addresses. This is because these routers we were not designed for a mutli device world (in my case our router could only issue up to 7 IP addresses). When your router is out of IP addresses, then your mac device will automatically self assign a IP address and hence the issue.
Per many family homes these days there is laptops, tablets, smartphones and so we had 7+ devices looking to connect to the router at the same time.
Once I replaced the router with a new one (designed to take more IP addresss) - and waited 20 minutes - the issue resolved itself. I am not a hardcore techie, so I can't say for certaintly this was the core issue but it worked for me when all else failed.
Good luck all.
I have found the solution, i read somewhere here in this discussion that someone resetted their router, after trying everything i decided to try it and it worked.... However the real problem is in the WPA/WPA2 PSK Encryption algorithm. When this was at TKIP/AES i got the error, switching to TKIP solved the issue IMMEDIATELY. Thanks all.
I had the same problem 2 days ago and I tried EVERYTHING on this post and EVERY other posts about this f***ing self assigned IP and nothing changed. Then I went to the router page, wich is 192.168.1.1 in my case, and then I looked at network map to see the devices that were conected to the router and scrolling down the list I saw a list of blocked devices and there was my MAC adress. This router, out of nothing, just blocked my mac. SO theres an icon that says unblock device and this process takes a little while and then BOOM! My mac was with full signal and internet pages are now loading normally!
ps.: my router is an ASUS.
This solution involving the password worked for me after several other suggestions wouldn't.
My macbook disconnected from the internet wirelessly last night, but my iphone was still good. There's also an ipad that can still connect wirelessly. A pc also couldn't connect but it was able to connect after simply turning on and off the modem. I disconnected my iphone and tried to reconnect with our usual password because I forgot if we had changed the password. The iphone wouldn't connect so I was convinced there's a new password.
After I was given our new password I tried it on my macbook, but it would give me the "airport has a self assigned IP address and will not connect to internet". After a while I tried the new password again and it worked for a moment. I tried with my iphone but it wouldn't work, then I checked my macbook and it was no longer connected. Then I came to this thread using an ethernet connection and tried several suggestions without success.
I was trying POA_'s suggestion to go to the router page. I didn't know what it was so I just typed in the ethernet connection's IP address into safari but with 1 as the last number. I clicked "wireless setup" and saw that the password is still listed as the old password. I was skeptical to try the old password again but strangely it worked.
I guess it's just one of those times when a glitch shows up, grabs me by the eyeballs and pulls them out, then mysteriously disappears without explanation.