Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently got given a Raspberry Pi and I would like to be able to remote into it using puTTy from my laptop so I don't have to sit next to my tv with a keyboard and mouse to use it. I am able to get a puTTy session going when I know the IP address that my router has given the Pi on each session but it keeps changing on each reboot as I would expect.

So I followed a number if instruction to go about configuring the RPi to keep a static IP address. This involved changing the file at '/etc/netwrok/interfaces' which now contains (password removed):

auto lo

iface lo inet loopback
iface eth0 inet static

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
        wpa-ssid "BeBoxD304BF"
        wpa-psk "**********"

Despite this however, each time I reboot my RPi it gives me a new dynamic IP address still. I also noticed that in the 'ifconfig' output below that the details of the eth0 doesn't contain IP details for inet addr, Bcast or Mask which have been present in all other examples I have seen online.

eth0      Link encap:Ethernet  HWaddr b8:27:eb:b5:95:da
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback
          inet addr:  Mask:
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr 00:87:c6:00:33:77
          inet addr:  Bcast:  Mask:
          RX packets:918 errors:0 dropped:0 overruns:0 frame:0
          TX packets:277 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000

Also I'm not sure if this is relevant but it can't hurt! The file at '/etc/resolv.conf' contains:

domain config
search config

..I heard it might mean something on one of the pages I was looking at. I would be very grateful for any help with this. I have tried everything I can think of and would really like to get this working this weekend so I can use it from work.

share|improve this question

migrated from Dec 8 '12 at 22:19

This question came from our site for professional and enthusiast programmers.

The distro matters more than the hardware. – Ignacio Vazquez-Abrams Dec 8 '12 at 22:13
up vote 2 down vote accepted

I'm guessing you're using wireless. If so you need to configure a static IP for your wireless interface (wlan0). You now configured your wired interface (eth0) to use a static IP.

share|improve this answer
That looks like it did the trick, I'm guessing this was a pretty dumb question for those in the know. I'm very new to anything networking. Thanks for taking the time siebz0r. – JonnyIrving Dec 8 '12 at 22:27
No problem, glad I could help. Marking the answer as accepted is all the thanks I need. ;-) – siebz0r Dec 8 '12 at 22:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .