I have set up my Raspberry Pi and from now on I want to access it only via SSH, so I want to ensure, that it doesn't change it's network IP on every reconnect. This is the automatically generated /etc/networking/interfaces:

auto lo

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

Every approach I've found so far on the internet lead my to a total disconnect, but on the other hand my raspberry hat kept it's IP stable all the time.

Is the network IP (wlan0) of my Raspberry Pi static as it is right now? (If not, how do I get a static IP?)

2 Answers 2


An alternative solution to the one proposed by Krzysztof Adamski is to use DHCP reservation: go on the configuration page of your router and add the reservation rule to associate your desired IP to the MAC address of your Raspberry (you can find it on the command line with ifconfig, under the voice HWaddr).


Instead of:

iface wlan0 inet manual

you should use:

iface wlan0 inet static

Of course you should change the ip addresses to the values you want to use.

And instead of:

wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf


wpa-ssid name_of_your_wifi_network
wpa-psk your_WPA_password

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.