I am having issues in getting a static eth0 and DHCP wlan0 working with Volumio 2 on RPi3. wlan0 works fine until I try to set a static IP address for eth0 in /etc/network/interfaces file.
From Google search, there was a change in Wheezy->Jessie distros (from /etc/network/interfaces to /etc/dhcpcd.conf) so I’d like to understand how the Volumio 2 distro is based as a starting point.
What I am trying to achieve:
Wifi router <-> RPi3 <-> Car Infotainment System
Car Infotainment System uses built-in browser to control Volumio
eth0 between RPi3 and Car Infotainment System on separate network than wlan0
eth0 needs to have static IP
wlan0 side is already working (Wifi side is to connect to home PC while car is in garage, for downloading new music to RPi)
No need to route traffic from Car Infotainment System to internet or vice-versa
What I have done so far (only edited /etc/network/interfaces and /etc/wpa_supplicant/wpa_supplicant.conf). Since wlan0 is working, below are the contents of /etc/network/interfaces
auto lo iface lo inet loopback auto eth0 iface eth0 static address 192.168.42.1 netmask 255.255.255.0 # Car's infotainment IP 192.168.42.3 allow-hotplug wlan0 auto wlan0 iface wlan0 inet dhcp wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf # IP assigned by Wifi access point: 192.168.1.20
With the above, wlan0 works, but no static IP address for eth0. If I change 'iface eth0 static" to “iface eth0 inet static” and reboot, I get a static eth0 IP but wlan0 doesn’t work.