I am trying to assign an IP address to Rpi

-connected to internet on my laptop through wifi

-changed LAN settings to obtain IP automatically

-connected Rpi to laptop via network cable

-ipconfig yields as ethernet adapter IPV4

-switched rpi off .took out SD card(running wheezy pi) and plugged it into laptop

-updated cmdline.txt file with ip= (assigned same class IP).also had trials with IPs like .121,.101,.133 etc.

-pinged (considering the assigned IP to Rpi)

-error in cmd says "host destination unreachable" while pinging is ok.

-cannot SSH into the newly assigned IP putty says 'network connection timeout'

-installed xming on windows

-I'm stuck at this step,need genuine help.why an assigned IP in the same class to rpi won't work,can anyone explain,that would be great help

  • I later found out that sshd service was not running,which is why it failed to connect remotely connect Rpi to a display first and then run /etc/init.d/sshd start .once done ..run xming on windows and you're good to go :) Jun 9, 2014 at 11:09

2 Answers 2


Can you do this from your routers administration page, this may be far easier to setup and maintain, as any new os installs on your RPI will still be assigned the same IP.

Edit: You can generally access your routers admin screen by typing in a browser.

  • +1 Telling the router to assign a fixed IP based on the RPI's ethernet MAC address is the way to go. You can find this via ifconfig. Not all routers use, BTW. Also note that the MAC address of a wifi dongle attached to the pi is not the same as the ethernet one.
    – goldilocks
    Mar 15, 2014 at 14:14

I suspect what's happening here is that the Pi is over-riding the boot time specified IP address when the networking service starts. If you can mount the SD card's linux file system, try changing the /etc/network/interfaces file to add the static IP, and then remove it from cmdline.txt.

iface eth0 inet static

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.