Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 7069

No internet connection with ethernet and rndis at the same time [closed]

$
0
0

So i have a Raspberry Pi4 with Ubuntu 20.04.6 LTS installed on it. For communications with several different systems i had to disable the network manager and configure the network myself.For that i had to create two RNDIS connections named usb0 and usb1. usb0 is connected to a sim modem which provides a mobile internet connection and usb1 is connected to a different pc.

Now i want to be able to connect to the Pi via ssh and the available ethernet port on the Pi but for some reason my internet connection via the usb0 interface stops working the second i start the eth0 interface.

The (shrank down) output of ifconfig:

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500        inet 192.168.1.129  netmask 255.255.255.0  broadcast 192.168.1.255lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536        inet 127.0.0.1  netmask 255.0.0.0        inet6 ::1  prefixlen 128  scopeid 0x10<host>usb0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500        inet 192.168.225.58  netmask 255.255.255.0  broadcast 192.168.225.255usb1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500        inet 192.168.90.2  netmask 255.255.0.0  broadcast 192.168.255.255

And the output of route -n:

Kernel IP routing tableDestination     Gateway         Genmask         Flags Metric Ref    Use Iface0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth0169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth0192.168.0.0     0.0.0.0         255.255.0.0     U     0      0        0 usb1192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0192.168.225.0   0.0.0.0         255.255.255.0   U     0      0        0 usb0

I saw that the default route was pointing to eth0 so i changed it with

sudo ip route change default via 192.168.225.1 dev usb0

Then i got the following route:

Kernel IP routing tableDestination     Gateway         Genmask         Flags Metric Ref    Use Ifacedefault         192.168.225.1   0.0.0.0         UG    0      0        0 usb0link-local      0.0.0.0         255.255.0.0     U     1000   0        0 eth0192.168.0.0     0.0.0.0         255.255.0.0     U     0      0        0 usb1192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0192.168.225.0   0.0.0.0         255.255.255.0   U     0      0        0 usb0

But if i try to ping a website or open one in a browser i get no response. Even if i put an -I usb0 into the ping command. The moment i disable the eth0 connection the internet works fine.What can i do to prevent this?

Also if i let the eth0 interface auto configure at startup inside the /etc/network/interfaces.d file and have NO ethernet cable connected the bootup takes like 5 minutes instead of < 1 minute because i guess the eth0 is searching for an address which it does not get.

I hope somebody can help me with this.


Viewing all articles
Browse latest Browse all 7069

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>