This page gives instructions for setting up a static IP for if you're running into issues with IPv6 or Avahi.
Credit: zangzi from Dockercon US workshop.
Pre-reqs:
- You must have access to ext4 partitions through a utility or Linux laptop
- A separate RPi could be used or live booting Linux OS and an SD card reader.
Normally Windows / Mac OS do not have access to write to an ext4 filesystem.
On the Raspberry Pi:
Edit /etc/network/interfaces
:
Add this:
allow-hotplug usb0
iface usb0 inet static
address 10.0.13.2
netmask 255.255.255.0
network 10.0.13.0
broadcast 10.0.13.255
gateway 10.0.13.1
dns-nameservers 8.8.8.8 8.8.4.4
On your Mac/Windows/Linux set a static IP address for the USB line:
address 10.0.13.1
netmask 255.255.255.0
network 10.0.13.0
broadcast 10.0.13.255
gateway 10.0.13.1