Raspberry Pi User Help

USB tethering: Raspi loses it’s ip if the host is restarted

currently I’m playing with USB tethering between a raspi and a Linux PC.
On the Linux pc I configured the USB interface to get a static ip once it’s connected. This is managed by the Networkmanager and works fine.
On the raspi I configured a static ip via `/etc/network/interfaces`

allow-hotplug usb0
iface usb0 inet static

So now when I connect the raspi via USB to the Linux PC, the interface is detected and I can ssh into the raspi.
But if I reboot my Linux PC, I cannot reach the raspi any more. And now I found out that the raspi loses it’s ip but does not reassign it if the Linux PC is back up.
I always have to execute ip a add dev usb0 on the raspi to get the network back.
Can you please give me any hint on what to do to get the network automatically back? At the moment I’m out of ideas.

Many thanks in advance for any help.

Leave a Reply

Your email address will not be published. Required fields are marked *