0

I considered asking under Unix but since this stems from using a Pi0 in ethernet gadget mode...

I'm having difficulty with static IP assignments. The downstream computer is a Raspberry Pi Zero running in ethernet gadget mode. It's connected to a Raspberry Pi Model 3 (via powered usb hub). They both have static IP addresses assigned (10.20.0.x), but when I reboot the Pi0, the Model 3 reverts to an autoconfiguration address (169.154.x.x). I have to cycle the interface (ifdown usb0; ifup usb0) or physically replug the Pi0 to get back the proper static IP on the Model 3.

Can I prevent the Model 3 from reverting to silly autoconf addresses?


This is from /etc/network/interfaces on the Pi zero:

allow-hotplug usb0
iface usb0 inet static
    address 10.20.0.2
    netmask 255.255.255.0
    network 10.20.0.0
    broadcast 10.20.0.255
    gateway 10.20.0.1
    dns-nameservers 10.20.0.1

And this is from /etc/network/interfaces on the Model 3:

allow-hotplug usb0
iface usb0 inet static
address 10.20.0.1
netmask 255.255.255.0
network 10.20.0.0
broadcast 10.20.0.255
  • Well crap. I'm no longer able to reproduce this situation :( – patricktokeeffe Apr 24 '17 at 22:30
0

I'm not sure this will work but I would try to add auto usb0 in the configuration on Pi zero which basically telling the Pi to add interfaces that you want brought up at boot time. If this is not working, maybe sharing your /etc/network/interfaces and etc/dhcpcd.conf on P3 would help to diagnostic.

  • Great suggestion. I've tried reproducing my problem a few times now and, of course, no longer can. But I'll keep this in mind! – patricktokeeffe Apr 24 '17 at 22:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.