Raspberry Pi – Static IP Adress for Debian Stretch
Since the latest version of Raspian OS ( Debian Stretch ) the configuration of a static IP address changed a little. If you enter it the old way into the /etc/network/interfaces you might end up in a „No wireless interfaces found“ error.
Setting a static IP in stretch has changed because the eth0 is replace by the new enx format. To set a static IP address for your network controller you now need to do the following steps:
First you need to know the interface name. Type this into your console:
This will list all network devices:
This is typically eth0, wlan0 but might now also be sth. like e.g.: enxb827ebdc0e3b instead of eth0. In my case it is eth0.
To now set a static IP address for eth0 edit /etc/dhcpcd.conf:
sudo nano /etc/dhcpcd.conf
There is already a section # Example static IP configuration: which allows you to configure a static IP address like this:
# Example static IP configuration:
static domain_name_servers=192.168.27.1 184.108.40.206 fd51:42f8:caae:d92e::1
Save your changes and restart the network services or restart:
Hope this helps.