Raspberry PI: Static WiFi IP

Impressed as I was, the pi worked with the WiFi gizmo out of the box, once I setup the keys and SSID from the desktop. But really DHCP is not ideal especially if you want to use only the ssh server (don’t care much about the mouse and desktop fluffy stuff).

Ran into a roadblock trying to enable static IP, searched high and low but could but configure a static route for the USB Micro WiFi dongle (belkin).

Finally got it working by updating the default interfaces config, changed the default from dhcp to static and added the ip properties:

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 static

Hope this helps someone in the same boat.

6 thoughts on “Raspberry PI: Static WiFi IP

  1. I tried so many tutorials concerning this problem and none of them worked. But your post worked perfectly. Thanks for that!

  2. Glad to have helped!

  3. Jon

    This is the solution that works. Thank You.

  4. I Could kiss you!!!! ;-S

    I’ve struggled for days now trying other tuts and happened upon yours by chance.
    I used my netgear n300 router to reserve the ip address for the mac code of the RPi then followed your directions. BINGO!! I have fixed ip, can access the internet and print FINALLY!
    with your solution the wlan0 starts automatically rather than having to go to the gui to start the wifi. Too old for using the term ‘Kudos’ but in this case you deserve it!

  5. Anacleto

    Funciona Perfectamente!!, gracias desde España

Leave a Reply to Juan Prado Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: