raspberry pi

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
address 192.168.2.120
netmask 255.255.255.0
gateway 192.168.2.1

Hope this helps someone in the same boat.

Discussion

5 responses to ‘Raspberry PI: Static WiFi IP

  1. 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!

Leave a 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 )

Google+ photo

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

Connecting to %s