iMac or Macbook (Pro), Self Assigned IP Address problem with Wifi Airport connections

I was having an issue with my Macbook Pro lately that the DHCP client couldn’t get an IP from the DHCP server. This happened on different networks and it didn’t happened every time. The message in the network settings was: “Self Assigned IP Address”. After a while I really wanted to have a solution for this so I started spitting in the logs first…

I ended with no result at all, but suddenly I remembered that other programs might behave weird when their preference files are corrupted or if there are mistakes in them.

Then I found the following file:

I first turned off my airport before doing any action to this file.

I opened the file to sniff around and there it was, a missing close tag in the XML. I first fixed this, without no result as expected. Then I moved the file to my desktop, compressed it, trashed the original file and cleared my trash. Then I turned back on the Airport and clicked my network… It connected, since then my wireless problems are solved 🙂

The error you see in the network preferences reads as follows: AirPort has the self-assigned IP address and will not be able to connect to the internet.. But I’m sure you will notice that as soon you have this problem 😉