Self Assigned IP / DHCP problem : sharing my fix.
Note that:
- i'm free of this problem since the last one week, so .. well, hopefully this is right.
- the problem happens almost anywhere, with any router types, and in any connection type, be it ethernet or wireless a/b/g/n.
- the problem is automagically fixed by running into safe mode.
- the problem keeps happening again and again, although you have powercycled everything of the electronic peripherals in your house, even by disconnecting your phone/ADSL line and main power fuse.
- disabling the Mac OS X Application Firewall sometimes cures it, but most of the time it happens again.
- AFAIK (correct me if i'm wrong), the ipfw, mother of all OS firewall, exists within Mac OS X, and the Mac OS X Application Firewall (i call this OSXAF) has nothing to do with ipfw.
A. My hypothesis and the reasons.
* for an unknown reason, there is a rule created for ipfw that tells it to block the ports 67 and 68, both are the common DHCP ports.
* because of that, your Mac cannot contact with any DHCP servers, anywhere. This forces your mac to assign an IP address by itself.
* disabling OSXAF incidentally removes that rule, but after (one or a few times) reconnect or reboot, the rule appears again.
* powercycling your routers or anything related does not concern ipfw, thus has no effect whatsoever to the problem.
B. My fix.
1. Get the WaterRoof free ipfw frontend (forgot the site, just google)
2. Open it.
3. Go to Static Rules part.
4. Find everything which reads "deny blah blah blah port blah,blah,67,68,blah blah"
5. Edit those rules so that there is no 67 and 68 inside.
6. Open tools -> rules configuration -> save to startup configuration -> yes.
7. Open tools -> startup script -> install startup script -> yes.
That's all.
For me, this seems to be a permanent fix. Please note that the startup script mentioned before exists in all *nix-based machines, so don't worry about startup time, there'll be no slowdowns (again, please correct me if i'm wrong, i had only little experience with *nixes). Besides, i suspect that if you don't save and reinstall that script, the previous script is the one which has 67 and 68 inside.
Hopefully this helps. Any corrections, comments, suggestions, and/or knowledge are welcome.
Cheers,
-bam, the noob.
Macbook2,1, Mac OS X (10.5.4), SMC wireless b/g router/ADSL modem