Solution for iMac's inability to connect with WiFi 802.11n only access point
Tweaking your WiFi configuration for maximum throughput sometimes have adverse side-effects, we have already seen how changing your WiFi channels can create problems with non-standard or incompatible WiFi cards.
Having customized your WiFi config can also create strange problems like WiFi being visible and connectable but with limited functionality and no web-browsing. As evident from the screenshots on the right and below my iMac running Mac OS X 10.8.2 is having issue communicating with my router, after researching over the internet reading numerous forums and help articles I finally figured out the solution experimenting with my router config.
Well the problem is my 21.5'' iMac running Apple Mac OS X 10.8.2 does not work with WiFi 802.11n only mode set to use 40Mhz channel width, instead of any warning or friendly error message the OS sits there having user confused why the hell it wont connect and acquire a IP from DHCP instead of using a internal non-functional private IP. The solution to the problem is to use 20Mhz channel width, this setting can be done from your router configuration options.
It is also worth noting that this limitation seems to be a deliberate attempt by Apple software (MAC OS X) rather than a hardware restriction, as in 2.4 GHz band Apple won't allow 40 MHz "wide" channels as they want to preserve the functionality of Bluetooth which comes alongside with Wi-Fi in most Macs which shares the same bandwidth spectrum. Allowing 40 MHz wide channels in 2.4 GHz band would have severely constrained Bluetooth functionality.