on a Pi2 running Jessy:
sudo nano /etc/network/interfaces
returns (amongst others):
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
So I modified /etc/dhcpcd.conf
:
nohook lookup-hostname
interface eth0
static ip_address=192.168.1.220/24
static routers=192.168.1.1
static domain_name_servers=192.168.1.1
This is working totally fine.
on a Pi3 running openhabian /etc/dhcpcd.conf
is empty
/etc/network/interfaces
:
# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
auto eth0
allow-hotplug eth0
iface eth0 inet dhcp
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
I modified this to:
# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
auto eth0
allow-hotplug eth0
iface eth0 inet
static ip_address 192.168.1.221/24
static routers=192.168.1.1
static domain_name_servers=192.168.1.1
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
However: openhab denies me permission to save the file.
Any suggestions?