This problem has always been a 100% router problem whenever it has happened to me (especially if only one computer on my LAN is affected and renewing the DHCP lease didn't work) - rebooting the router would always fix the self-assigned IP.
For those who may come across this forum / thread in regards to having this very same issue, this is NOT router related but OS X SOFTWARE RELATED and, most are not thinking here and remain focused on a router problem as the root cause for failure. Such is not the case.
I've just encountered this after having a power supply go out on my Mac pro. Now, the hard drive that was mounted and operational during the power spike that took out the power supply has no network connection. However, ALL other drives (WIN XP, MAC HD CLONES) work fine using the same hardware setup and the same exact settings. It IS NOT router related but software related to where, there's a corruption of the software that needs to be repaired.
I found this out after running Tinker tool and, it reported that the OS was damaged. Most likely because of the crash when the power supply went out.
SUMMARY: I had net connection. The power supply went out. The OS got trashed and, no network connection upon installation of new power supply.
By confirming on three other backup drives IN THE SAME MAC PRO running 10.5.8- off the same Ethernet port, using the same exact setup and same router config file / settings, I have come to the conclusion that it is software related in OS X that leads to having a self assigned IP address and NOT ROUTER NOR HARDWARE based as the root cause for failure in my case.
I too, am hunting for a Terminal Fix to resolve this. Trashing PLIST Files, assigning manual addresses, re-booting the router etc etc, did not resolve the issue in my case at all.
WHile TRUE - a router can impose or induce the same failure, in this thread, it sounds as if lots of folks have the same issue as I do to where, the software is either corrupted or damaged to some extent.
EDIT: 12-12-2010. In my case, what had happened, was, corruption of the FIREWALL settings may have been the root cause for self assigned IP address.
WHAT WAS DONE:
By changing the selection from the third option "SET ACCESS...." to "ALLOW ALL..." etc, I was able to receive an IP address from the router immediately.
After discovering this, the setting was put back to the way I had it before: "Set Access for...." etc. Well, after leaving the machine on all night, in the am, it was noted that, there was no connection again.
The setting was changed back to the first option to "ALLOW ALL" etc, and, immediately, an IP address was assigned. After leaving it set to that setting for a while, (week) I have set it back to the last option and, so far, after two days, it hasn't reverted back to shutting off the connection.
I will report back if this is still an issue or not for me. END EDIT.
12-13-10: Problem came back. I had been on Paypal and closed and relaunched the browser and lo and behold, no network connection and, yet another self assigned IP address problem. I simply went to the firewall settings and changed it and, again, connection was restored without issue. There's some firewall issue on my machine that keeps hosing up. I'll get to the bottom of it soon enough now that I know where to start looking.