I'm trying to achieve the following with my RPi3:
- Static eth0 IP. This connects to my car's infotainment system.
- DHCP wlan0 IP. This is for the RPi3 to connect to my home Wifi while the car is in the garage
- Both eth0 and wlan0 must be up at the same time
- I have no need to route traffic from the car's infotainment system through the RPi to Wifi or vice-versa (actually I want to prevent this)
My current situation is, with the /etc/network/interfaces file below, the wlan0 is working fine, but eth0 has no IP address and is unusable.
When I add "inet" to the iface eth0 configuration line, eth0 gets the static IP address, but wlan0 ceases to work. The wlan0 IP assigned to RPi by Wifi equipment is 192.168.1.20; netmask is 255.255.255.0.
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