1

I have a RPi 3 B with a WiFi dongle. I'd like to connect the built-in RPi WiFi (wlan0) to a wifi router that is not connected to the internet, just local. I'd also like to connect the WiFi dongle (wlan1) to a different WiFi router that is connected to the internet. This I have done, however internet doesn't work unless I disconnect from the local WiFi. Is there a way I can connect to both and have internet?

Thanks

1
  • 1
    While connecting to both WLANs, can you get the output of route command?
    – vaha
    Commented Oct 13, 2016 at 8:24

2 Answers 2

2

This is a routing problem. It seems that your default route is set to the router on the local network, connected on interface wlan0. But there is no internet. For example if your internet router has the ip address 192.168.4.1 then try to adjust the default route with:

rpi ~$ sudo ip route del default dev wlan0
rpi ~$ sudo ip route add default via 192.168.4.1 dev wlan1
1

You need to set up routes to direct traffic to the correct WLAN. Here is a link that should help as it seems to be very similar to your requested configuration.

https://www.raspberrypi.org/forums/viewtopic.php?f=36&t=38379

1
  • Please try adding more detail to the answer than just a rough description and a link.
    – Shan-Desai
    Commented Mar 2, 2017 at 14:06

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.