1

I've successfully been able to establish connection between my Realtek RTL8188CUS Wifi Dongle connected to Pi's USB port with my wifi router. (Got IP, able to SSH via wifi).

When I connect Ethernet to the Pi, I'm able to ping any external web server like 8.8.8.8 whereas when I remove the ethernet port, with JUST THE WIFI CONNECTED, I'm not able to ping any external server.

Any idea?

TIA :)

  • Sounds like you changed your routing table at some time. Have a look at ip route in those three states (via wifi, via ethernet and non-working) and compare (and possibly post) them – Max Mar 27 '13 at 19:54
1

Sounds like the default gateway for your Wifi connection on the Pi hasn't been set, or is incorrect. While you are connected to your router via Wifi, from the terminal type

route

This will show the current default gateway, and the interface it is associated with. Assuming your router has the IP address 192.168.1.1, you should see something like this:

Destination Gateway Genmask Flags Metric Ref Use Iface

0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0

There will be entries for eth0 and any other interfaces you have. The o.o.o.o inthe destination column means 'send everything else (all traffic bound for the outside world) through this interface, to this Gateway IP address'.

If this isn't the case, you need to look at the DHCP settings on your router (although why eth0 connects fine is a bit confusing) or the network interface settings on the Pi, which can be edited from the terminal with

sudo nano /etc/network/interfaces

If you get stuck, paste the output of the following commands here and I'll try and help :)

route

and

cat /etc/network/interfaces

And here's a shameless link to BigCowPi, my RPi blog :D

0

Reboot the Pi with ethernet disconnected.
This will force the Pi to use the wifi connection for all connections, even to the internet.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.