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 address 169.254.100.2 netmask 255.255.255.252 gateway 169.254.100.1
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 169.254.100.2/30 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.