0

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 169.254.159.134 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=169.254.159.120 (assigned same class IP).also had trials with IPs like .121,.101,.133 etc.

-pinged 169.254.159.120 (considering the assigned IP to Rpi)

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

-cannot SSH into the newly assigned IP 169.254.159.120 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 :) – turmoilawaits Jun 9 '14 at 11:09
1

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 192.168.1.1 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 198.168.1.1, 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 '14 at 14:14
0

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
address 169.254.159.120
netmask 255.255.0.0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.