I've been trying to reconfigure my second Raspberry Pi after half a year since the first one. When I refer back my old notes (which worked for the first one), I could not get the static IP working for the second R-Pi. Could it be possibly due to the different internet setting? (I'm currently using my campus LAN)

my /etc/network/interfaces looks like this:

auto lo
iface lo inet loopback
iface eth0 inet static


allow-hotplug wlan0
auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

However after I did a

$ sudo /etc/init.d/networking restart

and ifconfig it does not give me any address.

What's wrong with my configuration? Another question, can I have both Ethernet and WiFi dongle connected?

  • And there's no other device with this ip present in your network ?
    – umeli
    Commented Dec 20, 2013 at 8:50

3 Answers 3


You have a typo in your config file - broadcasr should be changed to broadcast. Fix that and try again.

Also, please add auto eth0 line to your config, preferably just before iface eth0 inet static line. This line tells Debian to start this interface automatically at boot. Without it, you have to run some commend like ifup eth0 to configure your interface.

  • opps sorry. that's a typo here. but it's correct in my config file.
    – yvonnezoe
    Commented Dec 20, 2013 at 8:30
  • @yvonnezoe: Just spot another problem and updated my answer. Commented Dec 20, 2013 at 8:48
  • Even though I had all the static ip addresses information entered exactly as they should be, Raspberry PI refused to make any connection through wired or wireless connection. As soon as I entered auto eth0 in the file, saved it and rebooted the PI, it automatically made the Internet connection and this time stayed connected. Thanks.
    – ThN
    Commented Jul 27, 2016 at 18:02

If you are on a campus LAN you should almost certainly be using dhcp, not static

iface eth0 inet dhcp

You also may have to kill dhclient if you don't restart after making the changes.

$ sudo killall dhclient

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.