Strange networking issue: good software/hardware troubleshooting tools? I'm posting this question with the hope of getting some guidance from others because at this point I'm completely stumped.  

I'm trying to troubleshoot a mid 2011 iMac (11,2) running Mavericks that is unable to ping or communicate with any other host, despite appearing to connect to my home router without issue (it associates and gets an IP address from DHCP).  The router is an Asus RT-N65U with both 2.4GHz and 5GHz radios.  Wireless clients mostly connect to the 2.4GHz radio since it has better range, WPA2 authentication is used on both.  There are numerous other devices on the LAN - both wired and wireless - that all work fine.  Furthermore, the iMac in question seems to only have developed problems within the last couple of days though nothing has changed on the router and nothing has changed on the machine either...or so I'm told.

After some initial troubleshooting I went ahead and reinstalled Mavericks from a USB stick I had on-hand, figuring that would eliminate any software related issues that might have otherwise been hard to track down.  However the problem persisted even after the re-install, which made me think the wireless card was flaking out.  I'm skeptical of this however because


The machine doesn't have any problem establishing a network connection
The signal strength is what I'd expect to see
I ran a packet sniffer and that showed link layer packets going back and forth, but IP packets of any kind are ignored (as far as I can tell).
I set up an ad-hoc network with the iMac and joined it with my MBP, both machines could ping each other.


The only thing I've seen that seems sort of suspect is an error message from the kernel in the wifi log: Unsupported ioctl 181 but I haven't been able to determine what this means beyond the kernel asking the wireless driver to do something it can't, so it may or may not be significant.  The other potentially significant thing is that at one point this machine was restored from a time machine backup of a completely different computer (a MBP).  It's my understanding that time machine backs up the entire drive, so restoring a backup from a different hardware configuration seems like it could break things, but nothing that a clean install of OSX couldn't fix.  I've tried to do the built in hardware test but it doesn't work for some reason, maybe because this machine has an after-market hard drive upgrade (the original failed).

So this brings me back to wondering whether it's a software issue, particularly something to do with the router but that seems strange since nothing has changed on the router and I'm the only one who could change anything to begin with.

This all brings me to my question: what else could I look into that could provide more info to work with so I narrow down what's going on here?

UPDATE

Some more info and clarification of some things:  When I say the machine "connects" to the router, I meant associate.  It associates to the wireless network, but will not ping the router's IP address.

I have not tried a wired connection but I did try one of these and it works flawlessly, so this is specific to the built in wireless.  Are there any other tools for testing the hardware besides the Apple diagnostics?
Apple ships with some pretty good tools to check wifi network.

Look in /System/Library/CoreServices/Applications for


Network Utility.app
Wireless Diagnostics.app


You can also access them by holding Opt/Alt while clicking on the WiFi icon in the menu bar.

Then there is lots of Terminal commands to do that as well, if you prefer the Terminal.