1

I have a plugged in via ethernet to a router upstairs. This router has no internet access.

I SSH and VNC to this pi from my laptop with no issue.

I connect the same pi to a wireless network via the wpa_config GUI tool on the default Raspian desktop and it appears to succeed. I confirm this with ifconfig and can see that an IP has been assigned to wlan0.

The network I am connecting to wirelessly has internet yet when i try and use the internet browser over my VNC session - I have no internet

My aim is to get the pi online whilst still being on a network with no internet access so that I can still VNC and SSH to it.

ip route show yields:

pi@BANE ~ $ ip route show
default via 192.168.1.254 dev eth0
192.168.1.0/24 dev eth0  proto kernel  scope link  src 192.168.1.65
192.168.1.0/24 dev wlan0  proto kernel  scope link  src 192.168.1.4

Can somebody please explain what steps I have missed to get my setup working correctly?

2
  • 1
    Both of those are on the same network. That will not work how you intend it to. One of the networks will need to be re-addressed to something different.
    – Butters
    Jun 18, 2013 at 12:49
  • That was it! Thank you! Can you amend your answer so that I can mark this question as Answered?
    – Sam
    Jun 18, 2013 at 16:07

2 Answers 2

2

You need to verify that you DO NOT have a default gateway set on your ETH0 interface. It has probably been assigned by DHCP, so you may have to address it statically, edit your router configuration. You will also need to verify that you have a default gateway on your WLAN interface.

Post the output of ip route show when both interfaces are connected for more detailed response.

You also need to ensure that your two routers are on different subnets. For example, the network connected to ETH0 could be 192.168.1.0 255.255.255.0, and WLAN0 could be 192.168.0.0 255.255.255.0, but they have to be on different networks. More on subnet mask

Finally you may want to read up on local routing for debian systems.

Sorry I can't be more specific, but there could be a book written to explain this topic. If you get stuck, or have a more specific question after doing a little reading, please let me know. I would be happy to help.

EDIT: Based on the added ip route show, you need to re-address one of your networks so the pi knows they are not connected. You may still have gateway issues, but that is where you need to start.

5

eth0 is always preferred interface over wireless, you will need to issue command route -n to see your routes and then probably change default routing using:

$ sudo route add default gw 192.168.1.1 wlan0

just use correct address for your wireless router.

1
  • +1, I tend to connect to internet via USB tethering and also connect to my router and this works. THANKS.
    – SAMPro
    Feb 2, 2016 at 6:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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