How would I be able to use my rPi with a fixed IP on the ethernet port and 'automatic' wifi?
I've got the credentials for the known accesspoints, with priority stored in /etc/wpa_supplicant/wpa_supplicant.conf
The RPi is autoconnecting to my wifi network, and I was able to SSH into the pi. Now, to setup the static IP for the ethernetport I followed this answer, and so:
In /etc/dhcpcd.conf
I uncommented the following:
interface eth0
static ip_address=x.y.z.5/24
static routers=x.y.z.1
static domain_name_servers=1.1.1.1
Then I ran
sudo systemctl disable dhcpcd
sudo systemctl enable networking
But now the pi doesn't connect to the Wifi anymore and I cannot connect to the ethernetport as this is a completely different subnet :)
So in the end I want to have the following:
- Eth0 > static IP
- Wlan0 > DHCP, with auto connect with credentials from
wpa_supplicant.conf
The reason for this setup: I've got 5 public ip adresses with my provider; I want my pi to be on one of them. As the router itself is 'transparent' and managed by the provider I need to configure the ip settings, including gateway, for this interface manually. The wlan connection is just to configure the pi at my office (which is not the end location).