I have a problem similiar to this

Ethernet and wifi together

I have connected a device to my LAN port which requires static ip address

I have given the LAN port a static IP address by modifying the dhcpcd.conf file and adding

interface eth0

static ip_address=

static routers=

static domain_name_servers=

to it. Now, I can connect the device on LAN port if I type the IP address in the browser. But when I use a 3G USB (eth1) dongle to connect the device (Rpi) to internet, I cannot access the LAN port. The USB modem and LAN port work fine independently but not simultaneously. It seems like the device on LAN port disables the USB 3G modem.

I found this question (Raspberry Pi Connect to 3G modem instead of ethernet) a bit related to my post, but I couldn't understand it properly. My knowledge of LINUX is very limited. Can somebody please help? Fyi, I am running Raspbian on RaspberryPi 3B.

  • It's a little bit confusing for me. What is "your LAN port"? A raspi in addition to the device? Where is the USB dongle connected? On that with "your LAN port" or on the device? The device is connected to "your LAN port" and should get the USB dongle to connect to internet? Where is the problem? On the device? Please don't answer in a comment. Instead edit your question.
    – Ingo
    Mar 16, 2018 at 23:17
  • This post solved my problem raspberrypi.stackexchange.com/questions/50664/… Thank you very much
    – ArkanSaaS
    Mar 18, 2018 at 16:15
  • Please can you self answer your question to finish it?
    – Ingo
    Mar 18, 2018 at 17:31

1 Answer 1


Seems like the LAN (eth0) has higher priority than the USB dongle (eth1 gateway I checked this using

route -n 

Then I used

sudo route delete  default gateway 

and finally

sudo route add  default gateway

to place my eth1 above eth0. So the result is that my Rpi is able to connect to the internet as well as I can access the device connected to the Pi's LAN port.

  • Please accept your own answer with a click on the tick on its left side. Only this will finish the question and it will not pop up again year for year.
    – Ingo
    Dec 16, 2019 at 1:36

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.