Couldn't get WiFi working on Mavericks-solution found
Installed Mavericks on Macbook Pro w Retina (2012).
WiFi would authenticate, but not get a DHCP address.
Tried deleting plists as suggested by others.
Tried deleting entry in keychain as suggested by others.
Reinstalled Mavericks
Cleared PRAM
Nothing.
Then I came across an older solution that fixed a similar problem in OS X Lion.
Essentially the built in firewall was apparently blocking the DHCP protocol.
Adding an entry to the ipw.conf file (and then rebooting) fixed it!
type "sudo vi /usr/local/etc/ipfw.conf" to edit the file (it will prompt for an admin password). Use the down arrow to go to the last line. Type "$" to go to the end of that line. Type "a" to append text. Hit the Enter key, and type the above rule on the new line:
add 00050 allow udp from any to any src-port 67 dst-port 68 in
Hit the Escape key to get out of editing mode. Type ":w" and hit Enter to write your changes to disk. Type ":q" and hit Enter to quit.
Reboot.
All ok now
Macbook Pro, Mac OS X (10.5.2)