I have a rpi model B, internet works fine when using cat5 cables plugged into the router. I recently purchased a BUFFALO AirStation N150 Wireless USB Adapter - WLI-UC-GNM and configured it to work, or so I thought. The pi works fine on LAN, as I have been accessing it through VNC and have had no problems. When trying to connect to the internet I could not connect to any website. Some more information:
When configure to use wlan0 (Wireless adapter) the link light on the board does not illuminate I can ping machines on my network and the local loopback Tried to ping 8.8.8.8 and got "connect: network is unreachable", same goes for trying to ping any named website.
Everything works fine when plugged in directly to the router.
/sbin/route -n
on the Pi may help a lot here.